Tricentis Tosca
Integrate Perfecto with desktop web scripts, mobile scripts, and mobile native scripts created with Tricentis Tosca. A sample project is available in GitHub: https://github.com/PerfectoMobileSA/ToscaSample
When working with the Perfecto-Tosca integration, you can use Tosca's Mobile xScan feature to look up or locate elements of an application. For integration information, see the Mobile xScan article.Prerequisites
Make sure you have installed the following:
- Tosca 12.1 or later. To download, go to https://www.tricentis.com/software-testing-tool-trial-demo.
- A valid Tosca license along with the
.exe
file.
Step-by-step instructions
Click to expand the steps for the device platform you are interested in (desktop web or mobile).
Create a new project using the sample provided by Tosca.
On the Test configuration tab, add the following parameters. Parameter names are case sensitive.
Parameter name
Value
Browser
Chrome
HubAddress
https://<your_cloud>.perfectomobile.com/nexperience/perfectomobile/wd/hub
Webdriver_perfecto_browserName
Chrome
Webdriver_perfecto_browserVersion
latest
Webdriver_perfecto_client
Tosca
Webdriver_perfecto_location
US East
Webdriver_perfecto_platformName
Windows
Webdriver_perfecto_platformVersion
10
Webdriver_perfecto_resolution
1920x1080
Webdriver_securityToken
<your_securityToken> Consider the following:
- The duplication in the
Browser
andWebdriver_perfecto_browserName
parameters is expected in Tosca. - All Perfecto parameters have a prefix of
Webdriver_perfecto_
, except the security token parameter,Webdriver_securityToken
. - To perform testing in incognito mode, do the following:
- Remove the
Webdriver_perfecto_client
capability from your configuration. - In the OpenURL, add the following value to
WebDriverBrowserArguments
:--incognito
- Remove the
To use the latest Tricentis Tosca browser extension out of the box, remove the
Webdriver_perfecto_client
capability from your configuration. Without this capability, all browsers will work, except Microsoft Edge. For working with Edge, you still need this capability.
- The duplication in the
To test the connection, right-click the test case and select Run in ScratchBook.
If the connection is successful, you should see a live desktop web execution in the Perfecto Test Analysis view.
Tip: To see the test passing, in the sample test, remove the “maximize window” step.
Create a new project using the sample provided by Tosca.
Update the test configuration for the sample script.
For iOS devices, supply AppiumServer, Browser, DeviceName, and PerfectoToken information.
Parameter name
Value
AppiumServer
https://demo.perfectomobile/nexperience/perfectomobile/wd/hub
Browser
SafariiOS
DeviceName
<device_udid>
PerfectoToken
<perfecto_token>
For Android devices, specify the desired capabilities as a step.
Parameter name
Value
Browser
ChromeAndroid
deviceName
<deviceUDID>
Live View
False
AppiumServer
https://demo.perfectomobile/nexperience/perfectomobile/wd/hub
PerfetoToken <perfecto_token>
To test the connection, right-click the test case and select Run in ScratchBook.
If the connection is successful, you should see a live desktop web execution in the Perfecto Live Stream view.
Create a new project and use the Import Subset option to import the following
.tsu
examples:https://github.com/PerfectoMobileSA/ToscaSample/blob/master/perfecto_android_native.tsu
https://github.com/PerfectoMobileSA/ToscaSample/blob/master/perfecto_ios_native.tsu
Supply the following information: a valid cloud URL, your Perfecto security token, the device UDID for both projects.
Parameter name
Value
AppiumServer
https://demo.perfectomobile/nexperience/perfectomobile/wd/hub
DeviceName
<UDID>
PerfetoToken <perfecto_token>
If you have a proxy, you also need to add the
WebDriverHubProxyAddress
parameter.- Provide the application name as follows:
For Android, enter the name in the format
package name/activity
. For example:com.sec.android.app.popupcalculator/com.sec.android.app.popupcalculator.Calculator
For iOS, enter the bundle ID. For example:
io.perfecto.expense.tracker
A copy of the
.ipa
file is available here: https://github.com/PerfectoMobileSA/ToscaSample/blob/master/InvoiceApp1.0.ipa
To launch the application from a Perfecto repository, use the format
repository location; package name; activity
.For example:
PRIVATE:apps/FingerPrintDemo3.apk;com.perfectomobile.fingerprintdemo;.MainActivity;
In the example, we launch the
.apk
file attached from the location in the following Perfecto repository:A copy of the
.apk
file is available here: https://github.com/PerfectoMobileSA/ToscaSample/blob/master/FingerPrintDemo3.apkImportant: Make sure you place your.apk
/.ipa
in a folder and not at the root ofMy Media
. Otherwise, the apps will not install.