3.17. Parallel Execution

By default, JUnit Jupiter tests are run sequentially in a single thread. Running tests in parallel, e.g. to speed up execution, is available as an opt-in feature since version 5.3. To enable parallel execution, simply set thejunit.jupiter.execution.parallel.enabled configuration parameter to true, e.g. in junit-platform.properties(see Configuration Parameters for other options).

Once enabled, the JUnit Jupiter engine will execute tests on all levels of the test tree fully in parallel according to the provided configuration while observing the declarative synchronization mechanisms. Please note that the Capturing Standard Output/Error feature needs to enabled separately.

Parallel test execution is currently an experimental feature. You’re invited to give it a try and provide feedback to the JUnit team so they can improve and eventually promote this feature. 


3.17. Parallel Execution


기본적으로 JUnit Jupiter 테스트는 단일 스레드에서 순차적으로 실행됩니다. 테스트를 병렬로 실행할 때 실행 속도를 높이기 위해 5.3 버전부터 opt-in 기능을 사용할 수 있습니다. 병렬 실행을 사용하려면 junit-platform.properties 에 있는 junit.jupiter.execution.parallel.enabled configuration 매개 변수를 true로 설정하면됩니다. (다른 옵션에 대해서는 Configuration Parameters 참조)

JUnit Jupiter 엔진이 활성화되면 선언 된 동기화 메커니즘을 관찰하면서 제공된 구성에 따라 테스트 트리의 모든 수준에서 완전히 병렬로 테스트를 실행합니다. 표준 출력 / 오류 캡처 기능은 별도로 활성화해야합니다.






'스터디 > JUnit' 카테고리의 다른 글

[JUnit 5] 3.15. Test Templates  (0) 2018.12.19

+ Recent posts