saucelabs / saucectl

A command line interface for the Sauce Labs platform.
Apache License 2.0
42 stars 16 forks source link

Connect tunnel before preExec scripts #894

Closed 3dd93 closed 1 month ago

3dd93 commented 7 months ago

🚀 Feature Proposal

Connect tunnel before preExec scripts execution

Motivation

Right now we have split suites by shard but our global setup is getting executed once per shard making them to fail as we cannot login multiple times, to avoid that we put our login into a small node script and call it via preExec tag but unfortunately it runs before even the tunnel connection so we are getting a proxy issue and not able to reach the login page

Example

alexplischke commented 7 months ago

The tunnel should definitely be already set up by the time the commands from preExec are executed. However, you may likely need to configure your HTTP client with the tunnel proxy yourself – in your script – by reading the HTTP_PROXY environment variable, whose value will be akin to http://host:port.