How to run other tests in TestNG after one test is failed using Java

For example:

    public void Online1(){

    public void Online2(){

In the above code, if priority 1 fails then priority 2 automatically get failed, I want to execute priority 2 even if 1 gets failed.


You can use TestNG's alwaysRun attribute. This is quite self explanatory.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.