name: ‘step-02-identify-targets’ description: ‘Identify automation targets and create coverage plan’ outputFile: ‘{test_artifacts}/automation-summary.md’
Determine what needs to be tested and select appropriate test levels and priorities.
{communication_language}CRITICAL: Follow this sequence exactly. Do not skip, reorder, or improvise.
BMad-Integrated:
Standalone:
{source_dir}If {detected_stack} is frontend or fullstack:
Browser Exploration (if tea_browser_automation is cli or auto):
Fallback: If CLI is not installed, fall back to MCP (if available) or skip browser exploration and rely on code/doc analysis.
Use CLI to explore the application and identify testable pages/flows:
playwright-cli -s=tea-automate open <target_url>playwright-cli -s=tea-automate snapshot → capture page structure and element refsplaywright-cli -s=tea-automate closeSession Hygiene: Always close sessions using
playwright-cli -s=tea-automate close. Do NOT useclose-all— it kills every session on the machine and breaks parallel execution.
If {detected_stack} is backend or fullstack:
Source & API Analysis (no browser exploration):
openapi.yaml, swagger.json) if availableIf use_pactjs_utils is enabled — Provider Endpoint Mapping (all stacks):
When consumer-driven contract tests will be generated, build a Provider Endpoint Map during target identification. This applies to all {detected_stack} values — frontend, backend, and fullstack consumers all need provider scrutiny.
openapi.yaml, openapi.json, swagger.json) — these document the provider’s contract explicitly and can supplement or replace handler code analysis.server/openapi.yaml)| Consumer Endpoint | Provider File | Route | Validation Schema | Response Type | OpenAPI Spec |
| --------------------- | --------------------------------- | ------------------------- | ----------------------------------- | --------------- | ------------------------------------------------- |
| GET /api/v2/users/:id | server/src/routes/userHandlers.ts | GET /api/v2/users/:userId | server/src/validation/user.ts | UserResponseDto | server/openapi.yaml#/paths/~1api~1v2~1users~1{id} |
| POST /api/v2/users | server/src/routes/userHandlers.ts | POST /api/v2/users | server/src/validation/createUser.ts | UserResponseDto | server/openapi.yaml#/paths/~1api~1v2~1users |
TODO — provider source not accessible and note in coverage plan that provider scrutiny will use graceful degradation (see contract-testing.md Provider Scrutiny Protocol)Use test-levels-framework.md to select:
Use test-priorities-matrix.md:
Produce a concise coverage plan:
Save this step’s accumulated work to {outputFile}.
{outputFile} does not exist (first save), create it with YAML frontmatter: ---
stepsCompleted: ['step-02-identify-targets']
lastStep: 'step-02-identify-targets'
lastSaved: '{date}'
---
Then write this step’s output below the frontmatter.
{outputFile} already exists, update:
'step-02-identify-targets' to stepsCompleted array (only if not already present)lastStep: 'step-02-identify-targets'lastSaved: '{date}'Load next step: {nextStepFile}