Document toolboxDocument toolbox

Execution on BrowserStack

Introduction

BrowserStack is a cloud environment that allows running tests in the cloud using different combinations of operating systems, browsers, and browser versions. In this environment, all tests are executed on BrowserStack VM. You can view the ongoing tests execution on BrowserStack.

For more information about BrowserStack, click here.

Before you start offline execution on BrowserStack, ensure you have:

  • An active account with valid Username/Access Key and
  • Sufficient balance of execution hours

In this section


BrowserStack does not support all Selenium versions. Qualitia users can use the browserstack.selenium_version capability to specify the version they want to use when executing test cases.
For more information about supported versions of Selenium, please refer to the BrowserStack documentation.

Mandatory Settings in Qualitia 

You must create execution profiles that are solely used for execution on Browserstack platform from Qualitia Client or offline package. In those execution profiles, you must define the settings that are mandatory for test suite execution.

Mandatory Settings in the Associated Execution Profile   

In the associated execution profile, do the following in the order listed:

  1. From the Environment list, select Cloud.
  2. From the Cloud Platform list, select BrowserStack.
  3. Select the Edit Desired Capabilities checkbox.
  4. Select or enter the following values:
  • Url
  • username 
  • accesskey
  • Appium Version

Additional Recommendations:

On the Execution Parameters tab, select ScreenCaptureMode as Browser.

Viewing Current Execution on BrowserStack

Once you have triggered the offline execution, you can view the status of your ongoing executions on BrowserStack. BrowserStack considers each Test case as a new project. The status is updated after each project is completed with its status against it. Also, you can filter the projects by their status (Completed, Timeout, or Errors) or you can search it by build name or session name.

You can record your test case execution configuring the browserstack.properties file accordingly. If you set the recordVideo value as true and all the test case executions will be recorded. You can download these videos once the test execution is completed.


Execution Behind Firewall 

Sometimes applications are configured to be accessed within private networks. Such applications deny access when they are being accessed from other than local networks and so from BrowserStack. Executing test cases on BrowserStack for such applications needs special configurations.

When executing test case for applications running behind firewall on Windows, you need to execute the BrowserStackLocal.exe file on the machine in the private network to allow BrowserStack to execute tests flawlessly.

To execute test cases for applications running behind firewall on BrowserStack (Windows):

  1. Make sure you have set the browserstack.local value as true in the Edit Additional capabilities.
  2. Download the BrowserStackLocal.exe on any machine in the network using the following url:
    https://www.browserstack.com/automate/python#setting-local-tunnel
  3. Unzip the folder.
  4. Open Command Prompt and navigate to the BrowserStackLocal.exe file followed by BrowserStack Access key.
    For example:
    <Path where the file is saved> BrowserStackLocal.exe --key <BrowserStack access key>
  5. Press Enter.

Once the BrowserStackLocal.exe file is executed successfully, you can execute your Offline tests on BrowserStack environment using the same method mentioned above. When executing test case for applications running behind firewall on Mac, you need to execute the BrowserStackLocal Unix Executable file on the machine in the private network to allow BrowserStack executing tests flawlessly.

To execute test cases for applications running behind firewall on BrowserStack (Mac):

  1. Make sure you have set the browserstack.local value as true in the Edit Additional Capabilities.
  2. Download the BrowserStackLocal Unix Executable file on any machine in the network using the following url:
    https://www.browserstack.com/automate/python#setting-local-tunnel
  3. Unzip the folder.
  4. Open Terminal and navigate to the BrowserStackLocal Unix Executable file followed by BrowserStack Access key.
    For example:
    ./BrowserStackLocal --key <BrowserStack access key>
  5. Press Enter.

Once the BrowserStackLocal Unix Executable file is executed successfully, you can execute your Offline tests on BrowserStack environment using the same method mentioned above.

Execution Behind Proxy

Qualitia users can execute the test cases behind a proxy.

In order to execute the test cases behind a proxy, you must configure Proxy Properties in the Edit Additional Capabilities.

Qualitia users can define these properties using the command line as well.

Execution using Browser Capabilities

Selenium allows you setting desired browser specific properties to be used when executing test cases. These properties can be set for offline execution as well. You can provide these browser specific details through browser-capability files. For each supported browser (Firefox, IE, Google Chrome, and Safari) you need to configure the settings in the Edit Additional Capabilities.

Each property file above is a set of all the browser specific properties that Selenium allows you change. If you do not change any property, Selenium uses its default values.

Qualitia gives you provision to set these values for Selenium. Selenium has its own control on what value to use and how to reflect them in Execution Browser. For more information about Selenium Capabilities, refer following links: