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
InterceptSpecState(f) runs f and returns the types.SpecState and types.Failure that Skip, Fail (including failed assertions), or AbortSuite recorded while it ran, without applying them to the current spec. This makes it possible to unit-test helpers that wrap Skip and Fail. Every intercepted non-passing outcome is recorded on the spec as a report entry so it stays visible. See https://onsi.github.io/ginkgo/#testing-helpers-that-call-skip-or-fail Thanks @jghiloni for proposing it in #1693/#1694!
Fixes
At long last - 13 years since it launched - ginkgo -p now runs plain Go testing tests, Examples and fuzz seeds only on process 1, instead of once per process (which also duplicated an Example's output). When it compiles the suite the CLI asks the go command which test files are built, finds the Test function that calls RunSpecs - and records it in binaries built by ginkgo build - and passes --test.run=^TestEntry$ to processes 2..N. When the entrypoint can't be determined (RunSpecs behind a helper in a package with several Test functions or with a TestMain; a precompiled binary built with plain go test -c, or by ginkgo build while GOFLAGS sets -ldflags or with the pattern=args form of --ldflags) or you pass your own -test.run, -test.skip, -test.bench or -test.fuzz, nothing is filtered, as before. Set GINKGO_RUN_GO_TESTS_ON_ALL_PROCS to any non-empty value to disable the filtering. If processes 2..N were filtered and then report nothing, the suite now fails with an error that names the entrypoint and this variable.
The Ginkgo CLI now fails a parallel suite when some processes started the suite but the CLI times out waiting for all of them to report back, even if every process exited cleanly. A suite that no process ever began (e.g. it calls t.Skip before RunSpecs) still passes.
--no-color is now honored by the messages the CLI and test processes print outside the reporters - the parallel "timed out waiting for all parallel procs to report back" report, the deprecation report, and configuration, validation and failure-message errors no longer contain ANSI escape codes.
GinkgoRecover no longer reports a spurious "Test Panicked" on a later spec when a goroutine's Fail is recovered after its node ended.
When Ginkgo reports a successful parallel suite but a process exits unsuccessfully (for example a failing Go Example), the CLI now prints that process's output - once per distinct failure - instead of only "Test Suite Failed". Thanks @Boulea7! (#1696)
Maintenance
Ginkgo's own test suite now passes when GINKGO_NO_COLOR is set, e.g. in distribution builds that run go test. Thanks @businessdeveloper69! (#1695)
De-flaked load-sensitive timing specs in internal/internal_integration.