/** * @deprecated Unused */ @Deprecated public int getFileFragmentationLevel() { return config.getFileFragmentationLevel(); }
/** * @deprecated Use #getConfig() instead */ @Deprecated public String getOutputDirectory() { return config.getOutputDirectory(); }
private XMLReporterConfig.StackTraceLevels calculateStackTraceLevels(ITestResult testResult) { XMLReporterConfig.StackTraceLevels stackTraceoutputMethod = config.getStackTraceOutput(); if (testResult.isSuccess()) { stackTraceoutputMethod = config.getStackTraceOutputLevelForPassedTests(); } return stackTraceoutputMethod; }
String startTime = TimeUtils.timeInUTC(testResult.getStartMillis(), config.getTimestampFormat()); String endTime = TimeUtils.timeInUTC(testResult.getEndMillis(), config.getTimestampFormat()); attributes.setProperty(XMLReporterConfig.ATTR_STARTED_AT, startTime); attributes.setProperty(XMLReporterConfig.ATTR_FINISHED_AT, endTime); attributes.setProperty(XMLReporterConfig.ATTR_DURATION_MS, strDuration); if (config.isGenerateGroupsAttribute()) { String groupNamesStr = Utils.arrayToString(testResult.getMethod().getGroups()); if (!Utils.isStringEmpty(groupNamesStr)) { if (config.isGenerateDependsOnMethods()) { String dependsOnStr = Utils.arrayToString(testResult.getMethod().getMethodsDependedUpon()); if (!Utils.isStringEmpty(dependsOnStr)) { if (config.isGenerateDependsOnGroups()) { String dependsOnStr = Utils.arrayToString(testResult.getMethod().getGroupsDependedUpon()); if (!Utils.isStringEmpty(dependsOnStr)) {
/** * Writes the specified ISuiteResult in the given XMLStringBuffer. Please consider that depending on the settings in * the <code>config</code> property it might generate an additional XML file with the actual content and only * reference the file with an <code>url</code> attribute in the passed XMLStringBuffer. * * @param xmlBuffer The XML buffer where to write or reference the suite result * @param suiteResult The <code>ISuiteResult</code> to serialize */ public void writeSuiteResult(XMLStringBuffer xmlBuffer, ISuiteResult suiteResult) { if (XMLReporterConfig.FF_LEVEL_SUITE_RESULT != config.getFileFragmentationLevel()) { writeAllToBuffer(xmlBuffer, suiteResult); } else { String parentDir = config.getOutputDirectory() + File.separatorChar + suiteResult.getTestContext().getSuite().getName(); File file = referenceSuiteResult(xmlBuffer, parentDir, suiteResult); XMLStringBuffer suiteXmlBuffer = new XMLStringBuffer(); writeAllToBuffer(suiteXmlBuffer, suiteResult); Utils.writeUtf8File(file.getAbsoluteFile().getParent(), file.getName(), suiteXmlBuffer.toXML()); } }
@Override public void generateReport(List<XmlSuite> xmlSuites, List<ISuite> suites, String outputDirectory) { if (Utils.isStringEmpty(config.getOutputDirectory())) { config.setOutputDirectory(outputDirectory); Utils.writeUtf8File(config.getOutputDirectory(), fileName(), rootBuffer, null /* no prefix */);
/** * @deprecated Use #getConfig() instead */ @Deprecated public boolean isGenerateTestResultAttributes() { return config.isGenerateTestResultAttributes(); }
/** * @deprecated Use #getConfig() instead */ @Deprecated public String getTimestampFormat() { return config.getTimestampFormat(); }
/** * @deprecated Use #getConfig() instead */ @Deprecated public boolean isGenerateGroupsAttribute() { return config.isGenerateGroupsAttribute(); }
/** * @deprecated Use #getConfig() instead */ @Deprecated public boolean isGenerateDependsOnMethods() { return config.isGenerateDependsOnMethods(); }
/** * @deprecated Use #getConfig() instead */ @Deprecated public int getStackTraceOutputMethod() { return config.getStackTraceOutputMethod(); }
/** * @deprecated Use #getConfig() instead */ @Deprecated public boolean isGenerateDependsOnGroups() { return config.isGenerateDependsOnGroups(); }
testResult.getStartMillis(), config.getTimestampFormat()); String endTime = TimeUtils.formatTimeInLocalOrSpecifiedTimeZone( testResult.getEndMillis(), config.getTimestampFormat()); attributes.setProperty(XMLReporterConfig.ATTR_STARTED_AT, startTime); attributes.setProperty(XMLReporterConfig.ATTR_FINISHED_AT, endTime); attributes.setProperty(XMLReporterConfig.ATTR_DURATION_MS, strDuration); if (config.isGenerateGroupsAttribute()) { String groupNamesStr = Utils.arrayToString(testResult.getMethod().getGroups()); if (!Utils.isStringEmpty(groupNamesStr)) { if (config.isGenerateDependsOnMethods()) { String dependsOnStr = Utils.arrayToString(testResult.getMethod().getMethodsDependedUpon()); if (!Utils.isStringEmpty(dependsOnStr)) { if (config.isGenerateDependsOnGroups()) { String dependsOnStr = Utils.arrayToString(testResult.getMethod().getGroupsDependedUpon()); if (!Utils.isStringEmpty(dependsOnStr)) {
/** * Writes the specified ISuiteResult in the given XMLStringBuffer. Please consider that depending * on the settings in the <code>config</code> property it might generate an additional XML file * with the actual content and only reference the file with an <code>url</code> attribute in the * passed XMLStringBuffer. * * @param xmlBuffer The XML buffer where to write or reference the suite result * @param suiteResult The <code>ISuiteResult</code> to serialize */ public void writeSuiteResult(XMLStringBuffer xmlBuffer, ISuiteResult suiteResult) { if (XMLReporterConfig.FF_LEVEL_SUITE_RESULT != config.getFileFragmentationLevel()) { writeAllToBuffer(xmlBuffer, suiteResult); } else { String parentDir = config.getOutputDirectory() + File.separatorChar + suiteResult.getTestContext().getSuite().getName(); File file = referenceSuiteResult(xmlBuffer, parentDir, suiteResult); XMLStringBuffer suiteXmlBuffer = new XMLStringBuffer(); writeAllToBuffer(suiteXmlBuffer, suiteResult); Utils.writeUtf8File( file.getAbsoluteFile().getParent(), file.getName(), suiteXmlBuffer.toXML()); } }
@Override public void generateReport( List<XmlSuite> xmlSuites, List<ISuite> suites, String outputDirectory) { if (Utils.isStringEmpty(config.getOutputDirectory())) { config.setOutputDirectory(outputDirectory); Utils.writeUtf8File(config.getOutputDirectory(), fileName(), rootBuffer, null /* no prefix */);
/** @deprecated Use #getConfig() instead */ @Deprecated public boolean isGenerateTestResultAttributes() { return config.isGenerateTestResultAttributes(); }
/** @deprecated Use #getConfig() instead */ @Deprecated public String getTimestampFormat() { return config.getTimestampFormat(); }
/** @deprecated Use #getConfig() instead */ @Deprecated public boolean isGenerateGroupsAttribute() { return config.isGenerateGroupsAttribute(); }
/** @deprecated Use #getConfig() instead */ @Deprecated public boolean isGenerateDependsOnMethods() { return config.isGenerateDependsOnMethods(); }
/** @deprecated Use #getConfig() instead */ @Deprecated public int getStackTraceOutputMethod() { return config.getStackTraceOutputMethod(); }