Mobile/Fennec/Android/Testing: Difference between revisions

Jump to navigation Jump to search
Line 241: Line 241:
The ADB device manager uses the adb command from the Android SDK to communicate with the remote device. To use the ADB device manager:
The ADB device manager uses the adb command from the Android SDK to communicate with the remote device. To use the ADB device manager:
* ensure the adb command is in your shell's PATH
* ensure the adb command is in your shell's PATH
* if running tests with make, set environment variable DM_TRANS=adb
* mach test commands use adb by default; if running tests with make, set environment variable DM_TRANS=adb
mach commands use adb by default.


The SUT device manager uses TCP to communicate with a remote agent, which must be installed on the device. To use the SUT device manager:
The SUT device manager uses TCP to communicate with a remote agent, which must be installed on the device. To use the SUT device manager:
* ensure TCP connectivity between the local host and the remote device: check that they are on the same network and you can ping each from the other
* ensure TCP connectivity between the local host and the remote device: check that they are on the same network and you can ping each from the other
* ensure the SUT agent is installed and started on the remote device
* ensure the SUT agent is installed and started on the remote device
** the SUT agent APK is built alongside Fennec; just install <objdir-droid>/build/mobile/sutagent/android/sutAgentAndroid.apk
** the SUT agent APK is built alongside Firefox for Android; just install <objdir-droid>/build/mobile/sutagent/android/sutAgentAndroid.apk
** The agent should be configured to start automatically with your phone when it boots. To start it immediately from an adb shell execute: `am start -n com.mozilla.SUTAgentAndroid/.SUTAgentAndroid -a android.intent.action.MAIN`  
** The agent should be configured to start automatically with your phone when it boots. To start it immediately from an adb shell execute: `am start -n com.mozilla.SUTAgentAndroid/.SUTAgentAndroid -a android.intent.action.MAIN`  
* if running tests with make, set environment variable DM_TRANS=sut and set TEST_DEVICE=<ip address of device -- displayed by SUT agent>
* if running tests with make, set environment variable DM_TRANS=sut and set TEST_DEVICE=<ip address of device -- displayed by SUT agent>
Confirmed users
1,759

edits

Navigation menu