jstemmer / go-junit-report

Convert Go test output to JUnit XML
MIT License
776 stars 224 forks source link

nested benchmarks are reported as failure #182

Open XANi opened 4 months ago

XANi commented 4 months ago

Example:

func BenchmarkTree(b *testing.B) {
        sizes := []int{1, 2, 4, 8, 16}
        for _, size := range sizes {
                b.Run(
                        fmt.Sprintf("size: %d", size),
                        func(b *testing.B) {
                                for i := 0; i < b.N; i++ {
                                        test(i + size)
                                }
                        })
        }
}

reports:

failures="0" errors="1" id="0"

when running benchmark with JSON output