fix(测试计划): 修复测试计划统计卡片未忽略已删除的用例的缺陷
This commit is contained in:
parent
fd05fdaa35
commit
c654d22042
|
@ -37,7 +37,7 @@ public class ApiDefinitionUtils {
|
|||
String urlItem = urlParams[urlIndex];
|
||||
String customUrlItem = customUrlArr[customUrlArr.length - urlParams.length + urlIndex];
|
||||
// 不为rest参数的要进行全匹配。 而且忽略大小写
|
||||
if (isRestUrlParam(customUrlItem) && isRestUrlParam(urlItem)) {
|
||||
if (isNotRestUrlParam(customUrlItem) && isNotRestUrlParam(urlItem)) {
|
||||
if (!StringUtils.equalsIgnoreCase(customUrlItem, urlItem)) {
|
||||
isFetch = false;
|
||||
break;
|
||||
|
@ -53,7 +53,7 @@ public class ApiDefinitionUtils {
|
|||
String urlItem = urlParams[urlIndex];
|
||||
String customUrlItem = customUrlArr[urlIndex];
|
||||
// 不为rest参数的要进行全匹配。 而且忽略大小写
|
||||
if (isRestUrlParam(customUrlItem) && isRestUrlParam(urlItem)) {
|
||||
if (isNotRestUrlParam(customUrlItem) && isNotRestUrlParam(urlItem)) {
|
||||
if (!StringUtils.equalsIgnoreCase(customUrlItem, urlItem)) {
|
||||
isFetch = false;
|
||||
break;
|
||||
|
@ -80,7 +80,7 @@ public class ApiDefinitionUtils {
|
|||
return customRequestUrl;
|
||||
}
|
||||
|
||||
private static boolean isRestUrlParam(String urlParam) {
|
||||
private static boolean isNotRestUrlParam(String urlParam) {
|
||||
return !StringUtils.startsWith(urlParam, "{") || !StringUtils.endsWith(urlParam, "}") || StringUtils.equals(urlParam, "{}");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -920,10 +920,12 @@
|
|||
ELSE resource.last_exec_result
|
||||
END AS execResult
|
||||
from test_plan_api_case resource
|
||||
INNER JOIN api_test_case apiCase ON resource.api_case_id = apiCase.id
|
||||
where resource.test_plan_id IN
|
||||
<foreach collection="testPlanIds" item="testPlanId" separator="," open="(" close=")">
|
||||
#{testPlanId}
|
||||
</foreach>
|
||||
AND apiCase.deleted IS FALSE
|
||||
</select>
|
||||
<select id="getBatchRunInfoByIds" resultType="io.metersphere.plan.dto.TestPlanApiCaseBatchRunDTO">
|
||||
SELECT t.id as id, t.test_plan_collection_id as test_plan_collection_id, atc.name as name, atc.id as caseId
|
||||
|
|
|
@ -690,9 +690,11 @@
|
|||
ELSE resource.last_exec_result
|
||||
END AS execResult
|
||||
from test_plan_api_scenario resource
|
||||
INNER JOIN api_scenario scenario ON resource.api_scenario_id = scenario.id
|
||||
where resource.test_plan_id IN
|
||||
<foreach collection="testPlanIds" item="testPlanId" separator="," open="(" close=")">
|
||||
#{testPlanId}
|
||||
</foreach>
|
||||
AND scenario.deleted IS FALSE
|
||||
</select>
|
||||
</mapper>
|
|
@ -816,11 +816,13 @@
|
|||
THEN 'PENDING'
|
||||
ELSE resource.last_exec_result
|
||||
END AS execResult
|
||||
from test_plan_functional_case resource
|
||||
where resource.test_plan_id IN
|
||||
FROM test_plan_functional_case resource
|
||||
INNER JOIN functional_case funcCase ON resource.functional_case_id = funcCase.id
|
||||
WHERE resource.test_plan_id IN
|
||||
<foreach collection="testPlanIds" item="testPlanId" separator="," open="(" close=")">
|
||||
#{testPlanId}
|
||||
</foreach>
|
||||
AND funcCase.deleted IS FALSE
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue