Ask Your Question
2

What is the method for running JUnit(5) tests concurrently in Gradle when testing a single class?

asked 2021-08-04 11:00:00 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-11-27 03:00:00 +0000

djk gravatar image

To run JUnit5 tests concurrently in Gradle when testing a single class, you can set the maxParallelForks parameter in the test task configuration.

Here's an example:

test {
    useJUnitPlatform()
    maxParallelForks = 4
}

This will run up to 4 test classes concurrently, which can significantly reduce the time it takes to run all the tests.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-08-04 11:00:00 +0000

Seen: 11 times

Last updated: Nov 27 '21