Previously, if Spock tests were executed using Gradle's JUnitPlatformTestFramework, we would retry an entire class if one of its parameterized methods failed. This applied both to Spock 2 tests and Spock 1 tests run with JUnit Vintage engine. However, parameterized tests cannot be retried independently only in the latter case.
This PR changes that and checks for spock-core-2* JAR on the classpath to differentiate between both cases. If the JAR is present, parameterized tests will be retried independently, otherwise, as an entire class.
Summary
Previously, if Spock tests were executed using Gradle's
JUnitPlatformTestFramework
, we would retry an entire class if one of its parameterized methods failed. This applied both to Spock 2 tests and Spock 1 tests run with JUnit Vintage engine. However, parameterized tests cannot be retried independently only in the latter case.This PR changes that and checks for
spock-core-2*
JAR on the classpath to differentiate between both cases. If the JAR is present, parameterized tests will be retried independently, otherwise, as an entire class.