We have two different test classes (each contains several test methods), they may affect each other while running in parallel and in the same jvm process. I know this sounds bad, but currently we have no easy solution to separate those two test classes.
How to specify the running order of these two test classes (to make them run in sequennce) while I still want the parallel test execution using gradle --parallel? Thanks a lot in advance.
[UPDATE]:
I have the following configurations
test {
// maxParallelForks=8
testLogging.showStandardStreams=true
exclude '**/ATests.scala'
exclude '**/BTests.scala'
}
task runATests(type: Test) {
include '**/ATests.scala'
}
task runBTests(type: Test) {
include '**/BTests.scala'
}
How can I verify that ATests and BTests are actuall run in different test JVM, from the logs, it seems have no related information about this? Thanks
The problem isn't related to parallel task or test execution (which, by the way, are independent Gradle features) because Gradle runs tests in a single thread per test JVM. The problem is simply that multiple tests access the same singleton and invalidate each other's expectations of that object's initial state. Possible solutions:
Test
task (and hence runs in a different test JVM).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With