HOW AI TESTS SOFTWARE / JASON ARBON

Part 4: Tests become intent

Same course, a reading layout. Presentation animations are omitted. Examples, prompts, diagrams and teaching notes stay together. Interactive exercises open separately.

Open matching presentation section →

All course materials. This HTML reading edition omits presentation animations; use the presentation view for animations.

Offline reading edition. All 27 sections and course media are included in this file. Interactive exercises and external links need an internet connection.

156 / 247

PART 4
TESTS BECOME INTENT

One intent.
Many ways to execute it.

Ask → Test Brief → HarnessUse ← → to present · Lessons to jump · Mobile scrolls vertically
Open this section in the presentation →

157 / 247

LECTURE 4.01

Keep the promise. Adapt the path.

IN THIS LECTURE

Convert procedural steps into a reusable intent with explicit expected outcomes.

HOW AI TESTS SOFTWARE TESTS BECOME INTENT

Open this section in the presentation →

158 / 247

PART 4 / WHAT YOU WILL LEARN

Keep the intent.
Change the execution.

01

Spot the coupling

See how manual steps and coded workflows become tied to one version of a product.

02

Make tests portable

Express the goal and expected outcome. Let an agent adapt the route across devices and applications.

03

Keep the evidence

Record journeys, reuse existing tests, and hand off reproducible findings—not just a claim that it worked.

Ask → Test Brief → HarnessUse ← → to present · Lessons to jump · Mobile scrolls vertically
Open this section in the presentation →

159 / 247

PART 4 / THE STARTING POINT

A manual test binds a person to a path.

TESTBUCKS · MANUAL CASE TC-014

Add a medium vanilla latte

Objective
Verify that the cart contains the selected drink at the correct price.
Setup
Empty cart. Medium vanilla latte costs $4.50. No extras.
Steps
  1. Open Menu → select Vanilla latte.
  2. Choose Medium → click Add to cart.
  3. Open Cart.
Verification
One medium vanilla latte · quantity 1 · item price $4.50.
Ask → Test Brief → HarnessUse ← → to present · Lessons to jump · Mobile scrolls vertically
Open this section in the presentation →

160 / 247

PART 4 / THE SAME CASE IN CODE

Automating the path hard-codes it.

C# · PLAYWRIGHT · ILLUSTRATIVE PAGETEST METHOD
[Test]
public async Task AddMediumLatte()
{
    await Page.GotoAsync(TestBucksUrl);
    await Page.Locator("#menu").ClickAsync();
    await Page.Locator("#vanilla-latte").ClickAsync();
    await Page.Locator("#medium").ClickAsync();
    await Page.Locator("#add-to-cart").ClickAsync();
    await Page.Locator("#cart").ClickAsync();

    await Expect(Page.Locator(".cart-item"))
        .ToHaveTextAsync("Medium vanilla latte × 1");
    await Expect(Page.Locator(".item-price"))
        .ToHaveTextAsync("$4.50");
}
New UI: #add-to-cart becomes #add-to-bag
Timeout → failed test → team investigation
Illustrative selectors and assertions; adapt to the actual app.
Ask → Test Brief → HarnessUse ← → to present · Lessons to jump · Mobile scrolls vertically
Open this section in the presentation →

161 / 247

PART 4 / FROM PROCEDURE TO INTENT

Keep the promise. Adapt the path.

TESTBUCKS · AN INTENT-BASED TEST

“Purchase a vanilla latte.”

A short prompt: the goal, expected outcome, and constraints.

Buy one medium vanilla latte from TestBucks using a simulated payment. Verify the saved order contains the right drink, quantity, and price, and that payment is recorded exactly once.
Goal + expected outcome→AI chooses the steps

Require a sequence only when the sequence matters.

Ask → Test Brief → HarnessUse ← → to present · Lessons to jump · Mobile scrolls vertically
Open this section in the presentation →

162 / 247

OpenTest.ai test-case format · refresher

otai/testcase · v1 · TestBucks example
{
  "title": "Add one vanilla latte",
  "goal": "One latte, $4.50; no order placed."
}
OPTIONAL STEP DETAIL · FIELD OUTLINE
"steps": [{
  "description": "What the user does",
  "thinking": "Brief test rationale",
  "action": "click",
  "target": "Add to cart",
  "value": "",
  "expected": "One latte in the cart"
}]

Keep the intent small.

title names the test. Add goal to make success and constraints explicit.

Steps are optional.

Specify them only when useful. Let the agent derive actions from the current interface.

Preserve the expected outcome.

When you include steps, use meaningful targets and explicit checks—not brittle selectors by default.

Portable JSON. A clear goal.
Not generated test code.

Field excerpt, not the full schema · Optional actions: navigate, click, fill, select, press, wait, assertOpenTest.ai ↗
Open this section in the presentation →

163 / 247

LECTURE 4.02

Reuse intent across surfaces

IN THIS LECTURE

Adapt one purchase intent across devices and similar apps without losing its checks.

HOW AI TESTS SOFTWARE TESTS BECOME INTENT

Open this section in the presentation →

164 / 247

Intent-based tests are portable across devices.

AI coding agentCopy for desktop agent▶ PlayBuy one vanilla latte. Verify the drink, quantity, price, and order confirmation.
DESKTOP · TESTBUCKS
TestBucksMenuRewardsStoresAccountCart
⌕ Search drinks
Vanilla latte
+↖
ESPRESSO CLASSICS

Vanilla latte

Espresso, steamed milk,
and a little vanilla.

SmallMediumLarge
Milk: Whole ▾
$4.50Add with + on the photo

Review your cart

Vanilla latte
Vanilla latte

Medium · Whole milk

−   1   +   Remove
$4.50
Promo code +
Pickup: Downtown
Pay $4.50↖
ORDER #104

Thanks! Your latte is on its way.

Vanilla latte
Vanilla latte × 1

Medium · Paid $4.50
Pickup: Downtown

✓ Vanilla latte purchased
View receiptTrack orderOrder again
Photo + → Cart & payment → Order confirmation
SAME
INTENT
↔

Different layout.
Different steps.
Same outcome.

MOBILE
TestBucks
STEP 1 / 3

Open the menu

Vanilla latte

Coffee → Lattes

Choose vanilla↖
STEP 2 / 3

Quick checkout

Vanilla latte

Vanilla latte · $4.50

Pay $4.50↖
STEP 3 / 3

Ready for pickup

Vanilla latte

1 vanilla latte · Paid

See order↖
✓ Vanilla latte purchased
Open the menu → Quick checkout → Ready for pickup

Same intent. Different devices and implementations. AI works out the route.

Animated practice example · Simulated purchaseDesktop + mobile · One saved intent
Open this section in the presentation →

165 / 247

Intent-based tests travel across similar apps.

AI coding agentCopy for desktop agent▶ PlayBuy one vanilla latte. Verify the drink, quantity, price, and order confirmation.
CATALOG ORDERING
TestBucks
Coffee · Bakery · Rewards
Vanilla latteVanilla latte · $4.50
+ Add to bag↖
SHOPPING BAG / 1 ITEM

Your daily coffee.

Vanilla latte × 1
Pickup Downtown
Total $4.50
Pay for order↖
ORDER #104

Thanks, coffee lover.

1 vanilla latte
Paid $4.50
Downtown pickup
✓ Order confirmed
Browse product → Add to bag → Pay
BUILDER ORDERING
Testin’ Donut
LET’S GET YOU GOING

Where’s your pickup?

⌕ City or ZIP code
Downtown0.4 mi · Ready in 5 min
Order here →↖
Central Station · 1.2 mi
STORE ✓   /   DRINK   /   PAY

Build your latte

Hot ●Iced ○
SmallMediumLarge
Flavor Vanilla ▾
Express pay · $4.25↖
PICKUP NUMBER27You’re in!1 medium vanilla latte
Paid $4.25 · Downtown
✓ Order confirmed
Choose store → Build drink → Express pay
QUICK-ORDER ORDERING
Tim Testons
⌕ Search: vanilla latte
MENU MATCHES
Vanilla latte$4.75
+↖
Vanilla cold brew$4.25
Menu   /   Offers   /   My order
MENU / VANILLA LATTE

Make it yours

Size Medium ▾
Milk Whole ▾
Quantity −   1   +
Place order · $4.75↖
TAKEOUT / MAIN STREET

See you soon.

✓ Paid   →   Preparing
Vanilla latte × 1
Medium · $4.75
✓ Order confirmed
Search menu → Customize sheet → Collect

Three coffee shops. Three different flows. One test intent.
Save what you want verified—not each app’s clicks.

Fictional coffee shops · Animated simulated purchasesOne intent → app-specific execution
Open this section in the presentation →

166 / 247

LECTURE 4.03

Record a journey. Replay its intent.

IN THIS LECTURE

Extract the purpose of a recorded TestBucks journey and replay it through a changed interface.

HOW AI TESTS SOFTWARE TESTS BECOME INTENT

Open this section in the presentation →

167 / 247

Record the journey. Save the intent.

LEGACYRecord clicks→The interface changes→✕ Playback breaks
01 / DEMONSTRATE

Watch me order.

Record the vanilla-latte journey.

→
02 / SAVE INTENT

Keep the goal.

Buy one vanilla latte. Verify the item, price, and confirmation.

→
03 / AI PLAYBACK

Work out today’s steps.

AI follows the intent through the current interface.

✓ Intent completed
AI coding agentCopy for desktop agent▶ PlayWatch me order a vanilla latte. Save what I demonstrate as an intent-based test, including what success looks like. Execute that saved intent next time.

With desktop observation enabled, the coding agent can watch your workflow.
Ask it to save the intent—not a brittle recording of clicks.

Open this section in the presentation →

168 / 247

PAUSE AND PRACTICE

Record once, replay intelligently

Exercise home
Review your result
Copy prompt for your AI coding agentPaste into a desktop agent with browser access.▶ PlayPaste it into a browser-capable agent. Run it there.
1 · Execute a flow→2 · Save the intent→3 · Replay it
Use your browser tools to explore https://howaitestssoftware.com/testbucks/. Find a vanilla latte and inspect its sizes and customization options without adding it to the cart.

Record the flow you actually execute. Save its goal and expected outcomes as a JSON array of OpenTest.ai test-case objects in latte-intent.json: https://opentest.ai/#testcase. Preserve required constraints, not selectors or a fixed click path.

Then start fresh and execute that saved intent again. Choose the current controls dynamically. Keep the intent unchanged; save evidence separately and compare the two runs.

Use the public fictional TestBucks practice shop. Begin each run at Home with the customization dialog closed. Do not submit orders or payments. Report PASS, FAIL, or BLOCKED with evidence; never invent success.

Same workspace for both runs. No browser tools? Enable them first. An unchanged site demonstrates replay—not adaptation to a changed UI.

Open this section in the presentation →

169 / 247

LECTURE 4.04

Turn legacy tests into reusable intent

IN THIS LECTURE

Keep fix-ready findings and preserve meaningful coverage when converting old scripts.

HOW AI TESTS SOFTWARE TESTS BECOME INTENT

Open this section in the presentation →

170 / 247

OpenTest.ai bug format · refresher

otai/bug · v1 · ARRAY OF ISSUES
[
  {
    "bug_title": "Pay button overlaps total at 200% text",
    "bug_reasoning_why_not_a_bug": "Check whether browser zoom caused the overlap",
    "what_type_of_engineer_to_route_issue_to": "Checkout UI engineer",
    "prompt_to_fix_this_issue": "Reflow checkout into one column. Retest enlarged text and keyboard access."
  }
]

Illustrative example with selected fields, not a finding from the screenshot exercise.

opentest.ai/#bug-format

Challenge the finding

Keep a counter-argument with the issue.

Route the work

Identify the engineering specialty needed.

Include a fix prompt

Give the next agent a concrete repair task.

Carry the evidence

Add page, console, and network context when available.

Adapted from the STARWEST OpenTest.ai schema slideSelected fields · Consult the full schema for validation
Open this section in the presentation →

171 / 247

AI-format bugs are ready to fix.

OPENTEST.AI BUG

Duplicate latte in cart

Expected
One latte after one Add action.
Actual
Two lattes appear.
Evidence
Screenshot, request trace, reproduction.
→
SAVE FOR THE TEAM

Jira

Store the structured issue and evidence.

→
OR PASS IT BACK IMMEDIATELY

AI coding agent + write access

Read bug→Fix code→Retest

✓ One latte. One Add action. Verified.

AI coding agentCopyOpen in ChatGPT▶ PlayUse the OpenTest.ai bug format schema to reproduce the failure, fix the code in the authorized workspace, and rerun the test. Verify the expected outcome and check for regressions.

A game changer: take the tester—and the developer—out of the routine find–fix–retest loop.

The farthest-left shift possible.

Structured evidence → actionable fix → verified resultAuthorized code changes · Existing review and release controls remain
Open this section in the presentation →

172 / 247

Keep the coverage. Replace brittle steps.

Millions invested in frameworks, test cases, and automation?
Keep the knowledge. Bring it forward.

PUT IT IN THE PROJECT FOLDER

Your existing test assets

Java + Selenium automation
Manual test-case definitions
Frameworks, assertions, and data

→AI CONVERTS
OPENTEST.AI TEST-CASE FORMAT

AI-first intent definitions

{
"title": "Order a vanilla latte",
"goal": "One latte purchased;
correct price and confirmation."
}

Preserve the goal and expected outcome.
Let AI execute the steps.

AI coding agentCopyOpen in ChatGPT▶ PlayRead the legacy tests in this folder. Convert them to OpenTest.ai intent-based test cases. Preserve the business rules, assertions, data variations, and expected outcomes. Save the intent definitions for AI execution.

Yes, AI can port Java + Selenium to TypeScript + Playwright.

The bigger move: reuse your investment as intent—not another generation of scripts.
AI can do almost all of the transformation for you.

Open this section in the presentation →

173 / 247

PAUSE AND PRACTICE

Convert legacy scripts to intent tests

Exercise home
Review your result

Choose one. Copy the prompt into your AI coding agent.

OPTION 1 / BRING YOUR OWN

Already have scripts?

Copy · Convert my scriptsPaste into a desktop agent with browser access.▶ Play

Attach your scripts or point the agent to their folder.

  • Preserve goals, assertions, and constraints.
  • Replace brittle steps with OpenTest.ai intents.
  • Map coverage and flag gaps.

Convert the existing test scripts I attach or identify in this workspace into intent-based tests. Read them without modifying the originals. Preserve their goals, business assertions, essential ordering, and safety constraints—not brittle selectors, fixed sleeps, or incidental click paths. Flag ambiguous requirements; do not guess. Return a JSON array of OpenTest.ai otai/testcase v1 objects using https://opentest.ai/#testcase. Save it as converted-intents.json and map each intent to its source test. Explain any coverage gaps. This is conversion, not execution; do not claim tests passed.

OPTION 2 / START WITH TESTBUCKS

No scripts? Make five.

Copy · Generate + convert five testsPaste into a desktop agent with browser access.▶ Play

Java + Selenium → intent-based tests

  • Inspect TestBucks in the browser.
  • Generate five Java + Selenium tests.
  • Convert to intents; check every assertion.

Inspect TestBucks, a fictional Starbucks-like coffee shop, at https://howaitestssoftware.com/testbucks/. Use your browser tools to understand the current UI. Generate five short Java/Selenium tests: browse the menu, customize a latte, add it to the cart, change quantity, and remove an item. Use observed controls and meaningful assertions; flag unsupported features instead of inventing them. Then convert all five scripts to a JSON array of OpenTest.ai otai/testcase v1 objects using https://opentest.ai/#testcase. Save the Java files and testbucks-intents.json. Show how each assertion survived without hard-coded selectors or click paths. Use synthetic data; do not submit orders or payments. Distinguish generated code from tests actually executed.

Review the mapping: did every meaningful assertion survive? Conversion is not proof that the new tests pass.

Open this section in the presentation →

174 / 247

LECTURE 4.05

Make outcomes observable

IN THIS LECTURE

Expose useful TestBucks state so a test can verify the result reliably.

HOW AI TESTS SOFTWARE TESTS BECOME INTENT

Open this section in the presentation →

175 / 247

Make state observable. Make tests reliable.

TestBucks: expose cart state, name controls, and reset test data.

THE OLD HANDOFF

Ask. Explain. Wait. Maintain.

Design test interfaces.
Request markup and data IDs.
Coordinate changes with engineers.
Maintain the testing hooks.

AI coding agent

“Make this application testable.”

✓ Stable controlsAccessible names + data-testid
✓ Repeatable setupSynthetic fixtures + reset hooks
✓ Observable outcomesStructured logs + explicit states
✓ Controllable failuresInject timeouts + dependency errors
AI coding agentCopyOpen in ChatGPT▶ PlayMake TestBucks easier to test. Add stable identifiers, repeatable test data, clear outcome signals, and test-environment hooks for failures. Preserve product behavior. Verify the changes.

Verify the original behavior after improving the testing hooks.

Open this section in the presentation →

176 / 247

PAUSE AND PRACTICE

Make TestBucks more testable

Exercise home
Review your result

One small change: make the cart total easy to find reliably.

Loading prompt + TestBucks source…Paste into your AI coding agent.
BEFORE / DEPENDS ON THE LAYOUT.cart > div:nth-child(4)
→
AFTER / NAMES THE MEANING[data-testid="cart-total"]
Make a separate copy of TestBucks. Add a stable data-testid="cart-total" to the final cart total—even after the cart re-renders. Keep its appearance and behavior unchanged. Verify the total can be found after changing quantity.

Done when: the total is easy to locate, its value updates correctly, and the original app is untouched. Selectors above are illustrative.

Open this section in the presentation →

177 / 247

LECTURE 4.06

Plan a bounded load test

IN THIS LECTURE

Define traffic, metrics, and stop limits before asking agents to coordinate a load test.

HOW AI TESTS SOFTWARE TESTS BECOME INTENT

Open this section in the presentation →

178 / 247

Ramp safely. Measure real outcomes.

Agree on traffic, duration, spend, and stop limits first.

AI coding agent

Plan. Coordinate.
Analyze.

Ramp the traffic.
Find the failure modes.

→
SUB-AGENT 1Browse menuHTTP traffic ↗
SUB-AGENT 2Search drinksHTTP traffic ↗
SUB-AGENT 3Sign inHTTP traffic ↗
SUB-AGENT 4Update cartHTTP traffic ↗
SUB-AGENT 5CheckoutHTTP traffic ↗
SUB-AGENT 6Order historyHTTP traffic ↗
→
TEST ENVIRONMENT

TestBucks server

Latency · Errors · CPU
Memory · Queues · DB

Record + replay authenticated test sessions↔Correlate failures with logs, traces, and operational data
AI coding agentCopy for desktop agent▶ PlayLoad-test the approved TestBucks staging environment with parallel sub-agents. Record and replay synthetic authenticated sessions. Ramp to the agreed traffic limit, then stress within the approved ceiling. Stop at the error or resource thresholds. Read server metrics and logs, and explain the bottlenecks and failure modes.

Measure latency, errors, and correct orders—not just traffic.

Use test accounts · Agree load, duration, budget, and stop limitsRead-only operational access · No production traffic by default
Open this section in the presentation →

179 / 247

LECTURE 4.07

Inject a fault. Verify recovery.

IN THIS LECTURE

Lose a simulated payment response, retry, and check for exactly one charge and order.

HOW AI TESTS SOFTWARE TESTS BECOME INTENT

Open this section in the presentation →

180 / 247

AI Fault Injection.

Once expensive and rarely used: understand the implementation,
build mocks, and emulate failures deep in the dependencies.

01 / ISOLATE

Clone the source.

Original source 🔒
↓
Disposable test copy

Keep the original untouched.

02 / INJECT + RUN

Ask for different faults.

DependencyTimeout / unavailable
Browser / OSDenied access / failed storage
MemorySimulated allocation failure
Data filesMalformed / truncated input
03 / ANALYZE

How did it cope?

  • Recovered cleanly?
  • Preserved user data?
  • Explained the failure?
  • Avoided duplicate actions?

Evidence → failure modes → fixes

AI coding agentCopy for desktop agent▶ PlayCreate an isolated copy of TestBucks. In that copy only, inject dependency timeouts, storage failures, simulated memory failures, and malformed data. Run each fault separately, compare with the baseline, and report how the app detects, handles, and recovers from it. Keep the original code and production untouched.

AI can add the faults, execute the runs, and analyze resilience.

Open this section in the presentation →

181 / 247

PAUSE AND PRACTICE

Inject a payment timeout and verify recovery

Exercise home
Review your result

The payment went through. The response didn’t. What happens when we retry?

Loading prompt + TestBucks source…Run this in your AI coding agent.
1 / INJECT

Lose the response

Record a mock charge.
Then trigger a timeout.

→
2 / RETRY

Try again

Retry the same purchase
through the browser.

→
3 / VERIFY

One charge. One order.

Check the stored records,
not just the success message.

In a separate local TestBucks copy, simulate a successful payment whose response is lost. Retry the purchase and verify it creates only one charge and one order. Show the evidence.

The shop’s built-in timeout creates no charge. This exercise adds a different fault: charge accepted, response lost. Inspect the ledger after retry.

Open this section in the presentation →

182 / 247

PART 4 / RECAP

What you’ve learned: Tests become intent.

01

Save the purpose

Keep goals, setup, expected outcomes, and safety constraints.

02

Reuse across surfaces

Apply the same intent across devices and similar apps.

03

Record and replay

Extract intent from a journey, then adapt to a changed interface.

04

Make findings fix-ready

Include evidence, ownership, repair prompts, and retest criteria.

05

Improve testability

Expose meaningful state so success can be verified.

06

Explore failure safely

Use isolated copies for fault injection and bounded load tests.

Keep the meaning. Adapt the execution. Verify the promise.

Ask → Test Brief → HarnessUse ← → to present · Lessons to jump · Mobile scrolls vertically
Open this section in the presentation →