This suite includes tests that exercises Android connectivity APIs and verify device behaviors.
These tests simulate connectivity use cases critical to NBU market like peer-to-peer interactions.
The tests have two components, an agent apk running on the Android Device Under Test (DUT) and Python test scripts running on a computer to which the DUTs are connected via USB. The tests issue cmds to the agent on the device to trigger actions and read status, thus coordinating actions across multiple devices.
The tests by default write output to
This section lists the components and steps required to create a setup to run these tests.
This is a zip file that you have downloaded.
The zip file includes:
The two devices should be of the same model and build (identical fingerprint).
On each device:
android_snippet.apkwith opition -g.
Based on the two devices' serial numbers, we need to create a config file.
Create a plain text file
config.yaml in the following format, with the
<> blocks replaced with the information of your actual devices:
TestBeds: - Name: P2pTestBed Controllers: AndroidDevice: - serial: <DUT1 serial> - serial: <DUT2 serial>
We need the following packages:
To check your Python's version, use command
$ python --version.
In addition to those, we also need to install a few other tools:
$ sudo apt-get install python-setuptools python-pip $ pip install mobly
After all the tools are installed, connect the devices to the computer with USB cables and make sure they show up as “device” in the output of
$ adb devices
First, you need to put the file
config.yaml in the same directory as the Python scripts. Then cd to that directory and run:
$ rm -rf /tmp/logs/ # Clear previous logs $ python xxx_test.py -c config.yaml
Execute all the
*_test.py files the same way. Once they all finish executing, all the logs will be collected in
/tmp/logs/. You can check the test results and debug info there.
Zip up the content of
/tmp/logs/ and send it to your contact at Google.