ginkgo icon indicating copy to clipboard operation
ginkgo copied to clipboard

How to serialize tests within a package

Open rosenhouse opened this issue 7 years ago • 2 comments

We sometimes encounter cases where a particular package manages global state, so making the tests safe to run in parallel is challenging.

To keep other packages running in parallel, we resort to complex scripts that include a list of "serial packages". We run ginkgo separately for each of those packages, and then do a single multi-package run for the rest that can run in parallel.

Is there an easier way to do that, either with the ginkgo CLI or by writing some config inside the test package itself?

rosenhouse avatar Oct 03 '18 15:10 rosenhouse

Looks like I'll be addressing this eventually in v2. I'm planning on making it possible to configure per-suite settings/defaults that the ginkgo CLI will honor as it runs through a test suite. I might circle back with some design decisions for feedback - but I'm not quite sure when I'll get to it on the v2 roadmap yet.

onsi avatar Apr 05 '21 18:04 onsi

Not quite what this issue is asking for, but on the ver2 branch you can now mark tests as Serial. This will be guaranteed to run in series, never in parallel with other test.

onsi avatar Sep 21 '21 18:09 onsi