Selenium Test on Cloud - TestingBot


Running test on local machine with different OS with different combination of browsers its always a challenge, either we need to get more machine and really on selenium grid to solve the problem. Now without installing any OS or browser can we run the selenium scripts on cloud, yes its possible with some of the cloud services like Testing bot and Sauce labs.

In this post we will see how to run the selenium scripts on cloud for Testing Bot

Note : We will run anuko timesheet login on testingbot for win8 OS and browser chrome 35.

Need to know about Desired Capabilities :  It is used to configure the driver instance of Selenium WebDriver. We can configure all driver instance like FirefoxDriver, ChromeDriver, InternetExplorerDriver using desired capabilities.

Step 1 : Register with TestingBot for 100 mins free trail : https://testingbot.com/users/sign_up

Step 2 : Once done login to TestingBot with your id : https://testingbot.com/users/sign_in
Step 3: After login go to accounts section and get the client key and client secret.
Step 4 : Open eclipse and create a project called "TestingonCloud" and create a package com.test

 Ste 5 : Create a testNG class file as "RunOnTestingBot" under com.test package. 




Output :

Now login to Testing Bot with your account and go to dashboard and to view the result 



In below screen we can see its launched anuko time sheet as expected. 





That;s it, if you want to run with different OS and browser : first go to wizard and then click on selenium automation 




click on JAVA will take you to this page.. and based on your requirement select the OS and Browser and copy paste the line of code to your script. 
Ex.  
caps.setCapability("platform", "WIN8");
    caps.setCapability("version", "35");
    caps.setCapability("browserName", "chrome");


Thanks
Happy cloud....