提交 dc2a1202 编写于 作者: Q q4speed

修复报告中请求失败数错误的bug

上级 5a0863e9
......@@ -88,8 +88,8 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
scenarioResult.addSuccess();
testResult.addSuccess();
} else {
scenarioResult.addError();
testResult.addError();
scenarioResult.addError(result.getErrorCount());
testResult.addError(result.getErrorCount());
}
RequestResult requestResult = getRequestResult(result);
......@@ -123,6 +123,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
requestResult.setRequestSize(result.getSentBytes());
requestResult.setTotalAssertions(result.getAssertionResults().length);
requestResult.setSuccess(result.isSuccessful());
requestResult.setError(result.getErrorCount());
ResponseResult responseResult = requestResult.getResponseResult();
responseResult.setBody(result.getResponseDataAsString());
......
......@@ -13,6 +13,8 @@ public class RequestResult {
private long requestSize;
private int error;
private boolean success;
private String headers;
......
......@@ -28,8 +28,8 @@ public class ScenarioResult {
this.responseTime += time;
}
public void addError() {
this.error++;
public void addError(int count) {
this.error += count;
}
public void addSuccess() {
......
......@@ -22,8 +22,8 @@ public class TestResult {
private final List<ScenarioResult> scenarios = new ArrayList<>();
public void addError() {
this.error++;
public void addError(int count) {
this.error += count;
}
public void addSuccess() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册