# Newman tests in CI fails

**URL:** <https://community.postman.com/t/newman-tests-in-ci-fails/24875>\
**Category:** Help Hub\
**Tags:** newman-project, tests, collections\
**Created:** [June 15, 2021, 6:19am UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875 "2021-06-15T06:19:46Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![faizan.anwar](https://avatars.discourse-cdn.com/v4/letter/f/d2c977/32.png) [@faizan.anwar](https://community.postman.com/u/faizan.anwar)\
**Post date:** [June 15, 2021, 6:19am UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/1 "2021-06-15T06:19:47Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

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](http://drone.io) as my ci tool and postman/newman image to run my collection.  
any help would be appreciated, thanks!

---

<div class="post-metadata">

**Author:** ![praveendvd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/praveendvd/32/6796_2.png) [@praveendvd](https://community.postman.com/u/praveendvd)\
**Post date:** [June 15, 2021, 9:36am UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/2 "2021-06-15T09:36:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![faizan.anwar](https://avatars.discourse-cdn.com/v4/letter/f/d2c977/32.png) [@faizan.anwar](https://community.postman.com/u/faizan.anwar)\
**Post date:** [June 15, 2021, 10:57am UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/3 "2021-06-15T10:57:00Z")

</div>

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.

 ![Screenshot from 2021-06-15 15-51-58](https://us1.discourse-cdn.com/getpostman/original/3X/8/0/80d8fcde438efcf060f92ea0f78325b0861424ed.png)

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

 ![Screenshot from 2021-06-15 15-55-35](https://us1.discourse-cdn.com/getpostman/original/3X/7/2/7288fb3ff5e8fc12b0b203b26247cdf4a6d3ed10.png)  
but when i am running it in my ci this tests result in 404!!!

---

<div class="post-metadata">

**Author:** ![praveendvd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/praveendvd/32/6796_2.png) [@praveendvd](https://community.postman.com/u/praveendvd)\
**Post date:** [June 15, 2021, 11:15am UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/4 "2021-06-15T11:15:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![faizan.anwar](https://avatars.discourse-cdn.com/v4/letter/f/d2c977/32.png) [@faizan.anwar](https://community.postman.com/u/faizan.anwar)\
**Post date:** [June 15, 2021, 11:33am UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/5 "2021-06-15T11:33:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![praveendvd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/praveendvd/32/6796_2.png) [@praveendvd](https://community.postman.com/u/praveendvd)\
**Post date:** [June 15, 2021, 11:35am UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/6 "2021-06-15T11:35:01Z")

</div>

can you add local newman run result also

---

<div class="post-metadata">

**Author:** ![faizan.anwar](https://avatars.discourse-cdn.com/v4/letter/f/d2c977/32.png) [@faizan.anwar](https://community.postman.com/u/faizan.anwar)\
**Post date:** [June 15, 2021, 11:40am UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/7 "2021-06-15T11:40:40Z")

</div>

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

 ![Screenshot from 2021-06-15 16-38-51](https://us1.discourse-cdn.com/getpostman/original/3X/d/9/d99edecf9fe3f61bc581888e6e248cfc02d1b9c5.png)

---

<div class="post-metadata">

**Author:** ![praveendvd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/praveendvd/32/6796_2.png) [@praveendvd](https://community.postman.com/u/praveendvd)\
**Post date:** [June 15, 2021, 12:12pm UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/8 "2021-06-15T12:12:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![faizan.anwar](https://avatars.discourse-cdn.com/v4/letter/f/d2c977/32.png) [@faizan.anwar](https://community.postman.com/u/faizan.anwar)\
**Post date:** [June 15, 2021, 3:06pm UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/9 "2021-06-15T15:06:53Z")

</div>

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

 ![Screenshot from 2021-06-15 20-05-33](https://us1.discourse-cdn.com/getpostman/original/3X/2/3/2330a8871df9890359dd3fd9d207dfebe37ecc66.png)

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

---

<div class="post-metadata">

**Author:** ![praveendvd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/praveendvd/32/6796_2.png) [@praveendvd](https://community.postman.com/u/praveendvd)\
**Post date:** [June 15, 2021, 3:20pm UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/10 "2021-06-15T15:20:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![faizan.anwar](https://avatars.discourse-cdn.com/v4/letter/f/d2c977/32.png) [@faizan.anwar](https://community.postman.com/u/faizan.anwar)\
**Post date:** [June 15, 2021, 3:26pm UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/11 "2021-06-15T15:26:47Z")

</div>

here they are!!!

 ![Screenshot from 2021-06-15 20-24-05](https://us1.discourse-cdn.com/getpostman/original/3X/3/0/301ec5d1dcd0eacb2bbfda242215255191146a54.png)  
 ![Screenshot from 2021-06-15 20-24-22](https://us1.discourse-cdn.com/getpostman/original/3X/4/c/4c648d154e2da3595fb829cfb870c3666d09bda0.png)

---

<div class="post-metadata">

**Author:** ![praveendvd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/praveendvd/32/6796_2.png) [@praveendvd](https://community.postman.com/u/praveendvd)\
**Post date:** [June 15, 2021, 3:38pm UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/12 "2021-06-15T15:38:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![faizan.anwar](https://avatars.discourse-cdn.com/v4/letter/f/d2c977/32.png) [@faizan.anwar](https://community.postman.com/u/faizan.anwar)\
**Post date:** [June 15, 2021, 3:52pm UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/13 "2021-06-15T15:52:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![praveendvd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/praveendvd/32/6796_2.png) [@praveendvd](https://community.postman.com/u/praveendvd)\
**Post date:** [June 15, 2021, 3:53pm UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/14 "2021-06-15T15:53:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![faizan.anwar](https://avatars.discourse-cdn.com/v4/letter/f/d2c977/32.png) [@faizan.anwar](https://community.postman.com/u/faizan.anwar)\
**Post date:** [June 15, 2021, 4:11pm UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/15 "2021-06-15T16:11:04Z")

</div>

@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!!!

---

<div class="post-metadata">

**Author:** ![praveendvd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/praveendvd/32/6796_2.png) [@praveendvd](https://community.postman.com/u/praveendvd)\
**Post date:** [June 15, 2021, 4:12pm UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/16 "2021-06-15T16:12:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![donnystacks](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/donnystacks/32/9105_2.png) [@donnystacks](https://community.postman.com/u/donnystacks)\
**Post date:** [July 6, 2021, 11:32pm UTC](https://community.postman.com/t/newman-tests-in-ci-fails/24875/17 "2021-07-06T23:32:30Z")

</div>

![image](https://us1.discourse-cdn.com/getpostman/original/2X/c/c9e75429ab89d9f4a1f08f36aa64a0adff809c15.jpeg)
