Generate and run comprehensive tests for your Next.js applications with AI-powered automation.
This is a demo shirt shop built with Next.js to showcase how Bugster can automatically generate and run tests for your web applications. Follow this step-by-step guide to try it from scratch!
curl -sSL https://github.com/Bugsterapp/bugster-cli/releases/latest/download/install.sh | bash -s -- -y
bugster --version
If the command doesn't work, open a new terminal to load the new command.
git clone https://github.com/Bugsterapp/bugster-nextjs-example.git
cd bugster-nextjs-example
npm install --legacy-peer-deps
npm run dev
Your demo shirt shop should now be running at http://localhost:3000
Open your editor:
# With Cursor
cursor .
# or with VS Code
code .
bugster init
# or
bugster init --project-name bugster-nextjs-example --url http://localhost:3000 --no-credentials
This repo already has some tests at .bugster/tests
generated with the bugster generate
command but you can generate more if you want:
bugster generate
Bugster will analyze your Next.js app and automatically generate comprehensive tests
bugster run
Watch 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)
- 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
:
"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