question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Postman BDD+Newman -- ReferenceRrror in test-script - runtime:extenstions~request: request url is empty

See original GitHub issue
  1. Newman Version (can be found via newman -v): 3.8.3

  2. OS details (type, version, and architecture): Windows 10

  3. Are you using Newman as a library, or via the CLI? via CLI

  4. Did you encounter this recently, or has this bug always been there: just tried the tool and got stucked

  5. Expected behaviour: to execute the tests with success from cmd line as well, from Postman GUI it works fine. Note: I’m using Postman BDD

  6. Command / script used to run Newman: newman run POC.postman_collection_23oct_1.json

  7. Sample collection, and auxilliary files (minus the sensitive details):

  8. Screenshots (if applicable):

Steps to reproduce the problem: I’m using Postman BDD for a POC on testing APIs on our project.

  1. Wrote some simple tests and executed collection from GUI - worked fine
  2. executed on cmd line with Newman - Fail

Note: I can not send the requests since it is sensitive data. What other info can I send to you?

Result:

POC - WS Test - WHK / 001 - SetUp β”” PostManBDD GET β–‘ POC - WS Test - WHK / 002 - Test ProductSummary for single product WS β”” Check that is a succesfull response GET https://product…/summary [200 OK, 437B, 351ms] 2β „ ReferenceError in test-script

β”” Check response content GET https://product-…/summary [200 OK, 437B, 74ms] 3β „ ReferenceError in test-script

β”” Check error case - product_number text GET https://product-…t/summary [404 Not Found, 336B, 76ms] 4β „ ReferenceError in test-script

β”” Check error case - product_number not existent GET https://product-…/summary [404 Not Found, 336B, 71ms] 5β „ ReferenceError in test-script

────────────────────────┬──────────┬──────────┐ β”‚ β”‚ executed β”‚ failed β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ iterations β”‚ 1 β”‚ 0 β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ requests β”‚ 5 β”‚ 1 β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ test-scripts β”‚ 4 β”‚ 4 β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ prerequest-scripts β”‚ 0 β”‚ 0 β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ assertions β”‚ 0 β”‚ 0 β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ total run duration: 725ms β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ total data received: 380B (approx) β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ average response time: 114ms β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

failure detail

  1. Error runtime:extenstions~request: request url is empty at request inside β€œPOC - WS Test - WHK / 001 - SetUp / PostManBDD”

  2. ReferenceError it is not defined at test-script inside β€œPOC - WS Test - WHK / 002 - Test ProductSummary for single product WS / Check that is a succesfull response”

  3. ReferenceError describe is not defined at test-script inside β€œPOC - WS Test - WHK / 002 - Test ProductSummary for single product WS / Check response content”

  4. ReferenceError it is not defined at test-script inside β€œPOC - WS Test - WHK / 002 - Test ProductSummary for single product WS / Check error case - product_number text”

  5. ReferenceError it is not defined at test-script inside β€œPOC - WS Test - WHK / 002 - Test ProductSummary for single product WS / Check error case - product_number not existent”

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
prakharjoshicommented, Oct 23, 2017

@dcalina One possible reason is you might have set it once before and the collection run picks the globals environment from App so it was available there while you run the collection through App. You might be able to see postmanBDD as a global variable in your app. On the other hand in Newman, there was no global env named postmanBDD during a run.

0reactions
dcalinacommented, Oct 23, 2017

Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Runner doesn't run the collection and returns error "request url ...
Expected: response is returned. Actually: error "Error: runtime:extenstions~request: request url is empty" in Postman console. In DevTools:
Read more >
"request url is empty" even though successful authentication
I authenticate using OAuth 2.0 successfully and get redirected back to Postman. In the console, I get an error: request URL is empty....
Read more >
Postman OAuth 2.0 "request url is empty" error even though ...
Please try my steps to get access token with OAuth 2.0 in Postman. POST https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token.
Read more >
How to use the postman-collection.Url function in ... - Snyk
To help you get started, we've selected a few postman-collection.Url examples, based on popular ways it is used in public projects.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found