fix(接口自动化) 修复最大化场景后执行问题

--bug=1006837 --user=赵勇 【测试计划-性能测试】批量执行其他配置为空,无法选择环境与执行器等 https://www.tapd.cn/55049933/s/1049756
This commit is contained in:
fit2-zhao 2021-09-22 19:55:19 +08:00 committed by fit2-zhao
parent 6271d90ce1
commit bb108e595a
4 changed files with 23 additions and 5 deletions

View File

@ -284,6 +284,7 @@
:onSampleError="onSampleError" :onSampleError="onSampleError"
:execDebug="stopDebug" :execDebug="stopDebug"
:isFullUrl.sync="isFullUrl" :isFullUrl.sync="isFullUrl"
:clearMessage="clearMessage"
@closePage="close" @closePage="close"
@unFullScreen="unFullScreen" @unFullScreen="unFullScreen"
@showAllBtn="showAllBtn" @showAllBtn="showAllBtn"
@ -451,6 +452,7 @@ export default {
buttonData: [], buttonData: [],
stepFilter: new STEP, stepFilter: new STEP,
plugins: [], plugins: [],
clearMessage: "",
} }
}, },
created() { created() {
@ -1137,6 +1139,7 @@ export default {
let sign = this.$refs.envPopover.checkEnv(this.isFullUrl); let sign = this.$refs.envPopover.checkEnv(this.isFullUrl);
if (!sign) { if (!sign) {
this.buttonIsLoading = false; this.buttonIsLoading = false;
this.clearMessage = getUUID().substring(0, 8);
return; return;
} }
// //
@ -1157,6 +1160,8 @@ export default {
this.debugLoading = true; this.debugLoading = true;
}) })
}) })
} else {
this.clearMessage = getUUID().substring(0, 8);
} }
}) })
}, },
@ -1401,6 +1406,7 @@ export default {
this.debugLoading = false; this.debugLoading = false;
this.debugVisible = false; this.debugVisible = false;
this.loading = false; this.loading = false;
this.clearMessage = getUUID().substring(0, 8);
}, },
showScenarioParameters() { showScenarioParameters() {
this.$refs.scenarioParameters.open(this.currentScenario.variables, this.currentScenario.headers); this.$refs.scenarioParameters.open(this.currentScenario.variables, this.currentScenario.headers);

View File

@ -81,7 +81,7 @@ export const PLUGIN_ELEMENTS = new Map([
['menu_logic_controller', ['GenericController', "IfController", "LoopController", 'IfControllerPanel', 'TransactionController', 'LoopControlPanel', 'WhileController', 'Separator', 'ForeachControlPanel', 'IncludeController', 'RunTime', 'CriticalSectionController', 'InterleaveControl', 'OnceOnlyController', 'RecordController', 'LogicController', 'RandomControl', 'RandomOrderController', 'ThroughputController', 'SwitchController', 'ModuleController']], ['menu_logic_controller', ['GenericController', "IfController", "LoopController", 'IfControllerPanel', 'TransactionController', 'LoopControlPanel', 'WhileController', 'Separator', 'ForeachControlPanel', 'IncludeController', 'RunTime', 'CriticalSectionController', 'InterleaveControl', 'OnceOnlyController', 'RecordController', 'LogicController', 'RandomControl', 'RandomOrderController', 'ThroughputController', 'SwitchController', 'ModuleController']],
['menu_fragments', ['TestFragmentController']], ['menu_fragments', ['TestFragmentController']],
['menu_non_test_elements', ['ProxyControl', 'HttpMirrorControl', 'GenerateTree', 'PropertyControl']], ['menu_non_test_elements', ['ProxyControl', 'HttpMirrorControl', 'GenerateTree', 'PropertyControl']],
['menu_generative_controller', ['AbstractSampler', 'CustomizeReq', 'HttpTestSample', 'TestAction', 'DebugSampler', 'JSR223Sampler', 'Separator', 'AjpSampler', 'AccessLogSampler', 'BeanShellSampler', 'BoltSampler', 'FtpTestSampler', 'GraphQLHTTPSampler', 'JDBCSampler', 'JMSPublisher', 'JMSSampler', 'JMSSubscriber', 'JUnitTestSampler', 'JavaTestSampler', 'LdapExtTestSampler', 'LdapTestSampler', 'SystemSampler', 'SmtpSampler', 'TCPSampler', 'MailReaderSampler']], ['menu_generative_controller', ["HTTPSamplerProxy", "DubboSampler", "JDBCSampler", "TCPSampler","Sampler",'AbstractSampler', 'CustomizeReq', 'HttpTestSample', 'TestAction', 'DebugSampler', 'JSR223Sampler', 'Separator', 'AjpSampler', 'AccessLogSampler', 'BeanShellSampler', 'BoltSampler', 'FtpTestSampler', 'GraphQLHTTPSampler', 'JDBCSampler', 'JMSPublisher', 'JMSSampler', 'JMSSubscriber', 'JUnitTestSampler', 'JavaTestSampler', 'LdapExtTestSampler', 'LdapTestSampler', 'SystemSampler', 'SmtpSampler', 'TCPSampler', 'MailReaderSampler']],
['menu_threads', ['SetupThreadGroup', 'PostThreadGroup', 'ThreadGroup']], ['menu_threads', ['SetupThreadGroup', 'PostThreadGroup', 'ThreadGroup']],
['menu_timer', ['ConstantTimer', 'UniformRandomTimer', 'PreciseThroughputTimer', 'ConstantThroughputTimer', 'Separator', 'JSR223Timer', 'SyncTimer', 'PoissonRandomTimer', 'GaussianRandomTimer', 'BeanShellTimer']], ['menu_timer', ['ConstantTimer', 'UniformRandomTimer', 'PreciseThroughputTimer', 'ConstantThroughputTimer', 'Separator', 'JSR223Timer', 'SyncTimer', 'PoissonRandomTimer', 'GaussianRandomTimer', 'BeanShellTimer']],
['menu_config_element', ['CSVDataSet', 'HeaderPanel', 'CookiePanel', 'CacheManager', 'HttpDefaults', 'Separator', 'BoltConnectionElement', 'DNSCachePanel', 'FtpConfig', 'AuthPanel', 'DataSourceElement', 'JavaConfig', 'LdapExtConfig', 'LdapConfig', 'TCPConfig', 'KeystoreConfig', 'ArgumentsPanel', 'LoginConfig', 'SimpleConfig', 'CounterConfig', 'RandomVariableConfig']], ['menu_config_element', ['CSVDataSet', 'HeaderPanel', 'CookiePanel', 'CacheManager', 'HttpDefaults', 'Separator', 'BoltConnectionElement', 'DNSCachePanel', 'FtpConfig', 'AuthPanel', 'DataSourceElement', 'JavaConfig', 'LdapExtConfig', 'LdapConfig', 'TCPConfig', 'KeystoreConfig', 'ArgumentsPanel', 'LoginConfig', 'SimpleConfig', 'CounterConfig', 'RandomVariableConfig']],

View File

@ -129,7 +129,7 @@
<!--执行组件--> <!--执行组件-->
<ms-run :debug="true" v-if="type!=='detail'" :environment="projectEnvMap" :reportId="reportId" <ms-run :debug="true" v-if="type!=='detail'" :environment="projectEnvMap" :reportId="reportId"
:run-data="debugData" :run-data="debugData"
@runRefresh="runRefresh" ref="runTest"/> @runRefresh="runRefresh" @errorRefresh="errorRefresh" ref="runTest"/>
<!-- 调试结果 --> <!-- 调试结果 -->
<el-drawer v-if="type!=='detail'" :visible.sync="debugVisible" :destroy-on-close="true" direction="ltr" <el-drawer v-if="type!=='detail'" :visible.sync="debugVisible" :destroy-on-close="true" direction="ltr"
:withHeader="true" :modal="false" size="90%"> :withHeader="true" :modal="false" size="90%">
@ -563,6 +563,7 @@ export default {
/*触发执行操作*/ /*触发执行操作*/
let sign = this.$refs.envPopover.checkEnv(); let sign = this.$refs.envPopover.checkEnv();
if (!sign) { if (!sign) {
this.errorRefresh();
return; return;
} }
this.$refs['currentScenario'].validate((valid) => { this.$refs['currentScenario'].validate((valid) => {
@ -584,6 +585,8 @@ export default {
this.reportId = getUUID().substring(0, 8); this.reportId = getUUID().substring(0, 8);
} }
}); });
}else{
this.errorRefresh();
} }
}) })
}, },
@ -761,6 +764,10 @@ export default {
this.debugVisible = true; this.debugVisible = true;
this.loading = false; this.loading = false;
}, },
errorRefresh(){
this.debugVisible = false;
this.loading = false;
},
showScenarioParameters() { showScenarioParameters() {
this.$refs.scenarioParameters.open(this.currentScenario.variables, this.currentScenario.headers); this.$refs.scenarioParameters.open(this.currentScenario.variables, this.currentScenario.headers);
}, },

View File

@ -19,7 +19,7 @@
</div> </div>
<div class="ms-header-right"> <div class="ms-header-right">
<el-checkbox v-model="cookieShare" @change="setCookieShare">共享cookie</el-checkbox> <el-checkbox v-model="cookieShare" @change="setCookieShare">共享cookie</el-checkbox>
<el-checkbox v-model="sampleError" @change="setOnSampleError" style="margin-right: 10px">{{$t('commons.failure_continues')}}</el-checkbox> <el-checkbox v-model="sampleError" @change="setOnSampleError" style="margin-right: 10px">{{ $t('commons.failure_continues') }}</el-checkbox>
<env-popover :disabled="scenarioDefinition.length < 1" :isReadOnly="scenarioDefinition.length < 1" <env-popover :disabled="scenarioDefinition.length < 1" :isReadOnly="scenarioDefinition.length < 1"
:env-map="envMap" :project-ids="projectIds" @setProjectEnvMap="setProjectEnvMap" :env-map="envMap" :project-ids="projectIds" @setProjectEnvMap="setProjectEnvMap"
@showPopover="showPopover" :project-list="projectList" ref="envPopover" class="ms-right" @showPopover="showPopover" :project-list="projectList" ref="envPopover" class="ms-right"
@ -53,6 +53,7 @@ export default {
projectList: Array, projectList: Array,
isFullUrl: Boolean, isFullUrl: Boolean,
execDebug: String, execDebug: String,
clearMessage: String,
}, },
data() { data() {
return { return {
@ -77,9 +78,13 @@ export default {
return getCurrentProjectID(); return getCurrentProjectID();
}, },
}, },
watch:{ watch: {
execDebug(){ execDebug() {
this.debug = false; this.debug = false;
},
clearMessage(){
this.debug = false;
this.debugLoading = false;
} }
}, },
mounted() { mounted() {