Changes

Jump to: navigation, search

Mobile/Fennec/Android/Testing

88 bytes removed, 11:23, 29 July 2016
JUnit4 tests
* Runs on [http://robolectric.org/ Robolectric], which mocks various Android libraries so you can write unit tests for Android libraries that would ordinarily have to be run on device
* Supports [http://mockito.org/ Mockito] for custom 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]).
* Run specific tests from the IDE: select the "Build Variants" menu (bottom left), change "Test Artifact" to "Unit Tests", right-click on the test class you want to run, and select the "Run <test-class>" option.
* <b>Some tests will fail with encryption & connection errors if you do not install the appropriate packages</b>: https://mail.mozilla.org/pipermail/mobile-firefox-dev/2015-September/001499.html Note that this package is also available in brew cask: `jce-unlimited-strength-policy`. You may need to wait/restart after installing for it to take effect. See [https://bugzilla.mozilla.org/show_bug.cgi?id=1271000#c8 bug 1271000 comment 8] for further discussion.
* After installing the policies, there is still a local test failure in TestJSONWebTokenUtils.testDSAGeneration that does not appear in automation ([https://bugzilla.mozilla.org/show_bug.cgi?id=1275423 bug 1275423]).
118
edits

Navigation menu