From the course: Java: Testing with JUnit
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Parallel execution
From the course: Java: Testing with JUnit
Parallel execution
- [Instructor] Parallel execution means that multiple tests are running at the same time. This can be done when the order, and also the order of the report, doesn't matter. In J unit five, we can easily turn it on by setting a configuration parameter. So far, we have not been touching this yet, but with configuration parameters, we can decide general rules and conditions for tests to run. So we're going to create a properties file in our resources, and we're going to be calling this J Unit platform dot properties. There we go. And in here I'm going to be adding two lines. The first one is J Unit dot Jupiter dot execution dot parallel dot enabled. And then I'm going to set to a value true. And the second one is very similar, J Unit, Jupiter, execution, parallel, and then config strategy. And it has to be dynamic. This will change properties for all or tests. However, they don't run parallel…
Contents
-
-
-
-
-
(Locked)
Dependency injection in your tests5m 7s
-
Repeated tests2m 55s
-
(Locked)
Parameterized tests9m 29s
-
(Locked)
Timeouts4m 49s
-
(Locked)
Parallel execution3m 42s
-
(Locked)
Lifecyle control: Before and after5m 10s
-
(Locked)
Custom messages and reports4m 28s
-
(Locked)
Conditional test execution4m 19s
-
(Locked)
Disabling unit tests1m 45s
-
(Locked)
Solution: Refactoring1m 1s
-
(Locked)
-
-