Mobile/Fennec/Android/Testing: Difference between revisions

Line 35: Line 35:
   mach robocop
   mach robocop


This builds the tests in <tt>mobile/android/base/tests</tt> and then installs the debug-signed Robocop APK onto the device. (It's unintuitive that building <tt>mobile/android</tt> doesn't build the tests within <tt>mobile/android/base/tests</tt>.)
This builds the tests in <tt>mobile/android/tests/browser/robocop</tt> and then installs the debug-signed Robocop APK onto the device. (It's unintuitive that building <tt>mobile/android</tt> doesn't build the tests within <tt>mobile/android/tests</tt>.)


Notes:
Notes:
* Mach is self documenting!  For help, try <tt>mach help robocop</tt>.
* Mach is self documenting!  For help, try <tt>mach help robocop</tt>.
* To run one test at a time, find the test name (like "testLoad") in <tt>mobile/android/base/tests/robocop.ini</tt> and pass it as an argument, like: <tt>mach robocop testLoad</tt>.
* To run one test at a time, find the test name (like "testLoad") in <tt>mobile/android/tests/browser/robocop/robocop.ini</tt> and pass it as an argument, like: <tt>mach robocop testLoad</tt>.
* A rooted device is NOT required.
* A rooted device is NOT required.
* <tt>MOZ_HOST_BIN</tt> is used to launch <tt>xpcshell</tt> on the desktop to provide a web server.
* <tt>MOZ_HOST_BIN</tt> is used to launch <tt>xpcshell</tt> on the desktop to provide a web server.
Confirmed users
1,759

edits