Skip to content

UI AQA Flow

TL;DR

Use ui-aqa-flow when you need Rosetta-guided automated UI test work tied to a real TestRail case or QA scenario. The workflow gathers TestRail and Confluence context, clarifies assertions, analyzes existing test architecture, identifies selectors without guessing, implements the test, then stops so you can run it and return the report.

This is a strict sequential workflow. Phases build on each other, agents/TEMP/<FEATURE>/ui-aqa-state.md is updated after each phase, and the coding agent must not skip ahead. Mandatory user interaction happens in Phase 2, Phase 6, Phase 7, and Phase 8. Phase 4 asks for page HTML only when frontend code or stable selectors are not available.

When To Use This Workflow

When Not To Use This Workflow

Before You Start

Prepare the inputs this workflow explicitly depends on:

You also get better results when the project already has strong shared Rosetta context. Keep shared setup in Usage Guide, especially docs/CONTEXT.md, docs/ARCHITECTURE.md, and docs/TECHSTACK.md.

How To Start

Typical prompts:

/ui-aqa-flow Automate TestRail case C12345 for the checkout confirmation flow.
/ui-aqa-flow Create UI automation for the registration success scenario using TestRail case 5678 and Confluence page https://...
/ui-aqa-flow Analyze this failing automated test report for case C9012 and prepare corrections.
/ui-aqa-flow Extend the existing checkout automation with a new TestRail scenario and reuse current Page Objects.

How Rosetta Shapes This Workflow

Rosetta provides the instructions. The coding agent executes them. Rosetta itself does not read your source code or test data.

For this workflow, the always-active Rosetta behavior changes the user experience in these ways:

Workflow At A Glance

Phase What you provide What the coding agent does What you get Mandatory workflow stop
1. Data Collection TestRail case, Confluence reference, slug confirmation Reads external QA/business context and creates the test plan plans/ui-aqa-<test-name>/test-plan.md, initial state file None
2. Requirements Clarification Answers about assertions, data, edge cases, scope Runs gap analysis over the plan and turns vague steps into explicit, typed, measurable assertions Updated test plan with ### Explicit Assertions, edge cases, test data rules Mandatory user answers before Phase 3
3. Code Analysis Repository test code, project docs, user instruction files Analyzes framework, conventions, Page Objects, similar tests, helpers, optional frontend code plans/ui-aqa-<test-name>/code-analysis.md with architecture findings and target test location None
4. Selector Identification Frontend code if available, otherwise page HTML when requested Maps test steps to UI elements and identifies missing selectors without guessing Selector map in the plan, page-source request if needed Mandatory user input only if selectors cannot be grounded from code
5. Selector Implementation Approval for any fragile selector Adds selectors or Page Object methods using current project conventions Updated Page Objects and test plan None
6. Test Implementation Approved assertions and reusable test architecture Implements the automated test, validates it locally (lint-clean), and stops before execution Test file plus the ## Test Implementation record in the plan Mandatory user execution before Phase 7
7. Test Report Analysis Test report path, logs, or output Reads report, classifies failures per the UI taxonomy, analyzes root causes with evidence labels, inspects page source for selector errors plans/ui-aqa-<test-name>/failure-analysis.md Mandatory user handoff of report/output
8. Test Corrections Explicit approval for proposed fixes Prepares before/after fixes, waits for exact approval tokens, applies approved changes with lint checks Corrected test/Page Objects and re-test guidance Explicit approval required before changes

Recommended review still matters throughout the workflow, but those checks are advisory checkpoints, not extra mandatory stops.

Workflow Overview

flowchart TD
    A[Start UI AQA request] --> B[Phase 1 Data Collection]
    B --> C[Phase 2 Requirements Clarification]
    C --> C1{User answered?}
    C1 -- No --> C2[Wait for answers]
    C2 --> C1
    C1 -- Yes --> D[Phase 3 Code Analysis]
    D --> E[Phase 4 Selector Identification]
    E --> E1{Selectors grounded from frontend code?}
    E1 -- Yes --> F[Phase 5 Selector Implementation]
    E1 -- No --> E2[Request page HTML and wait]
    E2 --> E3[Analyze provided page sources]
    E3 --> F
    F --> G[Phase 6 Test Implementation]
    G --> G1[Stop - user runs the test]
    G1 --> H[Phase 7 Test Report Analysis]
    H --> H1{Test passed?}
    H1 -- Yes --> J[Finish]
    H1 -- No --> I[Phase 8 Test Corrections]
    I --> I1{User approved fixes?}
    I1 -- Yes --> I2[Apply approved changes]
    I2 --> G1
    I1 -- No --> H

Interaction Flow

sequenceDiagram
    autonumber
    participant U as User
    participant R as Rosetta Instructions
    participant A as Coding Agent
    participant X as External Systems
    participant F as Workspace Files

    U->>A: Request automated UI QA work
    R-->>A: Enforce sequential phases, no assumptions, state tracking
    A->>X: Read TestRail case and Confluence context
    A->>F: Create plans/ui-aqa-test-name/test-plan.md and state file
    A->>U: Ask clarification questions for assertions, scope, data, edge cases
    U->>A: Provide answers
    A->>F: Update plan with explicit typed assertions
    A->>F: Analyze project docs, user instructions, tests, Page Objects, helpers
    alt Frontend selectors available
        A->>F: Record selectors from frontend code
    else Selectors missing
        A->>U: Request page HTML for specific elements
        U->>F: Add files under plans/ui-aqa-test-name/page-sources/
        A->>F: Read page source files and choose selectors
    end
    A->>F: Update Page Objects and implement test
    A->>U: Stop and ask user to run the test
    U->>A: Provide test report or output
    A->>F: Write failure analysis with root causes
    A->>U: Present proposed corrections for approval
    U->>A: Approve with exact token
    A->>F: Apply approved changes and update state

Phases

Phase 1: Data Collection

Goal:

What you provide:

What the agent does:

What to watch for:

Phase 2: Requirements Clarification

Goal:

What you provide:

What the agent does:

What to watch for:

Phase 3: Code Analysis

Goal:

What you provide:

What the agent does:

What to watch for:

Phase 4: Selector Identification

Goal:

What you provide:

What the agent does:

What to watch for:

Phase 5: Selector Implementation

Goal:

What you provide:

What the agent does:

What to watch for:

Phase 6: Test Implementation

Goal:

What you provide:

What the agent does:

What to watch for:

Phase 7: Test Report Analysis

Goal:

What you provide:

What the agent does:

What to watch for:

Phase 8: Test Corrections

Goal:

What you provide:

What the agent does:

What to watch for:

How To Review Results

Workflow-Specific Customization

Artifacts You Will Get

Per run, under plans/ui-aqa-<test-name>/:

Plus: agents/TEMP/<FEATURE>/ui-aqa-state.md (phase status, key artifacts, resume anchor) and the modified/created Page Object and test files.

Common Mistakes

Source Files

Authoritative source workflow and phases:

Shared skills: qa-knowledge, qa-structure, data-collection