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

This process is optional. You should use this process only if, for reasons of security, you wish to retain the signature of the application.

General Background

SeeTestAutomation comes with a unique capability, to automatically control your application internally (Native Object identification) without changing the APK of the application under test. However, because the automatic process uses a public key to resign the application, at times, due to security considerations, it will be inadequate for performing instrumentation and the private key will be needed.

To accommodate such needs, we provide a command line tool that can be used when the application's original APK is built (usually by the build/R&D team).

This tool receives as input the original APK together with its signing information (keystore, storepass, keypass, alias). The tool generates a bundled zip file containing the original, unmodified APK and an additional APK that has been signed with the same keystore file.

Following are the steps you should follow to make your application automation ready:

Process

Step 1: In the root directory of the SeeTestAutomation installation you will find the instrument.exe file.

To run this executable, use the following syntax:

Instrument help
instrument.exe  <sign configuration> -appApk <application APK> -outputFolder <the out put directory where all apks are generated>
 
Sign configuration:
-defaultKeystore         - will use the default keystore (ignore keystore, storepass, keypass and alias)
  or
-keystoreFile <keystore>    - the keystore file used to sign the apk
-storepass <storepass>   - the password for the keystore
-keypass   <keypass>     - the password for the used key
-alias     <alias>       - the alias used in keystore

<appApk>                 - The path to the target application APK file.
<outputFolder>             - The path and directory name of the bundled directory to be generated. Following its generation, be sure to provide your QA team with these included files.

On Mac use './instrument' instead of 'instrument.exe'.


For example: 

Windows: <Installation folder>instrument.exe -keystoreFile C:\Users\user\Desktop\myKey.keystore -storepass 1234 -keypass 4321 -alias aliasKey -appApk C:\Users\user\Desktop\eribank.apk -outputFolderC:\Users\user\Desktop\instrumentedEribank
 
Mac: <Installation folder>./instrument -keystoreFile /Users/user/Downloads/myKey.keystore -storepass 1234 -keypass 4321 -alias aliasKey -appApk /Users/user/Downloads/eribank.apk -outputFolder /Users/user/Documents/instrumentedEribank
 

The bundle directory is created. It should contain two apk files and one properties file.

Step 2: In the output folder, two apk files will be created - "com.packagename" and "a.com.packagename". Both should be imported separately to the designated cloud or software.

Step 3: In order to get an instrumented dump, "com.packagename" should be installed first and "a.com.packagename" installed afterwards. Both should be installed non-instrumented.

Step 4: "com.packagename" should be launched instrumented while "a.com.packagename" should not be launched at all.


Special Flags

-camera

Allow testing applications that use the camera feature of a mobile device and enabling using of Simulate Capture command.

For example: 

Windows: <Installation folder>instrument.exe -keystoreFile C:\Users\user\Desktop\myKey.keystore -storepass 1234 -keypass 4321 -alias aliasKey -appApk C:\Users\user\Desktop\eribank.apk -outputFolder C:\Users\user\Desktop\instrumentedEribank -camera
 
Mac: <Installation folder>./instrument -keystoreFile /Users/user/Downloads/myKey.keystore -storepass 1234 -keypass 4321 -alias aliasKey -appApk /Users/user/Downloads/eribank.apk -outputFolder /Users/user/Documents/instrumentedEribank -camera

-camera2

Allow testing applications that use the camera2 api feature of a mobile device and enabling use of Simulate Capture command.


Windows: <Installation folder>instrument.exe -keystoreFile C:\Users\user\Desktop\myKey.keystore -storepass 1234 -keypass 4321 -alias aliasKey -appApk C:\Users\user\Desktop\eribank.apk -outputFolder C:\Users\user\Desktop\instrumentedEribank -camera -camera2
 
Mac: <Installation folder>./instrument -keystoreFile /Users/user/Downloads/myKey.keystore -storepass 1234 -keypass 4321 -alias aliasKey -appApk /Users/user/Downloads/eribank.apk -outputFolder /Users/user/Documents/instrumentedEribank -camera -camera2


-fingerprint

Allow testing applications that use the fingerprint authentication api feature of a mobile device and enabling using of biometric Authentication command.


Windows: <Installation folder>instrument.exe -keystoreFile C:\Users\user\Desktop\myKey.keystore -storepass 1234 -keypass 4321 -alias aliasKey -appApk C:\Users\user\Desktop\eribank.apk -outputFolder C:\Users\user\Desktop\instrumentedEribank -fingerprint
 
Mac: <Installation folder>./instrument -keystoreFile /Users/user/Downloads/myKey.keystore -storepass 1234 -keypass 4321 -alias aliasKey -appApk /Users/user/Downloads/eribank.apk -outputFolder /Users/user/Documents/instrumentedEribank -fingerprint


-disableSecurityMode

For application with security mode, it is necessary to disable the security mode in order to work in non-instrumented mode.

in order to do that, use this instrument tool with a disableSecurityMode flag.

For example: 

Windows: <Installation folder>instrument.exe -defaultKeystore -appApk C:\Users\user\Desktop\eribank.apk -outApk C:\Users\user\Desktop\instrumentedEribank.apk -disableSecurityMode
 
Mac: <Installation folder>./instrument -defaultKeystore -appApk /Users/user/Downloads/eribank.apk -outApk /Users/user/Documents/instrumentedEribank.apk -disableSecurityMode

Note

The outApk file is not instrumented. For instrumentation import this apk to SeeTest (or use this command line tool) 

  • No labels