A new version of Qualitia Automation Studio for Web and Mobile 7.2.x is now available. We highly recommend you upgrade. Find more details here.
Executions on Perfecto
Configuring qualitia.properties
After you develop your test cases in Qualitia Automation Studio for Web and Mobile and add them in Suites, you can create an offline package to execute them in the Perfecto environment.
In order to do so, you must configure property files from the offline package accordingly.
- Navigate to the folder where you have saved your offline package.
- Open the config folder.
- Set xmlPath to the location where your test case execution XMLs (including Suite.xml and Map.xml) are stored.
- Set LogPath to the folder where your want to store your test cases results.
- Edit the qualitia.properties file.
- Do one of the following:
- If the test case belongs to Web application, go to the the Desktop Execution Properties section:
- Set ExecutionEnvironment as Perfecto and
- Set ScreenCaptureMode as Browser.
OR
- If the test case belongs to Mobile application, go to the the Mobile Execution Properties section:
- Set MobileExecutionEnvironment to Perfecto and
- Set other properties such as MobilePlatform, MobileUDID, and so forth based on your requirements.
- If the test case belongs to Web application, go to the the Desktop Execution Properties section:
- Save changes and close the file.
Configurations for Web Application Testing
To execute Web application test cases in Perfecto environment, you must configure the perfectoweb.properties file accordingly.
This file is located in the config folder of Qualitia offline package.
- Navigate to the folder where you have saved offline package.
- From the config folder, open the perfectoweb.properties file.
- Set pw.url.
This is the URL to your Perfecto's instance. - Do one of the following:
- Set pw.securityToken (recommended) or
- Set pw.user and pw.password to valid values.
- Set all the other desired capabilities such as pw.platformName, pw.platformVersion, pw.browserName, pw.location and so on.
Location is mandatory if you want to execute test case on Mac. - Save and close the file.
Configurations for Mobile Application Testing
To execute mobile application test cases in Perfecto environment, you must configure the perfectomobile.properties file accordingly.
This file is located in the config folder of Qualitia offline package.
- Navigate to the folder where you have saved Qualitia offline package.
- From the config folder, open the perfectomobile.properties file.
- Do one of the following:
- Set pm.user and pm.password to valid values or
Set pm.securityToken.
The pm.user, pm.password, and pm.host properties are mandatory when you want to upload the application to Perfecto's repository.
- Set pm.url.
This is the URL to your Perfecto's instance. - Set pm.host.
It is the location where you have hosted the Perfecto environment. - Do one of the following:
- Set pm.deviceName.
It is the unique identification number of the device you are using from the Perfecto's device repository or - Set the following properties:
- pm.manufacturer,
- pm.model,
- pm.platformName and
- pm.platformVersion.
- Set pm.deviceName.
- Set pm.openDeviceTimeout to a valid timeout in minutes as per the requirements. Qualitia sets default wait as 5 minutes.
Based on the time you set here, Qualitia waits for the device to be available in case the device is busy when execution of test case is triggered.
Qualitia Bot - Execution
After you configure all the files, you can trigger the test case execution by opening the command prompt and navigating to the folder where you saved the Qualitia bot. After navigating to the designated folder: execute the following command;
java -jar qualitiaoffline-xxx.jar
This command executes tests available at the xmlPath mentioned in the qualitia.properties file.
In case you have multiple versions of java, Qualitia uses the version set against the "JAVA_HOME" system variable under System Properties settings of your computer.
If you have used ID, Accessibility ID, and Class locator types when adding native mobile app objects in Qualitia, Perfercto Appium integration translates these all locator types to xPath at the time of test case execution.
For more information, refer to the PerfectoMobile documentation.
Viewing Execution Status and Reports in Perfecto's Execution Center
Once you have triggered the offline execution, you can view the status of your ongoing executions in Perfecto's Execution Center. Each test case appears on dashboard as a single grid with execution status against it. The status is updated after each test execution is completed in Perfecto's environment with its status (FAILED / SUCCESS) against it. Select the test case from the list and click Report from top to view recording of your test case.
Qualitia and Perfecto's reports may mismatch if Qualitia test case contains any situation which ends the WebDriver session. This situation may arise due to the use of actions like Mobile.CloseApp, opening multiple WebDriver sessions in a single test case and so forth.
To view the execution report of Qualitia test cases:
- Log on to your Perfecto account.
- From the top right corner, click More > Execution Center.
- In the Executions section, select the test case from the list.
- Click Report
Different Ways of Setting Properties
The values you provide in default property files (qualitia.properties, perfectomobile.properties, perfectoweb.properties, and so forth) can also be provided using user defined properties file and command line interface as follows:
1. | Default Property Files (from the config folder of offline package) | This is the set of default Perfecto properties. You can always use this file to add valid values. |
---|---|---|
2. | User Defined Perfecto Properties | You can create your own file with the set of properties and use when executing test cases in the Perfecto environment. These are called user defined property files. This gives you provision to override the property values given in the default property files (for example: perfectoweb.properties/perfectomobile.properties). For example:
|
3. | Command Line Arguments | Along with the two options mentioned above, you can also provide the properties using command line interface as well. Values provided using the command line interface override all the values provided in the default property files (such as perfectoweb.properties, perfectomobile.properties) and user defined properties file. In order to provide arguments from the command line interface, you must enter values in following syntax. For example: java -jar qualitia-offline-xxxx.jar pm.user=<<perfecto user name>> pm.platformName=Windows The command mentioned above overrides all the values provided in default property files (perfectoweb.properties/perfectomobile.properties) and user defined property file (if any). |
Executing Test Cases Behind Firewall Applications
Few applications are configured to be accessed using private networks. Such applications deny access when they are being accessed from other than local networks and so from Perfecto. Executing test cases on Perfecto for such applications needs special configurations.
Simply download Perfecto Connect client executable that matches your Operating System. You need to execute it on the machine in the private network to allow Perfecto executing tests flawlessly.
For more information on configuration of Perfecto connect, refer to the Perfecto documentation.
To configure perfecto to run test cases for the applications behind firewall:
- Download Perfecto Connect executable depending on your OS.
Unzip the folder and run the file using command line interface along with Cloud URL and Security Token.
For example:perfectoconnect.exe -c <Perfecto_Cloud_URL> -s <Security_token>
- Executing this file will give you the tunnel ID.
- If your test case belongs to mobile application, set this tunnel ID against pm.tunnelId in the perfectomobile.properties file.
- If your test case belongs to web application, set this tunnel ID against pw.tunnelId in the perfectoweb.properties file.
Now you can run test cases from Qualitia Bot.
For more information about this, refer to the Perfecto documentation.