'Can we use invocation-numbrr in failed-testng.xml to run the test method in parallel?

We have few test methods which have switch cases in it based on different functionality. When one of the functionality fails; we get invocation-number parameter in failed testng ex. invocation-number = "0 3 7" based on the failed case. Can we use this to run the single test method in parallel based on the switch cases in it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source