Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
inluxc opened this issue Apr 14, 2021 · 2 comments · May be fixed by #597
Open

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

inluxc opened this issue Apr 14, 2021 · 2 comments · May be fixed by #597

Comments

@inluxc
Copy link

inluxc commented Apr 14, 2021

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

@anusha-ragunathan
Copy link

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
Copy link

Stack trace is similar to above.

go version: 1.17.3
godog version: v0.12.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants