Skip to content

Instantly share code, notes, and snippets.

<?php
class ExampleTest extends PHPUnit_Extensions_TestingBotTestCase
{
public static $browsers = array(
array(
'name' => "Windows firefox 8",
'platform' => 'Windows',
'browser' => 'firefox',
@testingbot
testingbot / testingbot_selenium
Created January 20, 2012 12:56
Start new iexplore Selenium session on TestingBot
curl http://hub.testingbot.com:4444/selenium-server/driver/ -d 'cmd=getNewBrowserSession&client_key={{key}}&client_secret={{secret}}&1=iexplore&2=http%3A%2F%2Fwww.google.be%2F'
@testingbot
testingbot / gist:1863415
Created February 19, 2012 11:51
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]\"," +
{
"capabilities":
[
{
"browserName": "firefox",
"version" : "10",
"platform" : "LINUX",
"alias" : "FF10",
"maxInstances": 3,
"seleniumProtocol": "Selenium"
require "rubygems"
require 'testingbot'
gem "selenium-client"
gem "selenium-webdriver"
require "selenium-webdriver"
require "selenium/client"
caps = {
:browserName => "firefox",
:platform => "WINDOWS",
@testingbot
testingbot / gist:2362106
Created April 11, 2012 20:10
testingbot python
import unittest
from selenium import webdriver
class SimpleTest(unittest.TestCase):
def setUp(self):
desired_capabilities = webdriver.DesiredCapabilities.FIREFOX
desired_capabilities['version'] = '11'
desired_capabilities['api_key'] = 'xx'
desired_capabilities['api_secret'] = 'xx'
@testingbot
testingbot / gist:2428497
Created April 20, 2012 13:19
webdriver example java
import junit.framework.TestCase;
import org.openqa.selenium.*;
import org.openqa.selenium.remote.*;
import java.net.URL;
import java.util.concurrent.TimeUnit;
public class SimpleTest extends TestCase {
private WebDriver driver;
public void setUp() throws Exception {
@testingbot
testingbot / gist:2463226
Created April 22, 2012 10:07
android c# testingbot
using NUnit.Framework;
using System;
using Selenium;
using System.Web;
using System.Text;
using System.Net;
using OpenQA.Selenium;
using OpenQA.Selenium.Remote;
namespace Test
@testingbot
testingbot / gist:2551920
Created April 29, 2012 17:00
example sending test status back with java
import junit.framework.TestCase;
import org.openqa.selenium.*;
import org.openqa.selenium.remote.*;
import java.net.URL;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;
import junit.framework.AssertionFailedError;
import junit.framework.Test;
import junit.framework.TestListener;
import junit.framework.TestResult;
@testingbot
testingbot / gist:2579632
Created May 2, 2012 19:38
test with iPhone and Java
import junit.framework.TestCase;
import org.openqa.selenium.*;
import org.openqa.selenium.remote.*;
import java.net.URL;
import java.util.concurrent.TimeUnit;
public class SimpleTest extends TestCase {
private WebDriver driver;
public void setUp() throws Exception {