# Adding Postman Test Automation to my CI/CD Pipeline

**URL:** <https://community.postman.com/t/adding-postman-test-automation-to-my-ci-cd-pipeline/17245>\
**Category:** Help Hub\
**Created:** [October 29, 2020, 8:23pm UTC](https://community.postman.com/t/adding-postman-test-automation-to-my-ci-cd-pipeline/17245 "2020-10-29T20:23:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaseeb](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@chaseeb](https://community.postman.com/u/chaseeb)\
**Post date:** [October 29, 2020, 8:23pm UTC](https://community.postman.com/t/adding-postman-test-automation-to-my-ci-cd-pipeline/17245/1 "2020-10-29T20:23:16Z")

</div>

I’m currently working on a project that needs to regularly test our API before pushing into production. I see Postman offers the ability to add this to your CI/CD pipeline. Does anyone have any solid online examples for best practices?

---

<div class="post-metadata">

**Author:** ![allenheltondev](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/allenheltondev/32/31738_2.png) [@allenheltondev](https://community.postman.com/u/allenheltondev)\
**Post date:** [October 30, 2020, 11:44am UTC](https://community.postman.com/t/adding-postman-test-automation-to-my-ci-cd-pipeline/17245/2 "2020-10-30T11:44:26Z")

</div>

What we do on my team is run newman as a step in the pipeline.

We parameterize the collection and environment ids in the pipeline and just have it run. The command looks like this:

```auto
newman run https://api.getpostman.com/collections/$POSTMAN_COLLECTION_ID?apikey=$POSTMAN_API_KEY --environment https://api.getpostman.com/environments/$POSTMAN_ENV_ID?apikey=$POSTMAN_API_KEY

```

If any tests fail, it causes the build to fail.
