Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make compatible with saucelabs-adapter 0.7.6

  • Loading branch information...
commit c2ce1bbf193a5e675cbea24cfa79d063a7e64963 1 parent d733382
Sam Pierson authored
Showing with 35 additions and 24 deletions.
  1. +11 −6 java/source_server/net/jsunit/SeleniumTest.java
  2. +24 −18 selenium.yml
View
17 java/source_server/net/jsunit/SeleniumTest.java
@@ -127,12 +127,17 @@ private void stopJsUnitServer() {
private void startSeleniumClient() throws Exception {
String host = seleniumConfig.get("selenium_server_address");
int port = Integer.parseInt(seleniumConfig.get("selenium_server_port"));
- String start_command = "{" +
- "\"username\": \"" + seleniumConfig.get("saucelabs_username") + "\", " +
- "\"access-key\": \"" + seleniumConfig.get("saucelabs_access_key") + "\", " +
- "\"os\": \"" + seleniumConfig.get("saucelabs_browser_os") + "\", " +
- "\"browser\": \"" + seleniumConfig.get("saucelabs_browser") + "\", " +
- "\"browser-version\": \"" + seleniumConfig.get("saucelabs_browser_version") + "\"}";
+ String start_command;
+ if (host.equals("saucelabs.com")) {
+ start_command = "{" +
+ "\"username\": \"" + seleniumConfig.get("saucelabs_username") + "\", " +
+ "\"access-key\": \"" + seleniumConfig.get("saucelabs_access_key") + "\", " +
+ "\"os\": \"" + seleniumConfig.get("saucelabs_browser_os") + "\", " +
+ "\"browser\": \"" + seleniumConfig.get("saucelabs_browser") + "\", " +
+ "\"browser-version\": \"" + seleniumConfig.get("saucelabs_browser_version") + "\"}";
+ } else {
+ start_command = seleniumConfig.get("selenium_browser_key");
+ }
String browser_url = "http://" + seleniumConfig.get("application_address") + ":" + seleniumConfig.get("application_port");
selenium = new DefaultSelenium(host, port, start_command, browser_url);
selenium.start();
View
42 selenium.yml
@@ -1,4 +1,4 @@
-local:
+local: &local
selenium_server_address: "localhost"
selenium_server_port: "4444"
selenium_browser_key: "*chrome /Applications/Firefox.app/Contents/MacOS/firefox-bin"
@@ -7,24 +7,30 @@ local:
# Possible Sauce Labs configurations as of 2009/11/19
# From: http://saucelabs.com/products/docs/sauce-ondemand/browsers
-# os: "Windows 2003"
-# browser: "iexplore"
-# browser-version: "6.", "7.", "8."
-# browser: "firefox"
-# browser-version: "2.", "3.0", "3.5"
-# browser: "safari"
-# browser-version: "3.", "4."
-# browser: "opera"
-# browser-version: "9."
-# browser: "googlechrome"
-# browser-version: ""
-# os: "Linux"
-# browser: "firefox"
-# browser-version: "3."
#
-saucelabs:
+# saucelabs_browser_os saucelabs_browser saucelabs_browser_version (pick one)
+#
+# "Windows 2003" "iexplore" "6.", "7.", "8."
+# "firefox" "2.", "3.0", "3.5"
+# "safari" "3.", "4."
+# "opera" "9."
+# "googlechrome" ""
+# "Linux" "firefox" "3."
+saucelabs: &saucelabs
+ # URL of Selenium RC server:
selenium_server_address: "saucelabs.com"
selenium_server_port: "4444"
- selenium_browser_key: '{"username": "YOUR_SAUCELABS_USERNAME", "access-key": "YOUR_SAUCELABS_ACCESS_KEY", "os": "Linux", "browser": "firefox", "browser-version": "3."}'
- # application_server is generated during tunnel setup
+ # Saucelabs credentials / Browser to drive
+ saucelabs_username: "YOUR-SAUCELABS-USERNAME"
+ saucelabs_access_key: "YOUR-SAUCELABS-ACCESS-KEY"
+ saucelabs_browser_os: "Linux"
+ saucelabs_browser: "firefox"
+ saucelabs_browser_version: "3."
+ saucelabs_max_duration_seconds: "1800"
+ # Selenium RC browser connects to and tests the app at this URL:
+ application_address: "this will be ovewritten if tunnel_method == :saucetunnel"
application_port: "80"
+ # App host is actually a tunnel that tunnels from <application_address>:<application_port> to localhost:<tunnel_to_localhost_port>
+ tunnel_method: :saucetunnel
+ tunnel_to_localhost_port: "8080"
+ tunnel_startup_timeout: "240"
Please sign in to comment.
Something went wrong with that request. Please try again.