First the basics of curl:
Curl Manual https://curl.haxx.se/docs/manpage.html
curl https://my-site-under-test.com -vvvv -o /dev/null
This will use the HTTPS protocol and print out verbose info. It will discard the HTML body to "/dev/null". You can remove -o and the "/dev/null" if you need to see the HTML or other returned content, i.e. you need to confirm the web page is returned.
Curl with Sauce Connect Proxy
curl --proxy localhost:3788 https://my-site-under-test.com -v -o /dev/null
- Start a Sauce Connect tunnel or find the logs of an existing tunnel.
- Obtain the port used by SC from the logs. Looks like: Started scproxy on port 52178
curl -I --proxy localhost:52178 www.google.com
Curl with a generic proxy (not sauce connect)
curl --proxy username:firstname.lastname@example.org:port https://some-website.com -v
Can the host machine hit the RDC Tunnel API?
curl --user RDC_USERNAME:RDC_ACCESS_KEY https://us1.api.testobject.com/sc/rest/v1/RDC_USERNAME/tunnels -v -L -X GET
If you can curl a destination, say a site under test, and get a response, then Sauce Connect should be able to get there too. So before delving into Sauce Connect verify all the basic network connections exist via curl.
- curl the site under test
- If it fails check for a proxy. curl with aforementioned proxy, see "Curl with a generic proxy"
- Start sc and curl with sauce connect. verify the curl from step 1 and step 3 match.