修复报告中请求失败数错误的bug
This commit is contained in:
parent
5a0863e9a8
commit
dc2a1202ae
|
@ -88,8 +88,8 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
|
||||||
scenarioResult.addSuccess();
|
scenarioResult.addSuccess();
|
||||||
testResult.addSuccess();
|
testResult.addSuccess();
|
||||||
} else {
|
} else {
|
||||||
scenarioResult.addError();
|
scenarioResult.addError(result.getErrorCount());
|
||||||
testResult.addError();
|
testResult.addError(result.getErrorCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
RequestResult requestResult = getRequestResult(result);
|
RequestResult requestResult = getRequestResult(result);
|
||||||
|
@ -123,6 +123,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
|
||||||
requestResult.setRequestSize(result.getSentBytes());
|
requestResult.setRequestSize(result.getSentBytes());
|
||||||
requestResult.setTotalAssertions(result.getAssertionResults().length);
|
requestResult.setTotalAssertions(result.getAssertionResults().length);
|
||||||
requestResult.setSuccess(result.isSuccessful());
|
requestResult.setSuccess(result.isSuccessful());
|
||||||
|
requestResult.setError(result.getErrorCount());
|
||||||
|
|
||||||
ResponseResult responseResult = requestResult.getResponseResult();
|
ResponseResult responseResult = requestResult.getResponseResult();
|
||||||
responseResult.setBody(result.getResponseDataAsString());
|
responseResult.setBody(result.getResponseDataAsString());
|
||||||
|
|
|
@ -13,6 +13,8 @@ public class RequestResult {
|
||||||
|
|
||||||
private long requestSize;
|
private long requestSize;
|
||||||
|
|
||||||
|
private int error;
|
||||||
|
|
||||||
private boolean success;
|
private boolean success;
|
||||||
|
|
||||||
private String headers;
|
private String headers;
|
||||||
|
|
|
@ -28,8 +28,8 @@ public class ScenarioResult {
|
||||||
this.responseTime += time;
|
this.responseTime += time;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addError() {
|
public void addError(int count) {
|
||||||
this.error++;
|
this.error += count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addSuccess() {
|
public void addSuccess() {
|
||||||
|
|
|
@ -22,8 +22,8 @@ public class TestResult {
|
||||||
|
|
||||||
private final List<ScenarioResult> scenarios = new ArrayList<>();
|
private final List<ScenarioResult> scenarios = new ArrayList<>();
|
||||||
|
|
||||||
public void addError() {
|
public void addError(int count) {
|
||||||
this.error++;
|
this.error += count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addSuccess() {
|
public void addSuccess() {
|
||||||
|
|
Loading…
Reference in New Issue