• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Wifi Non-Updatable Framework Unit Tests
2This package contains unit tests for the non-updatable part (i.e. outside the Wifi module) of the
3Android Wifi framework APIs based on the
4[Android Testing Support Library](http://developer.android.com/tools/testing-support-library/index.html).
5The test cases are built using the [JUnit](http://junit.org/) and [Mockito](http://mockito.org/)
6libraries.
7
8## Running Tests
9The easiest way to run tests is simply run
10
11```
12atest android.net.wifi
13```
14
15To pick up changes in framework/base, you will need to:
161. rebuild the framework library 'make -j32'
172. sync over the updated library to the device 'adb sync'
183. restart framework on the device 'adb shell stop' then 'adb shell start'
19
20To enable syncing data to the device for first time after clean reflash:
211. adb disable-verity
222. adb reboot
233. adb remount
24
25## Adding Tests
26Tests can be added by adding classes to the src directory. JUnit4 style test cases can
27be written by simply annotating test methods with `org.junit.Test`.
28
29## Debugging Tests
30If you are trying to debug why tests are not doing what you expected, you can add android log
31statements and use logcat to view them. The beginning and end of every tests is automatically logged
32with the tag `TestRunner`.
33