← AI, Me & You☰ All tools

Agile quality with AI: live demos

Two practices, one story. See AI shift learning left and help anyone on the team own the code.

The user story

As an online shopper, I want free delivery when my basket is £50 or more, so that I'm rewarded for bigger orders.
Otherwise delivery costs £4.99. An empty basket has no delivery charge.

A developer has already written the code for this story. Has it been built right? Let's find out.

Demo 1 · Shift learning left

From story to tests, before anyone tests by hand

  1. Click Copy prompt below.
  2. Click Open Claude, paste the prompt and send. Claude writes the acceptance criteria and the test cases, including the edge cases.
  3. Come back here and click Run tests. These are the tests Claude suggests, running against the developer's code right now.
Here is a user story. Write the acceptance criteria in Given/When/Then format. Then list the test cases I need, as a table with: test name, input basket, expected delivery fee. Include the edge cases a team usually misses. Story: As an online shopper, I want free delivery when my basket is £50 or more, so that I'm rewarded for bigger orders. Otherwise delivery costs £4.99. An empty basket has no delivery charge.
Step 2: Open Claude
No internet in class? See the kind of answer Claude gives

Acceptance criteria

  • Given my basket total is £50 or more, when I check out, then delivery is free.
  • Given my basket total is under £50, when I check out, then delivery costs £4.99.
  • Given my basket is empty, when I view delivery, then there is no charge.

Edge cases teams often miss: exactly £50, £49.99 just under, more than one of the same item (quantity), and an empty basket.

The tests

Demo 2 · Collective ownership & T-shaped skills

Anyone can understand, and fix, someone else's code

Three tests failed. The developer who wrote this is on holiday. Can a tester, a BA or a Product Owner work out why? Ask AI.

The developer's code


  

The prompt

  1. Click Copy prompt (it includes the story and the code).
  2. Click Open Claude, paste the prompt and send.
  3. Read Claude's explanation: what the code does, where it doesn't match the story, and the fix.
  4. Back here, click Apply the AI's fix. The changed lines turn green.
  5. Click Run tests again and watch all 6 pass.
Step 2: Open Claude
No internet in class? See the kind of answer Claude gives

In plain English: the code adds up the price of every item in the basket. If the total is over £50, delivery is free; otherwise it charges £4.99.

Where it doesn't match the story:

  1. Line 4 ignores quantity. Two £30 jackets count as £30, not £60, so the customer pays delivery when they shouldn't.
  2. Line 6 uses "more than" instead of "50 or more". A basket of exactly £50 is charged £4.99.
  3. There's no check for an empty basket. An empty basket is charged £4.99.

What could break if we change it: anything else that relies on this total (order confirmation emails, reports) would change too, so re-run all the delivery tests after fixing it.

Your turn (5 min)

Try it on your own work

  1. Pick one of the two prompts below and click its Copy prompt button.
  2. Open Claude and paste the prompt.
  3. Replace the part in [square brackets] with your own story, code, query or formula, then send.
  4. Be ready to share one thing Claude found with the class.

Prompt A · Shift learning left: find the tests your team missed

Here is a user story. Write the acceptance criteria in Given/When/Then format. Then list the test cases I need, as a table with: test name, input, expected result. Include the edge cases a team usually misses. Story: [paste a story from your backlog here]

Prompt B · Collective ownership: understand work you don't own

Explain this to a tester who doesn't code, in plain English. Then: 1. What does it do, step by step? 2. What could go wrong, or what looks like a mistake? 3. What could break if we change it? [paste a piece of code, a SQL query or a spreadsheet formula here]

Don't paste confidential customer data or company secrets into a public AI tool. Use your company's approved AI tool for real work.