Search code examples
postman-collection-runner

Newman Postman test results in Azure do not show test names


Following the instructions on this Medium post I have my Postman tests running under newman however when the report is published the Test Case Title is simply Status code is 200.

I have set a name and description for each test in the collection but still they are indistinguishable from each other in the test report.

How can I set newman to generate a report with the actual test names (or descriptions) as the Test Case Titles?


Solution

  • The script in my Postman "Test" tab was reporting an explicit test name, so I changed it to match the request name in the collection:

    pm.test("Status code is 200", function () { pm.response.to.have.status(200); });
    

    To this:

    pm.test("Request name being tested", function () { pm.response.to.have.status(200); });