From MozillaWiki
< Mobile‎ | Fennec‎ | Android
Jump to: navigation, search

Running the robopan, robocheck, and robocheck2 (and soon robocheck3) tests locally is kind of tedious. I have never gotten it to run using the standard talos incantations. Instead, when I need to run these tests, I modify them so that they can run as mochitest-robotium tests. If you want to do this, follow these instructions:

  • Do the setup stuff for Robocop, found Auto-tools/Projects/Robocop#Setup. In particular, note that you need an xpcshell for your HOST environment (Mac OS/Linux) - you can either build this from source by doing a desktop build (which is what the instructions say), or I hear you can also download a pre-built one from ftp.
  • Go to mobile/android/base/tests/robocop.ini, and uncomment the tests you would like to run (e.g. testCheck).
  • Open up the corresponding test code (e.g. mobile/android/base/tests/ and change this code:
String url = getAbsoluteUrl("/startup_test/fennecmark/timecube.html");

to this:

String url = "";

Note that if you are using a different test the URL may be different, update it to the live version of the appropriate page.

  • Rebuild the test suite using
    make -C <objdir>/build/mobile/robocop
    cd <objdir> && make package
  • Ensure you have a device plugged in and loaded with the fennec APK you want to test.
  • Follow the steps to run a single test from the mochitest-robotium suite at Auto-tools/Projects/Robocop#Running_tests - basically export MOZ_HOST_BIN and TEST_PATH, and then run
    make mochitest-robotium

If all goes well, the test will run on the device, and you should be able to see it start fennec and run the test. For testCheck you should see repeatedly scroll up and down for a minute or so. The talos score will be reported out to logcat.