fix(测试跟踪): 修复首页失败case跳转页面错误的缺陷
--bug=1024638 --user=王孝刚 【测试跟踪】过去7天测试计划失败用例中 TCP/Dubbo 协议接口case跳转页面错误 https://www.tapd.cn/55049933/s/1353208
This commit is contained in:
parent
135bc509a7
commit
b062fc5a56
|
@ -252,7 +252,7 @@ export default {
|
||||||
jsonPath: [],
|
jsonPath: [],
|
||||||
xpath2: [],
|
xpath2: [],
|
||||||
jsr223: [],
|
jsr223: [],
|
||||||
document: {type: "JSON", data: {json: [], xml: []}},
|
document: {type: "JSON", data: {json: [], xml: []}, enable: true},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -301,7 +301,7 @@ export default {
|
||||||
jsonPath: [],
|
jsonPath: [],
|
||||||
xpath2: [],
|
xpath2: [],
|
||||||
jsr223: [],
|
jsr223: [],
|
||||||
document: {type: "JSON", data: {json: [], xml: []}},
|
document: {type: "JSON", data: {json: [], xml: []}, enable: true},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,7 +252,7 @@ export default {
|
||||||
jsonPath: [],
|
jsonPath: [],
|
||||||
xpath2: [],
|
xpath2: [],
|
||||||
jsr223: [],
|
jsr223: [],
|
||||||
document: {type: "JSON", data: {json: [], xml: []}},
|
document: {type: "JSON", data: {json: [], xml: []}, enable: true},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -301,7 +301,7 @@ export default {
|
||||||
jsonPath: [],
|
jsonPath: [],
|
||||||
xpath2: [],
|
xpath2: [],
|
||||||
jsr223: [],
|
jsr223: [],
|
||||||
document: {type: "JSON", data: {json: [], xml: []}},
|
document: {type: "JSON", data: {json: [], xml: []}, enable: true},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
SELECT t.api_case_id AS id,a.name AS caseName,t.status AS execResult
|
SELECT t.api_case_id AS id,a.name AS caseName,t.status AS execResult
|
||||||
FROM test_plan_api_case t
|
FROM test_plan_api_case t
|
||||||
INNER JOIN api_test_case a ON t.api_case_id = a.id
|
INNER JOIN api_test_case a ON t.api_case_id = a.id
|
||||||
WHERE t.test_plan_id = #{testPlanId} AND t.api_case_id in
|
WHERE t.test_plan_id = #{testPlanId} AND t.api_case_id in
|
||||||
<foreach collection="apiCaseIds" item="id" separator="," open="(" close=")">
|
<foreach collection="apiCaseIds" item="id" separator="," open="(" close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
@ -38,30 +38,35 @@
|
||||||
testCase.testPlanName AS testPlan,
|
testCase.testPlanName AS testPlan,
|
||||||
testCase.testPlanId AS testPlanId,
|
testCase.testPlanId AS testPlanId,
|
||||||
caseErrorCountData.dataCountNumber AS failureTimes,
|
caseErrorCountData.dataCountNumber AS failureTimes,
|
||||||
'apiCase' AS caseType
|
'apiCase' AS caseType,
|
||||||
|
testCase.protocol as protocol,
|
||||||
|
testCase.project_id as project_id
|
||||||
FROM (
|
FROM (
|
||||||
SELECT testPlanCase.id AS testPlanCaseID,
|
SELECT testPlanCase.id AS testPlanCaseID,
|
||||||
apiCase.id AS id,
|
apiCase.id AS id,
|
||||||
apiCase.`name` AS testCaseName,
|
apiCase.`name` AS testCaseName,
|
||||||
testPlan.id AS testPlanId,
|
testPlan.id AS testPlanId,
|
||||||
testPlan.`name` AS testPlanName
|
testPlan.`name` AS testPlanName,
|
||||||
FROM api_test_case apiCase
|
api_definition.protocol as protocol,
|
||||||
INNER JOIN test_plan_api_case testPlanCase ON testPlanCase.api_case_id = apiCase.id
|
api_definition.project_id as project_id
|
||||||
INNER JOIN test_plan testPlan ON testPlan.id = testPlanCase.test_plan_id
|
FROM api_test_case apiCase
|
||||||
WHERE
|
INNER JOIN test_plan_api_case testPlanCase ON testPlanCase.api_case_id = apiCase.id
|
||||||
(apiCase.`status` IS NULL OR apiCase.`status` != 'Trash')
|
INNER JOIN test_plan testPlan ON testPlan.id = testPlanCase.test_plan_id
|
||||||
AND apiCase.project_id = #{projectId}
|
INNER JOIN api_definition on api_definition.id = apiCase.api_definition_id
|
||||||
|
WHERE
|
||||||
|
(apiCase.`status` IS NULL OR apiCase.`status` != 'Trash')
|
||||||
|
AND apiCase.project_id = #{projectId}
|
||||||
) testCase
|
) testCase
|
||||||
INNER JOIN (SELECT executionInfo.source_id AS sourceId,
|
INNER JOIN (SELECT executionInfo.source_id AS sourceId,
|
||||||
COUNT(executionInfo.id) AS dataCountNumber
|
COUNT(executionInfo.id) AS dataCountNumber
|
||||||
FROM api_case_execution_info executionInfo
|
FROM api_case_execution_info executionInfo
|
||||||
INNER JOIN test_plan_api_case testPlanCase ON executionInfo.source_id = testPlanCase.id
|
INNER JOIN test_plan_api_case testPlanCase ON executionInfo.source_id = testPlanCase.id
|
||||||
WHERE executionInfo.`result` = 'ERROR'
|
WHERE executionInfo.`result` = 'ERROR'
|
||||||
AND executionInfo.create_time > #{startTimestamp}
|
AND executionInfo.create_time > #{startTimestamp}
|
||||||
<if test="versionId != null">
|
<if test="versionId != null">
|
||||||
AND executionInfo.version = #{versionId}
|
AND executionInfo.version = #{versionId}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY source_id
|
GROUP BY source_id
|
||||||
) caseErrorCountData
|
) caseErrorCountData
|
||||||
ON caseErrorCountData.sourceId = testCase.testPlanCaseID
|
ON caseErrorCountData.sourceId = testCase.testPlanCaseID
|
||||||
) showTable ORDER BY showTable.failureTimes DESC LIMIT ${limitNumber}
|
) showTable ORDER BY showTable.failureTimes DESC LIMIT ${limitNumber}
|
||||||
|
|
|
@ -90,6 +90,8 @@ public class TrackController {
|
||||||
dataDTO.setCaseType(selectData.getCaseType());
|
dataDTO.setCaseType(selectData.getCaseType());
|
||||||
dataDTO.setId(selectData.getId());
|
dataDTO.setId(selectData.getId());
|
||||||
dataDTO.setTestPlanDTOList(selectData.getTestPlanDTOList());
|
dataDTO.setTestPlanDTOList(selectData.getTestPlanDTOList());
|
||||||
|
dataDTO.setProtocol(selectData.getProtocol());
|
||||||
|
dataDTO.setProjectId(selectData.getProjectId());
|
||||||
returnList.add(dataDTO);
|
returnList.add(dataDTO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,4 +28,6 @@ public class ExecutedCaseInfoDTO {
|
||||||
private String id;
|
private String id;
|
||||||
//测试计划集合
|
//测试计划集合
|
||||||
private List<TestPlanDTO> testPlanDTOList;
|
private List<TestPlanDTO> testPlanDTOList;
|
||||||
|
private String protocol;
|
||||||
|
private String projectId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,4 +23,6 @@ public class ExecutedCaseInfoResult {
|
||||||
//案例类型
|
//案例类型
|
||||||
private String caseType;
|
private String caseType;
|
||||||
private List<TestPlanDTO> testPlanDTOList;
|
private List<TestPlanDTO> testPlanDTOList;
|
||||||
|
private String protocol;
|
||||||
|
private String projectId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ export default {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
redirectPage(page, dataType, selectType, title) {
|
redirectPage(page, dataType, selectType, projectId, protocol) {
|
||||||
//api页面跳转
|
//api页面跳转
|
||||||
//传入UUID是为了进行页面重新加载判断
|
//传入UUID是为了进行页面重新加载判断
|
||||||
let uuid = getUUID();
|
let uuid = getUUID();
|
||||||
|
@ -118,7 +118,11 @@ export default {
|
||||||
"/" +
|
"/" +
|
||||||
dataType +
|
dataType +
|
||||||
"/" +
|
"/" +
|
||||||
selectType
|
selectType+
|
||||||
|
"/" +
|
||||||
|
projectId +
|
||||||
|
"/" +
|
||||||
|
protocol
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case "issue":
|
case "issue":
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
style="color: #783887; width: 100%"
|
style="color: #783887; width: 100%"
|
||||||
:underline="false"
|
:underline="false"
|
||||||
type="info"
|
type="info"
|
||||||
@click="redirect(row.caseType, row.id)"
|
@click="redirect(row.caseType, row.id, row.protocol, row.projectId)"
|
||||||
:disabled="
|
:disabled="
|
||||||
(row.caseType === 'apiCase' && apiCaseReadOnly) ||
|
(row.caseType === 'apiCase' && apiCaseReadOnly) ||
|
||||||
(row.caseType === 'scenario' && apiScenarioReadOnly) ||
|
(row.caseType === 'scenario' && apiScenarioReadOnly) ||
|
||||||
|
@ -192,13 +192,13 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
redirect(pageType, param) {
|
redirect(pageType, param, protocol, projectId) {
|
||||||
switch (pageType) {
|
switch (pageType) {
|
||||||
case "testPlanEdit":
|
case "testPlanEdit":
|
||||||
this.$emit("redirectPage", "testPlanEdit", null, param);
|
this.$emit("redirectPage", "testPlanEdit", null, param);
|
||||||
break;
|
break;
|
||||||
case "apiCase":
|
case "apiCase":
|
||||||
this.$emit("redirectPage", "api", "apiTestCase", "single:" + param);
|
this.$emit("redirectPage", "api", "apiTestCase", "single:" + param, projectId , protocol);
|
||||||
break;
|
break;
|
||||||
case "scenario":
|
case "scenario":
|
||||||
this.$emit(
|
this.$emit(
|
||||||
|
|
Loading…
Reference in New Issue