Fast Fail
Basically you’ll stop loading the URL or domain asap. Sauce Connect will respond to the request right away thus ending that request and allowing any client side javascript to fire as expected.
How?
The magic really happens in squid but some client side validation (sauce connect client) is being done. This may change as sauce connect goes up in versions but #sc-support should be able to guide you if you have any unique errors/customer questions.
This is regular old regex. You should be able to use ANY regex testing website with any library (golang, C, python, php, etc etc) to test your regex. Or even direct customers to use regex testing of their choice.
Lets say as an example we want the user to reach www.google.com but NOT search for the word “test”. In the world of URLs it would look something like this:
The regex for that in –fast-fail would look like the below:
-F .*q=test*.
This would cause the site not to load if the URL contained the param and key q=test
. This would also block the term q=test+saucelabs
but you could adapt the regex as needed.
If you wanted to block a domain and all subdomains you could just put in the domain itself:
-F .*q=test*.,saucelabs.com
Now the user can’t search for “test” on google.com or go to saucelabs.com or any of its subdomains!
Why stop loading a URL?
Sometimes it's a script included and not part of the SUT. Sometimes its a tracking beacon, ad that takes too long to load, inconsequential API calls, etc etc. Basically its not needed for the test but may be needed for the whole user experience (i.e. tracking users everywhere they go and monitoring everything they do).
Gotchas
NO SPACES. Any spaces after the commas will discard the rest of the list of comma separated values.