# Unable to run collection via newman form javascript

**URL:** <https://community.postman.com/t/unable-to-run-collection-via-newman-form-javascript/2622>\
**Category:** Help Hub\
**Tags:** newman-project, scripts\
**Created:** [September 6, 2018, 8:59pm UTC](https://community.postman.com/t/unable-to-run-collection-via-newman-form-javascript/2622 "2018-09-06T20:59:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hhazan](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hhazan](https://community.postman.com/u/hhazan)\
**Post date:** [September 6, 2018, 8:59pm UTC](https://community.postman.com/t/unable-to-run-collection-via-newman-form-javascript/2622/1 "2018-09-06T20:59:22Z")

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

Hello  
Consider the following.  
**Scenario #1**  
I am able to successfully run from command line (`newman run -e no-gento.postman_environment.json no-gentoCopy.postman_collection.json -r cli`)  
I changed to json and was able to save the results file as well.

**Scenario #2**  
I am unable to do the same from javascript

```auto
var newman = require('../../framework/node_modules/newman');
newman.run({
    collection: require('../../data/no-gentoCopy.postman_collection.json'),
    environment: require('../../data/no-gento.postman_environment.json'), 
    // reporters: 'cli',
    reporters: { json : { export : '../../data/no-gentoResults.json' } },
}, function (err) {
    if (err) { throw err; }
    console.log('collection run complete!');
});

```

This is the results (notice 0 passing )

```auto
no-gentoCopy
**[13:51:08]** COMMAND DELETE "/wd/hub/session/857014bd-e623-1d43-9b2e-0dce8e63eb3f"
**[13:51:08]** DATA {}
❏ smoketest
↳ POST / account
POST http://localhost:8080/account ⠋ **[13:51:09]** RESULT {}
0 passing (7.10s)

```

Please advise.

Thank you  
Hagay

---

<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:** [April 10, 2025, 4:20pm UTC](https://community.postman.com/t/unable-to-run-collection-via-newman-form-javascript/2622/3 "2025-04-10T16:20:58Z")

</div>

Closed on April 10, 2025, 4:20pm UTC


