Merge remote-tracking branch 'origin/v1.7' into v1.7
This commit is contained in:
commit
d21ec14290
|
@ -314,11 +314,7 @@ public class APITestController {
|
||||||
apiCountResult.setThisWeekExecutedCount(executedInThisWeekCountNumber);
|
apiCountResult.setThisWeekExecutedCount(executedInThisWeekCountNumber);
|
||||||
|
|
||||||
//统计 失败 成功 以及总数
|
//统计 失败 成功 以及总数
|
||||||
// List<ApiDataCountResult> api_allExecuteResult = apiReportService.countByProjectIdGroupByExecuteResult(projectId);
|
|
||||||
List<ApiDataCountResult> allExecuteResult = apiScenarioReportService.countByProjectIdGroupByExecuteResult(projectId);
|
List<ApiDataCountResult> allExecuteResult = apiScenarioReportService.countByProjectIdGroupByExecuteResult(projectId);
|
||||||
// List<ApiDataCountResult> allExecuteResult = new ArrayList<>();
|
|
||||||
// allExecuteResult.addAll(api_allExecuteResult);
|
|
||||||
// allExecuteResult.addAll(scene_allExecuteResult);
|
|
||||||
apiCountResult.countScheduleExecute(allExecuteResult);
|
apiCountResult.countScheduleExecute(allExecuteResult);
|
||||||
|
|
||||||
long allCount = apiCountResult.getExecutedCount();
|
long allCount = apiCountResult.getExecutedCount();
|
||||||
|
|
|
@ -216,4 +216,6 @@ public class ApiDefinitionController {
|
||||||
public String preview(@RequestBody String jsonSchema) {
|
public String preview(@RequestBody String jsonSchema) {
|
||||||
return JSONSchemaGenerator.getJson(jsonSchema);
|
return JSONSchemaGenerator.getJson(jsonSchema);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,6 +103,15 @@ public class ApiAutomationService {
|
||||||
if (setDefultOrders) {
|
if (setDefultOrders) {
|
||||||
request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders()));
|
request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders()));
|
||||||
}
|
}
|
||||||
|
if(StringUtils.isNotEmpty(request.getExecuteStatus())){
|
||||||
|
Map<String,List<String>> statusFilter = new HashMap<>();
|
||||||
|
List<String> list = new ArrayList<>();
|
||||||
|
list.add("Prepare");
|
||||||
|
list.add("Underway");
|
||||||
|
list.add("Completed");
|
||||||
|
statusFilter.put("status",list);
|
||||||
|
request.setFilters(statusFilter);
|
||||||
|
}
|
||||||
if (checkThisWeekData) {
|
if (checkThisWeekData) {
|
||||||
if (request.isSelectThisWeedData()) {
|
if (request.isSelectThisWeedData()) {
|
||||||
Map<String, Date> weekFirstTimeAndLastTime = DateUtils.getWeedFirstTimeAndLastTime(new Date());
|
Map<String, Date> weekFirstTimeAndLastTime = DateUtils.getWeedFirstTimeAndLastTime(new Date());
|
||||||
|
|
|
@ -304,7 +304,7 @@
|
||||||
|
|
||||||
<select id="countRunResultByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
<select id="countRunResultByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||||
SELECT count(id) AS countNumber, if(last_result is null,"notRun",last_result) AS groupField FROM api_scenario
|
SELECT count(id) AS countNumber, if(last_result is null,"notRun",last_result) AS groupField FROM api_scenario
|
||||||
WHERE project_id = #{0}
|
WHERE project_id = #{0} AND status != 'Trash'
|
||||||
GROUP BY groupField
|
GROUP BY groupField
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -278,7 +278,9 @@
|
||||||
url = "/api/testcase/update";
|
url = "/api/testcase/update";
|
||||||
} else {
|
} else {
|
||||||
tmp.request.path = this.api.path;
|
tmp.request.path = this.api.path;
|
||||||
tmp.request.method = this.api.method;
|
if (tmp.request.protocol != "dubbo://" && tmp.request.protocol != "DUBBO") {
|
||||||
|
tmp.request.method = this.api.method;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (tmp.tags instanceof Array) {
|
if (tmp.tags instanceof Array) {
|
||||||
tmp.tags = JSON.stringify(tmp.tags);
|
tmp.tags = JSON.stringify(tmp.tags);
|
||||||
|
|
Loading…
Reference in New Issue