From bc37aab6693b7f3839d42916c754f0b265009cf2 Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Sun, 25 Jun 2023 09:30:53 +0200 Subject: [PATCH] Document ClassOrderer wrt. parallel execution Resolves #3007. --- .../src/docs/asciidoc/user-guide/writing-tests.adoc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/documentation/src/docs/asciidoc/user-guide/writing-tests.adoc b/documentation/src/docs/asciidoc/user-guide/writing-tests.adoc index b6cc23c33f9c..97991db4fb86 100644 --- a/documentation/src/docs/asciidoc/user-guide/writing-tests.adoc +++ b/documentation/src/docs/asciidoc/user-guide/writing-tests.adoc @@ -664,8 +664,8 @@ dependencies between test classes, or you may wish to order test classes to opti time as outlined in the following scenarios. * Run previously failing tests and faster tests first: "fail fast" mode -* With parallel execution enabled, run longer tests first: "shortest test plan execution - duration" mode +* With parallel execution enabled, schedule longer tests first: "shortest test plan + execution duration" mode * Various other use cases To configure test class execution order _globally_ for the entire test suite, use the @@ -2302,6 +2302,12 @@ might conflict with the configured execution order. Thus, in both cases, test me such test classes are only executed concurrently if the `@Execution(CONCURRENT)` annotation is present on the test class or method. +When parallel execution is enabled and a default `{ClassOrderer}` (see +<> for details) is registered, top-level test +classes will initially be sorted accordingly and scheduled in that order. However, they +are not guaranteed to be started in exactly that order since the threads they are executed +on are not controlled directly by JUnit. + All nodes of the test tree that are configured with the `CONCURRENT` execution mode will be executed fully in parallel according to the provided <> while observing the