This repository showcases TestFairy usage in an Android instrumentation test.
Following examples are provided:
- Basic instrumentation with a class runner
- Shuffled instrumentation with a class runner
- Wrapped instrumentations
- Manual instrumentation
You can find the companion docs and blog post here.
- Add these to app/build.gradle
dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'testfairy:testfairy-android-sdk:1.+@aar'
}
- Copy these into your project.
- Modify ExampleTestBase.java to set your app token.
It is advised that you should consider these files not as dependencies but as starting points for your custom use cases. Therefore, further modifications to the contents of these files are highly encouraged. We'd love it if you sent a pull requests with suggestions and bugfixes.