I am using Gradle 4.6 with testng. My test suite has tests organized something like these.
java class1
{
test 1.1
test 1.2
test 1.3
test 1.4
}
java class2
java class3
java class4
java class5
All these classes have total 100 tests in the suite. When I execute the suite, gradle first executes, tests 1.1 and 1.2 and then goes and executes all the tests in class2 to 5 and finally comes back to class 1 to execute 1.3 and 1.4.
Is there a way we can force all the tests in a class to be executed before going to class? For example, it will be helpful, I get all my tests in class1 completes execution, then goes to next class (in any order) and so on.
I do not want to set dependency as any failures will force the dependent test to skip, these are independent tests, eventhough there is some dependency declared tests within the same class.
Source: Read More