lecture 10 of 120 completed

What a generated test costs after it is written

One tool wrote 10 tests for a page and another wrote 46. Writing them cost almost nothing. This lecture counts what each file costs after that, with the numbers from our runs.

What you'll learn

  • The costs that start after a test is merged: run time, failures to read, review and repairs
  • Why the number of tests is a poor measure of a test file
  • What a coding tool reports as its own cost, and what a token is
  • How to decide which generated tests to keep

Two test files for the same page are waiting for your review. A tool wrote each of them in a few minutes.

  • The first has 10 tests in 95 lines.
  • The second has 46 tests in 360 lines.

Both pass. Most people would call the second one better, because it has more tests.

Writing these files cost almost nothing, and that is new. A test file used to cost a day of somebody's time, so nobody wrote 46 tests without a reason. Now the cost of writing is close to zero, and the other costs have not changed. They start when the file is merged. To merge a change is to add it to the team's shared code.

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