fix(接口测试): 修复导入jmx文件测试计划包含自定义变量获取问题

--bug=1011455 --user=赵勇 [BUG]github#11608Jmeter测试计划里的自定义变量导入ms失效 https://www.tapd.cn/55049933/s/1122388
This commit is contained in:
fit2-zhao 2022-03-21 17:24:07 +08:00 committed by fit2-zhao
parent 599919e3ae
commit cf53040931
1 changed files with 7 additions and 1 deletions

View File

@ -77,7 +77,13 @@ public class MsJmeterElement extends MsTestElement {
config.getCsvFilePaths().add(csvPath);
}
}
// 取出导入的测试计划中变量
if (scriptWrapper instanceof TestPlan) {
TestPlan testPlan = (TestPlan) scriptWrapper;
if (testPlan.getArguments() != null) {
elementTree.add(testPlan.getArguments());
}
}
if (config.isOperating()) {
elementTree = tree.add(scriptWrapper);
} else if (!(scriptWrapper instanceof TestPlan) && !(scriptWrapper instanceof ThreadGroup)) {