I have a script setup developed using Appium and TestNG. The TestNG xml contains execution of multiple classes and each class has multiple test cases.

Example:

```
Class1:
-Class1_Test1
-Class1_Test2
-Class1_Test3
Class2:
-Class2_Test1
-Class2_Test2
-Class2_Test3

```

I tried integrating IRetryAnalyzer but that just calls the failed test case. The requirement is to execute the complete Class1 in case Class1\_Test2 fails as soon as Class1 fails before it proceeds to Class2?

The reason for the ask is the app is a media player and if in case media playback fails due to network/server issues, next test cases of forward and rewind will not be required to be executed and it will need to relaunch the app and retry all steps before performing further tests.