fix(测试跟踪) 修复测试跟踪中跨项目性能测试 报告问题

This commit is contained in:
fit2-zhao 2021-09-23 12:17:02 +08:00 committed by fit2-zhao
parent 965596d35b
commit 9d347826ce
2 changed files with 10 additions and 1 deletions

View File

@ -313,6 +313,9 @@ public class PerformanceTestService {
if (request.getUserId() != null) {
loadTest.setUserId(request.getUserId());
}
if(StringUtils.isNotEmpty(request.getProjectId())){
loadTest.setProjectId(request.getProjectId());
}
if (loadTest == null) {
MSException.throwException(Translator.get("run_load_test_not_found") + request.getId());
}

View File

@ -128,7 +128,7 @@ import {
checkTableRowIsSelect, getCustomTableHeader, getCustomTableWidth, handleRowDrop
} from "@/common/js/tableUtils";
import {TEST_PLAN_LOAD_CASE} from "@/common/js/constants";
import {getCurrentUser} from "@/common/js/utils";
import {getCurrentProjectID, getCurrentUser, getCurrentUserId} from "@/common/js/utils";
import HeaderLabelOperate from "@/business/components/common/head/HeaderLabelOperate";
import MsPlanRunMode from "../../../common/PlanRunMode";
import MsTable from "@/business/components/common/components/table/MsTable";
@ -259,6 +259,8 @@ export default {
runArr.push({
id: loadCase.loadCaseId,
testPlanLoadId: loadCase.id,
userId: getCurrentUserId(),
projectId: getCurrentProjectID(),
triggerMode: 'MANUAL'
});
});
@ -273,6 +275,8 @@ export default {
runArr.push( {
id: loadCase.loadCaseId,
testPlanLoadId: loadCase.id,
userId: getCurrentUserId(),
projectId: getCurrentProjectID(),
triggerMode: 'MANUAL'
})
});
@ -399,6 +403,8 @@ export default {
this.$post('/test/plan/load/case/run', {
id: loadCase.loadCaseId,
testPlanLoadId: loadCase.id,
userId: getCurrentUserId(),
projectId: getCurrentProjectID(),
triggerMode: 'MANUAL'
}).then(() => {
this.$notify.success({