Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore testnames when using suites in suite.
- Loading branch information
Martin Aldrin
committed
Jan 14, 2022
1 parent
55e8e52
commit d107137
Showing
5 changed files
with
58 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import java.util.Arrays; | ||
import org.testng.JarFileUtils; | ||
import org.testng.TestNG; | ||
|
||
public class TestNgTest { | ||
|
||
public void ensureThatSuitesInSutesWorksWithTestnames(){ | ||
TestNG testNg = new TestNG(false); | ||
JarFileUtils utils = | ||
newJarFileUtils( | ||
Arrays.asList("testng-tests-child2", "testng-tests-child4", "testng-tests-child5")); | ||
String[] expectedTestNames = | ||
new String[] {"testng-tests-child2", "testng-tests-child4", "testng-tests-child5"}; | ||
String[] expectedClassNames = | ||
new String[] { | ||
"org.testng.jarfileutils.org.testng.SampleTest2", | ||
"org.testng.jarfileutils.org.testng.SampleTest4", | ||
"org.testng.jarfileutils.org.testng.SampleTest5" | ||
}; | ||
|
||
|
||
|
||
testNg.setXmlPathInJar(); | ||
testNg.initializeSuitesAndJarFile(); | ||
} | ||
} |