testproject-io / java-opensdk

TestProject Java OpenSDK
Apache License 2.0
50 stars 42 forks source link

Running test that calls a method annotated with @DisplayName creates a new test in reports #92

Closed s-glatshtein closed 3 years ago

s-glatshtein commented 3 years ago

To reproduce, run this sample code:

public class TestClass {
  @Test
  public void testMethod() {
    ChromeDriver driver = new ChromeDriver(new ChromeOptions);
    driver.navigate().to("http://www.google.com");
    notTestMethod(driver);
  }

  @DisplayName("Not a test")
  public void notTestMethod(WebDriver driver) {
    driver.navigate().to("http://www.yahoo.com");
  }
}

executing testMethod via junit will create 2 tests in the report, when it should create only one.

DavidG8168 commented 3 years ago

96