Coverage 100% não garante testes bons. Mutation testing introduz bugs. Se testes não detectam, são inúteis.
Carregando
Coverage 100% não garante testes bons. Mutation testing introduz bugs. Se testes não detectam, são inúteis.
Coverage 100% não garante testes bons. Mutation testing introduz bugs. Se testes não detectam, são inúteis.
Modificações automáticas no código. + vira -, === vira !==, true vira false. Simula bugs comuns.
Killed: teste detectou mutant. Survived: bug passou. Quanto mais killed, melhor.
killed / (killed + survived). 80%+ é bom. Mais rigoroso que coverage.
Arithmetic (+ → -), Conditional (=== → !==), Logical (|| → &&). Cobre erros típicos.
• Mutation testing para código crítico
• Target 80%+ mutation score
• Run periodicamente (não todo commit)
• Fix survived mutants
• Combine com coverage tradicional
• Run em todo commit (muito lento)
• Ignorar survived mutants
• Mutation testing de tudo (overkill)
• Não analisar report
• Confiar apenas em coverage %
Quando usar cada um