Provide support for adding config at higher level in case of nested test
See original GitHub issueThis question has been asked on stackoverflow.
As of now we can add config to the lowest level/leaf test of nested test for example
class MyTest : FreeSpec({
"high level container with multiple tests" - {
"always failing test".config(enabled: false) { // config at lowest level or leaf
fail("Should not get called")
}
"another always failing test".config(enabled: false){ // config at lowest level or leaf
fail("Should not get called")
}
}
})
we should have ability to provide config at higher level/container as well for example
class MyTest : FreeSpec({
"high level container with multiple tests".config(enabled: false) - { // config at top level/container
"always failing test" {
fail("Should not get called")
}
"another always failing test" {
fail("Should not get called")
}
}
})
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
JUnit 5 Nested Class: @Nested Tutorial With Examples
The high-level answer to this is that the complex and multiple test cases can be broken down in such a way that each...
Read more >NoSuchBeanDefinitionException if a @Bean is needed in a ...
I declared a static class on the top level of the test class. ... but why do the nested classes not know anything...
Read more >Allow @Nested test classes to be ordered #2699 - GitHub
When having a @TestMethodOrder annotated class, I'd like to not only be able to annotate @Test methods, but also be able to define...
Read more >JUnit 5 Tutorial: Writing Nested Tests - Petri Kainulainen
This blog post describes how we can write nested tests with JUnit 5. ... Next, we will add nested setup, teardown, and test...
Read more >Organize Pega unit tests with nested test suites
A test suite can now contain both test cases and other test suites. Additionally, test suites within a top-level test suite support further ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Maybe, but it would have to be a cut down version of config - without invocations / threads. So we could have ContainerTestConfig which has enabled, enabledIf, tags.
We can now use timeouts at a higher level. We can disable using ! at a higher level. And tags have always been supported at a higher level. I think this is good to close.