Any way to run JUnit 5 integration tests in parallel under failsafe?
Asked Answered
F

1

7

Trying revisit running Junit 5 / 4 integration tests under Junit 5 platform (5.3.2) in maven. from How to run a mix of JUnit 4 and JUnit 5 tests in parallel using maven-failsafe-plugin

Running unit tests under surefire plugin 2.22.1 works fin in parallel and mixed tests of JUnit 5 and JUnit 4 and see worker threads in the verbose.

Tried doing the same in failsafe 2.22.1, but takes a log time and no parallel execution is seemed. Also only [main] is printed in the verbose and no worker threads.

Does failsafe supports threads / concurrent execution in Junit 5 platform ? if so, how ?

Also I use the config params :

junit.jupiter.execution.parallel.enabled=true
junit.jupiter.execution.parallel.config.strategy=fixed
junit.jupiter.execution.parallel.config.fixed.parallelism=6
Frambesia answered 18/12, 2018 at 11:50 Comment(0)
F
0

try with this configuration inside failsafe:

<configuration>
  <configurationParameters>
    junit.jupiter.execution.parallel.enabled = true
    junit.jupiter.execution.parallel.mode.default = concurrent
    junit.jupiter.execution.parallel.mode.classes.default =concurrent            
  </configurationParameters>
<configuration>
Fang answered 6/9, 2019 at 10:1 Comment(1)
@KajHejer yes. it worked fine with my project. hope to be helpful to youFang

© 2022 - 2024 — McMap. All rights reserved.