postmanlabs / newman

Newman is a command-line collection runner for Postman
https://www.postman.com
Apache License 2.0
6.78k stars 1.15k forks source link

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

Open BillChirico opened 2 months ago

BillChirico commented 2 months ago
  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 commented 2 months ago

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 commented 2 weeks ago

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

MoWu0 commented 6 days ago

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

willynilly commented 4 days ago

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

jdelpierre commented 4 days ago

Same for me. Thanks.