junit5.TestInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenium-java-toolkit-JUnit5 Show documentation
Show all versions of selenium-java-toolkit-JUnit5 Show documentation
Selenium-Toolkit is a Java based test-toolkit for selenium-testing with testNg.
The goal of the toolkit is, to suport you in different things like 'how to manage testdata in the source', parallelisation, Webdriver-managemet, reporting and a lot more.
package junit5;
import org.junit.jupiter.api.Tag;
import org.junit.platform.engine.TestTag;
import org.junit.platform.launcher.TestIdentifier;
public class TestInfo implements vendors.grid.TestInfo {
public static final String NL_USER_PATH = "nlUserPath=";
private TestIdentifier testIdentifier = null;
private String displayName = "";
public TestInfo(TestIdentifier testIdentifier) {
this.testIdentifier = testIdentifier;
}
public TestInfo(String displayName) {
this.displayName = displayName;
}
@Override
public String getTestname() {
return testIdentifier != null ? testIdentifier.getDisplayName() : displayName;
}
@Override
public String getNlPurePath() {
for (TestTag tag : testIdentifier.getTags()){
if(tag.toString().startsWith(NL_USER_PATH)) {
return tag.toString().substring(NL_USER_PATH.length());
}
}
return "";
}
@Override
public Object getMetaKey() {
return testIdentifier != null ? testIdentifier.getDisplayName() : displayName;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy