# Postman multiple collection run with newman from gitlab

**URL:** <https://community.postman.com/t/postman-multiple-collection-run-with-newman-from-gitlab/57335>\
**Category:** Help Hub\
**Tags:** newman-project, collections, multiple\
**Created:** [February 5, 2024, 9:50pm UTC](https://community.postman.com/t/postman-multiple-collection-run-with-newman-from-gitlab/57335 "2024-02-05T21:50:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anita.christobel](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@anita.christobel](https://community.postman.com/u/anita.christobel)\
**Post date:** [February 5, 2024, 9:50pm UTC](https://community.postman.com/t/postman-multiple-collection-run-with-newman-from-gitlab/57335/1 "2024-02-05T21:50:34Z")

</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).

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.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [February 6, 2024, 8:41am UTC](https://community.postman.com/t/postman-multiple-collection-run-with-newman-from-gitlab/57335/2 "2024-02-06T08:41:51Z")

</div>

Hey @anita.christobel 👋,

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?

---

<div class="post-metadata">

**Author:** ![anita.christobel](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@anita.christobel](https://community.postman.com/u/anita.christobel)\
**Post date:** [February 6, 2024, 5:50pm UTC](https://community.postman.com/t/postman-multiple-collection-run-with-newman-from-gitlab/57335/3 "2024-02-06T17:50:32Z")

</div>

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 xxxxx@gmail.com

```

artifacts:  
when: always  
paths:  
- report.html

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [March 7, 2024, 5:51pm UTC](https://community.postman.com/t/postman-multiple-collection-run-with-newman-from-gitlab/57335/4 "2024-03-07T17:51:32Z")

</div>

Closed on March 7, 2024, 5:51pm UTC

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