Merge branch 'master' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
4ce09675b3
|
@ -193,6 +193,8 @@ public class ApiDefinitionExecResultService {
|
|||
planRequest.setScenarioId(item.getTestCaseID());
|
||||
} else if ("apiCase".equals(item.getCaseType())) {
|
||||
planRequest.setApiId(item.getTestCaseID());
|
||||
} else if ("load".equals(item.getCaseType())) {
|
||||
planRequest.setLoadId(item.getTestCaseID());
|
||||
}
|
||||
List<TestPlanDTO> dtoList = testPlanService.selectTestPlanByRelevancy(planRequest);
|
||||
item.setTestPlanDTOList(dtoList);
|
||||
|
|
|
@ -63,6 +63,18 @@
|
|||
WHERE report.project_id = #{projectId}
|
||||
AND ( report.STATUS = 'Error' OR report.STATUS = 'Fail' ) AND report.create_time >= #{startTimestamp}
|
||||
GROUP BY scene.id
|
||||
UNION
|
||||
SELECT ltr.test_id as testCaseID, ltr.name as caseName,tplt.testPlanName AS testPlan, count(ltr.id) as failureTimes, 'load' as caseType FROM load_test_report ltr
|
||||
join load_test on load_test.id = ltr.test_id
|
||||
JOIN (
|
||||
select tplc.load_case_id, group_concat(tp.`name`) AS testPlanName, tp.project_id
|
||||
from test_plan_load_case tplc
|
||||
join test_plan tp on tp.id = tplc.test_plan_id
|
||||
GROUP BY tplc.load_case_id
|
||||
) tplt on tplt.load_case_id = ltr.test_id
|
||||
WHERE load_test.project_id = #{projectId}
|
||||
AND ltr.STATUS = 'Error' and ltr.trigger_mode = 'TEST_PLAN_SCHEDULE' AND ltr.create_time >= #{startTimestamp}
|
||||
GROUP BY load_test.id
|
||||
) showTable
|
||||
ORDER BY showTable.failureTimes DESC
|
||||
</select>
|
||||
|
|
|
@ -223,6 +223,9 @@
|
|||
<if test="request.apiId != null">
|
||||
AND p.id IN (SELECT test_plan_id FROM test_plan_api_case WHERE api_case_id = #{request.apiId})
|
||||
</if>
|
||||
<if test="request.loadId != null">
|
||||
AND p.id IN (SELECT test_plan_id FROM test_plan_load_case WHERE load_case_id = #{request.loadId})
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="findTestProjectNameByTestPlanID" resultType="java.lang.String">
|
||||
|
|
|
@ -20,6 +20,8 @@ public class QueryTestPlanRequest extends TestPlan {
|
|||
|
||||
private String apiId;
|
||||
|
||||
private String loadId;
|
||||
|
||||
private List<OrderRequest> orders;
|
||||
|
||||
private Map<String, List<String>> filters;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
<template v-slot:default="scope">
|
||||
<ms-tag v-if="scope.row.caseType == 'apiCase'" type="success" effect="plain" :content="$t('api_test.home_page.failed_case_list.table_value.case_type.api')"/>
|
||||
<ms-tag v-if="scope.row.caseType == 'scenario'" type="warning" effect="plain" :content="$t('api_test.home_page.failed_case_list.table_value.case_type.scene')"/>
|
||||
<ms-tag v-if="scope.row.caseType == 'load'" type="danger" effect="plain" :content="$t('api_test.home_page.failed_case_list.table_value.case_type.load')"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="testPlan" :label="$t('api_test.home_page.failed_case_list.table_coloum.test_plan')">
|
||||
|
|
|
@ -1035,6 +1035,7 @@ export default {
|
|||
case_type: {
|
||||
api: "Api case",
|
||||
scene: "Scenario case",
|
||||
load: "Load case"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1039,6 +1039,7 @@ export default {
|
|||
case_type: {
|
||||
api: "接口用例",
|
||||
scene: "场景用例",
|
||||
load: "性能用例"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1037,6 +1037,7 @@ export default {
|
|||
case_type: {
|
||||
api: "接口用例",
|
||||
scene: "場景用例",
|
||||
load: "性能用例"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue