Issue#67 Update Readme with test util module releases
This commit is contained in:
parent
fad19ffee7
commit
ca9c813121
2 changed files with 60 additions and 10 deletions
54
README.md
54
README.md
|
|
@ -170,5 +170,59 @@ Open the [shared tests instruction set](./codekata/sharedtests.instructionset.md
|
||||||
In this section we will see how can we share Robolectric test source with AndroidTests to run our same tests on actual device.
|
In this section we will see how can we share Robolectric test source with AndroidTests to run our same tests on actual device.
|
||||||
We will also see how to write AndroidTest End to End Tests.
|
We will also see how to write AndroidTest End to End Tests.
|
||||||
|
|
||||||
|
|
||||||
|
## Util classes
|
||||||
|
|
||||||
|
Additional modules have been added prefixed with test-util.
|
||||||
|
|
||||||
|
These contain all the reusable Test Util classes used in the showcase.
|
||||||
|
|
||||||
|
The Testing setup is extracted into a separate gradle script, which with some modifications, you should be able to easily add to your own project.
|
||||||
|
|
||||||
|
To use the TestUtil classes, you will need to add the GitHub Repository as a source for dependencies:
|
||||||
|
|
||||||
|
```groovy
|
||||||
|
// top level build.gradle
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
// ...
|
||||||
|
maven {
|
||||||
|
url "https://maven.pkg.github.com/fknives/AndroidTest-ShowCase"
|
||||||
|
credentials {
|
||||||
|
username = project.findProperty("GITHUB_USERNAME") ?: System.getenv("GITHUB_USERNAME")
|
||||||
|
password = project.findProperty("GITHUB_TOKEN") ?: System.getenv("GITHUB_TOKEN")
|
||||||
|
}
|
||||||
|
// https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// OR
|
||||||
|
// top level build.gradle.kts
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
// ...
|
||||||
|
maven {
|
||||||
|
url = uri("https://maven.pkg.github.com/fknives/AndroidTest-ShowCase")
|
||||||
|
credentials {
|
||||||
|
username = extra.properties["GITHUB_USERNAME"] as String? ?: System.getenv("GITHUB_USERNAME")
|
||||||
|
password = extra.properties["GITHUB_TOKEN"] as String? ?: System.getenv("GITHUB_TOKEN")
|
||||||
|
}
|
||||||
|
// https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
*Latest version:*
|
||||||
|
|
||||||
|
and then you can use the following dependencies:
|
||||||
|
```groovy
|
||||||
|
testImplementation "org.fnives.android.testutil:android-unit-junit5:<latestVersion>" // test-util-junit5-android
|
||||||
|
testImplementation "org.fnives.android.testutil:shared-robolectric:<latestVersion>" // test-util-shared-robolectric
|
||||||
|
testImplementation "org.fnives.android.testutil:android:<latestVersion>" // test-util-android
|
||||||
|
androidTestImplementation "org.fnives.android.testutil:android:<latestVersion>" // test-util-android
|
||||||
|
androidTestImplementation "org.fnives.android.testutil:shared-android:<latestVersion>" // test-util-shared-android
|
||||||
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
[License file](./LICENSE)
|
[License file](./LICENSE)
|
||||||
|
|
|
||||||
|
|
@ -106,17 +106,13 @@ dependencies {
|
||||||
|
|
||||||
androidTestImplementation project(':mockserver')
|
androidTestImplementation project(':mockserver')
|
||||||
|
|
||||||
|
testImplementation project(':test-util-junit5-android')
|
||||||
|
testImplementation project(':test-util-shared-robolectric')
|
||||||
|
testImplementation project(':test-util-android')
|
||||||
|
androidTestImplementation project(':test-util-android')
|
||||||
|
androidTestImplementation project(':test-util-shared-android')
|
||||||
|
|
||||||
testImplementation testFixtures(project(':core'))
|
testImplementation testFixtures(project(':core'))
|
||||||
// testImplementation project(':test-util-junit5-android')
|
|
||||||
testImplementation "org.fnives.android.testutil:android-unit-junit5:1.0.0"
|
|
||||||
androidTestImplementation testFixtures(project(':core'))
|
androidTestImplementation testFixtures(project(':core'))
|
||||||
// testImplementation project(':test-util-shared-robolectric')
|
|
||||||
testImplementation "org.fnives.android.testutil:shared-robolectric:1.0.0"
|
|
||||||
// androidTestImplementation project(':test-util-shared-android')
|
|
||||||
androidTestImplementation "org.fnives.android.testutil:shared-android:1.0.0"
|
|
||||||
// testImplementation project(':test-util-android')
|
|
||||||
testImplementation "org.fnives.android.testutil:android:1.0.0"
|
|
||||||
// androidTestImplementation project(':test-util-android')
|
|
||||||
androidTestImplementation "org.fnives.android.testutil:android:1.0.0"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue