Changes

Jump to: navigation, search

Mobile/Fennec/Android/Testing

378 bytes added, 17:23, 5 May 2016
unit tests
This runs in automation as the "android-api-15-frontend" job ([https://bugzilla.mozilla.org/show_bug.cgi?id=1260874 soon to be renamed "android-api-15-test" or similar]).
 
These jobs run on [http://robolectric.org/ Robolectric], which mocks various Android libraries so you can write integration tests as unit tests. [http://mockito.org/ Mockito] is also supported for mocking (see [http://mxr.mozilla.org/mozilla-central/source/mobile/android/tests/background/junit4/src/org/mozilla/gecko/dlc/TestVerifyAction.java TestVerifyAction for a sample]).
You can also run specific tests from the IDE by selecting the "Build Variants" menu (bottom left), changing "Test Artifact" to "Unit Tests", right-clicking on the test class you want to run, and selecting the "Run <test-class>" option.
Confirm
975
edits

Navigation menu