纽曼运行集合的子目录



我有一个包含一些目录的集合,它们也有子目录。

{
    "variables": [],
    "info": {
        "name": "MyCollection",
        "_postman_id": "9d4b89df-4e52-e51b-59d1-4baa2c6a424f",
        "description": "",
        "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
    },
    "item": [
        {
            "name": "D1",
            "description": "",
            "item": [
                {
                    "name": "D11",
                    "description": "",
                    "item": [
                        {
                            "name": "my_report",
                            "request": {
                                "url": "http://192.168.100.139:1998/api/my_report",
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json",
                                        "description": ""
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{"name": "zizi"}"
                                },
                                "description": ""
                            },
                            "response": []
                        }
                    ],
                    "_postman_isSubFolder": true
                }
            ]
        },
        {
            "name": "D2",
            "description": "",
            "item": [
                {
                    "name": "D22",
                    "description": "",
                    "item": [
                        {
                            "name": "my_report",
                            "request": {
                                "url": "http://192.168.100.139:1998/api/my_report",
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json",
                                        "description": ""
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{"name": "zizi"}"
                                },
                                "description": ""
                            },
                            "response": []
                        }
                    ],
                    "_postman_isSubFolder": true
                },
                {
                    "name": "D21",
                    "description": "",
                    "item": [
                        {
                            "name": "my_report",
                            "request": {
                                "url": "http://192.168.100.139:1998/api/my_report",
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json",
                                        "description": ""
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{"name": "zizi"}"
                                },
                                "description": ""
                            },
                            "response": []
                        }
                    ],
                    "_postman_isSubFolder": true
                }
            ]
        }
    ]
}

我想从整个集合中运行D22;这是我尝试过的:

  1. newman run my-collection.json -e my-environ.json --folder "D22"
  2. newman run my-collection.json -e my-environ.json --folder "D2/D22"
  3. newman run my-collection.json -e my-environ.json --folder "D2.D22"

他们都没有工作。

顺便说一句,newman run my-collection.json -e my-environ.json --folder "D2"运行良好; 它以D21D22执行测试。

编辑 1:

newman版本是 3.9.1 .

在纽曼 4.5.4 上,执行newman run my-collection.json -e my-environ.json --folder "D22"应该可以正常工作

最新更新