Skip to content

Android Instrumented testing

Android instrumented tests require the VotePeer android library to be checked out locally, see section "Before building".

Running from Android Studio

In Run/Debug configurations, click the [ + ] button and Android Instrumental Tests. Select module

Now you should be able to run the tests by clicking the "Play" button on the toolbar.

Android Instrumented test results

Running from command line

./gradlew connectedAndroidTest

Android developer documentation section on running tests:

Jacoco: Code coverage reporting

Coverage reports for the unit tests
./gradlew jacocoTestDebugUnitTestReport

App => {rootDir}/app/build/jacoco/jacoco.xml //unit tests
Library => ${rootDir}../VotePeerLibrary/votepeer/build/jacoco/jacoco.xml //unit tests
Coverage reports for the UI tests


./gradlew createDebugCoverageReport

App => "${rootDir}/app/build/reports/coverage/debug/report.xml", //ui tests
Library => ${rootDir}../VotePeerLibrary/votepeer/build/reports/coverage/debug/report.xml //ui tests