mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
fix(接口测试): 修复多线程组JMX导入模块创建错误问题
--bug=1022727 --user=赵勇 【接口测试】导入多线程的jmx文件,自动生成的模块名称是null https://www.tapd.cn/55049933/s/1334194
This commit is contained in:
parent
4c1cb6c0f9
commit
23b343bd85
@ -286,15 +286,9 @@ public class JmeterDefinitionParser extends ApiImportAbstractParser<ApiDefinitio
|
||||
apiDefinition.setName(element.getName());
|
||||
apiDefinition.setProjectId(this.projectId);
|
||||
apiDefinition.setRequest(JSON.toJSONString(element));
|
||||
/* if (this.apiModule != null) {
|
||||
apiDefinition.setModuleId(this.apiModule.getId());
|
||||
if (StringUtils.isNotBlank(this.selectModulePath)) {
|
||||
apiDefinition.setModulePath(this.selectModulePath + "/" + this.apiModule.getName());
|
||||
} else {
|
||||
apiDefinition.setModulePath("/" + this.apiModule.getName());
|
||||
}
|
||||
}*/
|
||||
apiDefinition.setModulePath("/" + this.planName);
|
||||
if (StringUtils.isNotBlank(this.planName)) {
|
||||
apiDefinition.setModulePath("/" + this.planName);
|
||||
}
|
||||
// todo 除HTTP协议外,其它协议设置默认模块
|
||||
apiDefinition.setStatus("Prepare");
|
||||
apiDefinition.setProtocol(protocol);
|
||||
|
@ -146,7 +146,9 @@ public class JMeterParser extends ApiImportAbstractParser<ScenarioImport> {
|
||||
scenarioWithBLOBs.setProjectId(request.getProjectId());
|
||||
if (msScenario != null && CollectionUtils.isNotEmpty(msScenario.getHashTree())) {
|
||||
scenarioWithBLOBs.setStepTotal(msScenario.getHashTree().size());
|
||||
scenarioWithBLOBs.setModulePath("/" + msScenario.getName());
|
||||
if (StringUtils.isNotBlank(msScenario.getName())) {
|
||||
scenarioWithBLOBs.setModulePath("/" + msScenario.getName());
|
||||
}
|
||||
}
|
||||
scenarioWithBLOBs.setId(UUID.randomUUID().toString());
|
||||
scenarioWithBLOBs.setScenarioDefinition(JSON.toJSONString(msScenario));
|
||||
|
Loading…
Reference in New Issue
Block a user