Commit 1d5e60a7 authored by 黎博's avatar 黎博

Merge branch 'master' into ldap

parents 9711c09f 8b622e8e
......@@ -123,6 +123,7 @@ public class TestReportController {
int total = sceneTestcaseReports.size();
int pass = 0;
int fail = 0;
Long totalElapsedTime = 0L;
for (SceneTestcaseReport sceneTestcaseReport: sceneTestcaseReports) {
String status = sceneTestcaseReport.getStatus();
if (status.equals("pass")) {
......@@ -130,10 +131,12 @@ public class TestReportController {
} else if (status.equals("fail")) {
fail += 1;
}
totalElapsedTime += sceneTestcaseReport.getElapsedTime();
}
map.put("total", total);
map.put("pass", pass);
map.put("fail", fail);
map.put("totalElapsedTime", totalElapsedTime);
map.put("list", sceneTestcaseReports);
return JsonResult.buildSuccessResult(map);
}
......
......@@ -113,7 +113,7 @@ public class AutoUtilsServiceImpl implements AutoUtilsService {
String comparator = map.get("comparator");
String checkpoint = JsonPath.read(response, map.get("check")).toString();
String expectValue = map.get("expect");
boolean result = singleAssertResponse(response, comparator, checkpoint, expectValue);
boolean result = singleAssertResponse(comparator, checkpoint, expectValue);
if (!result) {
return false;
}
......@@ -123,13 +123,12 @@ public class AutoUtilsServiceImpl implements AutoUtilsService {
/**
*
* @param response
* @param comparator
* @param checkpoint
* @param expectValue
* @return
*/
public boolean singleAssertResponse(String response, String comparator, String checkpoint, String expectValue) {
public boolean singleAssertResponse(String comparator, String checkpoint, String expectValue) {
switch (comparator) {
case "eq":
return checkpoint.equals(expectValue);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment