Skip to content

Commit

Permalink
Updating Sauce Labs tunnel instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
daynew committed May 22, 2024
1 parent 1788f8c commit 08a1094
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions config.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ azure_content_moderation_key:
# multiple browsers
saucelabs_username:
saucelabs_authkey:
saucelabs_tunnel_name:

# Credentials for applitools.com, used for running automated visual tests
applitools_eyes_api_key: !Secret
Expand Down
11 changes: 11 additions & 0 deletions dashboard/test/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ You can find the values for these settings in your saucelabs account settings (`

If you want to run tests on Sauce Labs against localhost you need to set up your tunnel:

#### Latest version of Sauce Labs tunnel
1. Login to Sauce Labs and download the [tunnel](https://app.saucelabs.com/tunnels).
2. Uncomment and fill out the values for the "saucelabs_" properties in `locals.yml`
- `saucelabs_tunnel_name` can be an arbitrary name, but it needs to match what you pass as an argument to `sc run...`
3. (Re)start your dashboard-server `./bin/dashboard-server`.
4. Start the sauce labs tunnel
- `sc run -u <saucelabs_username> -k <saucelabs_authkey> -r us-west --tunnel-name <saucelabs_tunnel_name>`
5. Run your UI test
- `./runner.rb -l -f features/platform/policy_compliance.feature -c Chrome --html`
- The log output can be found in `log/*.html`
#### Older versions of Sauce Labs tunnel
1. Login to Sauce Labs and download the [tunnel](https://app.saucelabs.com/tunnels).
- If you work on a Linux EC2 instance:
- Download the Linux version (will end in .tar.gz)
Expand Down
3 changes: 2 additions & 1 deletion dashboard/test/ui/features/support/connect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def saucelabs_browser(test_run_name)
idleTimeout: 60,
seleniumVersion: Selenium::WebDriver::VERSION
}
sauce_options[:tunnelIdentifier] = CDO.circle_run_identifier if CDO.circle_run_identifier
tunnel_name = CDO.circle_run_identifier || CDO.saucelabs_tunnel_name
sauce_options[:tunnelIdentifier] = tunnel_name if tunnel_name
sauce_options[:priority] = ENV['PRIORITY'].to_i if ENV['PRIORITY']
capabilities["sauce:options"] ||= {}
capabilities["sauce:options"].merge!(sauce_options)
Expand Down
1 change: 1 addition & 0 deletions locals.yml.default
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ use_my_apps: true
# multiple browsers
#saucelabs_username: ''
#saucelabs_authkey: ''
#saucelabs_tunnel_name: ''


# Credentails for applitools.com, used for running automated visual tests
Expand Down

0 comments on commit 08a1094

Please sign in to comment.