fix(接口测试): 修复场景禁用引用的场景的子用例步骤后,仍然可以执行的缺陷

--bug=1026067 --user=王孝刚 [接口测试]github#24306设计场景用例时,禁用子场景下的子场景用例仍然可以调试执行
https://www.tapd.cn/55049933/s/1370989
This commit is contained in:
wxg0103 2023-05-11 17:49:32 +08:00 committed by fit2-zhao
parent 4627de8c85
commit 224860d2c2
4 changed files with 26 additions and 15 deletions

View File

@ -253,7 +253,8 @@ public class MsScenario extends MsTestElement {
orgJSONArray.forEach(obj -> { orgJSONArray.forEach(obj -> {
JSONObject orgJsonObject = (JSONObject) obj; JSONObject orgJsonObject = (JSONObject) obj;
hashTree.forEach(targetObj -> { hashTree.forEach(targetObj -> {
if (StringUtils.equals(orgJsonObject.optString(MsHashTreeService.RESOURCE_ID), targetObj.getResourceId())) { if (StringUtils.equals(orgJsonObject.optString(MsHashTreeService.ID), targetObj.getId())
&& StringUtils.equals(orgJsonObject.optString(MsHashTreeService.INDEX), targetObj.getIndex())) {
setRefEnable(targetObj, orgJsonObject); setRefEnable(targetObj, orgJsonObject);
} }
}); });

View File

@ -74,7 +74,7 @@ public class MsThreadGroup extends MsTestElement {
threadGroup.setProperty(ThreadGroup.ON_SAMPLE_ERROR, ThreadGroup.ON_SAMPLE_ERROR_CONTINUE); threadGroup.setProperty(ThreadGroup.ON_SAMPLE_ERROR, ThreadGroup.ON_SAMPLE_ERROR_CONTINUE);
threadGroup.setScheduler(false); threadGroup.setScheduler(false);
if (onSampleError != null && !onSampleError) { if (onSampleError != null && !onSampleError) {
threadGroup.setProperty("ThreadGroup.on_sample_error", "stoptest"); threadGroup.setProperty("ThreadGroup.on_sample_error", "stopthread");
} }
threadGroup.setSamplerController(loopController); threadGroup.setSamplerController(loopController);
return threadGroup; return threadGroup;

View File

@ -91,7 +91,7 @@ public class MsHashTreeService {
private static final String FOLLOW_REDIRECTS = "followRedirects"; private static final String FOLLOW_REDIRECTS = "followRedirects";
private static final String AUTO_REDIRECTS = "autoRedirects"; private static final String AUTO_REDIRECTS = "autoRedirects";
private static final String ALIAS = "alias"; private static final String ALIAS = "alias";
private static final String INDEX = "index"; public static final String INDEX = "index";
private static final String QUERY = "query"; private static final String QUERY = "query";
private static final String VARIABLE_NAMES = "variableNames"; private static final String VARIABLE_NAMES = "variableNames";
private static final String DATASOURCEID = "dataSourceId"; private static final String DATASOURCEID = "dataSourceId";

View File

@ -3,17 +3,24 @@
<div v-if="(node.children && node.children.length >0) || node.unsolicited <div v-if="(node.children && node.children.length >0) || node.unsolicited
|| (node.type && this.stepFilter.get('AllSamplerProxy').indexOf(node.type) === -1)"> || (node.type && this.stepFilter.get('AllSamplerProxy').indexOf(node.type) === -1)">
<el-card class="ms-card"> <el-card class="ms-card">
<div class="el-step__icon is-text ms-api-col"> <el-row>
<div class="el-step__icon-inner"> <el-col span="23">
{{ node.index }} <div class="el-step__icon is-text ms-api-col">
</div> <div class="el-step__icon-inner">
</div> {{ node.index }}
<el-tooltip effect="dark" :content="node.label" placement="top"> </div>
<el-link v-if="node.redirect" class="report-label-head" @click="isLink"> </div>
{{ getLabel(node.label) }} <el-tooltip effect="dark" :content="node.label" placement="top">
</el-link> <el-link v-if="node.redirect" class="report-label-head" @click="isLink">
<span v-else>{{ getLabel(node.label) }}</span> {{ getLabel(node.label) }}
</el-tooltip> </el-link>
<span v-else>{{ getLabel(node.label) }}</span>
</el-tooltip>
</el-col>
<el-col :span="1">
<ms-api-report-status :status="node.totalStatus"/>
</el-col>
</el-row>
</el-card> </el-card>
</div> </div>
<div v-else-if="node.type === 'MsUiCommand'"> <div v-else-if="node.type === 'MsUiCommand'">
@ -50,12 +57,15 @@
import MsRequestResult from "./RequestResult"; import MsRequestResult from "./RequestResult";
import {STEP} from "./Setting"; import {STEP} from "./Setting";
import UiCommandResult from "./UiCommandResult"; import UiCommandResult from "./UiCommandResult";
import MsApiReportStatus from "@/business/plan/view/comonents/report/detail/api/ApiReportStatus";
export default { export default {
name: "MsScenarioResult", name: "MsScenarioResult",
components: { components: {
UiCommandResult, UiCommandResult,
MsRequestResult MsRequestResult,
MsApiReportStatus
}, },
props: { props: {
scenario: Object, scenario: Object,