JBird20
(Jay)
August 19, 2020, 6:20pm
1
Hi,
I have newman setup and running local. But i am having an issue with newman running on a certain endpoint. This endpoint is not public, and i cannot give details on it.
I have a simple GET request that when fired through Newman returns:
GET https://soemthing/online/3bc009c4-15bc-40dc-aeaf-409c48285bac
Error: connect ETIMEDOUT 50.11.121.100:443
Request Headers
User-Agent: PostmanRuntime/7.26.3
Accept: */*
Postman-Token: b39eeb33-2496-41b7-a233-dd6de7d2e989
Host: something.co.uk
Accept-Encoding: gzip, deflate, br
This does not happen when running it through Postman.
The reason for this is the following box is checked in Postman: “Use the system Proxy”
Is there a way to get Newman to run using the same setting?
If so, how do i find out what the Proxy is that the API calls are going through?
Many thanks in advance
What’s the Newman run command that you’re using?
Have you tried this with --insecure
appended to the end of the command?
JBird20
(Jay)
August 19, 2020, 6:34pm
3
Yep:
"newman-tests-smoke": "newman run ./smoke-test-set/smoke.postman_collection.json -e ./smoke-test-set/smoke-test.postman_environment.json --reporter-junit-export Results\\junitSmokeTestReport.xml --insecure",
JBird20
(Jay)
August 19, 2020, 6:42pm
4
I have also read that it may have something to do with Newman wanting things in lowercase and Postman has them in upper case.
opened 10:31AM - 26 Aug 15 UTC
closed 12:05PM - 30 Aug 17 UTC
when using postman generated collections with Post http method and raw body (json data), the content length is not set automatically...
bug
pending-close
v3
so i have set the requests (that arn’t hidden) to lower case and turned off the proxy, and still get the same error
I think you’re missing a --reporters junit
in there
newman run ./smoke-test-set/smoke.postman_collection.json -e ./smoke-test-set/smoke-test.postman_environment.json --reporters junit --reporter-junit-export Results\\junitSmokeTestReport.xml --insecure
That’s not the same issue though
Not really sure what to suggest to be honest as it’s not a lot of information to go off - Are you using something to run Newman or was that just part of an npm script?
JBird20
(Jay)
August 19, 2020, 6:59pm
6
Am just running this from inside VSCode.
npm run {packageName}.
As soon as it hits the GETs on the API Request it throws the error. I think i have now found my companies Proxy, so am going to try the
set HTTPS_proxy=myuser:mypassword@ipoftheproxy:portoftheproxy
set HTTP_proxy=myuser:mypassword@ipoftheproxy:portoftheproxy
in front of the Newman command. I’ll let you know how that goes
JBird20
(Jay)
August 19, 2020, 7:20pm
7
Nope, still no luck. Different error this time:
"newman-tests-smoke": "set HTTPS_PROXY=https://username:[email protected] :8080 && newman run ./smoke-test-set/smoke-test.postman_collection.json -e ./smoke-test-set/smoke-tetest_environment.json --reporter-junit-export Results\\junitSmokeTestReport.xml --insecure",
returns
[errored]
tunneling socket could not be established, cause=Client network socket disconnected before secure TLS connection was established
JBird20
(Jay)
August 19, 2020, 7:46pm
8
@danny-dainton is there anyway to set a Proxy setting for a single request rather than Globally?