refactor(接口测试): 接口场景转性能测试的时候不会生成CriticalSectionController

This commit is contained in:
Jianguo-Genius 2024-12-11 16:02:51 +08:00 committed by Craftsman
parent 8ea9ce3982
commit b743ab9132
1 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,7 @@ public class JmeterDocumentParser implements EngineSourceParser {
private final static String RESPONSE_ASSERTION = "ResponseAssertion";
private final static String HTTP_SAMPLER_PROXY = "HTTPSamplerProxy";
private final static String CSV_DATA_SET = "CSVDataSet";
private final static String CRITICAL_SECTION_CONTROLLER = "CriticalSectionController";
private final static String THREAD_GROUP_AUTO_STOP = "io.metersphere.jmeter.reporters.ThreadGroupAutoStop";
private final static List<String> SCRIPTS = new ArrayList<>() {{
add("JSR223PreProcessor");
@ -127,6 +128,9 @@ public class JmeterDocumentParser implements EngineSourceParser {
} else if (ele.getName().endsWith(RESULT_COLLECTOR)) {
// 处理结果收集器性能测试不需要这些
processResultCollector(ele);
} else if (ele.getName().endsWith(CRITICAL_SECTION_CONTROLLER)) {
// 性能测试不需要这些
processResultCollector(ele);
} else if (CollectionUtils.containsAny(SCRIPTS, ele.getName())) {
this.elementCacheScript(ele);
}