Skip to content

Instantly share code, notes, and snippets.

@testingbot
Created February 19, 2012 11:51
Show Gist options
  • Save testingbot/1863415 to your computer and use it in GitHub Desktop.
Save testingbot/1863415 to your computer and use it in GitHub Desktop.
testingbot java example
import com.thoughtworks.selenium.*;
import org.junit.*;
import com.testingbot.*;
public class SmokeTest extends TestingBotTestCase {
public void setUp() throws Exception {
TestingBotSelenium selenium = new TestingBotSelenium(
"hub.testingbot.com",
4444,
"{\"client_key\": \"[key]\"," +
"\"client_secret\": \"[secret]\"," +
"\"os\": \"Windows\"," +
"\"browserName\": \"firefox\"," +
"\"browserVersion\": \"10\"}",
"http://www.google.com/");
this.selenium = selenium;
selenium.start("version=10;platform=WINDOWS;screenshot=false");
}
public void testGoogle() throws Exception {
this.selenium.open("/");
assertEquals("Google", this.selenium.getTitle());
}
public void tearDown() throws Exception {
this.selenium.stop();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment