# Mutation testing comes to DAML

DevFeed: [Mutation testing comes to DAML](<https://devfeed.tech/articles/mutation-testing-comes-to-daml-7657.md>)

Original publisher: [Read original article](<https://blog.trailofbits.com/2026/07/08/mutation-testing-comes-to-daml/>)

Author: "Kamil Chmielewski"

Published: 2026-07-08T11:00:00Z

Content type: article

Language: en

Sources: [The Trail of Bits Blog](<https://devfeed.tech/sources/the-trail-of-bits-blog.md>), [The Trail of Bits Blog](<https://devfeed.tech/sources/the-trail-of-bits-blog-2.md>)

Topics: [mutation-testing](<https://devfeed.tech/topics/mutation-testing.md>), [test-coverage](<https://devfeed.tech/topics/test-coverage.md>), [Authorization](<https://devfeed.tech/topics/authorization.md>), [Code](<https://devfeed.tech/topics/code.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [applications](<https://devfeed.tech/tags/applications.md>), [blockchain](<https://devfeed.tech/tags/blockchain.md>), [bug](<https://devfeed.tech/tags/bug.md>), [code](<https://devfeed.tech/tags/code.md>), [development](<https://devfeed.tech/tags/development.md>), [mutation-testing](<https://devfeed.tech/tags/mutation-testing.md>), [open](<https://devfeed.tech/tags/open.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [production](<https://devfeed.tech/tags/production.md>), [test-coverage](<https://devfeed.tech/tags/test-coverage.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tool-release](<https://devfeed.tech/tags/tool-release.md>)

## AI overview

Mewt, an open-source mutation-testing engine, now supports DAML, the language used for Canton Network applications. The article explains how mutation testing exposes gaps that ordinary coverage reports can miss by generating modified versions of code and checking which changes survive the existing test suite.

## Source excerpt

In April we released Mewt, our open-source mutation-testing engine that finds the gaps in your test suite. Today we're expanding it with support for DAML, the language Canton Network applications are written in. Mewt now reads DAML, generates several classes of mutants (including two built for DAML's authorization primitives), and runs them through your existing test suite to count how many mutants survive. If you want to try it, simply install Mewt from the repository, point a mewt.toml at your project and its test command, and use mewt run. For a team shipping DAML to production, that count is what a passing test run is actually worth: it puts a number on how much your suite checks, whereas a green run on its own does not. Why DAML's coverage reports lie Test coverage is the most reassuring lie in smart-contract development. Hitting 100% line coverage tells you the test runner walked the code; it does not tell you whether any test would fail if that code stopped doing what it is supposed to. We have been grading test harnesses by how many mutants they kill since at least 2019, and our primer on finding the bugs your tests don't catch shows how a green suite can still miss the bug that matters. DAML's built-in coverage measures execution at the template and choice level: which templates were created and which choices were exercised over the test run. It reports whether each choice was exercised, not what happened inside it. A test that exercises a choice once and asserts nothing about the result reports that choice as covered. The report prints the same green percentage whether the test verifies the outcome or discards it. How mutation testing works Instead of asking whether your tests reached the code, mutation testing grades your tests by sabotaging that code. The engine generates mutants, copies of the code that each carry one small deliberate change: a flipped comparison, a removed branch, a dropped party. It then runs your test suite against each one. A mutant