As of Surefire 2.16, new thread-count attributes are introduced, namely threadCountSuites, threadCountClasses and threadCountMethods. This is particularly useful for slow tests that can have high concurrency.Īs of Surefire 2.7, no additional dependencies are needed to use the full set of options with parallel. If your tests specify any value for the parallel attribute and your project uses JUnit 4.7+, your request will be routed to the concurrent JUnit provider, which uses the JUnit JUnitCore test runner. If nothing is configured, Surefire detects which JUnit version to use by the following algorithm: It is a transitional feature that will be removed in a future version of surefire. This is only meant to be used as a tool when upgrading to check that all expected tests will be run. This will perform a check and notify you of any invalid tests that will not be run with this version of Surefire (and the build fails). When upgrading from a Surefire version prior to 2.7, the build can be run with the flag. From 2.7 and on, only valid JUnit tests are run for all versions of JUnit, where older versions of the plugin would also run invalid tests that satisfied the naming convention. Upgrade Check for JUnit 4.xĪs of Surefire version 2.7, the algorithm for choosing which tests to run has changed. The provider is selected based on the JUnit version in your project and the configuration parameters (for parallel). Surefire supports three different generations of JUnit: JUnit 3.8.x, JUnit 4.x (serial provider) and JUnit 4.7 (junit-core provider with parallel support). This is the only step that is required to get started - you can now create tests in your test source directory (e.g., src/test/java). Run tests in a different JVM using toolchains.Fork Options and Parallel Test Execution.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |