@Override public void write(OutputStream output) throws IOException { new TestResultExport().export(output, testsPerPage, results); } };
@Override public void write(OutputStream output) throws IOException { new TestResultExport().export(output, testsPerPage, results); } };
public void write(TestUnitsResults result) throws Exception { TestSuite testSuite = result.getTestSuite(); String testName = testSuite.getTestSuiteMethod().getName(); String moduleName = testSuite.getTestSuiteMethod().getModuleName(); String suitName = "OpenL." + moduleName + "." + testName; String filename = "TEST-" + suitName + ".xlsx"; if (!dir.mkdirs() && !dir.exists()) { throw new IOException("Can't create folder '" + dir.getAbsolutePath() + "'."); } File file = new File(dir, filename); try (FileOutputStream outputStream = new FileOutputStream(file)) { new TestResultExport().export(outputStream, -1, result); } } }
public void write(TestUnitsResults result) throws Exception { TestSuite testSuite = result.getTestSuite(); String testName = testSuite.getTestSuiteMethod().getName(); String moduleName = testSuite.getTestSuiteMethod().getModuleName(); String suitName = "OpenL." + moduleName + "." + testName; String filename = "TEST-" + suitName + ".xlsx"; if (!dir.mkdirs() && !dir.exists()) { throw new IOException("Can't create folder '" + dir.getAbsolutePath() + "'."); } File file = new File(dir, filename); try (FileOutputStream outputStream = new FileOutputStream(file)) { new TestResultExport().export(outputStream, -1, result); } } }