diff --git a/backend/src/main/java/io/metersphere/performance/parse/xml/reader/JmeterDocumentParser.java b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/JmeterDocumentParser.java index c028bddc6e..16d273aa42 100644 --- a/backend/src/main/java/io/metersphere/performance/parse/xml/reader/JmeterDocumentParser.java +++ b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/JmeterDocumentParser.java @@ -13,9 +13,7 @@ import io.metersphere.performance.parse.EngineSourceParser; import io.metersphere.performance.parse.EngineSourceParserFactory; import io.metersphere.service.TestResourcePoolService; import org.apache.commons.lang3.BooleanUtils; -import org.apache.commons.lang3.ClassUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.reflect.MethodUtils; import org.dom4j.Document; import org.dom4j.Element; import org.dom4j.Node; @@ -937,8 +935,10 @@ public class JmeterDocumentParser implements EngineSourceParser { // elementProp // 避免出现配置错位 Object durations = context.getProperty("duration"); + String duration = "2"; if (durations instanceof List) { - ((List) durations).remove(0); + Object o = ((List) durations).remove(0); + duration = o.toString(); } Object units = context.getProperty("unit"); if (units instanceof List) { @@ -1015,10 +1015,10 @@ public class JmeterDocumentParser implements EngineSourceParser { appendStringProp(threadGroup, "ThreadGroup.on_sample_error", onSampleError); appendStringProp(threadGroup, "ThreadGroup.num_threads", threads); appendStringProp(threadGroup, "ThreadGroup.ramp_time", rampUp); - appendBoolProp(threadGroup, "ThreadGroup.scheduler", false); + appendBoolProp(threadGroup, "ThreadGroup.scheduler", true); appendStringProp(threadGroup, "Hold", "1"); - appendStringProp(threadGroup, "ThreadGroup.duration", "10"); - appendStringProp(threadGroup, "ThreadGroup.delay", ""); + appendStringProp(threadGroup, "ThreadGroup.duration", duration); + appendStringProp(threadGroup, "ThreadGroup.delay", "0"); appendBoolProp(threadGroup, "ThreadGroup.same_user_on_next_iteration", true); } diff --git a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue index 3e8545b94a..2bb2c72f74 100644 --- a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue +++ b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue @@ -97,53 +97,9 @@
- - - - - - - - - - - - -
- - - - - -
+ size="mini"/>   + + + -
- - - - - - -
+
+ + + + + + + + + + + + +
+ + + + + +
diff --git a/frontend/src/business/components/track/plan/view/comonents/load/PerformanceLoadConfig.vue b/frontend/src/business/components/track/plan/view/comonents/load/PerformanceLoadConfig.vue index 16d0a8bae7..1550272b24 100644 --- a/frontend/src/business/components/track/plan/view/comonents/load/PerformanceLoadConfig.vue +++ b/frontend/src/business/components/track/plan/view/comonents/load/PerformanceLoadConfig.vue @@ -89,56 +89,13 @@
- + {{ $t('load_test.by_duration') }} {{ $t('load_test.by_iteration') }}
- - - - - - - - - - - - -
- - - - - -
+ size="mini"/>  + + + -
- - - - - - -
+ + + + + + + + + + + + +
+ + + + + +
diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 8020808cf6..d01cb7ede1 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -1036,6 +1036,7 @@ export default { ramp_up_tips: 'The RampUp is too large, the chart rendering will not be displayed, this does not affect the test execution, please refer to the actual results', iterate_num: 'Iterations', by_iteration: 'By iterations', + by_iteration_tip: 'The execution time needs to be configured according to the number of iterations. JMeter will decide whether to end the test according to the number of iterations and the execution time', by_duration: 'By duration', ramp_up_time_times: 'add VUs', advanced_config_error: 'Advanced configuration verification failed', diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 0e245935b5..2865819bbe 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -1040,6 +1040,7 @@ export default { ramp_up_tips: 'RampUp 过大,图表渲染卡顿不予展示,这并不影响测试执行,请以实际结果为准', iterate_num: '迭代次数', by_iteration: '按迭代次数', + by_iteration_tip: '按迭代次数执行需要配置执行时长,JMeter会按照迭代次数和执行时长来决定是否结束测试', by_duration: '按持续时间', ramp_up_time_times: '次增加并发用户', advanced_config_error: '高级配置校验失败', diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index c133bd6d51..91ded2f3fc 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -1039,7 +1039,8 @@ export default { ramp_up_time_seconds: '秒內增加並發用戶', ramp_up_tips: 'RampUp 過大,圖表渲染卡頓不予展示,這並不影響測試執行,請以實際結果為準', iterate_num: '叠代次數', - by_iteration: '按叠代次數', + by_iteration: '按迭代次數', + by_iteration_tip: '按迭代次數執行需要配置執行時長,JMeter會按照迭代次數和執行時長來決定是否結束測試', by_duration: '按持續時間', ramp_up_time_times: '次增加並發用戶', advanced_config_error: '高級配置校驗失敗',