开源软件名称(OpenSource Name):jaredsburrows/android-gradle-kotlin-app-template
开源软件地址(OpenSource Url):https://github.com/jaredsburrows/android-gradle-kotlin-app-template
开源编程语言(OpenSource Language):
Kotlin
100.0%
开源软件介绍(OpenSource Introduction):Android Gradle Kotlin App Template
Gradle + Android Studio + Robolectric + Espresso + JaCoCo
Technologies used:
Build Tools:
Android Libraries:
Testing Frameworks:
Name |
Description |
Espresso |
Instrumentation Framework |
Reporting Plugins:
Name |
Description |
JaCoCo |
JaCoCo Test Coverage |
Coveralls |
Hosts test reports published from TravisCI |
Continuous Integration:
Name |
Description |
TravisCI |
Build Server(Builds, Tests, Publishes reports to Coveralls) |
Publishing to Google Play:
Getting Started:
Android Studio or Intellij Support(Simple):
-
Import/Open this project with Android Studio/Intellij(click on build.gradle )
-
Instrumentation Tests:
-
Change the Build Variant Test Artifact to Instrumentation Tests
-
Right click an instrumentation test located in src/main/androidTest and click test
-
Unit Tests:
-
Change the Build Variant Test Artifact to Unit Tests
-
Right click a unit test located in src/main/test and click test
Building and Running
This project builds with Gradle and the Android Build tools.
Build the APK:
Install the APK:
Run the App:
Testing
Running the Unit Tests:
The Junit tests run on the JVM, no need for emulators or real devices.
Run a single unit test in the debug flavor :
$ gradlew testDebug --tests="*MainActivityTest*"
Running the Instrumentation Tests:
The Espresso instrumentation tests run on the device.
$ gradlew connectedDebugAndroidTest
Reports
Generate Lint Reports:
The Lint plugin generates reports based off the source code.
Generate Jacoco Test Coverage:
The Jacoco plugin generates coverage reports based off the unit tests.
$ gradlew jacocoDebugReport
|
请发表评论