Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & Test Observability

Integrate BrowserStack Automate with Tricentis Tosca

This document guides you through the step-by-step process to execute Tricentis Tosca tests on BrowserStack.

Tricentis Tosca accelerates testing with a scriptless, no-code approach for test automation. Integrating Tricentis Tosca with BrowserStack helps you run test scripts recorded on Tricentis Tosca on BrowserStack devices and desktop browsers.

Prerequisites

  • BrowserStack Username and Access Key to set up the BrowserStack integration. After logging into your BrowserStack account, visit the Settings page and copy your Username and Access Key. You can also sign up for a free trial here.
  • A registered account at Tricentis. You can sign up for a demo account here. You need to download Tosca + ARA (Automation Recording Assistant).

Integration Steps

To run your test on BrowserStack:

  1. Select your test and update the test configuration details. Select PROJECT > Settings > TBox > Engines > XBrowser > WebDriver > BrowserStack and add your BrowserStack Username and Access key as specified in your Account Settings.

    BrowserStack credentials

    Add HubAddress and set its value to BrowserStack in the Test Configuration. Set BrowserStack hub address

    Run the test and view the test execution on BrowserStack’s Automate Dashboard. BrowserStack Automate dashboard

  2. Follow these rules while setting the browser and OS capabilities:

    • Set the Browser to Chrome (This is the TCP browser, which is a mandatory parameter for the test to be triggered from Tosca).
    • Set the other desired capabilities using the format Webdriver_<capabilityname>. To specify the browser capabilities, you can use our capability generator.
    • Sample capabilities for Chrome desktop: Chrome sample capabilities
  • The capabilities that contain a ‘.’ need to be replaced by a double underscore ‘__’. More details are available on the Tricentis documentation page. For example, use Webdriver_browserstack__local instead of browserstack.local.
  • To improve performance, set Fibermode as TRUE in Tosca. It reduces the non-essential Selenium requests that Tosca otherwise generates.

Enable local testing

  1. Refer to these instructions to initiate local testing.

  2. Set the browserstack local capability as true in the desired capabilities:

WebDriver_browserstack__local: `true`

Scan using BrowserStack sessions

To scan with Tosca XScan using a BrowserStack session:

  1. Initiate Tosca XScan to record your actions and create the test steps. Right-click a Module folder or use the dynamic menu Modules and select Scan > More > Web Driver. Tosca Scan Modules folder

  2. When the XScan window is visible, click on Browser > Scan. Tosca Scan Browser scan

  3. Select BrowserStack in the hub address. Along with this, you can set the browser, browser_version, and the OS. You can also add the URL of the page that you intend to scan. Note that the Username, access key, and Hub URL were set in Project > Settings. Tosca Select Hub Address

  4. Select the window you want to scan and click the Scan button to start scanning the application. Select Window and Scan Applications

  5. You can see all the items scanned from the web application page. Select these items and save it. Select items and save

  6. You can see the scanned modules that you can use to create your tests. View Scanned modules

Run web tests on BrowserStack mobile devices

Follow these steps to run web tests on BrowserStack mobile devices using Tosca:

  1. Select the test case and set the Test configuration as shown in the following screenshot. Tosca test configuration
    Here is an expanded view of the test configuration. Tosca test configuration expanded view

  2. Open the Set Desired Capabilities folder from the following location. Tosca open set desired capabilities

  3. Set the parameters in Set Desired Capabilities as follows: Tosca set parameters in desired capabilities

  4. Right-click a test case and select Run in ScratchBook. Tosca run a test case in scratchbook

Scan web applications on BrowserStack mobile devices

Use TOSCA 15.2 patch 4 or above to scan web applications.

To scan a web application on BrowserStack mobile devices:

  1. Create a .conf file in the root folder of your project and add the following capabilities:

     browserstack.user,<USERNAME>
     browserstack.key,<AUTOMATE_KEY>
     browserName,Safari
     device,iPhone 14
     os_version,16
     PlatformName,iOS
    
  2. Go to PROJECT > Settings > TBox > Engines > Mobile30 and set the Value field for Desired capabilities as the path of the folder containing the .conf file. Tosca set desired capabilities value

  3. Click the Scan button in the toolbar and select the option Mobile. Tosca click scan mobile

  4. Add the device and the app to scan. Please note that you need a valid Tosca license to execute this step. Tosca add device to scan

  5. Enter the name of the device in the device ID field as specified in the capabilities builder. Note that the device ID should be the same as the name passed in capabilities for other automation tests. Tosca device ID

  6. Click the Add New button. Enter Remote in the field Type and https://hub.browserstack.com/wd/hub in the field Appium server address. Click the Add button to add the new connection. Tosca add new connection

  7. Enter the name and the URL of the web application you need to scan. Tosca scan the web application

  8. Click Advanced configuration. Select your .conf file and add it. Click the Connect button. Tosca advanced configuration connection

  9. The scan begins when you click the Connect button. You can see a corresponding session on the BrowserStack App-Automate dashboard too. Tosca start scan Tosca start sample1 Tosca scan sample2

  10. If the Mobile scan window is not scaling correctly as per the display, set the display resolution to 100% in the Windows settings.

Run web tests on BrowserStack mobile devices

To run mobile tests in parallel, you can use Execution Lists.

Follow these steps to run web tests on BrowserStack mobile devices using Tosca:

  1. Select the test case and set the test configuration as shown in the following screenshot. Tosca select test case and set test configuration Here is an expanded view of the test configuration. Tosca expanded view of test configuration

  2. Open the Set Desired Capabilities folder from the following location. Tosca open and set the desired capabilities

  3. Set the parameters in Set Desired Capabilities as follows: Tosca16 set parameters

  4. Right-click a test case and click Run in ScratchBook. Tosca16 run scratchbook

Scan web applications on BrowserStack mobile devices

Use Tosca 16 patch 1 or higher to avoid errors in scanning Android mobile browsers. The .conf file is not supported in Tosca 16. Instead, you can add the capabilities using the Tosca Commander mobile scanner. Follow these steps to scan web applications on BrowserStack mobile devices using Tosca:

  1. Click the Scan button on the toolbar and select Mobile. Tosca16 scan mobile

  2. Add the device and the app. Note that you can proceed further only if you have a valid Tosca license. Tosca16 add device

  3. Set the device ID to the name of the device. This device ID is the same as the name passed in capabilities for other automation tests based on the BrowserStack Capabilities builder. Tosca16 deviceID

  4. Add a new connection. Give it a suitable name. Enter Remote in the Type field and enter the address https://hub.browserstack.com/wd/hub in the Appium server address field. Tosca16 add new connection

  5. Select the connection you created from the drop-down. Select the device platform versions according to your requirement and click Save. Tosca16 select connection

  6. Specify the details of the web application you need to scan. Tosca16 scan webpage

  7. Click Advanced configuration, add the desired capabilities as selected in the BrowserStack Capability generator, and then click the Add button. Tosca16 advanced config

Enter the PackageName or ActivityName while setting up advanced configurations. Do not enter the full path of the scanned application. You might face BROWSERSTACK_INVALID_APP_CAP error if the full path is added.

  1. When you see the following screen, you can scan your application on BrowserStack cloud devices. Tosca16 connection established

  2. If the mobile scan window is not scaling correctly, set the display resolution to 100% in the Windows settings.

  3. You can upload the logs from Tosca to BrowserStack using the Post terminal logs API.

Run tests in parallel

To run mobile tests in parallel on BrowserStack:

  1. Click the Execution Tab. On the ExecutionLists folder, add the test configuration parameter ExecuteInParallel and set its value to True. Tosca16 execute in parallel

  2. Right-click the ExecutionLists folder and click the highlighted icon to create an Execution List. You can drag and drop the Test cases in the Execution List. Tosca16 execution list

  3. Click Run from the ExecutionList folder. Tosca16 run execution list

  4. View the test run in parallel on the BrowserStack Dashboard.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy