fix(接口测试): 修复接口自动化场景接口测试响应断言不准确的缺陷
--bug=1010232 --user=王孝刚 【接口测试】github#10412,接口测试响应断言不准确 https://www.tapd.cn/55049933/s/1104624
This commit is contained in:
parent
b588cdf53a
commit
13e9bbd3c2
|
@ -67,7 +67,7 @@ public class ApiDefinitionExecResultService {
|
||||||
|
|
||||||
for (RequestResult item : requestResults) {
|
for (RequestResult item : requestResults) {
|
||||||
item.setEndTime(System.currentTimeMillis());
|
item.setEndTime(System.currentTimeMillis());
|
||||||
if (item.getResponseResult() != null) {
|
if (item.getResponseResult() != null && item.getResponseResult().getResponseTime() <= 0) {
|
||||||
item.getResponseResult().setResponseTime((item.getEndTime() - item.getStartTime()));
|
item.getResponseResult().setResponseTime((item.getEndTime() - item.getStartTime()));
|
||||||
}
|
}
|
||||||
if (!StringUtils.startsWithAny(item.getName(), "PRE_PROCESSOR_ENV_", "POST_PROCESSOR_ENV_")) {
|
if (!StringUtils.startsWithAny(item.getName(), "PRE_PROCESSOR_ENV_", "POST_PROCESSOR_ENV_")) {
|
||||||
|
|
Loading…
Reference in New Issue