Is there a way to add group names before executing a test in TestNG (Java)?

102 views Asked by At

For each test (@Test) we have to add group names dynamically before executing them. Before executing @Test method, data provider is invoked and it will give the list of group names to that particular test case falls in.

Is there any way to add group names to @Test before executing them? Based on the group name which we pass from testng.xml should run only those cases. Please guide me if we have any existing solution for this use case.

0

There are 0 answers