Skip to main content

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:

SourceRequired?Examples
Youyesthe business type, compliance needs, risk appetite, the flows that must never break
Documentsoptionala PRD, user stories, an architecture note, an existing test plan
The live productyesthe pages, flows, forms and features that actually exist

The tools

ToolWhat it does
analyzer_setupStarts 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_contextAdds context: a file, inline text or a URL, as a PRD, architecture, API spec, test plan or general notes
analyzer_scan_productExplores the product (quick, standard or deep), optionally focused on areas such as checkout
analyzer_build_risk_profileBuilds the risk profile from what was found and what you said
analyzer_save_profileSaves it as YAML or JSON in risk-profiles/
analyzer_generate_documentationWrites 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:

FactorWeight
Revenue impact30%
User impact25%
Frequency of use15%
Complexity15%
Compliance15%

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:

  1. 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).
  2. High next. The cart and search: the standard paths and the obvious negative cases.
  3. Medium: happy path only. One test per filter, one combination.
  4. 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

  1. Run the analyzer on the shop with your own business context (pretend it is your company’s shop: what is critical for you?).
  2. Read the profile. Change at least one risk level you disagree with, and say why.
  3. Which three plans would you write first? Which features would you deliberately not test, and why is that acceptable?
Show suggested answer
1–2. Most people move checkout and payment to critical (money and personal data), and the cart to high. A typical disagreement: the AI rates search critical because it’s on every page; for a shop with ten products, search is high at most, because customers can browse. That is exactly the kind of judgement the AI can’t make from the page alone. 3. First: checkout totals and VAT, payment per method, add to cart (from the grid and the detail pop-up). Deliberately not tested: the theme toggle and the star-rating display. Acceptable because a failure there costs no money, harms no one and would be seen by anyone opening the page, while every test costs maintenance. Write that decision down in the profile (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

Quiz

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
B.
Quiz

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
B.
Quiz

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
Show answer
B.