Skip to main content
Bugzy’s test-engineer subagent handles the full lifecycle of test code — generating new Playwright scripts, debugging failures, auto-fixing broken tests, and maintaining the suite as your application changes.

Test generation

When creating new tests, the test engineer:
  1. Reads test cases (from markdown files or an external TMS like Zephyr Scale)
  2. Generates Playwright TypeScript test scripts with proper assertions
  3. Creates Page Object classes for reusable interactions
  4. Adds appropriate waits, retries, and error handling
  5. Tags tests with @smoke, @regression, or custom tags
Generated tests follow your project’s existing patterns. If you have an established test suite, the agent reads your CLAUDE.md conventions and matches your style.

Auto-fixing

When a test fails due to a test issue (not a product bug), the test engineer automatically:
1

Analyze the failure

Reads the error message, stack trace, and screenshots to identify the root cause.
2

Identify the fix

Determines whether the issue is a stale selector, a timing race, an outdated assertion, or a changed page structure.
3

Apply and validate

Modifies the test file, re-runs the test to confirm the fix works.
4

Retry if needed

If the first fix doesn’t work, tries an alternative approach — up to 3 total attempts.
5

Commit the fix

Once validated, commits the fix to the repo so the suite stays green.

Knowledge base

The test engineer builds and consults a knowledge-base.md file that captures:
  • Application structure and navigation patterns
  • Common selectors and interaction patterns
  • Known flaky areas and workarounds
  • Corrections from disputed findings
This knowledge base improves over time. Corrections from your team feed directly into future test generation and fixing decisions.

Test maintenance

As your application evolves, existing tests may break due to UI changes, new authentication flows, or restructured pages. The test engineer handles this during every test run:
  • Updates selectors when elements are moved or renamed
  • Adjusts assertions when expected behavior changes intentionally
  • Refactors Page Objects when page structure changes significantly

Learn more

Extend test coverage

The full test generation workflow from plan to automation.

Triage failures

How failures are classified and how auto-fix fits into triage.