fix(测试跟踪): 测试用例关联测试,显示了多条相同数据

--bug=1020235 --user=陈建星 【测试跟踪】测试用例-关联性能测试-报sql错 https://www.tapd.cn/55049933/s/1304609
This commit is contained in:
chenjianxing 2022-11-24 16:47:03 +08:00 committed by jianxing
parent 0d30328bb6
commit 61926434ae
8 changed files with 17 additions and 5 deletions

View File

@ -35,6 +35,9 @@ public class ApiScenarioRequest extends BaseQueryRequest {
*/
private boolean selectEnvironment = false;
// 查询功能用例需要关联的场景测试列表
private String testCaseId;
//测试计划关联场景过滤掉步骤为0的场景
private String stepTotal;
}

View File

@ -968,6 +968,7 @@
FROM
api_scenario atc
LEFT JOIN test_case_test tct ON atc.id = tct.test_id
and tct.test_case_id = #{request.testCaseId}
WHERE
(atc.status is null or atc.status != 'Trash')
<if test="request.projectId != null and request.projectId!=''">
@ -1088,4 +1089,4 @@
WHERE project_id IS NULL
</select>
</mapper>
</mapper>

View File

@ -544,6 +544,7 @@
FROM
load_test atc
LEFT JOIN test_case_test tct ON atc.id = tct.test_id
and tct.test_case_id = #{request.testCaseId}
WHERE
(atc.status is null or atc.status != 'Trash')
<if test="request.projectId != null and request.projectId!=''">

View File

@ -26,5 +26,8 @@ public class LoadCaseRequest extends TestPlanLoadCase {
private List<String> notInIds;
// 查询功能用例需要关联的性能测试列表
private String testCaseId;
private Boolean allowedRepeatCase = false;
}

View File

@ -9,6 +9,7 @@
:project-id="projectId"
:not-in-ids="notInIds"
:versionEnable="versionEnable"
:test-case-id="caseId"
@selectCountChange="setSelectCounts"
ref="apiCaseList"/>

View File

@ -77,7 +77,6 @@
import MsTable from "metersphere-frontend/src/components/table/MsTable";
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination";
// import MsPerformanceTestStatus from "@/business/components/performance/test/PerformanceTestStatus";
import MsTableAdvSearchBar from "metersphere-frontend/src/components/search/MsTableAdvSearchBar";
import {TEST_CASE_RELEVANCE_LOAD_CASE} from "metersphere-frontend/src/components/search/search-components";
import MxVersionSelect from "metersphere-frontend/src/components/version/MxVersionSelect";
@ -87,7 +86,6 @@ import {getTestCaseRelevanceLoadList} from "@/api/testCase";
export default {
name: "TestCaseRelateLoadList",
components: {
// MsPerformanceTestStatus,
MsTablePagination,
MsTable,
MsTableColumn,
@ -114,7 +112,8 @@ export default {
notInIds: {
type: Array,
default: null
}
},
testCaseId: String
},
created: function () {
this.initTable();
@ -148,6 +147,7 @@ export default {
this.condition.projectId = this.projectId;
}
this.condition.notInIds = this.notInIds;
this.condition.testCaseId = this.testCaseId;
getTestCaseRelevanceLoadList(this.currentPage, this.pageSize, this.condition)
.then(response => {
this.total = response.data.itemCount;

View File

@ -130,7 +130,8 @@ export default {
notInIds: {
type: Array,
default: null
}
},
testCaseId: String
},
created: function () {
this.getVersionOptions();
@ -167,6 +168,7 @@ export default {
this.condition.projectId = this.projectId;
}
this.condition.notInIds = this.notInIds;
this.condition.testCaseId = this.testCaseId;
getTestCaseRelevanceScenarioList(this.currentPage, this.pageSize, this.condition)
.then(response => {
this.total = response.data.itemCount;

View File

@ -22,6 +22,7 @@
:project-id="projectId"
:not-in-ids="notInIds"
:versionEnable="versionEnable"
:test-case-id="caseId"
@selectCountChange="setSelectCounts"
ref="apiCaseList"/>