fix(接口测试): 修复报告时间计算问题
--bug=1009945 --user=赵勇 【接口测试】场景批量执行 - 串行 - node资源池执行,执行时间和结果显示错误 https://www.tapd.cn/55049933/s/1098852
This commit is contained in:
parent
b685fac7d9
commit
96fa4cef85
|
@ -42,15 +42,6 @@ public class ApiScenarioReportResultService {
|
||||||
//解析误报内容
|
//解析误报内容
|
||||||
ErrorReportLibraryParseDTO errorCodeDTO = ErrorReportLibraryUtil.parseAssertions(result);
|
ErrorReportLibraryParseDTO errorCodeDTO = ErrorReportLibraryUtil.parseAssertions(result);
|
||||||
report.setId(UUID.randomUUID().toString());
|
report.setId(UUID.randomUUID().toString());
|
||||||
result.setEndTime(System.currentTimeMillis());
|
|
||||||
if (result.getResponseResult() != null) {
|
|
||||||
long time = result.getEndTime() - result.getStartTime();
|
|
||||||
if (time > 0) {
|
|
||||||
result.getResponseResult().setResponseTime(time);
|
|
||||||
} else {
|
|
||||||
result.setEndTime(result.getEndTime());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
String resourceId = result.getResourceId();
|
String resourceId = result.getResourceId();
|
||||||
report.setResourceId(resourceId);
|
report.setResourceId(resourceId);
|
||||||
report.setReportId(reportId);
|
report.setReportId(reportId);
|
||||||
|
|
Loading…
Reference in New Issue