# Test pre-script output without collection runner?

**URL:** <https://community.postman.com/t/test-pre-script-output-without-collection-runner/68847>\
**Category:** Help Hub\
**Tags:** scripts\
**Created:** [September 25, 2024, 8:15am UTC](https://community.postman.com/t/test-pre-script-output-without-collection-runner/68847 "2024-09-25T08:15:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rachb](https://avatars.discourse-cdn.com/v4/letter/r/cab0a1/32.png) [@rachb](https://community.postman.com/u/rachb)\
**Post date:** [September 25, 2024, 8:15am UTC](https://community.postman.com/t/test-pre-script-output-without-collection-runner/68847/1 "2024-09-25T08:15:25Z")

</div>

As a newbie my javascript is still quite sketchy, so I have to iterate a lot to get it going.

I’ve been trying to build the body of a request based on the values in a csv file. The 25 runs per month is really killing me as I can’t test if the iteration is working as expected without the runner and silly things like syntax errors will use an entire run.

How do people (newish to javascript) test their scripts?  
Is there a feature I haven’t found I can use to see the raw json it creates?

I can’t even get more runs by buying the basic paid tier, so I’m feeling really disincentivised from parting with any $ at all.

---

<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:** [September 25, 2024, 11:48am UTC](https://community.postman.com/t/test-pre-script-output-without-collection-runner/68847/2 "2024-09-25T11:48:33Z")

</div>

Hey @rachb 👋

Welcome to the Postman Community! :postman:

The Runner is only 1 way to run the Collection with a file. You could also use the [Monitors](https://learning.postman.com/docs/monitoring-your-api/setting-up-monitor/) feature or use [Newman](https://learning.postman.com/docs/collections/using-newman-cli/command-line-integration-with-newman/)/[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/) from the command line to run the Collection.

What is it that you’re trying to do in the script? Are you able to mock out the data within the script and send a single request?

---

<div class="post-metadata">

**Author:** ![rachb](https://avatars.discourse-cdn.com/v4/letter/r/cab0a1/32.png) [@rachb](https://community.postman.com/u/rachb)\
**Post date:** [September 26, 2024, 1:34am UTC](https://community.postman.com/t/test-pre-script-output-without-collection-runner/68847/3 "2024-09-26T01:34:32Z")

</div>

I needed to update ~3000 records from a csv file. Not all records needed every field updated, so there are a lot of empty cells.  
I was trying to build a request body dynamically, including only the fields that were populated in the csv in the request body.

I needed to be able to include or exclude nested lists, as well as skip entire records if all fields were empty.

I was able to mock some example records and send single requests.  
What I really want is the ability to see what the request body would look like _before_ I send it.

Thank you for your suggestions, I will have a look into Monitors and Newman/Postman CLI.

---

<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:** [October 26, 2024, 1:35am UTC](https://community.postman.com/t/test-pre-script-output-without-collection-runner/68847/4 "2024-10-26T01:35:06Z")

</div>

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