Keep your tests synchronized with code changes using bugster update
--against-last-update
comparisonsCommand | Description | Example |
---|---|---|
bugster update | Update tests based on git changes | bugster update |
bugster update --update-only | Only update existing tests, no new/delete | bugster update --update-only |
bugster update --suggest-only | Only suggest new tests for added files | bugster update --suggest-only |
bugster update --delete-only | Only delete tests for removed files | bugster update --delete-only |
Flag | Description | Example |
---|---|---|
--update-only | Only update existing specs, no suggestions or deletes | --update-only |
--suggest-only | Only suggest new specs, no updates or deletes | --suggest-only |
--delete-only | Only delete specs, no updates or suggestions | --delete-only |
Flag | Description | Example |
---|---|---|
--against-default | Compare against the default branch instead of HEAD | --against-default |
--against-last-update | Compare against the commit from the last update run | --against-last-update |
--show-logs | Show detailed logs during analysis (deprecated, use —debug) | --show-logs |
Change Type | Action | Example |
---|---|---|
Modified files | Updates existing test specs | Function signature changes → updated test steps |
New files | Suggests new test specs | New component → generates new test file |
Deleted files | Removes obsolete test specs | Removed page → deletes corresponding tests |
Renamed files | Updates file references | Moved component → updates import paths |
Use Case | Command | Description |
---|---|---|
Full maintenance | bugster update | Handle all types of changes |
Safe updates only | bugster update --update-only | Only modify existing tests |
New feature testing | bugster update --suggest-only | Generate tests for new code |
Cleanup after refactor | bugster update --delete-only | Remove obsolete tests |
Branch comparison | bugster update --against-default | Compare against main/master branch |
Incremental updates | bugster update --against-last-update | Only changes since last update |
Scenario | Command | When to Use |
---|---|---|
Pre-commit hook | bugster update --update-only | Before committing changes |
PR automation | bugster update --against-default | In GitHub Actions/CI |
Feature branch | bugster update | After completing feature development |
Refactoring | bugster update --delete-only | After removing old code |
Daily maintenance | bugster update --against-last-update | Regular test maintenance |
--against-last-update
for incremental updates in active development--against-default
is perfect for PR workflows to catch all branch changesbugster run --only-affected
for complete change validation--against-default
and --against-last-update
simultaneously