Skip to content

Use parallel classes test over reusing forks#10824

Merged
wing328 merged 1 commit intoOpenAPITools:masterfrom
agilob:shorter-test-times
Nov 14, 2021
Merged

Use parallel classes test over reusing forks#10824
wing328 merged 1 commit intoOpenAPITools:masterfrom
agilob:shorter-test-times

Conversation

@agilob
Copy link
Copy Markdown
Contributor

@agilob agilob commented Nov 9, 2021

I played a bit with surefire config locally. mvn test with config from master branch runs in 418 seconds on my laptop so this was my baseline. I tried a few different things, experimented with configuration on parallel classes, methods etc. and got to this point where mvn test now completes in 280 seconds

From surefire doesn't really encourage to use fork parallelism:

forkCount=1/reuseForks=false executes each test class in its own JVM process, one after another. It creates the highest level of separation for the test execution, but it would probably also give you the longest execution time of all the available options. Consider it as a last resort.

testng had to be downgraded to support parallel flag in surefire, but that will be fixed in the next version of surefire:
https://stackoverflow.com/questions/68143219/maven-surefire-failsafe-testng-7-4-0-parallel-error-void-org-testng-xml-xmlsuit

@agilob
Copy link
Copy Markdown
Contributor Author

agilob commented Nov 10, 2021

@wing328 @jimschubert

Comment thread pom.xml
@wing328 wing328 added this to the 5.3.1 milestone Nov 14, 2021
@wing328 wing328 merged commit 65f3845 into OpenAPITools:master Nov 14, 2021
@agilob agilob deleted the shorter-test-times branch November 14, 2021 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants