Skip to content

Running collection with packages results in pm.require is not a function #3229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
BillChirico opened this issue May 15, 2024 · 24 comments
Open

Comments

@BillChirico
Copy link

BillChirico commented May 15, 2024

  1. Newman Version (can be found via newman -v): 6.1.2
  2. OS details (type, version, and architecture): Windows 10
  3. Are you using Newman as a library, or via the CLI? CLI through Powershell
  4. Did you encounter this recently, or has this bug always been there: First time trying
  5. Expected behaviour: To support the require function on pm. This is critical to our CI/CD integration testing.
  6. Command / script used to run Newman: newman run clients-api-collection.json -e cloud-dev-environment.json
  7. Sample collection, and auxiliary files (minus the sensitive details): 01. TypeError pm.require is not a function at test-script inside "[Test Setup] / CreateNewClient"
  8. Screenshots (if applicable):
    image
@esbenboye
Copy link

esbenboye commented May 17, 2024

I'm having the same issue with the following info;

Newman Version (can be found via newman -v): 6.1.2
OS details (type, version, and architecture): Ubuntu 22.04.3 LTS
Are you using Newman as a library, or via the CLI? CLI
Did you encounter this recently, or has this bug always been there: First time trying
Command / script used to run Newman: newman run ./PostmanDemo.postman_collection.json
Sample collection attached: PostmanDemo.postman_collection.json
Screenshot;
Skærmbillede 2024-05-17 101027

@sudhirbits
Copy link

When is the package management feature in postman going to be supported in newman?

@MoWu0
Copy link

MoWu0 commented Jul 10, 2024

The Library feature is almost useless for us currently, because we develop in postman and run in newman.

@willynilly
Copy link

I would also like to use this with newman since we use newman.

@jdelpierre
Copy link

Same for me. Thanks.

@mustaphadem
Copy link

+1

@indalaterre
Copy link

We implemented this using UI with Postman and it's a great feature to have a better maintainbility of the code. Having it in newman would be a great pro.

@donatodipierr0
Copy link

It's a good feature, very helpful for improving the maintenance of the API tests but... on the automated side, using newman is mandatory to have this feature. I hope it will be available with newman usage also

@dosaki
Copy link

dosaki commented Sep 3, 2024

It didn't even cross my mind that newman wouldn't support this!

Any timeframe for this to be implemented?

@marinflorin
Copy link

I mean, if you can't use it using newman or postman-cli what's the purpose of this feature?

@edtro-bp
Copy link

edtro-bp commented Oct 9, 2024

Some problem here. Upvoted!

@cazzhd
Copy link

cazzhd commented Oct 18, 2024

Some problem, please implement in newman or postman-cli

@cazzhd
Copy link

cazzhd commented Oct 18, 2024

Some problem, please implement in newman or postman-cli

I decided upgrade my postman-cli version 1.1.2 -> 1.10.2
imagen

This functionality works, but only for payment plans.

@noopliez
Copy link

Same here, would be nice to have it in newman, too

@polnicki
Copy link

Hi, could you prioritise it a little higher? please ;-)

@LudovicPelleDMS
Copy link

Hello, thank you for your excellent work, and I agree, it would be really nice to have this feature, for better maintainability. Upvoted

@erikssonphil
Copy link

Would like this feature very much. Was surprised when I found out it wasn't supported.

@Jef1SD
Copy link

Jef1SD commented Nov 28, 2024

Any updates on this?

@mordam
Copy link

mordam commented Dec 11, 2024

This is a critical feature that is missing.

@sini4242
Copy link

is there any workaround for this issue?

@malvika-chaudhary
Copy link

Hi All,

Thanks for your feedback as always. Support for package library is not on the roadmap for Newman. However, we do support the package library feature on Postman CLI.

Please try out Postman CLI (command-line collection runner from Postman that supports similar functionalities as Newman).
You can install it from here. Let us know your experience. If you would like to read more about similarities/differences between both the CLI tools, I can recommend this blog.

If you would like to talk with me on the call about your experience or challenges, here is a link to schedule a time.

Thanks,
Malvika

@bathwaterpizza
Copy link

bathwaterpizza commented Jan 22, 2025

You forgot to mention that Postman CLI does not support packages with the free plan either.

@polnicki
Copy link

Hi All,

Thanks for your feedback as always. Support for package library is not on the roadmap for Newman. However, we do support the package library feature on Postman CLI.

Please try out Postman CLI (command-line collection runner from Postman that supports similar functionalities as Newman). You can install it from here. Let us know your experience. If you would like to read more about similarities/differences between both the CLI tools, I can recommend this blog.

If you would like to talk with me on the call about your experience or challenges, here is a link to schedule a time.

Thanks, Malvika

Great but CLI is not supporting proxy ...

@sharshi
Copy link

sharshi commented Feb 12, 2025

You forgot to mention that Postman CLI does not support packages with the free plan either.

Thanks for saving me time. I assume you figured this out the hard way? I did not see any indication of this being the case anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests