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
Previously, there was discussion at #3526, which finally led to creation of this feature request.
Use case and benefit
As a test automation developer, I want to be able to make sure that a specific test class runs in isolation, because otherwise it would upset other tests running concurrently. However, within my test class I want methods to run concurrently to decrease overall execution time, because the tests are slow and the structure of the test allows them to run independently and concurrently.
If e.g. my integration test class has 10 test methods, each taking 30 seconds to run, total runtime is 5 minutes when the tests run serially, but would only be 30-40 seconds when run concurrently. However, if I annotate my class with @Isolated, currently (Platform 1.11.3, Jupiter 5.11.3) this enforces all tests within the class to run serially, i.e. one after another.
Deliverables
I am suggesting one or more of the following:
The JUnit platform is enabled to run all or a subset of test methods within a class (or more generally, sub-elements of a certain tree node) concurrently, even if same tree node as such runs in isolation of other nodes.
@Isolated gets an optional parameter executionMode defaulting to ExecutionMode.SAME_THREAD, which can be overridden with a value of ExecutionMode.CONCURRENT, resulting in the test class still running in isolation from other classes, but methods within the class running concurrently.
Ideally, for more fine-granular control on method level, @Execution annotations can be used to override the default intra-class execution mode specified in @Isolated.
The text was updated successfully, but these errors were encountered:
Previously, there was discussion at #3526, which finally led to creation of this feature request.
Use case and benefit
As a test automation developer, I want to be able to make sure that a specific test class runs in isolation, because otherwise it would upset other tests running concurrently. However, within my test class I want methods to run concurrently to decrease overall execution time, because the tests are slow and the structure of the test allows them to run independently and concurrently.
If e.g. my integration test class has 10 test methods, each taking 30 seconds to run, total runtime is 5 minutes when the tests run serially, but would only be 30-40 seconds when run concurrently. However, if I annotate my class with
@Isolated
, currently (Platform 1.11.3, Jupiter 5.11.3) this enforces all tests within the class to run serially, i.e. one after another.Deliverables
I am suggesting one or more of the following:
@Isolated
gets an optional parameterexecutionMode
defaulting toExecutionMode.SAME_THREAD
, which can be overridden with a value ofExecutionMode.CONCURRENT
, resulting in the test class still running in isolation from other classes, but methods within the class running concurrently.@Execution
annotations can be used to override the default intra-class execution mode specified in@Isolated
.The text was updated successfully, but these errors were encountered: