-
Notifications
You must be signed in to change notification settings - Fork 53
Instrumentation Tests Limitations
Marcel Schnelle edited this page Apr 7, 2019
·
5 revisions
JUnit 5 requires an environment built on top of Java 8. For Android, this means that devices running Android 8.0/API 26/Oreo are supported, and can execute JUnit 5 instrumentation tests just fine - older devices can not.
When running a test suite wth JUnit 5 tests on a phone running Oreo, the test report may look like this:
Here is the same test suite executed on a KitKat phone:
You can see that the old phone disables all execution of JUnit 5 tests. You don't need to include any conditional logic to detect the current Android OS version yourself - the instrumentation test libraries do all of this for you. However, be mindful that only new devices will be able to handle the new test paradigm if your minSdkVersion
is less than 26.