This plugin integrates TestFairy platform with the Gradle build system. With this plugin, you can upload signed builds directly via command line, IntelliJ, Android Studio and other IDEs.
A typical TestFairy Gradle Plugin installation takes less than 20 seconds. Installation consists of adding the following to your build.gradle file:
-
Add the TestFairy Maven repository:
maven { url 'https://www.testfairy.com/maven' }
-
Add plugin dependency:
classpath 'com.testfairy.plugins.gradle:testfairy:1.+'
-
Apply plugin:
apply plugin: 'testfairy'
-
Configure API key by adding this to your "android" section:
testfairyConfig { apiKey "1234567890abcdef" }
For convenience, here is a snippet of a complete build.gradle file, including the additions above.
buildscript {
repositories {
mavenCentral()
maven { url 'https://www.testfairy.com/maven' }
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6'
classpath 'com.testfairy.plugins.gradle:testfairy:1.+'
}
}
apply plugin: 'android'
apply plugin: 'testfairy'
android {
testfairyConfig {
apiKey "1234567890abcdef"
}
}
With the plugin installed, a set of new tasks, prefixed "testfairy" will be added, one for each build type.
For example: to upload a debug build, run the following from terminal:
gradlew testfairyDebug
Optionally, you can add a changelog to this build. This changelog will appear in your build notes and as a default message when inviting testers. For example:
gradlew -PtestfairyChangelog="Fixed all bugs" testfairyDebug
This plugin is also Android Studio and Intellij-friendly. To upload builds directly from your IDE:
- Open "Edit Configuration..." dialog
- Add a new Gradle configuration, use task "testfairyDebug" or another, depending on your build type.
Please send bug reports to support@testfairy.com or use GitHub to open issues at: