i've setup my xml so it will run groups which depends-on different group in order to run. when the different group fails, i would expect that the groups won't run, but it is still running. here is my code:
<test name="Test1">
<parameter name="testedApp" value="someValue"/>
<groups>
<run>
**<include name="Test1"/>**
<exclude name="TestX"/>
<exclude name="TextY"/>
</run>
<dependencies>
<!-- Service Health Check -->
**<group name="Test1" depends-on="ServiceHealthCheck"/>**
</dependencies>
</groups>
<packages>
<package name="project.auto.tests.api...*"/>(package)
</packages>
<classes>
<!-- Service Health Check -->
<class name=".....PbServiceHealthCheckTest"/>(class)
</classes>
</test>
Answer: TestNG 6.14.3 has a bug which prevenr the "depends-on" to work correctly. Upgrade to TestNG 7.1.0 solved the issue.