Urgent.News

What's breaking now, across thousands of outlets.

AI

Coverage theatre: your AI hit 90% coverage and still shipped the bug

Your AI assistant just generated tests until the coverage bar turned green. 92%. Ship it? Here's the trap: coverage measures which lines ran , not whether a test would notice when they're wrong . AI made that gap free — you can generate 90% coverage in a minute, all of it happy-path, none of it discriminating. That's coverage theatre: it looks like safety, it measures activity, it proves almost…

Your AI generated tests reached 90% coverage, but the story has a tragic ending: the shipped code still contained bugs. The problem is that coverage measures which lines of code ran during testing, not whether the tests could detect if those lines were wrong. An AI can quickly churn out tests that hit 90% coverage, but those tests are often one-dimensional happy path cases with no real validation.

Just because a line of code was executed doesn't mean the test actually verified the correct behavior of that code. The key question is not "did this code run in a test?" but "would a test fail if this code were broken in some way?" Coverage and AI output often get the first question right, but they routinely fail the second critical question.

The solution is simple but effective: break the code on purpose. Introduce intentional defects, then run the same test suite to see if any tests fail. If the suite stays green despite the defects, the tests are not actually discriminating against bad code. Mutation testing, which systematically introduces defects, is a cheap way to verify the quality of your test suite.

Pairing AI-generated tests with a separate verification suite that can catch defects is essential. Don't rely solely on the coverage bar - check the mutation score too. Coverage tells you what code was hit, mutation tells you what your test suite can actually catch. Remember, high coverage is not evidence of good tests, especially when AI is involved. Treat the green coverage bar as a starting point, not a final answer.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

NIMET partners 3IS on AI chatbot for climate warnings

The Nigerian Meteorological Agency (NiMet) has partnered with 3IS to improve access to weather and climate information through an artificial intelligence-powered chatbot.

  • Nigerian Meteorological Agency (NiMet) partners with 3IS for AI chatbot project
  • ANTICIPA project tested in Sokoto State using WhatsApp chatbot
  • Aim is to provide early warnings for climate-related threats

AI Crawlers Are Hitting Your Site Right Now. Should You Block Them?

Go check your server logs. I'll wait. See those user agents you don't recognize? GPTBot , ClaudeBot , CCBot , PerplexityBot , Bytespider , Amazonbot — that's not Googlebot doing its usual rounds.

  • AI crawlers like GPTBot and ClaudeBot collect content for training language models.
  • These bots differ from traditional search crawlers like Googlebot and Bingbot.
  • Website owners must balance benefits of citation against costs of aggressive crawling.

More from Wednesday 30 September →