Boolean Tag Expressions to Filter Cucumber Scenarios in CI
How to use boolean tag expressions and version‑aware filter config to precisely control which Cucumber scenarios run, with JUnit 5 and JUnit 4 examples.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
How to use boolean tag expressions and version‑aware filter config to precisely control which Cucumber scenarios run, with JUnit 5 and JUnit 4 examples.
Use JUnit 5's @Test(timeout) to fail hung or slow tests and Assume.assumeTrue/assumeFalse to skip environment-dependent tests cleanly — with verification steps and guidance on when each tool is the right choice.
Stop writing repetitive test methods. Learn how to use JUnit 5 @ParameterizedTest to run a single test logic against multiple data sets using CsvSource and ValueSource.
A decision guide for JUnit 5: when @ParameterizedTest beats separate @Test methods, which data source fits your inputs, and how to verify each iteration reports individually.
In multi-module Java projects, test method visibility across module dependency boundaries determines whether non-public @Test methods are silently dropped or inadvertently exposed to consumers of compiled artifacts. JUnit 4 default runners require test methods to be public; non-public @Test methods are silently ignored unless a customized runner or rule conf
A JUnit 5 test class requires non-static @BeforeAll and @AfterAll methods so setup can use constructor-injected dependencies. Under the default lifecycle, JUnit 5 instantiates the test class once per test method and rejects non-static class-level lifecycle methods. Enabling @TestInstance(TestInstance.Lifecycle.PER_CLASS) reuses a single instance for all test
Unresolved Decision: @RepeatedTest and @ParameterizedTest The goal is to determine how JUnit 5 executes tests when a @RepeatedTest annotation is combined with a @ParameterizedTest . The current specification does not state whether the repetitions apply to each individual parameter set or to the entire parameterized sequence, leading to ambiguous execution or