Postman+Newman Orb for CircleCI

I’m trying to create a little proof of concept, I have a Postman collection with one pre-request script, one GraphQL post request and some very simple tests.

This collection works (pre-request gets the auth, the request is authed, the response is expected and valid,etc) as expected in Postman, the postman Runner, newman via link, newman via exported files, and the official newman docker image however… when I’m using the CircleCI official newman orb (which is over a year since last update), my requests seem to get mangled somehow.

Mostly the errors indicate 400s around auth and bad document formatting. I’ve tried changing the content type, the body formatting, etc. Despite a litany of console.logs the issue is still opaque to me. Has anyone run into this before or have issues with this orb? And maybe specifically with GraphQL?

I opened a PR to bump the newman version of the Orb but since it relies on a current docker image, I’m not sure that would help.

Any guidance would be appreciated, not sure what to try next.

Would still love to hear other’s usage but to unblock myself, I’m using the official postman/newman docker image and is it working just fine. :grin:

Shoutout to Danny Dainton for assisting in another forum.

2 Likes

Hi @smariapena,

To select a different Docker image tag in .circleci/config.yml, you can set a tag parameter on the executor declaration for the job like so:

version: 2.1

orbs:
  newman: postman/[email protected]
jobs:
  newman-collection-run:
    executor:
      name: newman/postman-newman-docker
      tag: 5.2.0
    steps:
      - checkout
      - newman/newman-run:
          collection: ./dummy-test.postman_collection.json
          environment: ./test-env.postman_environment.json
workflows:
  version: 2
  workflow:
    jobs:
      - newman-collection-run

Thanks for the PR! We’ll review it and get it merged.

@smariapena, did updating to the latest version of newman solve your issue with 400s?

Best,

Kevin

2 Likes

@kevin.swiber happy to report it worked perfectly! No more confusing failures.
Thank you so much for the help. :strawberry:

1 Like

WORKS PERFECT :+1:

Thank you!

2 Likes