Skip to content

CoverageBasedTest misses recently added tests in coveredBy, marking killable mutants as Survived #3815

Description

@im47cn-bot

Stryker.NET version: 4.16.0
Coverage analysis: perTest (CoverageBasedTest)

Summary

A mutant was reported Survived although two tests that kill it were present in the run. The mutant's coveredBy list did not include those tests — they appear to have been missed by the per-test coverage mapping, so the mutant never ran against them.

Reproduction outline

  1. A Block removal mutant inside a private helper (SkipValue, a JSON-ish scanner) survived a full run (388–390 tests, all green).
  2. mutation-report.json for that mutant listed only 6 covering tests — all older tests; two recently added tests that explicitly exercise the mutated branch ("a":"a\"}" style inputs where string-aware skipping is the whole point) were absent from coveredBy.
  3. Manually applying the identical mutation (removing the block body) and running only those two tests: both fail → the mutant is killable, not equivalent.

So the effective score was understated: Survived: 1 in the report, ground truth Survived: 0.

Impact

  • False survivors mislead equivalent-mutant triage: reviewers spend effort constructing equivalence proofs for mutants that are actually killed by tests the mapper missed.
  • Silent: nothing in the report suggests the coverage map is incomplete.

Environment

  • .NET 8.0, xUnit 2.9.2 (Theory-heavy suite; the missed tests were [Fact]s added in the same session, file rebuilt before the run — Number of tests found included them).
  • The killed-by-omission tests cover exactly the mutated lines (verified via coverlet line data).

Suggestion

When a mutant is marked Survived, consider a diagnostic mode that re-runs it against tests covering the mutant's line range per the raw coverage data (or at minimum flags survivors whose coveredBy set looks suspiciously small relative to line coverage).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ! Need more info !More information is required to start or continue working on this issueAI assisted🐛 BugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions