Postman BDD+Newman -- ReferenceRrror in test-script - runtime:extenstions~request: request url is empty
See original GitHub issue-
Newman Version (can be found via
newman -v
): 3.8.3 -
OS details (type, version, and architecture): Windows 10
-
Are you using Newman as a library, or via the CLI? via CLI
-
Did you encounter this recently, or has this bug always been there: just tried the tool and got stucked
-
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
-
Command / script used to run Newman: newman run POC.postman_collection_23oct_1.json
-
Sample collection, and auxilliary files (minus the sensitive details):
-
Screenshots (if applicable):
Steps to reproduce the problem: Iβm using Postman BDD for a POC on testing APIs on our project.
- Wrote some simple tests and executed collection from GUI - worked fine
- 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
-
Error runtime:extenstions~request: request url is empty at request inside βPOC - WS Test - WHK / 001 - SetUp / PostManBDDβ
-
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β
-
ReferenceError describe is not defined at test-script inside βPOC - WS Test - WHK / 002 - Test ProductSummary for single product WS / Check response contentβ
-
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β
-
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:
- Created 6 years ago
- Comments:10 (5 by maintainers)
@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 namedpostmanBDD
during a run.Thank you