fix(接口测试): 修复调试接口打印环境为null问题

--bug=1035027 --user=王旭 【接口测试】github#28622,tcp 后置脚本打印环境id值是null, http接口可以打印出来 https://www.tapd.cn/55049933/s/1621265
This commit is contained in:
WangXu10 2024-11-29 17:13:21 +08:00 committed by 刘瑞斌
parent 5520044764
commit 63a1449c42
3 changed files with 9 additions and 3 deletions

View File

@ -80,7 +80,8 @@ import MsApiCaseList from '../case/EditApiCase';
import { TYPE_TO_C } from '@/business/automation/scenario/Setting'; import { TYPE_TO_C } from '@/business/automation/scenario/Setting';
import { mergeRequestDocumentData } from '@/business/definition/api-definition'; import { mergeRequestDocumentData } from '@/business/definition/api-definition';
import { execStop } from '@/api/scenario'; import { execStop } from '@/api/scenario';
import {useApiStore} from "@/store";
const store = useApiStore();
export default { export default {
name: 'ApiConfig', name: 'ApiConfig',
components: { components: {
@ -155,6 +156,7 @@ export default {
this.loading = true; this.loading = true;
this.isStop = true; this.isStop = true;
this.request.name = getUUID().substring(0, 8); this.request.name = getUUID().substring(0, 8);
this.request.useEnvironment = store.useEnvironment;
this.runData = []; this.runData = [];
this.runData.push(this.request); this.runData.push(this.request);
/*触发执行操作*/ /*触发执行操作*/

View File

@ -106,7 +106,8 @@ import MsApiCaseList from '../case/EditApiCase';
import { TYPE_TO_C } from '@/business/automation/scenario/Setting'; import { TYPE_TO_C } from '@/business/automation/scenario/Setting';
import { mergeRequestDocumentData } from '@/business/definition/api-definition'; import { mergeRequestDocumentData } from '@/business/definition/api-definition';
import { execStop } from '@/api/scenario'; import { execStop } from '@/api/scenario';
import {useApiStore} from "@/store";
const store = useApiStore();
export default { export default {
name: 'DebugHttpPage', name: 'DebugHttpPage',
components: { components: {
@ -190,6 +191,7 @@ export default {
this.isStop = true; this.isStop = true;
this.request.url = this.debugForm.url; this.request.url = this.debugForm.url;
this.request.method = this.debugForm.method; this.request.method = this.debugForm.method;
this.request.useEnvironment = store.useEnvironment;
this.request.name = getUUID().substring(0, 8); this.request.name = getUUID().substring(0, 8);
this.runData = []; this.runData = [];
this.runData.push(this.request); this.runData.push(this.request);

View File

@ -85,7 +85,8 @@ import MsApiCaseList from '../case/EditApiCase';
import { TYPE_TO_C } from '@/business/automation/scenario/Setting'; import { TYPE_TO_C } from '@/business/automation/scenario/Setting';
import { mergeRequestDocumentData } from '@/business/definition/api-definition'; import { mergeRequestDocumentData } from '@/business/definition/api-definition';
import { execStop } from '@/api/scenario'; import { execStop } from '@/api/scenario';
import {useApiStore} from "@/store";
const store = useApiStore();
export default { export default {
name: 'ApiConfig', name: 'ApiConfig',
components: { components: {
@ -162,6 +163,7 @@ export default {
this.isStop = true; this.isStop = true;
this.request.name = getUUID().substring(0, 8); this.request.name = getUUID().substring(0, 8);
this.runData = []; this.runData = [];
this.request.useEnvironment = store.useEnvironment;
this.runData.push(this.request); this.runData.push(this.request);
/*触发执行操作*/ /*触发执行操作*/
this.reportId = getUUID().substring(0, 8); this.reportId = getUUID().substring(0, 8);