Cross browser testing tools

Problem: Maintaining testing infrastructure for testing across different combinations of browser, browser version and platform is difficult and time consuming.

Of late, there are many tools that help testers quickly spin up any combination of browser, browser version and platform. Below, we give a brief outline of some tools that we use at Qxf2 Services for doing cross browser testing.

Cross browser testing tools

Some tools you can use to test your applications on different Browsers and OS without having to invest much on infrastructure:

a) Sauce Labs
b) Modern IE
c) BrowserStack


a) Sauce Labs

1. Sign up for a Sauce Labs account. You can sign up for a Free Account where you get 30 manual testing minutes.

2. Login to your Sauce Labs account

3. Click on “New Interactive Session” button to start Manual Testing

Sauce Labs New Interactive

4. Enter the url of the application you want to test

5. Choose the OS and Browser and Click on Test

Sauce Labs

6. Once Sauce Labs launches the Remote Machine you can start testing your application on the Remote Machine

Sauce Labs Manual

7. You can also file Bug, take screenshot while you test the application

Sauce Labs screenshot

8. Sign Out from the Remote Machine once you complete testing

9. You can view the results on your web account. Login to your Sauce Labs account and you should see a result as shown in the screen shot below.

Sauce Result


b) Modern.ie

1. Microsoft provides different combinations of browser and OS virtual machines at Modern IE.

2. You can get free Virtual machines by clicking on this link. Choose the OS and the browser you want and download all the EXE and RAR files for the VM

3. After you download all the files run the EXE file to extract vmc/vhd files

Modern IE_files

4. We will use Microsoft Virtual PC to run the VM.

5. Go to your start Menu and launch Microsoft Virtual PC

6. Click on New button which will launch New Virtual Machine Wizard

7. Click Next and then check on “Add an existing virtual machine” and click Next.

Modern IE Add VM

8. Browse for the vmc file created earlier and click next and Finish to add the VM to Microsoft Virtual PC

Modern IE VM

9. You can change the setting parameters like RAM, Networking (connect to appropriate Network Adapter) etc by clicking on Settings button

Modern IE Settings

10. Click on Start to use the VM created and test your application on the VM created.

Modern IE

11. For Windows 7,8 and 8.1 virtual machines, you can connect to the Internet in order to activate the trial. You get a 90 day license period
For Windows Vista, you have 30 days of trial period
For Windows XP you have 30 days of trial period

12. For Windows XP, Vista and 7 you can re-arm to further extend the initial trial period

Process to re-arm

  • Right-click on command Prompt and select the ‘Run as Administrator’ option
  • Enter command slmgr/rearm to re-arm Vista and 7.
  • To re-arm Windows XP enter command rundll32.exe syssetup,SetupOobeBnk
  • slmgr/dlv command will help you to get current license, time remaining and re-arm count

c) BrowserStack

Browser Stack provides access to 300+ desktop and mobile browsers on different Windows, Mac & mobile OS flavors.

1. You can create a free BrowserStack account where you can get 30 mins of free Manual testing across different browser and OS

2. Login to your BrowserStack Account

3. Enter the URL of the application you want to test and select the OS and Browser you want to test it on and click on Start testing

BrowserStack Login

4. BrowserStack starts a new Server and launches the URL in the browser which you selected in previous step.

BrowserStack VM

5. Now you can start testing the application in the Remote machine.

6. You can also Capture a bug using Issue tracker or Dashboard tool at the top right section.

BrowserStack Capture
BrowserStack Dashboard

7. All the Issues along with Screenshot which were saved can be found in the Issue Tracker section for Defect tracking.

BrowserStack Issue Tracker


Happy testing!

Avinash Shetty
I am a software tester with over 10 years of experience in software testing. Currently I am working at Qxf2 Services Bangalore. As a student of the context-driven approach to software testing I feel there is a lot to learn out there which keeps me very excited. My work has helped me gain good experience in different areas of testing like CRM, Web, Mobile and Database testing. I have good knowledge of building test scripts using Automation tools like Selenium and Appium using Java and Python. Beside testing I am a “Sports Fanatic” and love watching and playing sports.

© 2013-2017, Avinash Shetty. All rights reserved.

5 Comments

  1. Browserstack is most popular and trusted cloud based testing tool in the market. You can access this automation testing tool on your web browser with simple user interface.

    July 28, 2014
    Reply
    • Arunkumar Muralidharan Qxf2 said:

      Hmmm …. ‘most popular and trusted’ may be going a bit too far. One of our key goals at Qxf2, is to help testers get started on a variety of tools and explore different options to solve the problems that testers face. Way I see it, BrowserStack is one of your options. Based on your specific context, you can choose the option that suits you.

      July 28, 2014
      Reply
  2. Brooks said:

    Check it out:

    This main method will let you run the browserstack binary from your projects main folder

    public static void main(String[] args){
    //our command line string
    String command = “\””+ System.getProperty(“user.dir”)+”\\BrowserStackLocal.exe\” ” //the location in quotes
    + AUTOMATE_KEY
    + ” /* insert site here*/,80″//normal port
    + “,0,/*if it uses https here too*/,443,1”;//https port

    @SuppressWarnings(“unused”)
    Process p;
    try {
    //excecute the command via runtime
    p = Runtime.getRuntime().exec(command);

    Thread.sleep(2000);//wait two seconds to let it load

    System.out.println(“Binary excecuted… Verify in task manager”);

    } catch (Exception e) {
    e.printStackTrace();
    }
    }

    And here we have code to make the webdriver:

    /** Creates a webdriver with the proper cabalities to test remotely via browserstack.
    * Using this driver will return an error if the browserstack binary is not running
    *
    *
    * @param browser The type of browser
    * @param version The version number of the browser
    * @param os The name of the operating system
    * @param osVersion The version name/number of the operating system
    * @return The webdriver with the proper capabilities enabled for remote testing
    */
    public WebDriver testRemotely(String browser, String version, String os, String osVersion){

    DesiredCapabilities caps = new DesiredCapabilities();
    caps.setCapability(“browser”, browser);
    caps.setCapability(“browser_version”, version);
    caps.setCapability(“os”, os);
    caps.setCapability(“os_version”, osVersion);

    caps.setCapability(“acceptSslCerts”, true);//allows invalid SSL certificates
    //caps.setCapability(“nativeEvents”, true);
    caps.setCapability(“browserstack.debug”, true);//creates visual logs
    caps.setCapability(“browserstack.local”, true);//allows local testing to proceed
    caps.setCapability(“resolution”, “1024×768”);

    WebDriver driver = new HtmlUnitDriver();//the variable needs to be instantiated. This creates an invisible driver to start with

    try {
    driver.close();
    //the actual driver is a remote driver based on the URL and capabilities
    driver = new RemoteWebDriver(new URL(URL), caps);

    } catch (MalformedURLException e) {
    e.printStackTrace();
    } catch (WebDriverException f){

    //browserstack is not running
    //f.printStackTrace();

    }
    driver.manage().window().maximize();
    return driver;
    }

    Sorry its in java but still, very nice for remote testing

    July 31, 2014
    Reply
    • Arunkumar Muralidharan Qxf2 said:

      Thanks for the comment Brooks! Team Qxf2 will check out running tests on BrowserStack very soon.

      July 31, 2014
      Reply

Leave a Reply to Brooks Cancel reply

Your email address will not be published.