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