Integrate BrowserStack Automate with Tricentis Tosca
This document guides you with the step by step process to execute Tricentis Tosca tests on BrowserStack.
Introduction
Tricentis Tosca accelerates testing with a script-less, no-code approach for test automation. Integrating Tricentis Tosca with BrowserStack will help you to run the Tricentis Tosca recorded test scripts on 3000+ real devices and desktop browsers.
Pre-requisites
- 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
-
Launch the Tosca Commander.
-
Now, create a new project by selecting PROJECT → New and set the name for the new workspace as Selenium.
-
Once the project is created successfully, select the Modules tab to start recording the sample test case.
-
The sample test case will search for BrowserStack on Google and from the results displayed will click the first link that resolves to BrowserStack’s main web page. Finally, we will confirm that we are on https://www.browserstack.com.
-
To record the actions and create the test steps, first ensure that you have a browser open on your system to manually perform the steps which will be recorded by Tosca XScan. To initiate Tosca XScan, right click on the Modules folder then select Scan → Application.
-
This will prompt you to select the app window you wish to record. Here we have Chrome browser up and running with the initial URL. You can select the Chrome window option and click Scan.
-
Clicking the Scan button will prompt you to install the extension. Tosca Automation requires that its browser extension be installed on the browser to record elements that can be interacted with.
-
Once the extension is installed then Tosca’s XScan will be able to interact with the browser. You may have to re-initiate XScan (refer to step 5) after installing the extension. Now, select the option Select on Screen Items. This will allow you to record the items/web elements you wish to interact with.
-
Here, we record identifiers to elements like the Google search box and the Google search button. Additionally you can create another module that checks the results displayed when the search button is clicked. Once completed you need to click Finish screen and finally Close to save the module.
-
Final Modules screen would look like the following.
-
Go back to the TestCases tab in Tosca and create a test case for BrowserStack Search on Google. You can now select the modules you created earlier and drag them to the new test case. The screen would look like.
-
We can now add data to the test steps that we added from the modules.
-
Go back to the Modules tab and select Import Subset to add commonly used modules.
Select standard.tsu file:
Commonly used modules exported as shown in the following figure: -
We need to add the Open URL and Close browser actions, to add these actions go back to the TestCases tab. Click the test case and then press CTRL + T. This will display a list of all the common modules that you can use in your test. Type in OpenUrl and then click the module to be added.
Type CloseBrowser and select the module.
-
The final test case should look like the following:
-
Let’s run the test on a local Chrome browser. First we need to add Test Configuration which will help define capabilities for the browser we wish to run the test on by right clicking on the test case folder and select Create Test configuration parameter. In this case let’s try Chrome.
-
To run the test case go back to the Details tab then Right click on the test case and select Run in ScratchBook. This will launch the test on a local Chrome browser.
Once the test executes successfully, the following result window will appear:
-
Finally, to run the test on BrowserStack we update the Test Configuration details as follows. First, add your BrowserStack Username and Access key by selecting PROJECT → Settings → TBox → Engines → XBrowser → WebDriver → BrowserStack.
Then back in the Test Configuration add HubAddress and set its value to BrowserStack.
Now run the test and you should see the execution on BrowserStack’s Automate Dashboard. -
You need to follow certain rules while setting the browser and OS capabilities.
- Set the “Browser” to “Chrome” (This is the TCP Browser that is a compulsory parameter for the test to be triggered from Tosca).
- All the other Desired capabilities can now be set using this format
Webdriver_<capabilityname>
. To specify the Browser capabilities you can use our capability generator. - The capabilities that contain
.
needs to be replaced by double underscore__
. More details available in the Tricentis documentation page. For example, setbrowserstack.local
toWebdriver_browserstack__local
- Set the “Browser” to “Chrome” (This is the TCP Browser that is a compulsory parameter for the test to be triggered from Tosca).
You can run your Tosca tests on any browser/os/device combination that BrowserStack supports. You just have to specify them in the capabilities in the above mentioned format i.e. Webdriver_<capabilityname>
.
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
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!