Last active
January 16, 2019 23:52
-
-
Save mdsauce/b22f548a1e89ee80dba21c1fd0b5b41e to your computer and use it in GitHub Desktop.
nethelp CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nethelp Proposal and Basic Usage Examples | |
Best Scenario | |
------------- | |
User has solid internet connection and can reach Sauce services | |
$ nethelp —proxy user:password | |
[x] connect to public website status.saucelabs.com | |
[x] connect to RDC US endpoint | |
[x] connect to RDC EU endpoint | |
[x] connect to VDC US endpoint | |
[x] connect to VDC EU endpoint | |
[x] connect to Sauce Connect Tunnel endpoint | |
[x] connect to Sauce Labs REST API | |
[x] connect to Test Object REST API | |
[x] ping from ondemand.saucelabs.com | |
Worst Scenario | |
-------------- | |
User has poor internet connection or is unable to connect because they don't know about their proxy or firewall. | |
$ nethelp -v | |
!!! potential proxy or firewall detected | |
[ ] connect to internet at status.saucelabs.com | |
=== FAIL Unable to reach *default endpoint or arg* | |
- Unable to establish a basic HTTP connection to a public site. Could be | |
problem with network. | |
- Proxy or firewall may be preventing outgoing connection | |
**Full Results of test and raw output here** | |
[ ] connect to ondemand endpoint | |
=== FAIL Unable to reach *public VDC endpoint* | |
- Unable to get a response from HTTP request to public ondemand.saucelabs.com endpoint. Could be | |
problem with local network if other public sites are unreachable. | |
- Proxy or firewall may be preventing outgoing connection | |
**Full Results of test and raw output here** | |
[ ] connect to RDC endpoint | |
=== FAIL Unable to reach *public RDC api endpoint* | |
- Unable to get a response from HTTP request to public ondemand.saucelabs.com endpoint. Could be | |
problem with local network if other public sites are unreachable. | |
- Proxy or firewall may be preventing outgoing connection | |
**Full Results of test and raw output here** | |
[ ] connect to US data centers | |
=== FAIL Unable to obtain a response from US data centers | |
- Unable to get a response from HTTP request to public ondemand.saucelabs.com endpoint. Could be | |
problem with local network if other public sites are unreachable. | |
- Proxy or firewall may be preventing outgoing connection | |
**Full Results of test and raw output here** | |
[ ] connect to US data centers | |
=== FAIL Unable to obtain a response from US data centers | |
- Unable to get a response from HTTP request to public ondemand.saucelabs.com endpoint. Could be | |
problem with local network if other public sites are unreachable. | |
- Proxy or firewall may be preventing outgoing connection | |
**Full Results of test and raw output here** | |
[ ] connect to Sauce Connect Tunnel VMs | |
=== FAIL Unable to obtain a response from US data centers | |
- Unable to get a response from *tunnel endpoint*. Could be | |
problem with local network if other public sites are unreachable. | |
- Proxy or firewall may be preventing outgoing connection | |
**Full Results of test and raw output here** | |
[x] ping from ondemand.saucelabs.com | |
=== PASS Able to ping using ICMP ECHO REQUEST | |
!!! Took a long time to respond (ms value in response time on ping). Potentially low bandwidth or congested network. | |
- *arg or default endpoint* is reachable using ICMP ECHO packets and responding. | |
- Run ping command locally like $ ping *arg or default endpoint* | |
**Full Results of test and raw output here** | |
Middling Scenario | |
----------------- | |
User just hasn't put in their proxy settings. | |
$ nethelp -datacenter=us -cloud=vdc -sc | |
!!! potential proxy or firewall detected | |
[ ] connect to public server at saucelabs.com | |
[ ] connect to ondemand endpoint | |
[ ] connect to US data center | |
[ ] ping ondemand.saucelabs.com | |
Usage and Help Message | |
$ nethelp -h | |
Available Commands: | |
-h boolean print all commands and their descriptions. Defaults to false. | |
-v boolean print out all result details as well as traffic from the tests. Defaults to false. | |
-datacener string Pass the arg us, eu, or both to choose a datacenter location to test. Defaults to both. | |
-cloud string Pass the arg rdc, vdc or both to choose a service endpoint to test. Defaults to both. | |
-sc boolean Additional tests for sauce connect tunnel connectivity. Defaults to false | |
-long boolean Additional test to ensure long running connections >= 15 minutes do not get cutoff. Defaults to false. | |
-default boolean Disable all standard tests and only run tests specified at command line. Defaults to true. | |
-zip boolean Automatically zip the results. Default is false. | |
-o string path to output the file to. Default is Current Working Directory. | |
Why can’t you just use curl for everything? | |
Like this person says: https://github.com/carlmjohnson/get-headers | |
The problem this solves is that when you use curl -I it does a HEAD request, potentially changing the result, and when you do curl -i it also dumps the page HTML on you. This does a GET and returns those results—including any doubled headers. It also (optionally) downloads the body of the page and returns speed and timing information. | |
So why not curl and other tools like netcat or wireshark? | |
There are other problems introduced when you try to use mutliple tools to test a lot of things at once. Ideally we'll have a custom tool that does everything quickly and most importantly produces clear output. The user shouldn't need to be an expert with the tool. The ideal situation is the customer is sent nethelp and then asked to return the results to Sauce Labs which then snake their way to Support or a ticket. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment