lecture 9 of 120 completed

Debug a failing test with AI

Two projects had a test that failed on some runs, and we sent the same request for both. In one the app was wrong, and in the other the test was. Both tools told the two apart.

What you'll learn

  • The two causes of a test that fails only sometimes, and how the evidence differs
  • A request that asks for evidence before any change
  • Repairs that hide the cause
  • How many runs you need before you believe a repair

A test fails about one run in three. The other two runs pass, and nothing in the code changed between them. Lecture 6 called this a flaky test.

Most people do the same thing first. They run it again. It passes, and they move on.

We gave that situation to two coding tools, with this request.

full course

Keep reading with the full course

The first 2 lessons of “Work With AI as a QA Engineer” are free. A course plan opens every lesson of this course and its graded practice. It also opens “Review Tests Written by AI”. The same plan includes all lessons for Playwright, Cypress and Selenium.

See course plans →

Read the free lessons first