修复报告中请求失败数错误的bug
This commit is contained in:
parent
5a0863e9a8
commit
dc2a1202ae
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue