Basically, I have a teardown method that I want to log to the console which test was just run. How would I go about getting that string?
I can get the class name, bu
If you want to get the method name before the test is executed you can use the following:
import java.lang.reflect.Method; @BeforeMethod public void nameBefore(Method method) { System.out.println("Test name: " + method.getName()); }