Skip to content
Test your app with Firebase Test Lab with ease using fastlane for Android
Branch: master
Clone or download
Latest commit 4ee1181 Mar 4, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
art update readme Mar 1, 2019
fastlane update usage Mar 1, 2019
lib/fastlane/plugin
spec
.gitignore
.rspec
.rubocop.yml initial commits Mar 1, 2019
CONTRIBUTING.md Update CONTRIBUTING.md Mar 4, 2019
Gemfile
LICENSE
README.md update usage Mar 1, 2019
Rakefile initial commits Mar 1, 2019
fastlane-plugin-firebase_test_lab_android.gemspec

README.md

Firebase Test Lab plugin for fastlane

Inspired by Firebase test lab plugin for ios

Getting Started

License Gem fastlane Plugin Badge

This project is a fastlane plugin. To get started with fastlane-plugin-firebase_test_lab_android, add it to your project by running:

fastlane add_plugin firebase_test_lab_android 

If you are not current user of Firebase

You need to set up Firebase first. These only needs to be done once for an organization.

Configure Google credentials through service accounts

To authenticate, Google Cloud credentials will need to be set for any machine where fastlane and this plugin runs on.

If you are running this plugin on Google Cloud Compute Engine, Kubernetes Engine or App Engine flexible environment, a default service account is automatically provisioned. You will not need to create a service account. See this for more details.

In all other cases, you need to configure the service account manually. You can follow this guide on how to create a new service account and create a key for it. You will need to set the GOOGLE_APPLICATION_CREDENTIALS environment variable pointing to the service account key file according to the document.

No matter if you are a using an automatically provisioned service account or a manually created one, the service account must be configured to have the project editor role.

Enable relevant Google APIs

  • You need to enable the following APIs on your Google Cloud API library (see this for instructions how):
    1. Cloud Testing API
    2. Cloud Tool Results API

Find the devices you want to test on

If you have gcloud tool, you can run

gcloud beta firebase test android models list

to get a list of supported devices and their identifiers.

Alternatively all available devices can also be seen here.

Actions

Test your app with Firebase Test Lab with ease using fastlane.
Check out the example Fastfile to see how to use this plugin.

lane :test do
  # upload to Firebase Test Lab
  firebase_test_lab_android(
    project_id: "cats-firebase",
    gcloud_service_key_file: "fastlane/client-secret.json",
    type: "robo", # or instrumentation
    devices: [
      {
        model: "hammerhead",
        version: "21",
        locale: "ja_JP",
        orientation: "portrait"
      },
      {
        model: "Pixel2",
        version: "28"
      }
    ],
    app_apk: "test.apk",
    # app_test_apk: "test.apk" if you wanna do instrumentation
    console_log_file_name: "fastlane/console_output.log",
    timeout: "3m",
    notify_to_slack: true # or false
  )
end

before_all do
# If you use `notify_to_slack` option
  ENV["SLACK_URL"] = "https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX"
end

Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting guide.

Using fastlane Plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

About fastlane

fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.

You can’t perform that action at this time.