Luke Turner
Luke Turner

Reputation: 334

How do I run a Postman collection subfolder with Newman

Postman: 5.5.0 Newman: 3.9.0 OS: Windows 10

How am I supposed to use the --folder command in Newman?

I have a Postman Collection Export (v2.1) which I am loading into Newman using: - newman run "AME.postman_collection.json" When I run this command, all tests execute as expected (including all sub folders.

However, I would like to run a specific subfolder called "Media". My understanding is that I should run the commandline: - newman run "AME.postman_collection.json" --folder "Media"

Unfortunately this does not work. Newman simply reports no failure, but also 0 tests. I have also tried numerous other variations of the --folder parameter such as: - "AME.Media" - "AME/Media" - "AME\Media" - "\Media" - "/Media" - "Media/" - "Media\" - ".Media" - And many, many more

Sample data from the Export below:

{
    "info": {
        "name": "AME",
        "_postman_id": "023f6868-4c80-8c0f-01b6-78943caa38a6",
        "description": "",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
        {
            "name": "Media",
            "description": "",
            "item": [
                {
                    "name": "showRenderer",
                    "event": [

Upvotes: 1

Views: 2509

Answers (1)

Sergej Lopatkin
Sergej Lopatkin

Reputation: 1107

Try updgrading to v3.9.1 (December 8, 2017).

The changelog states

Fixed folder option handling

that there was in error in folder handling which is now fixed. I tried v3.9.1 with sub folder and it worked for me.

Upvotes: 2

Related Questions