newman icon indicating copy to clipboard operation
newman copied to clipboard

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

Open BillChirico opened this issue 1 year ago • 24 comments

  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

BillChirico avatar May 15 '24 21:05 BillChirico

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

esbenboye avatar May 17 '24 08:05 esbenboye

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

sudhirbits avatar Jul 01 '24 12:07 sudhirbits

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

MoWu0 avatar Jul 10 '24 07:07 MoWu0

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

willynilly avatar Jul 11 '24 13:07 willynilly

Same for me. Thanks.

jdelpierre avatar Jul 11 '24 13:07 jdelpierre

+1

mustaphadem avatar Jul 26 '24 16:07 mustaphadem

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.

indalaterre avatar Jul 29 '24 07:07 indalaterre

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

donatodipierr0 avatar Jul 29 '24 07:07 donatodipierr0

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

Any timeframe for this to be implemented?

dosaki avatar Sep 03 '24 13:09 dosaki

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

marinflorin avatar Sep 24 '24 07:09 marinflorin

Some problem here. Upvoted!

edtro-bp avatar Oct 09 '24 14:10 edtro-bp

Some problem, please implement in newman or postman-cli

cazzhd avatar Oct 18 '24 13:10 cazzhd

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.

cazzhd avatar Oct 18 '24 14:10 cazzhd

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

noopliez avatar Oct 25 '24 13:10 noopliez

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

polnicki avatar Oct 28 '24 15:10 polnicki

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

LudovicPelleDMS avatar Oct 29 '24 09:10 LudovicPelleDMS

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

erikssonphil avatar Nov 13 '24 21:11 erikssonphil

Any updates on this?

Jef1SD avatar Nov 28 '24 08:11 Jef1SD

This is a critical feature that is missing.

mordam avatar Dec 11 '24 22:12 mordam

is there any workaround for this issue?

sini4242 avatar Dec 31 '24 03:12 sini4242

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

malvika-chaudhary avatar Jan 03 '25 09:01 malvika-chaudhary

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

bathwaterpizza avatar Jan 22 '25 21:01 bathwaterpizza

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

polnicki avatar Jan 23 '25 06:01 polnicki

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.

sharshi avatar Feb 12 '25 21:02 sharshi