Robocop and his Friends in Mobile Automation
Trevor Fairey
Who am I?
- I'm a senior at the University of Waterloo Pursuing my Bachelors in Software Engineering
- Worked with the Automation and Tools team this term.
- Also Chocolate-Maple-Bacon Cake Cook and Red Suit wearer
What i really did this term
- TegraPool: A system to check-out mobile devices to make easy debugging for Developers
- Linux Version of SUTAgent. Not covered in Presentation.
- Robocop: Automation utility to test the Java UI of the new mobile firefox.
TegraPool
- Developers might need to debug mobile errors in the build system
- TegraPool is a system to check out Tegra boards with android on it to test on.
- Requires LDAP access, so we know who has checked out what device.
- Extra Panada boards were added to the pool as well.
- Found at tegrapool.private.mtv1.mozilla.com
Remote TegraPool use
- Unfortunately, the people who needed it most were remote, and mochitest requires a local server
- TegraPool server access added for people to run mochitests and ref tests and talos tests from a server in MV.
- To make it even better, the accounts set up had 1 click batch scripts to run these tests.
The Switch to a Native User Interface
- October's switch to using Java as the UI for mobile firefox broke a lot of tests
- The js tests could no longer test the front end.
- After a quick analysis, a robotium-based approach was chosen over MonkeyRunner
Robocop
- Robotium turned out to not have enough functionality to do everything
- Luckily the underlying Java instrumentation work had what was needed
How Robocop Works
- Android doesn't let applications interact normally.
- Workaround involves having the testing application run in the same namespace as mobile firefox
- Means the mobile firefox must be signed by the same key that signs the test application.
The Roboextender
- Interacting with the Java doesn't always give enough information
- Gecko information sometimes needs to be passed to the java side
- Java already receives messages from the Gecko, such as DOMContentLoaded
- Extension added to pass up any more information from other events. Can also receive messages from the java side if necessary.
What sort of actions can Robocop Automate?
- Clicking individual elements
- Dragging across the screen.
- Accessing strings
- Sending keystrokes
- Receiving messages from the Gecko
What can't Robocop do?
- Directly interacting with the Gecko
- Interact with any given mobile firefox build easily
Special Thanks
- Heather Arthur for being an awesome Mentor
- Clint Talbert for pointing me in the right directions
- Joel Maher for writing most of the building of Robocop
- Dave Burns for the starting code for Robocop
- Bob Moss for helping with the SUTAgent and other mobile setup.
- The rest of the A*team for their input and support