Mobile/Fennec Unittests/Remote Testing: Difference between revisions
| Line 22: | Line 22: | ||
Now that you have verified you can connect, the next step is to start writing python code. We have a library (devicemanager.py) which allows you to do common (file and process) operations across the telnet interface. | Now that you have verified you can connect, the next step is to start writing python code. We have a library (devicemanager.py) which allows you to do common (file and process) operations across the telnet interface. | ||
== Available Commands == | |||
== DeviceManager library == | |||
== Mozilla Unittests == | == Mozilla Unittests == | ||
== Examples == | == Examples == | ||
Revision as of 14:41, 10 May 2010
Overview
While battling Windows Mobile and python, [we came to the conclusion] that we needed to shift out of our model where we run everything on the device and allow for some or all test tools and data to be run remotely.
This has proven to be a reliable model and will meet our needs with Android. We also have found this very useful for investigating tests on Maemo as we don't need to ssh to the device and do all the setup.
Requirements / Setup
Testing remote requires a few things:
- a platform that you can install an agent on (currently, Windows Mobile (c++), Android (java), and Maemo/Linux (python). NOTE: a generic C++ linux agent is in development
- a recent build or downloaded tests package (from mozilla-central, not 1.9.2)
- the ip address of your device
- python on your host machine to run the test harness runners
To set this up, you need to first get the test agent for your platform [here. Copy that to your device and set it up to run automatically on boot.
- NOTE: fully implemented agents have a GUI and will give you useful information like ip address, commands running, and audible alerts
Next you need to determine your ip address. This can be done with a fully implemented agent, command line tools, or looking at your router.
Once this is running lets test it from your desktop (host):
- telnet <ip> 20701
Now that you have verified you can connect, the next step is to start writing python code. We have a library (devicemanager.py) which allows you to do common (file and process) operations across the telnet interface.
Available Commands
DeviceManager library
Mozilla Unittests
Examples
Copy File to device:
import devicemanager
dm = devicemanager.DeviceManager('192.168.1.103', 20701)
dm.pushFile('/home/joel/config.txt', '/config.txt')