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

  • Next.js & React
  • Angular, Svelte, Vue & Others
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.
# Full update (create/modify/delete as needed)
bugster update
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:
You create a PR  →  bugster update runs  →  Bugster opens "Update PR" → 
Bugster comments results in original PR → you review/merge Update PR → merge feature PR

Comparison Baselines (Next.js & React)

Choose the comparison model that fits your development stage:
BaselineUse WhenCommand
Last commit (default)Small, isolated editsbugster update
Default branchBefore PR / comprehensive sweepbugster update --against-default
Since last updateTight inner loop without reprocessingbugster update --against-last-update

Last commit (default)

When to use: Small, isolated edits
bugster update
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
bugster update --against-default
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
bugster update --against-last-update
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.
ScenarioCommandUse Case
During active developmentbugster update --against-last-updateTight feedback loop
Before opening a PRbugster update --against-defaultFinal, comprehensive sweep
For small, isolated editsbugster updateDefault mode usually sufficient

Workflow for Other Frameworks

For Angular, Svelte, Vue, and other frameworks:
ScenarioApproachUse Case
Test updates neededUse Cursor or Claude Code with Bugster Agent rulesAI-assisted test updates based on code changes
Review and refineAI coding assistant + manual reviewEnsure tests match your changes
Commit test changesStandard git workflowKeep tests in sync with code

Examples (Next.js & React)

Here are common scenarios and the commands to use for Next.js and React applications.
# Create/modify/delete as needed for just-touched files
bugster update
# Full branch comparison before PR
bugster update --against-default
# Tight inner loop; don't reprocess old changes
bugster update --against-last-update
# Limit to modifications only (no new/deleted tests)
bugster update --update-only
# Generate suggestions for new areas only
bugster update --suggest-only
# Purge tests tied to removed features
bugster update --delete-only
# Combine scope + baseline
bugster update --against-default --update-only

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.