diff --git a/content/doc/developer/testing/index.adoc b/content/doc/developer/testing/index.adoc index 283fab52e15a..c05ede7f3a9a 100644 --- a/content/doc/developer/testing/index.adoc +++ b/content/doc/developer/testing/index.adoc @@ -148,6 +148,36 @@ Most Java IDEs should be able to run JUnit tests and report on the results. //==== From the Command Line //==== From an IDE +=== Performance considerations + +The test runner (Surefire) supports running tests in parallel to speed them up. +A possibility to configure this machine-wide is to adjust the `forkCount` within Maven. +The default setting is `forkCount=1`, which means no parallel testing. +An often-used setting is `1C`, which spawns as many testing processes in parallel as CPU cores are present. +If you have a machine with many cores, it might be faster to set it to a smaller number, like `0.45C`. +For example, with 16 cores the runner will be spawning up to 7 processes. +More details can be found in the link:https://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html[Maven Surefire documentation]. + +You can also adjust this globally within a Maven profile setting, independently of the Plugin configuration. +The Maven profile can be typically found at: `~/.m2/settings.xml` (Linux) or `%userprofile%/.m2` (Windows). +A profile setting with the name "faster", which is enabled by default can look like this: + +[source,xml] +---- + + faster + + true + + + 0.45C + + +---- + +In the IDE this setting will be able to enable or disable depending on the test suite you are working on. +In case of problems it can also be deactivated on the command-line with `-P=-faster`. + == What to Test Now that we can write a basic test, we should discuss what you should be testing…