fix(接口自动化): 修复执行单个步骤无公共参数问题

This commit is contained in:
fit2-zhao 2020-12-28 16:12:55 +08:00
parent e6f5b717b4
commit fbeb1ded75
2 changed files with 9 additions and 2 deletions

View File

@ -91,6 +91,7 @@
name: "MsApiComponent",
props: {
request: {},
currentScenario: {},
node: {},
currentEnvironmentId: String,
},
@ -178,7 +179,13 @@
this.loading = true;
this.runData = [];
this.request.useEnvironment = this.currentEnvironmentId;
this.runData.push(this.request);
let debugData = {
id: this.currentScenario.id, name: this.currentScenario.name, type: "scenario",
variables: this.currentScenario.variables, referenced: 'Created', enableCookieShare: this.enableCookieShare,
environmentId: this.currentEnvironmentId, hashTree: [this.request]
};
this.runData.push(debugData);
/*触发执行操作*/
this.reportId = getUUID().substring(0, 8);

View File

@ -169,7 +169,7 @@
<!--提取规则-->
<ms-api-extract @remove="remove" @copyRow="copyRow" v-if="data.type==='Extract'" customizeStyle="margin-top: 0px" :extract="data" :node="node"/>
<!--API 导入 -->
<ms-api-component :request="data" :currentEnvironmentId="currentEnvironmentId" @remove="remove" @copyRow="copyRow" v-if="data.type==='HTTPSamplerProxy'||data.type==='DubboSampler'||data.type==='JDBCSampler'||data.type==='TCPSampler'" :node="node"/>
<ms-api-component :request="data" :currentScenario="currentScenario" :currentEnvironmentId="currentEnvironmentId" @remove="remove" @copyRow="copyRow" v-if="data.type==='HTTPSamplerProxy'||data.type==='DubboSampler'||data.type==='JDBCSampler'||data.type==='TCPSampler'" :node="node"/>
</template>
</span>
</el-tree>