Skip to main content

Fastlane

Upload a new build to TestFairy using Fastlane. You can find your API Key in the TestFairy Settings page.

testfairy(
api_key: "...",
ipa: "./ipa_file.ipa",
comment: "Build #{lane_context[SharedValues::BUILD_NUMBER]}",
)
testfairy(
api_key: "...",
apk: "../build/app/outputs/apk/qa/release/app-qa-release.apk",
comment: "Build #{lane_context[SharedValues::BUILD_NUMBER]}",
)

Parameters​

KeyDescriptionDefault
api_keyAPI Key for TestFairy
ipaPath to your IPA file for iOS
apkPath to your APK file for Android
symbols_fileSymbols mapping file
upload_urlUpload API URL for TestFairyhttps://upload.testfairy.com
testers_groupsArray of tester groups to be notified[]
commentAdditional release notes for this upload. Will be added to sent emailsNo comment
notifySend email to testersoff
timeoutRequest timeout in seconds

Lane Variables​

Actions can communicate with each other using a shared hash lane_context, that can be accessed in other actions, plugins or your lanes: lane_context[SharedValues:XYZ]. The testfairy action generates the following Lane Variables:

SharedValueDescription
SharedValues::TESTFAIRY_BUILD_URLURL for the sessions of the newly uploaded build
SharedValues::TESTFAIRY_DOWNLOAD_URLURL directly to the newly uploaded build
SharedValues::TESTFAIRY_LANDING_PAGEURL of the build's landing page

Documentation​

To show the documentation in your terminal, run

fastlane action testfairy

CLI​

It is recommended to add the above action into your Fastfile, however sometimes you might want to run one-offs. To do so, you can run the following command from your terminal

fastlane run testfairy

To pass parameters, make use of the : symbol, for example

fastlane run testfairy parameter1:"value1" parameter2:"value2"

It's important to note that the CLI supports primitive types like integers, floats, booleans, and strings. Arrays can be passed as a comma delimited string (e.g. param:"1,2,3"). Hashes are not currently supported.

It is recommended to add all fastlane actions you use to your Fastfile.

You can review this action documentation and code on docs.fastlane.tools.