Firebase is actually the most popular developer tool platform, wchich handles almost every aspect of the app. It also gives possibility to run Android Tests on physical or virtual devices hosted in a Google data center through Firebase Test Lab. In order to fully exploit the potential of this tool I've created plugin to simplify process of creating tests configurations. It allows to run tests locally as well as on you CI server.
- Creating tasks for testable
buildType
[By default it isdebug
. If you want to change it usetestBuildType "buildTypeName"
] - Creating tasks for every defined device and configuration separetly [ including Instrumented / Robo tests ]
- Creating tasks which runs all configurations at once
- Ability to download tests results to specific location
- Ability to clear directory inside bucket before test run
- Readability
- Simplicity
- Remote and Local Testing
- Compatible with Gradle 3.0
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.firebase.test.lab:plugin:1.0.4"
}
}
apply plugin: "firebase.test.lab"
//For gradle 2.1+
plugins {
id "firebase.test.lab" version "1.0.4"
}
Add devices configurations inside build.gradle
List of available devices
firebaseTestLab {
cloudSdkPath = "/user/cloud-sdk/bin"
cloudBucketName = "bucket-test"
cloudDirectoryName = "androidTests"
clearDirectoryBeforeRun = true
devices {
galaxyS7 {
androidApiLevels = [23]
deviceIds = ["herolte"]
}
}
}