godog icon indicating copy to clipboard operation
godog copied to clipboard

Can't get report on test failure and StopOnFailure=true

Open inluxc opened this issue 4 years ago • 2 comments

Please answer these questions before submitting a bug report.

What version of godog are you using?

> godog version 11

What version of Go are you using?

> go version 1.16

What did you expect to see?

The cucumber report should return the failed report

What did you see instead?

panic: Couldn't find index: "id" in table: "pickle_result" with args: [7793]

 

goroutine 1 [running]:
github.com/cucumber/godog/internal/storage.(*Storage).mustFirst(0xc00081f620, 0xf58d91, 0xd, 0xf515a4, 0x2, 0xc0006145c0, 0x1, 0x1, 0x0, 0x0)
        /vendor/github.com/cucumber/godog/internal/storage/storage.go:307 +0x285
github.com/cucumber/godog/internal/storage.(*Storage).MustGetPickleResult(...)
        /vendor/github.com/cucumber/godog/internal/storage/storage.go:206
github.com/cucumber/godog/internal/formatters.(*cukefmt).buildCukeElements(0xc00013e128, 0xc00013e658, 0x1, 0x1, 0x1, 0x1, 0x7)
        /vendor/github.com/cucumber/godog/internal/formatters/fmt_cucumber.go:82 +0x17f
github.com/cucumber/godog/internal/formatters.(*cukefmt).buildCukeFeatures(0xc00013e128, 0xc000305700, 0x15, 0x20, 0xc00089b818, 0xc000c0d818, 0x408125)
        /vendor/github.com/cucumber/godog/internal/formatters/fmt_cucumber.go:64 +0x1d7
github.com/cucumber/godog/internal/formatters.(*cukefmt).Summary(0xc00013e128)
        /vendor/github.com/cucumber/godog/internal/formatters/fmt_cucumber.go:43 +0x46
github.com/cucumber/godog.(*runner).concurrent(0xc000142320, 0x1, 0x126c6f1)
        /vendor/github.com/cucumber/godog/run.go:134 +0x658
github.com/cucumber/godog.runWithOptions(0xc000289098, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfa3cc0, 0xfa3cb8, 0x0, ...)
        /vendor/github.com/cucumber/godog/run.go:232 +0x48b
github.com/cucumber/godog.TestSuite.Run(0xc000289098, 0x7, 0xfa3cc0, 0xfa3cb8, 0x1640340, 0x2)
        /vendor/github.com/cucumber/godog/run.go:292 +0x158
git.worten.net/qa/suite/core/godogRunner.TestSuite.Run(0xc000289098, 0x7, 0xfa3cc0, 0xfa3cb8, 0x1640340, 0x0, 0x0, 0xc000289098, 0x7, 0xf51a02, ...)
        /vendor/git.worten.net/qa/suite/core/godogRunner/main.go:66 +0x28c
main.main()
        /main.go:74 +0x358
exit status 2

Additional context

This happens when the test fails and StopOnFailure=true

inluxc avatar Apr 14 '21 13:04 inluxc

I see this issue as well.

What's the expectation on the --stop-on-failure flag? Are reports expected to be generated in this case, given that we only have a partial view of the test runs, now that the run stopped on the first failure?

anusha-ragunathan avatar Mar 25 '22 20:03 anusha-ragunathan

Stack trace is similar to above.

go version: 1.17.3 godog version: v0.12.4

anusha-ragunathan avatar Mar 25 '22 21:03 anusha-ragunathan