Am 29.04.23 um 10:59 schrieb Vladimir Sitnikov:
I guess the reason is that execute tests several times. Gradle caches test results. In other words, if you execute the same tests with the same source, then the build does not execute tests again. However, if you modify test code and/or change dependency, then tests would be re-executed.
That is what I thought, too. But even changing the source of the test (with something, I know will break it), didn't work. Spock tests in the same package (src/components) will run just fine.
Another strange thing is, that intellij shows the test as runnable (green triangle) and starts running tests, when I press that button, but afterwards it reports, that no tests are found:
Execution failed for task ':src:components:test'.> No tests found for given includes: [org.apache.jmeter.assertions.TestJSONPathAssertion.testGetExpectedValue](--tests filter)
* Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output.
batchTests are not cached though since they depend on external systems, so if you execute ./gradlew batchTests, then it will take some time (batch tests are executed sequentially for now). I think it is expected that we cache test results. If we have randomized tests and or tests that depend on external systems, we should configure them accordingly so Gradle does not cache them. WDYT?
I have nothing against caching tests, as long as it works :) There are only two hard problems in computer science: * Naming things * Cache invalidation * One off problems Felix
Vladimir
OpenPGP_0xEA6C3728EA91C4AF.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature