community postAL Developmentcommunity - not Microsoftreviewed - checked by Opus

Your Tests All Pass. I Have Bad News.

Mutation testing is a technique that validates test quality by intentionally breaking code to see if tests catch the failures. The post introduces LethAL, an open-source tool for AL that performs mutation testing efficiently by compiling once and running mutations as table writes, making it practical for finding gaps in test suites that code coverage alone misses.

post SShadowS

Torben Leth · 2026-08-24 · 1,732 words · about 8 min

Key points

  • Code coverage only shows a line ran; mutation testing shows whether a test would notice that line breaking
  • LethAL compiles all mutants into one build and switches between them with a table write, so the demo’s 32 mutants ran in 16 seconds instead of roughly an hour
  • The credit limit demo exposed three test gaps: no exact-limit boundary test, no posted ledger data so the Balance FlowField was never exercised, and only one customer so the customer filter never mattered
  • LethAL targets agent workflows with published JSON Schemas, doctor –json, meaningful exit codes, and quarantine of runs it cannot trust
  • Survivors are leads, not verdicts; decide the correct behavior before letting an agent write the killing test

Context

  • Features: Mutation testing, LethAL tool, Test quality validation, Code coverage analysis, Mutation scoring, Agent-driven testing workflow

Source: SShadowS, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.