Newman tests in CI fails

Hey, I am using postman for building my APIs and using newman to test them locally but when i run my collection inside my CI the newman tests fail.
the same request from postman and even using newman passes but when i run them through in my CI the test fails.
i am using drone.io as my ci tool and postman/newman image to run my collection.
any help would be appreciated, thanks!

1 Like

Welcome to the community. ,that’s a new tool ! Could you add more information of the error you are getting

thank you for the warm welcome @praveendvd !!!

below is the screenshot of the request i sent from postman and get expected response code 201, that is okay.

and below is the code for my drone and the screenshot of its console:

  • name: integration-testing
    image: postman/newman
    depends_on: [ clone ]
    commands:
    • cd docs/api
    • newman run ‘RankNRole API Collection.postman_collection.json’ -e ranknrole_api_env.postman_environment.json --env-var base_url=‘pr${DRONE_PULL_REQUEST}-api.ranknrole.net’ --bail --verbose


but when i am running it in my ci this tests result in 404!!!

Thats great , it’s more helpful to show output from Newman local and the Newman in cicd so that we can see the difference between the two

so any idea what am I doing wrong or is there any catch to it?

can you add local newman run result also

the name of test is “ADD ROLE TEMPLATE”, the output is following:

use htmlextra report it helps on debugging , why the test execution order is different in local and in CI/CD try using newman htmlextra report by @danny-dainton it gives you all information you need to understand whats going wrong

@praveendvd that was new i tried it but get the same result

nothing new in report as it was already showing same result on drone console

GOto request tab and check the response of that specific iteration and request

here they are!!!


You are using http here and in the first one you where using https .

1 Like

@praveendvd that was dumb of me sorry for all inconvenience and thank you for you patience and helping me out here <3

1 Like

htmlextra is the best report for postman use it , it makes your life easier :smiley:

@praveendvd one quick question, why was it working in some requests and not in others because 7 requests before this was still working fine and giving response 200, shouldn’t postman do something about these error messages to make them relatable!!!

1 Like

its nothing to do with postman , it is about how your endpoint is implemented . Ask development team to serve the endpoints only through https.

1 Like