I want to get all the groups from my @Test annotation.
I'm using the function context.getAllTestMethods(), where "context" is the object reference of ITestContext interface, in BeforeMethod annotation.
On executing the command context.getAllTestMethods().length, in @BeforeMethod, I observe the value I get is 2. I expected this as 1.
Attached herewith is my code.
Please help.
Thank you!
Instructor
Ashish Thakur Replied on 19/08/2020
Print the names of the methods and you will get the answer :)