fix(接口测试): postman文件多级目录,导入后接口的目录结构不对

--user=郭雨琦
--bug=1014928
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001014928
This commit is contained in:
guoyuqi 2022-07-19 14:36:39 +08:00 committed by xiaomeinvG
parent b66ef0c30e
commit 67de6c7dbc
1 changed files with 5 additions and 3 deletions

View File

@ -56,11 +56,13 @@ public class PostmanDefinitionParser extends PostmanAbstractParserParser<ApiDefi
for (PostmanItem item : items) {
List<PostmanItem> childItems = item.getItem();
if (childItems != null) {
String itemModulePath;
if (StringUtils.isNotBlank(modulePath) && StringUtils.isNotBlank(item.getName())) {
modulePath = modulePath + "/" + item.getName();
itemModulePath = modulePath + "/" + item.getName();
} else {
itemModulePath = item.getName();
}
parseItem(childItems, modulePath, results, cases);
parseItem(childItems, itemModulePath, results, cases);
} else {
MsHTTPSamplerProxy msHTTPSamplerProxy = parsePostman(item);
HttpResponse response = parsePostmanResponse(item);