Legacy | Install application
-
Command: application
-
Subcommand: install
-
Supported Platforms: Native (legacy), UFT (legacy), Selenium, Appium
All commands must be executed using the same framework. Sharing the execution ID between different frameworks is not possible. This means that if you work with a Selenium/Appium driver, you need to call the commands using the Selenium/Appium driver (or, in the case of Reporting commands, through the Reporting SDK that works with the driver) and not as part of a UFT test or another framework.
-
Supported OS: Android, iOS
Description
Installs a single application on the device, using automation. To use this command, the application must first be uploaded to the Perfecto repository. The PerfectoLabUtils class provides the uploadMedia method to upload a file to the Repository.
The Install application function performs the same operation as the Install widget in the Manual testing view (see Manage apps).
For Android devices
- The application manifest.xml file must include internet access permission: <uses-permission android:name="android.permission.INTERNET"/>
- The application will automatically be signed with an Android debug key to enable native object automation.
Parameters
Name | Values | Default | Description |
---|---|---|---|
deviceId* |
|
|
The device for this command. |
file* |
|
|
The full repository path, including directory and file name, where to locate the application. Example - PRIVATE:dir1/dir2/name.apk Click browse and navigate to the file. |
instrument |
noinstrument (False) instrument (True) |
False |
Enable native objects automation. True - testing on the application with native objects and visual analysis support False - testing on the application with visual analysis support only on this application |
sensorInstrument |
nosensor (False) sensor (True) |
False |
Indicates if application to install should be instrumented for sensor operations, for example fingerprint reader, camera. |
resign |
True False |
False |
(iOS only) Re-sign the app with a Perfecto code-signing certificate that has the cloud device provisioned. To learn more, see Re-sign an application | iOS. |
certificate.file |
|
|
The repository path, including directory and file name, of the certificate for certifying the application after instrumentation. This is the Keystore file in Android devices. Used alongside the Application instrumentation parameter. Available for Android devices only. Example - PRIVATE:dir1/dir2/name.jks Click browse and navigate to the file. |
certificate.user |
|
|
The user for certifying the application after instrumentation. The user can be encoded, click here for more details on the String Encoder. This is the Key Alias in Android devices. The user can be encoded, click here for more details on the String Encoder. Used alongside the Application instrumentation parameter. Available for Android devices only. |
certificate.password |
|
|
The password for certifying the application after instrumentation. This is the Keystore Password in Android devices. Available for Android devices only. The password can be encoded. Click here for more details on the String Encoder. Used alongside the Application instrumentation parameter. Available for Android devices only. |
certificate.params |
|
|
The key password parameter for certifying the application after instrumentation. This is the Key Password in Android devices. Available for Android devices only. The value must be preceded with "keypass". The param can be encoded. Click here for more details on the String Encoder. Example - keypass 3f51s6 Used alongside the Application instrumentation parameter. Available for Android devices only. |
dataReset |
reset (True) noreset (False) |
True |
Indicates if the application data on the device should be cleaned prior to installation. True - (default) indicates that all application data should be cleaned, application starts with a clean slate. False - indicates that existing application data should be kept on the device, application will be able to access the existing data. |
* Mandatory parameter
Request & Response
Request
https://mycloud.perfectomobile.com/services/executions/samb@perfectomobile.com_controller_16-11-06_14_43_06_35?operation=command&securityToken=<your_token>&command=application&subcommand=install¶m.deviceId=6370E775¶m.file=PUBLIC:Android/android.perfecto.apk
JSON response
{
"executionId" : "samb@perfectomobile.com_controller_16-11-06_14_43_06_35",
"reason" : "Success",
"timer.elapsed" : "18563",
"testGridReportUrl" : "https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=samb@perfectomobile.com_controller_16-11-06_14_43_06_35",
"timer.ux" : "18016",
"singleTestReportUrl" : "https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161106/controller_16-11-06_14_43_06_35.xml&ownerId=samb@perfectomobile.com&sharingCode=36fb10bb-06ec-4364-b815-c0a6488e0f6b",
"description" : "Success",
"timer.system" : "547",
"reportKey" : "PRIVATE:controller/161106/controller_16-11-06_14_43_06_35.xml",
"completed" : "true",
"flowEndCode" : "SUCCEEDED",
"timer.device" : "18016"}