Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Jun 17, 2020 11:52

This section walks you through integrating 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

Tip: 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.

On this page:

Prerequisites

Make sure you have installed the following:

Step-by-step instructions

Click to expand the steps for the device platform you are interested in (desktop web or mobile).


Connect a desktop web script to Perfecto
  1. Create a new project using the sample provided by Tosca.

     Click to view image
  2. On the Test configuration tab, add the following parameters. Parameter names are case sensitive. 

    Note: The duplication in the Browser and Webdriver_browserName parameters is expected in Tosca 13.0. In subsequent versions, you can remove the Browser parameter. 

    Tip: You can look up the valid string values for each parameter in the Manual Testing view in the Perfecto UI.

  3. 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.

     Click to view image

    Tip: To see the test passing, in the sample test, remove the “maximize window” step.

Connect a mobile web script to Perfecto
  1. Create a new project using the sample provided by Tosca.

     Click to view image
  2. Update the test configuration for the sample script.
    For iOS devices, supply AppiumServer, Browser, DeviceName, and PerfectoToken information.

     Click to view image

    For Android devices, specify the desired capabilities as a step.

     Click to view image
  3. 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.

     Click to view image
Connect a mobile native script to Perfecto
  1. 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

     Click to view image

    In the screenshot above, the Android and iOS native examples have been imported and renamed to Android_Native_Example & iOS_Native_Example.

  2. Supply the following information: a valid cloud URL, your Perfecto security token, the device UDID for both projects.

     Click to view image
  3. Provide the application name as follows:
    • For Android, enter the name in the format package name/activity, as shown in the following image. For example: com.sec.android.app.popupcalculator/com.sec.android.app.popupcalculator.Calculator

       Click to view image
    • For iOS, enter the bundle ID, as shown in the following image. For example: io.perfecto.expense.tracker

       Click to view image

      A copy of the .ipa file is available here: https://github.com/PerfectoMobileSA/ToscaSample/blob/master/InvoiceApp1.0.ipa

  4. 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 above, 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.apk

    Note: Make sure you place your .apk/.ipa in a folder and not at the root of My Media. Otherwise, the apps won’t install.