# Configure newman json reporter to not write results to disk

**URL:** <https://community.postman.com/t/configure-newman-json-reporter-to-not-write-results-to-disk/60867>\
**Category:** Help Hub\
**Tags:** newman-project, newman-reports\
**Created:** [May 9, 2024, 5:11pm UTC](https://community.postman.com/t/configure-newman-json-reporter-to-not-write-results-to-disk/60867 "2024-05-09T17:11:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![docyes](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@docyes](https://community.postman.com/u/docyes)\
**Post date:** [May 9, 2024, 5:11pm UTC](https://community.postman.com/t/configure-newman-json-reporter-to-not-write-results-to-disk/60867/1 "2024-05-09T17:11:34Z")

</div>

I was unable to find a param that can stop the newman json reporter from writing results using the `run` function to disk. Any tips?

---

<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:** [May 9, 2024, 5:22pm UTC](https://community.postman.com/t/configure-newman-json-reporter-to-not-write-results-to-disk/60867/2 "2024-05-09T17:22:32Z")

</div>

Hey @docyes 👋

Welcome to the Postman Community! :postman:

Could you provide some more context and an example of this please?

Doesn’t that reporter create a json file, wouldn’t it need to write to disk to store the file? Perhaps I’m not understanding what you’re doing here. 🤔

---

<div class="post-metadata">

**Author:** ![docyes](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@docyes](https://community.postman.com/u/docyes)\
**Post date:** [May 10, 2024, 9:31am UTC](https://community.postman.com/t/configure-newman-json-reporter-to-not-write-results-to-disk/60867/3 "2024-05-10T09:31:57Z")

</div>

Hi Danny,

I am interested in using newman as a library  
[GitHub - postmanlabs/newman: Newman is a command-line collection runner for Postman](https://github.com/postmanlabs/newman?tab=readme-ov-file#using-newman-as-a-library) and specifically the json reporter and the run callback paramater in the summary argument:  
[GitHub - postmanlabs/newman: Newman is a command-line collection runner for Postman](https://github.com/postmanlabs/newman?tab=readme-ov-file#newmanruncallbackerror-object--summary-object)

Goal is to use the newman.run function and get the results from the reporter and the summary callback instead of having it write the results to the file system.

---

<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:** [May 10, 2024, 11:17am UTC](https://community.postman.com/t/configure-newman-json-reporter-to-not-write-results-to-disk/60867/4 "2024-05-10T11:17:57Z")

</div>

If you’re using it as a library within a script, you don’t need to attach a reporter.

All of the data that gets fed into all the reporters comes from the Summary Object.

You need to use the various `.on()` events to capture this during the run and that can be logged to the console.

> **[GitHub - postmanlabs/newman: Newman is a command-line collection runner for...](https://github.com/postmanlabs/newman?tab=readme-ov-file#newmanrunevents)**
>
> Newman is a command-line collection runner for Postman - postmanlabs/newman

---

<div class="post-metadata">

**Author:** ![docyes](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@docyes](https://community.postman.com/u/docyes)\
**Post date:** [May 31, 2024, 2:57pm UTC](https://community.postman.com/t/configure-newman-json-reporter-to-not-write-results-to-disk/60867/5 "2024-05-31T14:57:25Z")

</div>

That makes sense. So my specific question is what is the option to pass telling Newman to not write results to disk if I am manually capturing them.

It’s not the end of the world but having a process that writes to disk (Newman) requires a cleanup activity from a developer standpoint. So passing a null reporter will solve this?

---

<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:** [May 31, 2024, 3:04pm UTC](https://community.postman.com/t/configure-newman-json-reporter-to-not-write-results-to-disk/60867/6 "2024-05-31T15:04:28Z")

</div>

The default reporter is the CLI reporter, that will log the requests details and a summary of the run in the form of a table, to the terminal.

You would just need to remove the `-r <your_reporter>` from your command.

---

<div class="post-metadata">

**Author:** ![docyes](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@docyes](https://community.postman.com/u/docyes)\
**Post date:** [May 31, 2024, 3:07pm UTC](https://community.postman.com/t/configure-newman-json-reporter-to-not-write-results-to-disk/60867/7 "2024-05-31T15:07:57Z")

</div>

Ok, so use the default reporter and write my own json reporter from the event listener?

---

<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:** [May 31, 2024, 6:52pm UTC](https://community.postman.com/t/configure-newman-json-reporter-to-not-write-results-to-disk/60867/8 "2024-05-31T18:52:39Z")

</div>

If that’s something that you’d like to do - there have been many great community reporters created.

It would be great to see what you come up with. ❤

---

<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:** [June 30, 2024, 6:52pm UTC](https://community.postman.com/t/configure-newman-json-reporter-to-not-write-results-to-disk/60867/9 "2024-06-30T18:52:55Z")

</div>

Closed on June 30, 2024, 6:52pm UTC

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