Skip to main content
Keep your test suite synchronized with code changes. The approach depends on your framework: Next.js and React can use the automatic bugster update command, while Angular, Svelte, Vue, and other frameworks use AI-assisted updates with Cursor or Claude Code.
Framework-specific updates: Next.js and React use bugster update command with automatic routing analysis. Angular, Svelte, Vue, and other frameworks use AI assistance with Cursor or Claude Code Agent rules.
In this guide you will learn:
  • How to keep your test suite synchronized with your codebase.
  • How to use different update modes for local development and CI workflows (Next.js & React).
  • How to use AI-assisted updates for other frameworks (Angular, Svelte, Vue & Others).

Prerequisites

  • Bugster CLI installed and authenticated.
  • Run commands from your repo root (the directory containing /.bugster/).
  • For Next.js & React PR automation: the Bugster GitHub App is installed on the repo (document required permissions) and PR previews are available if your flow depends on them.

Framework-Specific Approaches

Automatic bugster update CommandNext.js and React applications can use the bugster update command to automatically:
  • Create tests for new functionality
  • Modify tests impacted by code changes
  • Delete tests for removed features
Available both locally on demand and automatically on pull requests via the GitHub App.Continue reading below for detailed usage instructions.

Usage Modes (Next.js & React)

Local (manual)

Available for: Next.js and React applications with enhanced routing analysis.
Run bugster update when you’re confident about local changes and ready to sync them. The command analyzes committed changes only - both staged and unstaged files are ignored. Only differences between commits are considered for test updates.
Scope flag precedence: If multiple scope flags are provided, the command will error and ask you to specify only one scope option.

Automatic on Pull Requests

Available for: Next.js and React applications with the Bugster GitHub App installed.
When you open a Pull Request, Bugster’s E2E agent runs bugster update first. New commits or force-pushes will amend the existing Update PR rather than creating a new one.
1

Bugster creates an Update PR

Bugster opens a secondary PR targeting your feature branch with the suggested test suite changes.
2

Review the results

The original PR gets a comment with the test results and a link to the “Bugster Update PR”.
3

Approve and merge

You approve and merge the “Bugster Update PR”.
4

Merge your feature

Once the test updates are in, you can merge your feature branch.
Remember to review the Bugster Update PR before merging your feature.
Here is a summary of the flow:

Comparison Baselines (Next.js & React)

Choose the comparison model that fits your development stage:

Last commit (default)

When to use: Small, isolated edits
Scope: Compares your latest commit against the previous commit. Only sees files changed in your most recent commit.

Against default branch

When to use: Before PR / comprehensive sweep
Scope: Compares your current branch against the merge-base with the default branch (e.g., main). Sees all changes in your feature branch.

Since last update

When to use: Tight inner loop without reprocessing
Scope: Compares changes since the last time you ran bugster update. The “last update” state is stored in .bugster/state/last-update-hash and tracks the commit hash from your previous update.

Workflow for Other Frameworks

For Angular, Svelte, Vue, and other frameworks:

Examples (Next.js & React)

Here are common scenarios and the commands to use for Next.js and React applications.

Review Tips

For Next.js & React:
  • Always review the Update PR diff before merging.
  • Keep descriptive commit messages (e.g., bugster: update tests for billing portal flow).
  • If a change looks incorrect, adjust the code or the test, rerun bugster update, and re-review.
For Angular, Svelte, Vue & Others:
  • Review AI-generated test updates in your coding assistant.
  • Ensure tests accurately reflect your code changes.
  • Commit test updates alongside your feature changes.

Summary

Next.js & React: Use the bugster update command to keep your test suite aligned with code changes—locally or automatically on every PR. Angular, Svelte, Vue & Others: Use AI-assisted updates with Cursor or Claude Code Agent rules for intelligent test synchronization.