refactor(接口测试): 次数循环控制器支持变量方式

--bug=1013431 --user=赵勇 【接口测试】github#5872循环控制器的次数不支持变量 https://www.tapd.cn/55049933/s/1171792
This commit is contained in:
fit2-zhao 2022-06-01 17:22:19 +08:00 committed by f2c-ci-robot[bot]
parent 7484eb1edf
commit 1e0010a0b0
4 changed files with 4 additions and 4 deletions

View File

@ -793,7 +793,7 @@ public class MsJmeterParser extends ApiImportAbstractParser<ScenarioImport> {
((MsLoopController) elementNode).setLoopType(LoopConstants.LOOP_COUNT.name());
LoopController loopController = (LoopController) key;
CountController countController = new CountController();
countController.setLoops(loopController.getLoops());
countController.setLoops(String.valueOf(loopController.getLoops()));
countController.setProceed(true);
((MsLoopController) elementNode).setCountController(countController);
}

View File

@ -135,7 +135,7 @@ public class MsLoopController extends MsTestElement {
loopController.setProperty(TestElement.TEST_CLASS, LoopController.class.getName());
loopController.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("LoopControlPanel"));
loopController.setLoops(countController.getLoops());
if (countController.getLoops() > 0) {
if (StringUtils.isNotEmpty(countController.getLoops())) {
loopController.setContinueForever(true);
}
return loopController;

View File

@ -4,7 +4,7 @@ import lombok.Data;
@Data
public class CountController {
private int loops;
private String loops;
private long interval;
private boolean proceed;
private Object requestResult;

View File

@ -23,7 +23,7 @@
<el-row>
<el-col :span="8">
<span class="ms-span ms-radio">{{ $t('loop.loops') }}</span>
<el-input-number size="small" v-model="controller.countController.loops" :placeholder="$t('commons.millisecond')" :max="100000000" :min="0"/>
<el-input size="small" v-model="controller.countController.loops" :placeholder="$t('commons.millisecond')" style="width: 200px"/>
<span class="ms-span ms-radio"></span>
</el-col>
<el-col :span="8">