# Skip Request Feature in Newman

**URL:** <https://community.postman.com/t/skip-request-feature-in-newman/59158>\
**Category:** Help Hub\
**Tags:** newman-project, skip\
**Created:** [March 22, 2024, 9:44pm UTC](https://community.postman.com/t/skip-request-feature-in-newman/59158 "2024-03-22T21:44:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bstokesmelaleuca](https://avatars.discourse-cdn.com/v4/letter/b/7ea924/32.png) [@bstokesmelaleuca](https://community.postman.com/u/bstokesmelaleuca)\
**Post date:** [March 22, 2024, 9:44pm UTC](https://community.postman.com/t/skip-request-feature-in-newman/59158/1 "2024-03-22T21:44:54Z")

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

The new [skipRequest() feature that was added in November](https://blog.postman.com/optimize-your-api-testing-workflow-with-postmans-skip-request-feature/) is great functionality, we are using it to eliminate false negatives in our automation testing.

It works great within Postman whether we run a request individually or through the collection runner, but when we push those changes up to a pipeline that runs on Newman, the tests fail with this error message:

`Cannot read properties of undefined (reading 'skipRequest')`

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/e/9/e97a10055051108af2e8e158ac94890c2727cf68.png)

This is the full snippet we are using in the pre-request script, again it works perfectly within Postman, but not in a pipeline with Newman.

```auto
if (pm.environment.get("OrderNumber") == 0 || pm.environment.get("OrderNumber") == null){
    pm.execution.skipRequest()
}

```

Based on this PR, it should be up and running in Newman right?

> <https://github.com/postmanlabs/newman/pull/3183>
>
> Sourced from \[postman-runtime's changelog\](https://github.com/postmanlabs/postma…n-runtime/blob/develop/CHANGELOG.yaml).
> 
> \> 7.36.0: date: 2023-11-18 new features: - \>- \[GH-1336\](https://redirect.github.com/postmanlabs/postman-runtime/issues/1336) Added support for fetching execution location context through script chores: - Updated dependencies
> \> 
> \> 7.35.0: date: 2023-11-02 new features: - \[GH-1354\](https://redirect.github.com/postmanlabs/postman-runtime/issues/1354) Added support for skipping request execution through script
> \> 
> \> 7.34.0: date: 2023-10-19 new features: - \[GH-1340\](https://redirect.github.com/postmanlabs/postman-runtime/issues/1340) Added support for ASAP authentication chores: - Updated dependencies
> 
> Sourced from \[postman-collection's changelog\](https://github.com/postmanlabs/postman-collection/blob/develop/CHANGELOG.yaml).
> 
> \>4.3.0: date: 2023-11-18 new features: - GH-1339 Added \`getPath\` method on Item chores: - Updated dependencies

Any ideas on what we could be doing wrong?

Our pipeline pulls the latest version of Newman before it kicks off the tests.

---

<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:** [March 22, 2024, 11:58pm UTC](https://community.postman.com/t/skip-request-feature-in-newman/59158/2 "2024-03-22T23:58:19Z")

</div>

Hey @bstokesmelaleuca 👋

Welcome to the Postman Community! :postman:

Are you able to confirm the Newman version that you have running in your pipeline as part of the test? Are you able to add a `newman -v` statement to print that to the console?

Do you have these only in the individual requests or are these also at the folder or collection level pre-request scripts?

---

<div class="post-metadata">

**Author:** ![bstokesmelaleuca](https://avatars.discourse-cdn.com/v4/letter/b/7ea924/32.png) [@bstokesmelaleuca](https://community.postman.com/u/bstokesmelaleuca)\
**Post date:** [March 25, 2024, 2:52pm UTC](https://community.postman.com/t/skip-request-feature-in-newman/59158/3 "2024-03-25T14:52:13Z")

</div>

@danny-dainton, version 5.3.2 is what is being used in the pipeline, so that’s my problem… Thanks for pointing out what should have been obvious. I’ll figure out why the latest version is not being installed when it should be and get that fixed.

The skipRequest is only being used at an individual requests level, nothing at folder or collection level.

---

<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:** [March 25, 2024, 3:16pm UTC](https://community.postman.com/t/skip-request-feature-in-newman/59158/4 "2024-03-25T15:16:46Z")

</div>

I thought it might have be the case, as the skipRequest feature was added to Newman as part of the 6.1.0 release.

> <https://github.com/postmanlabs/newman/blob/develop/CHANGELOG.yaml>

---

<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 28, 2024, 3:17pm UTC](https://community.postman.com/t/skip-request-feature-in-newman/59158/5 "2024-03-28T15:17:06Z")

</div>

Closed on March 28, 2024, 3:17pm UTC

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