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
* set environment variable DM_TRANS=adb
* if running tests with make, set environment variable DM_TRANS=adb
* do not set environment variable TEST_DEVICE, or set TEST_DEVICE= (unless you really need it)
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:
Line 248: Line 248:
* 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 Fennec; 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 do: `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`  
* set environment variable DM_TRANS=sut
* if running tests with make, set environment variable DM_TRANS=sut and set TEST_DEVICE=<ip address of device -- displayed by SUT agent>
* set environment variable TEST_DEVICE=<ip address of remote device -- displayed by SUT agent>
 
Note: to run the tests you should ensure that your host machine and device are on the same network so that the device can contact the server that will run on the host.


== Host Builds (MOZ_HOST_BIN) ==
== Host Builds (MOZ_HOST_BIN) ==
Confirmed users
1,759

edits

Navigation menu