NewsCrawler.org

Does mutation testing make AI-written tests stronger? A small experiment with specs

AI時代のテスト品質をGoogle・Metaの論文と実験で検証する ─ Mutation Testingは本当に有効なのか?
Image: zenn.dev

The article checks whether mutation testing[1] makes tests written by AI stronger. Thoughtworks' Technology Radar moved mutation testing from Trial in April 2026 to Adopt in November 2026 (Vol.35), because tests written by AI often have high coverage while checking very little.

Claude Code wrote unit tests for automatic renewal logic in car insurance, about 150 lines of code, and 38 hidden bugs that the AI never saw were used to measure the results. The experiment ran three times with a detailed spec and three times with a thin spec. With the detailed spec, the first tests caught 90.4% of the hidden bugs, and adding mutants[2] generated by Stryker[3] raised this to 93.0%; asking the AI to review its tests also gave 93.0%. With the thin spec, the first tests caught 75.4%, and adding mutants raised this to 86.8%.

The mutation score[4] for the detailed spec rose from 79.0% to 92.9%, but only three more hidden bugs were caught. The author concludes that a detailed spec with boundary conditions matters more: its first tests caught more bugs than thin-spec tests with mutation testing added. Strengthening with Stryker cost about 1.7 to 2.5 dollars and 12 to 29 minutes per run. Bugs that change specification-level behavior stayed hard to catch, with 39 to 42 of 54 caught by any method under the thin spec.

Read the original zenn.dev

Sources

  • Zenn JA

    AI時代のテスト品質をGoogle・Metaの論文と実験で検証する ─ Mutation Testingは本当に有効なのか?

    6 likes0 bookmarks0 comments

Published: First seen: Читать по-русски

Open as a page