I currently want to execute the test method in Try the test name rule @ before so that I can get annotation current In law is executing.
public class TestCaseExample {@Before public void setUp () {// Get the current method here. } @Test @MyAnnestation ("ID") Public Zero Some Test {// code}}
public class TestCaseExample {@Rule Public TestName testName = new TestName (); @ First public set up () {method m = TestCaseExample.class.getMethod (testName.getMethodName ()); ...} ...
No comments:
Post a Comment