Chapter 10: Tests

Acceptance test

Also called Gherkin

A test written from what the customer asked for and not from how the code works. Often written in Given, When, Then sentences that a person can read and a tool can run.

It is written before the code exists and from the request, so it is harder for the agent to fit it to whatever it happened to build. A person can also read it and say "that isn't what I meant" before any code gets written.

Say it to your agent

“Before writing any code, write features/refund.feature in Gherkin: Given an order paid yesterday, When the customer asks for a refund, Then the status is refunded and the money is returned once. Stop and let me approve it.”

The workshop

Name a word, or describe what you mean in everyday language.