/** * @deprecated Use #getConfig() instead */ @Deprecated public String getTimestampFormat() { return config.getTimestampFormat(); }
/** @deprecated Use #getConfig() instead */ @Deprecated public String getTimestampFormat() { return config.getTimestampFormat(); }
/** * Add started-at, finished-at and duration-ms attributes to the <suite> tag */ public static void addDurationAttributes(XMLReporterConfig config, Properties attributes, Date minStartDate, Date maxEndDate) { String startTime = TimeUtils.timeInUTC(minStartDate.getTime(), config.getTimestampFormat()); String endTime = TimeUtils.timeInUTC(maxEndDate.getTime(), config.getTimestampFormat()); long duration = maxEndDate.getTime() - minStartDate.getTime(); attributes.setProperty(XMLReporterConfig.ATTR_STARTED_AT, startTime); attributes.setProperty(XMLReporterConfig.ATTR_FINISHED_AT, endTime); attributes.setProperty(XMLReporterConfig.ATTR_DURATION_MS, Long.toString(duration)); }
/** Add started-at, finished-at and duration-ms attributes to the <suite> tag */ public static void addDurationAttributes( XMLReporterConfig config, Properties attributes, Date minStartDate, Date maxEndDate) { String startTime = TimeUtils.formatTimeInLocalOrSpecifiedTimeZone( minStartDate.getTime(), config.getTimestampFormat()); String endTime = TimeUtils.formatTimeInLocalOrSpecifiedTimeZone( maxEndDate.getTime(), config.getTimestampFormat()); long duration = maxEndDate.getTime() - minStartDate.getTime(); attributes.setProperty(XMLReporterConfig.ATTR_STARTED_AT, startTime); attributes.setProperty(XMLReporterConfig.ATTR_FINISHED_AT, endTime); attributes.setProperty(XMLReporterConfig.ATTR_DURATION_MS, Long.toString(duration)); }
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);
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);