Sitemap
Data And Beyond

Selected stories around Data Science, Machine Learning, Artificial Intelligence, Programming, and Technology topics. Writing guide: https://medium.com/data-and-beyond/how-to-write-for-data-and-beyond-b83ff0f3813e

Member-only story

Your End-to-End Tests Do Not Need Step Definitions

9 min readOct 8, 2026

--

In this example, I deleted the step definitions from an end-to-end test and handed the plain-English file straight to two AI agents and a real browser. Seven steps passed on the first try in under a minute, for about ten cents, and the one number that mattered was checked by ordinary code, never by the model. This was a single recorded run on a small static demo app, so read the numbers as an illustration, not a benchmark.

Here, an end-to-end test, or E2E, is a script that clicks through the real application the way a user would, to prove the whole thing still works. Gherkin writes that test in plain Given/When/Then English, so a product manager can read it and sign it off. Step definitions are the glue code hidden underneath, the part that says “click the button whose internal name is btn-refund-v2, then wait 300 milliseconds.” The English reads well; the glue code breaks every time the frontend team renames something.

So I removed the glue code. Here the .feature file is the whole test. One agent, the executor, reads each step and carries it out in a real browser with no visible window; a second agent, the evaluator, judges what happened; and plain Python does the rest. On the refund scenario below, all seven steps passed on the first attempt in 58.7 seconds, and the final step…

--

--

Senior data scientist | PhD in Physics

See more from me

Data And Beyond
Data And Beyond

Published in Data And Beyond

Selected stories around Data Science, Machine Learning, Artificial Intelligence, Programming, and Technology topics. Writing guide: https://medium.com/data-and-beyond/how-to-write-for-data-and-beyond-b83ff0f3813e