Postman multiple collection run with newman from gitlab

Hi Team ,

I am trying to run a more than one collection using newman run in gitlab.
in my gitlab.yaml file , inside the script
i have the below code

  • newman run XXXXXX.postman_collection.json -g globals.postman_globals.json -r html

newman run YYYYY.postman_collection.json -g globals.postman_globals.json -r html

The second newman command is got getting executed , once the first iteration is completed , it goes to after-script.Even i tried && in between .

Any statement after the frist newman run command is not getting executed .
Please need your help.

Hey @anita.christobel :wave:,

Could you share the full yml file, please? That single part of it doesn’t provide enough detail.

There could be specific gitlab syntax issues that are causing you problems.

Those should be 2 separate scripts but without looking closer at the gitlab documentation, I don’t know how that file it formulate.

Do you get any information from thier official documentation?

Hi @danny-dainton please find the yaml file info. Can you please help me.
The size of the newman report is increasing , sometime we are not able to load the report to see the failure . So we decided to run multiple collections separately so that we can get the report individually.

postman_test-job: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully.
tags:
- docker-runner-am-east

image:
name: postman/newman_alpine33
entrypoint: [“”]
script:
- echo “postman_test-job”
- newman --version
- npm install -g newman-reporter-html
- newman run Smoke.postman_collection.json -d XXXX.postman_environment.json --reporters cli,html --reporter-html-export report.html
- newman run Smoke.postman_collection.json -d YYYY.postman_environment.json --reporters cli,html --reporter-html-export report.html

after_script:

- sendmail [email protected]

artifacts:
when: always
paths:
- report.html

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.