use of com.oracle.bedrock.testsupport.junit.JUnitXmlReporter in project oracle-bedrock by coherence-community.
the class JUnitTest method shouldRunJUnitTestsAndPrintXmlReport.
@Test
public void shouldRunJUnitTestsAndPrintXmlReport() throws Exception {
SimpleJUnitTestListener listener = new SimpleJUnitTestListener();
File folder = temporaryFolder.newFolder();
TestClasses tests = TestClasses.of(JUnit4Test.class);
JUnitXmlReporter reporter = new JUnitXmlReporter(folder);
try (JUnitTestRun jUnit = platform.launch(JUnitTestRun.class, tests, reporter.asOption(), listener.asOption())) {
jUnit.waitFor();
assertThat(listener.awaitCompletion(2, TimeUnit.MINUTES), is(true));
}
dumpReports(folder);
assertThat(new File(folder, reporter.getReportFileName(JUnit4Test.class)).exists(), is(true));
}
Aggregations