diff --git a/api-test/backend/src/main/java/io/metersphere/api/parse/api/JmeterDefinitionParser.java b/api-test/backend/src/main/java/io/metersphere/api/parse/api/JmeterDefinitionParser.java index a635c7291b..b7ab7a0212 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/parse/api/JmeterDefinitionParser.java +++ b/api-test/backend/src/main/java/io/metersphere/api/parse/api/JmeterDefinitionParser.java @@ -286,15 +286,9 @@ public class JmeterDefinitionParser extends ApiImportAbstractParser { 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));