You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using go test -shuffle=on ./..., this will print out a shuffle seed
Example output if there's a failure:
ok github.com/kevinawoo/test/pkg/example 0.686s
-test.shuffle 1655405871045329000
--- FAIL: TestExample (0.00s)
panic: runtime error: index out of range [99] with length 1 [recovered]
panic: runtime error: index out of range [99] with length 1
The seed 1655405871045329000 allows us to reproduce the same test shuffle to reproduce failures.
go test -json -shuffle=on ./... output does show the shuffle seed, example:
Thank you for opening this issue! It looks like there will need to be special handling for a few of the formats.
testname - does print the -test.shuffle line, but it's not clear exactly which package the line is associated with. Maybe it should only be printed on failure.
pkgname (the default format) - does not print it on failure
standard-quiet - prints it all the time, but shouldn't
The rest seem to do the right thing.
Since the output is associated with the package (not a specific test), I think we'll have to handle it similar to cached, and coverage. Store it on Package, and print it as part of the package output.
When using
go test -shuffle=on ./...
, this will print out a shuffle seedExample output if there's a failure:
The seed
1655405871045329000
allows us to reproduce the same test shuffle to reproduce failures.go test -json -shuffle=on ./...
output does show the shuffle seed, example:However when we run it
go run gotest.tools/gotestsum@latest -- -shuffle=on ./...
, the shuffle seed doesn't get printed out.The text was updated successfully, but these errors were encountered: