Mobile/Fennec/Android/Testing: Difference between revisions

Jump to navigation Jump to search
Line 32: Line 32:
[[Auto-tools/Projects/Robocop|General Robocop information]] and http://mxr.mozilla.org/mozilla-central/source/mobile/android/tests/browser/robocop/README.rst.
[[Auto-tools/Projects/Robocop|General Robocop information]] and http://mxr.mozilla.org/mozilla-central/source/mobile/android/tests/browser/robocop/README.rst.


The Robocop test suite verifies UI behavior in native Fennec by pointing-and-clicking through the UI on running device or emulator.  It is built on the Robotium testing framework. To run tests locally, a separate Robocop test APK also needs to be installed.
The Robocop test suite verifies UI behavior in Firefox for Android by pointing-and-clicking through the UI on running device or emulator.  It is built on the Robotium testing framework. To run tests locally, a separate Robocop test APK also needs to be installed.


To get tests running locally, first build and install native Fennec,  
To get tests running locally, first build and install Firefox for Android,  


   mach build
   mach build
Line 56: Line 56:
* 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>.
* 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.
* If set, <tt>MOZ_HOST_BIN</tt> is used to launch <tt>xpcshell</tt> on the desktop to provide a web server.


Troubleshooting:
Troubleshooting:
Line 66: Line 65:
* Ensure Robocop has the correct IP address for your machine
* Ensure Robocop has the correct IP address for your machine
** Make sure _SERVER_ADDR in the Robocop output is the same as your machine's IP address.
** Make sure _SERVER_ADDR in the Robocop output is the same as your machine's IP address.
** If not, set it to your IP by running <tt>export DM_FLAGS="--remote-webserver=xxx.xxx.xxx.xxx"</tt>
* If using MOZ_HOST_BIN, ensure the binaries in your MOZ_HOST_BIN folder are executable, in case you pull them down from the FTP site. You might see "OSError: [Errno 13] Permission denied" if they are not executable. Use chmod to fix them. Check certutil, pk12util and ssltunnel.
* If using MOZ_HOST_BIN, ensure the binaries in your MOZ_HOST_BIN folder are executable, in case you pull them down from the FTP site. You might see "OSError: [Errno 13] Permission denied" if they are not executable. Use chmod to fix them. Check certutil, pk12util and ssltunnel.
*Additional tips at [[Auto-tools/Projects/Robocop#Frequently_found_errors]]
*Additional tips at [[Auto-tools/Projects/Robocop#Frequently_found_errors]]
Confirmed users
1,759

edits

Navigation menu