--bug=1005697 --user=宋天阳 【测试跟踪】首页,用例总数统计有误 https://www.tapd.cn/55049933/s/1033262 --bug=1005694 --user=宋天阳 【接口自动化】包含前/后置sql的场景,转性能测试会报错 https://www.tapd.cn/55049933/s/1033263 --bug=1005686 --user=宋天阳 【接口定义】点击首页用例名称,跳转到用例列表后,用例列表数据清空了 https://www.tapd.cn/55049933/s/1033264
This commit is contained in:
parent
bcb29d816e
commit
6ddc5bf2e4
|
@ -332,6 +332,7 @@ public class APITestController {
|
||||||
dataDTO.setTestPlan(selectData.getTestPlan());
|
dataDTO.setTestPlan(selectData.getTestPlan());
|
||||||
dataDTO.setFailureTimes(selectData.getFailureTimes());
|
dataDTO.setFailureTimes(selectData.getFailureTimes());
|
||||||
dataDTO.setCaseType(selectData.getCaseType());
|
dataDTO.setCaseType(selectData.getCaseType());
|
||||||
|
dataDTO.setId(selectData.getId());
|
||||||
dataDTO.setTestPlanDTOList(selectData.getTestPlanDTOList());
|
dataDTO.setTestPlanDTOList(selectData.getTestPlanDTOList());
|
||||||
} else {
|
} else {
|
||||||
dataDTO.setCaseName("");
|
dataDTO.setCaseName("");
|
||||||
|
|
|
@ -13,6 +13,7 @@ import java.util.List;
|
||||||
@Setter
|
@Setter
|
||||||
public class ExecutedCaseInfoResult {
|
public class ExecutedCaseInfoResult {
|
||||||
private String testCaseID;
|
private String testCaseID;
|
||||||
|
private String id;
|
||||||
//案例名称
|
//案例名称
|
||||||
private String caseName;
|
private String caseName;
|
||||||
//所属测试计划
|
//所属测试计划
|
||||||
|
|
|
@ -22,8 +22,10 @@ public class ExecutedCaseInfoDTO {
|
||||||
private Long failureTimes;
|
private Long failureTimes;
|
||||||
//案例类型
|
//案例类型
|
||||||
private String caseType;
|
private String caseType;
|
||||||
//案例ID
|
//案例ID -- 目前被用为案例-测试计划 关联表ID
|
||||||
private String caseID;
|
private String caseID;
|
||||||
|
//ID
|
||||||
|
private String id;
|
||||||
//测试计划集合
|
//测试计划集合
|
||||||
private List<TestPlanDTO> testPlanDTOList;
|
private List<TestPlanDTO> testPlanDTOList;
|
||||||
}
|
}
|
||||||
|
|
|
@ -236,7 +236,7 @@ public class MsJDBCPostProcessor extends MsTestElement {
|
||||||
private JDBCPostProcessor jdbcPostProcessor(ParameterConfig config) {
|
private JDBCPostProcessor jdbcPostProcessor(ParameterConfig config) {
|
||||||
JDBCPostProcessor jdbcPostProcessor = new JDBCPostProcessor();
|
JDBCPostProcessor jdbcPostProcessor = new JDBCPostProcessor();
|
||||||
jdbcPostProcessor.setEnabled(this.isEnable());
|
jdbcPostProcessor.setEnabled(this.isEnable());
|
||||||
jdbcPostProcessor.setName(this.getName());
|
jdbcPostProcessor.setName(this.getName() == null? "JDBCPostProcessor" : this.getName());
|
||||||
String name = this.getParentName(this.getParent());
|
String name = this.getParentName(this.getParent());
|
||||||
if (StringUtils.isNotEmpty(name) && !config.isOperating()) {
|
if (StringUtils.isNotEmpty(name) && !config.isOperating()) {
|
||||||
jdbcPostProcessor.setName(this.getName() + DelimiterConstants.SEPARATOR.toString() + name);
|
jdbcPostProcessor.setName(this.getName() + DelimiterConstants.SEPARATOR.toString() + name);
|
||||||
|
|
|
@ -236,7 +236,7 @@ public class MsJDBCPreProcessor extends MsTestElement {
|
||||||
private JDBCPreProcessor jdbcPreProcessor(ParameterConfig config) {
|
private JDBCPreProcessor jdbcPreProcessor(ParameterConfig config) {
|
||||||
JDBCPreProcessor jdbcPreProcessor = new JDBCPreProcessor();
|
JDBCPreProcessor jdbcPreProcessor = new JDBCPreProcessor();
|
||||||
jdbcPreProcessor.setEnabled(this.isEnable());
|
jdbcPreProcessor.setEnabled(this.isEnable());
|
||||||
jdbcPreProcessor.setName(this.getName());
|
jdbcPreProcessor.setName(this.getName() == null? "JDBCPreProcessor" : this.getName());
|
||||||
String name = this.getParentName(this.getParent());
|
String name = this.getParentName(this.getParent());
|
||||||
if (StringUtils.isNotEmpty(name) && !config.isOperating()) {
|
if (StringUtils.isNotEmpty(name) && !config.isOperating()) {
|
||||||
jdbcPreProcessor.setName(this.getName() + DelimiterConstants.SEPARATOR.toString() + name);
|
jdbcPreProcessor.setName(this.getName() + DelimiterConstants.SEPARATOR.toString() + name);
|
||||||
|
|
|
@ -34,9 +34,9 @@
|
||||||
<select id="findFaliureCaseInfoByProjectIDAndExecuteTimeAndLimitNumber" resultType="io.metersphere.api.dto.datacount.ExecutedCaseInfoResult">
|
<select id="findFaliureCaseInfoByProjectIDAndExecuteTimeAndLimitNumber" resultType="io.metersphere.api.dto.datacount.ExecutedCaseInfoResult">
|
||||||
SELECT * FROM (
|
SELECT * FROM (
|
||||||
-- api_test_case 只查找测试计划执行的结果
|
-- api_test_case 只查找测试计划执行的结果
|
||||||
SELECT testCase.testCaseID,testCase.testCaseName AS caseName,testCase.testPlanName AS testPlan ,caseErrorCountData.dataCountNumber AS failureTimes,'apiCase' AS caseType
|
SELECT testCase.testCaseID AS testCaseID,testCase.id AS id,testCase.testCaseName AS caseName,testCase.testPlanName AS testPlan ,caseErrorCountData.dataCountNumber AS failureTimes,'apiCase' AS caseType
|
||||||
FROM (
|
FROM (
|
||||||
SELECT testPlanCase.id AS testCaseID,apiCase.`name` AS testCaseName,group_concat(testPlan.`name`) AS testPlanName, testPlanCase.update_time as updateTime
|
SELECT testPlanCase.id AS testCaseID,apiCase.id AS id,apiCase.`name` AS testCaseName,group_concat(testPlan.`name`) AS testPlanName, testPlanCase.update_time as updateTime
|
||||||
FROM api_test_case apiCase
|
FROM api_test_case apiCase
|
||||||
inner join api_definition on api_definition.id = apiCase.api_definition_id
|
inner join api_definition on api_definition.id = apiCase.api_definition_id
|
||||||
INNER JOIN test_plan_api_case testPlanCase ON testPlanCase.api_case_id = apiCase.id
|
INNER JOIN test_plan_api_case testPlanCase ON testPlanCase.api_case_id = apiCase.id
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
) caseErrorCountData ON caseErrorCountData.testPlanCaseID =testCase.testCaseID
|
) caseErrorCountData ON caseErrorCountData.testPlanCaseID =testCase.testCaseID
|
||||||
WHERE testCase.updateTime >= #{startTimestamp}
|
WHERE testCase.updateTime >= #{startTimestamp}
|
||||||
UNION
|
UNION
|
||||||
SELECT scene.id AS testCaseID,scene.`name` AS caseName,apiScene.testPlanName AS testPlan,count(report.id) AS failureTimes,'scenario' AS caseType
|
SELECT scene.id AS testCaseID,scene.id AS id,scene.`name` AS caseName,apiScene.testPlanName AS testPlan,count(report.id) AS failureTimes,'scenario' AS caseType
|
||||||
FROM api_scenario_report report
|
FROM api_scenario_report report
|
||||||
INNER JOIN api_scenario_report_detail reportDetail ON report.id = reportDetail.report_id
|
INNER JOIN api_scenario_report_detail reportDetail ON report.id = reportDetail.report_id
|
||||||
INNER JOIN api_scenario scene ON report.scenario_id = scene.id
|
INNER JOIN api_scenario scene ON report.scenario_id = scene.id
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
AND ( report.STATUS = 'Error' OR report.STATUS = 'Fail' ) AND report.create_time >= #{startTimestamp}
|
AND ( report.STATUS = 'Error' OR report.STATUS = 'Fail' ) AND report.create_time >= #{startTimestamp}
|
||||||
GROUP BY scene.id
|
GROUP BY scene.id
|
||||||
UNION
|
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
|
SELECT ltr.test_id as testCaseID,ltr.id AS id, 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 load_test on load_test.id = ltr.test_id
|
||||||
JOIN (
|
JOIN (
|
||||||
select tplc.load_case_id, group_concat(tp.`name`) AS testPlanName, tp.project_id
|
select tplc.load_case_id, group_concat(tp.`name`) AS testPlanName, tp.project_id
|
||||||
|
|
|
@ -418,7 +418,7 @@
|
||||||
<select id="countProtocolByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
<select id="countProtocolByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||||
SELECT apiDef.protocol AS groupField,COUNT(testCase.id) AS countNumber FROM api_test_case testCase
|
SELECT apiDef.protocol AS groupField,COUNT(testCase.id) AS countNumber FROM api_test_case testCase
|
||||||
INNER JOIN api_definition apiDef ON testCase.api_definition_id = apiDef.id
|
INNER JOIN api_definition apiDef ON testCase.api_definition_id = apiDef.id
|
||||||
WHERE testCase.project_id = #{0} AND apiDef.status != "Trash"
|
WHERE testCase.project_id = #{0} AND (testCase.status IS NULL or testCase.status != "Trash")
|
||||||
GROUP BY apiDef.protocol
|
GROUP BY apiDef.protocol
|
||||||
</select>
|
</select>
|
||||||
<select id="findApiUrlAndMethodById" resultType="io.metersphere.base.domain.ApiDefinition">
|
<select id="findApiUrlAndMethodById" resultType="io.metersphere.base.domain.ApiDefinition">
|
||||||
|
|
|
@ -385,7 +385,9 @@
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="countPriority" resultType="io.metersphere.track.response.TrackCountResult">
|
<select id="countPriority" resultType="io.metersphere.track.response.TrackCountResult">
|
||||||
SELECT test_case.priority as groupField,count(id) AS countNumber FROM test_case WHERE project_id = #{projectId} GROUP BY test_case.priority
|
SELECT test_case.priority as groupField,count(id) AS countNumber FROM test_case
|
||||||
|
WHERE project_id = #{projectId} AND (test_case.status IS NULL OR test_case.status != 'Trash')
|
||||||
|
GROUP BY test_case.priority
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- todo 排除删除的用例统计-->
|
<!-- todo 排除删除的用例统计-->
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<el-table-column prop="sortIndex" :label="$t('api_test.home_page.failed_case_list.table_coloum.index')" width="100" show-overflow-tooltip/>
|
<el-table-column prop="sortIndex" :label="$t('api_test.home_page.failed_case_list.table_coloum.index')" width="100" show-overflow-tooltip/>
|
||||||
<el-table-column prop="caseName" :label="$t('api_test.home_page.failed_case_list.table_coloum.case_name')" width="150">
|
<el-table-column prop="caseName" :label="$t('api_test.home_page.failed_case_list.table_coloum.case_name')" width="150">
|
||||||
<template v-slot:default="{row}">
|
<template v-slot:default="{row}">
|
||||||
<el-link type="info" @click="redirect(row.caseType,row.caseID)">
|
<el-link type="info" @click="redirect(row.caseType,row.id)">
|
||||||
{{ row.caseName }}
|
{{ row.caseName }}
|
||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="editorsDivStyle">
|
<div class="editors_div_style">
|
||||||
<div id="editorsDiv" >
|
<div id="editorsDiv" >
|
||||||
<mavon-editor v-if="showEditor" @imgAdd="imgAdd" :default-open="'edit'" class="review-mavon-editor" :imageFilter="imageFilter"
|
<mavon-editor v-if="showEditor" @imgAdd="imgAdd" :default-open="'edit'" class="review-mavon-editor" :imageFilter="imageFilter"
|
||||||
:toolbars="richDataToolbars" @imgDel="imgDel" v-model="textarea" ref="md"/>
|
:toolbars="richDataToolbars" @imgDel="imgDel" v-model="textarea" ref="md"/>
|
||||||
|
|
Loading…
Reference in New Issue