What to Test First: the Regression Analyzer
Why This Matters
With an AI that writes tests quickly, the bottleneck moves. Writing a test is cheap; maintaining one is not, and every test you add is one more thing that can break, run slowly or need a heal. “Test everything” is not a strategy. The question becomes: what deserves a test first, and how deep?
That is risk-based testing, which you may know from the ISTQB syllabus. The regression analyzer agent does the legwork: it combines what you know about the business with what it finds in the live product, and proposes a risk profile. You decide; the planner then works through the plans in that order.
What you will learn
- What the regression analyzer does, and what it needs from you
- The analyzer’s tools, from setup to risk profile
- How a risk profile is built and what it contains
- Why the profile needs your review as much as a plan does
- Turning the profile into the order of the plans
The idea: the product is the source of truth
The analyzer agent’s instructions start with one principle: the product is the source of truth, not user stories. Documents drift; the live application is always current. So the analyzer combines three sources:
| Source | Required? | Examples |
|---|---|---|
| You | yes | the business type, compliance needs, risk appetite, the flows that must never break |
| Documents | optional | a PRD, user stories, an architecture note, an existing test plan |
| The live product | yes | the pages, flows, forms and features that actually exist |
The tools
| Tool | What it does |
|---|---|
analyzer_setup | Starts the analysis: URL, product name, risk appetite (startup-mvp, standard, regulated), compliance (e.g. PCI-DSS, GDPR) and the critical flows you name |
analyzer_import_context | Adds context: a file, inline text or a URL, as a PRD, architecture, API spec, test plan or general notes |
analyzer_scan_product | Explores the product (quick, standard or deep), optionally focused on areas such as checkout |
analyzer_build_risk_profile | Builds the risk profile from what was found and what you said |
analyzer_save_profile | Saves it as YAML or JSON in risk-profiles/ |
analyzer_generate_documentation | Writes product discovery documentation, with screenshots, for the planner |
For the shop, a good start:
Use the regression analyzer on https://practiceautomatedtesting.com/shopping. It’s an e-commerce shop, standard risk appetite, GDPR applies. The critical flows are checkout and payment. Then build a risk profile.
The agent calls analyzer_setup with that context, scans the product, and builds the profile. A domain template for e-commerce in the agent’s repository (examples/analysis-context/domain_templates/e-commerce.yaml) describes the standard journeys of a web shop, Purchase Product first, so the analyzer knows what to look for: product listing, cart, checkout, payment, confirmation.
The risk profile
The analyzer scores every feature it found on five factors:
| Factor | Weight |
|---|---|
| Revenue impact | 30% |
| User impact | 25% |
| Frequency of use | 15% |
| Complexity | 15% |
| Compliance | 15% |
The score sets a level: critical (0.8 and up), high (0.6), medium (0.4) or low. Each level gets a test depth and a moment to run:
coverage_recommendations:
critical:
features: ["checkout", "payment"]
test_depth: "comprehensive"
run_on: "every_deploy"
high:
features: ["cart", "search"]
test_depth: "standard"
run_on: "every_pr"
medium:
features: ["filters", "sorting"]
test_depth: "happy_path_only"
run_on: "nightly"
low:
features: ["theme toggle"]
test_depth: "smoke"
run_on: "weekly"
Per feature the profile records the factors, the recommended tests, and, just as important, what to skip:
- name: "Price range filter"
risk_level: "medium"
recommended_tests:
- type: "happy_path"
priority: 1
skip_tests:
- type: "edge_cases"
reason: "Low risk, not worth the maintenance cost"
A profile also lists gaps: things a product of this type usually has, that weren’t found. For the shop, the e-commerce template expects a cart page with quantities and a Remove button; the shop has none. That is the same gap the planner found in lesson 6, from a different direction.
The profile needs your review
The weights and scores look precise; they are judgement. The AI doesn’t know your revenue per feature, your incident history or what your regulator checks. The analyzer agent’s instructions say it directly: after building the profile it must stop, present the summary, and ask you:
- Are the risk levels right?
- Are features missing?
- Do the recommendations need adjusting?
and save it only after your approval. Treat it like a plan: read it, correct it, and only then use it. A profile that rates checkout “medium” because the AI saw little traffic on a test environment will steer the whole suite wrong.
From profile to plans
The profile decides the order of the work in the rest of this course:
- Critical first. Checkout and payment get a plan each, with error cases and every payment method (this is why lesson 6’s plan covers totals, VAT and iDeal).
- High next. The cart and search: the standard paths and the obvious negative cases.
- Medium: happy path only. One test per filter, one combination.
- Low: a smoke test, or nothing. A theme toggle doesn’t need a regression test.
The run_on field maps to your pipeline: critical tests on every deploy, high on every pull request, the rest nightly. With the CI gate (lesson 18) and tags or folders per level, that becomes three jobs.
The planner can start from the analyzer’s output: “Create a test plan for the critical features in risk-profiles/practice-shop-risk-profile.yaml.”
Exercise
- Run the analyzer on the shop with your own business context (pretend it is your company’s shop: what is critical for you?).
- Read the profile. Change at least one risk level you disagree with, and say why.
- Which three plans would you write first? Which features would you deliberately not test, and why is that acceptable?
Show suggested answer
skip_tests with a reason): an explicit “we don’t test this” is a decision; a missing test without a reason is a gap.Exam-style questions
1. What does the regression analyzer treat as the source of truth about the product?
- A. The user stories
- B. The live product, combined with the business context you give it
- C. The existing test suite
- D. The AI’s general knowledge of web shops
Show answer
2. The analyzer rates a feature “low: smoke test only, skip edge cases”. What is the main reason to accept such a recommendation?
- A. The AI is always right about risk
- B. Every test costs maintenance; a low-risk feature isn’t worth deep tests, as long as the decision is explicit
- C. Low-risk features can’t break
- D. Smoke tests find all bugs
Show answer
3. What must the analyzer do after building a risk profile?
- A. Start the planner immediately
- B. Present it, ask whether the levels and recommendations are right, and save it only after your approval
- C. Generate tests for every feature
- D. Delete low-risk features