diff --git a/testjson/execution.go b/testjson/execution.go index 25d4be0..a8c99fb 100644 --- a/testjson/execution.go +++ b/testjson/execution.go @@ -307,6 +307,10 @@ func rootTestPassed(p *Package, subtest TestCase) bool { continue } + // A TestCase name can exist more than once in an Execution due to + // the go test -count=n flag or when the input contains multiple separate + // test runs. + // Check the testcase has the correct ID for this subtest. for _, subID := range p.subTests[tc.ID] { if subID == subtest.ID { return true