We have two type test tasks test and integrationTest,
Now we have situatino where same class name with same package structure exist in both test and integrationTest directory and with this when I try to run test class from integrationTest it’s running from test:
We are using Spock framework with gradle (gradle version 5.6.4).
DemoProject |-src |-test |-groovy |-example |-ClassA --Unit Test1 --Unit Test2 |-integrationTest |-groovy |-example |-ClassA --Integration Test1 --Integration Test2
With above straucture when I run below command, it run test cases from test folder instead of integrationTest folder:
gradlew integrationTest --tests example.ClassA
When there is unique test class name than it’s working fine.
Is there any configuration that I’m missing?