Closed s-glatshtein closed 3 years ago
When running the class in the following example, 2 job reports will be created with one test in each, rather than 1 job report with 2 tests:
import io.testproject.sdk.drivers.web.ChromeDriver; import io.testproject.sdk.internal.exceptions.AgentConnectException; import io.testproject.sdk.internal.exceptions.InvalidTokenException; import io.testproject.sdk.internal.exceptions.ObsoleteVersionException; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; import org.openqa.selenium.chrome.ChromeOptions; import java.io.IOException; import java.net.URL; @EnabledIfEnvironmentVariable(named = "TP_DEV_TOKEN", matches = ".*?") public final class JUnitTests { @Test public void test1() throws IOException, InvalidTokenException, AgentConnectException, ObsoleteVersionException { ChromeDriver driver = new ChromeDriver(new URL("http://localhost:9999"), new ChromeOptions()); driver.navigate().to("https://example.testproject.io/web/"); driver.quit(); } @Test public void test2() throws IOException, InvalidTokenException, AgentConnectException, ObsoleteVersionException { ChromeDriver driver = new ChromeDriver(new URL("http://localhost:9999"), new ChromeOptions()); driver.navigate().to("https://example.testproject.io/web/"); driver.quit(); } }
When running the class in the following example, 2 job reports will be created with one test in each, rather than 1 job report with 2 tests: