Generate and run comprehensive tests for your React.js applications with AI-powered automation.
This repository contains three different React.js demo implementations to showcase how Bugster can automatically generate and run tests for your web applications. Follow this step-by-step guide to try any implementation from scratch!
This repository includes three React.js examples:
- Framework: React 19 + Vite + React Router v7
- Features: Full-stack routing with server-side rendering capabilities
- Styling: Tailwind CSS
- Port:
http://localhost:5173
- Framework: React 19 + Vite + TypeScript
- Routing: React Router DOM v7 (client-side only)
- Features: Single Page Application with TypeScript
- Port:
http://localhost:5173
- Framework: React 19 + Create React App
- Language: JavaScript
- Features: Standard Create React App setup with built-in tooling
- Port:
http://localhost:3000
curl -sSL https://github.com/Bugsterapp/bugster-cli/releases/latest/download/install.sh | bash -s -- -ybugster --versionIf the command doesn't work, open a new terminal to load the new command.
git clone https://github.com/Bugsterapp/bugster-reactjs-example.git
cd bugster-reactjs-examplecd vite-react-router-v7
npm install
npm run devcd vite-typescript
npm install
npm run devcd cra-javascript
npm install
npm startYour chosen React application should now be running at http://localhost:5173 (for Vite implementations) or http://localhost:3000 (for Create React App)
Open your editor:
# With Cursor
cursor .
# or with VS Code
code .Navigate to your chosen implementation directory first:
# For React Router v7:
cd vite-react-router-v7
# OR for TypeScript SPA:
cd vite-typescript
# OR for Create React App:
cd cra-javascriptbugster init
# or with specific configuration for Vite implementations
bugster init --project-name bugster-reactjs-example --url http://localhost:5173 --no-credentials
# or for Create React App
bugster init --project-name bugster-reactjs-example --url http://localhost:3000 --no-credentialsAll implementations already have some tests at .bugster/tests generated with the bugster generate command but you can generate more if you want:
bugster generateBugster will analyze your React.js app and automatically generate comprehensive tests
bugster runWatch as Bugster runs the tests it generated for your application
Ready to see Bugster in production? Let's deploy your own version and set up GitHub integration for automatic testing on every deployment.
After testing locally, create your own repository with this code:
Create a new repository
- Create a new repository on GitHub
- From your local directory, update the remote:
git add .
git commit -m "Add Bugster Integration"
git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git
git push -u origin main- Go to Vercel Dashboard
- Click "New Project"
- Import your repository (the one you just created)
- Important: Set the root directory to
vite-react-router-v7,vite-typescript, orcra-javascriptdepending on which implementation you want to deploy - Deploy with default settings
Connect Bugster with GitHub to automatically run tests on every Vercel Preview deployment.
According to the best secure practices, Vercel protects your Vercel Previews, so this step is essential to allow Bugster access to your Previews
- In Vercel Dashboard, go to your project
- Navigate to Settings → Deployment Protection
- Find "Protection Bypass for Automation" and click "Add Secret"
- Save (you can leave the value empty - it will be generated automatically)
- Copy the generated secret
Add the secret to .bugster/config.yaml in your chosen implementation directory:
"x-vercel-protection-bypass": "your-secret-here"Push these changes:
git add .
git commit -m "Add Protection Vercel Bypass Automation token to bugster config.yaml"
git push- Visit Bugster Dashboard
- Connect your GitHub repository
- Test the integration by creating a PR
Create a Pull Request and watch Bugster automatically test your Vercel Preview! 🎉
Found a bug or want to improve the demo? PRs welcome!
Made with ❤️ by the Bugster team