bookmark

java - Get name of currently executing test in JUnit 4 - Stack Overflow


Description

@Rule public TestName name = new TestName();

@Test public void testA() {
    assertEquals("testA", name.getMethodName());
}

Preview

Tags

Users

  • @jil

Comments and Reviews