-
-
Notifications
You must be signed in to change notification settings - Fork 660
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
Run specs in one suite with different label #1262
Comments
Hey there @liubog2008 - I think I understand what you're trying to do and why. I don't currently have a strong answer for you. It seems that a common use-case in Kubernetes is:
Ginkgo doesn't have a strong answer for this matrix of use-cases... yet. It's currently designed around the notion that:
Over the years we've gradually added some additional options:
I'm considering options to allow for something more general so you can express things like "this group of tests can run in parallel with respect to each other but not with respect to other tests" but I only have some ideas at this point, not a concrete plan or proposal yet. Until then, fwiw:
You can get this with a little bit of code that loads and merges multiple JSON/JUnit reports. |
Yes, I'm worked in Kubernetes. The biggest problem is that I have to do something between two subset of tests. some tests -> do something serial and expensive(e.g. upgrade some apps and the upgrade also should be tested) -> other tests |
Thanks for the detail - it's helpful and further paints a picture of just how much flexibility folks seem to need when building these complex e2e suites. I have a few more questions as I'm actively considering how to design solutions for this kind of problem space:
/*
option 1: this runs "some tests" in parallel, then does the upgrade once and runs "other tests" in serial
*/
Describe("Feature A", func() {
BeforeEach(func() {
// set up the application
}, OncePerOrdered)
// some tests
It("tests something", func() { ... })
It("tests something else", func() { ... })
// do something serial and expensive
Describe("When upgraded", Ordered, func() {
BeforeAll(func() {
// the expensive upgrade
})
// other tests
It("tests something after the upgrade", func() { ... })
It("tests another thing after the upgrade", func() { ... })
})
})
/*
option 2: this runs everything in parallel. It's true that the upgrade is very expensive - but with enough parallelism and resources the actual run-time is not too bad.
*/
Describe("Feature A", func() {
BeforeEach(func() {
// set up the application
}, OncePerOrdered)
// some tests
It("tests something", func() { ... })
It("tests something else", func() { ... })
// do something expensive, repeatedly, for each test
Describe("When upgraded", func() {
BeforeEach(func() {
// the expensive upgrade
})
// other tests
It("tests something after the upgrade", func() { ... })
It("tests another thing after the upgrade", func() { ... })
})
}) and evaluated their performance characteristics when running in parallel with |
For example:
Why not use multiple suites?
Because features maybe too many
Why not call ginkgo multiple times?
I hope to get a summary report.
Why not run once with all features?
BeforeSuite
is too expensive.The text was updated successfully, but these errors were encountered: