Last updated: Jan 28, 2020 14:28
2 | Use the plugin
For information on using the fastlane plugin, see this example Fastfile. Following is a sample action that you can add to your Fastfile to utilize the plugin.
lane :test do perfecto( perfecto_cloudurl: ENV["PERFECTO_CLOUDURL"], perfecto_token: ENV["PERFECTO_TOKEN"], perfecto_media_location: ENV["PERFECTO_MEDIA_LOCATION"], file_path: ENV['GRADLE_APK_OUTPUT_PATH'] ) end
where:
PERFECTO_CLOUDURL
is the URL of your Perfecto cloud, such as demo.perfectomobile.comPERFECTO_TOKEN
is your Perfecto security tokenPERFECTO_MEDIA_LOCATION
is the location of the Perfecto media repository to upload the file specified by thefile_path
key, such asPUBLIC:Samples/sample.ipa
file_path
is the location of your preferred.ipa
/.apk
file to be uploaded to the Perfecto media repository
You pass the values for these keys either by means of an .env
file inside the fastlane
folder or through environment variables.
The following image shows a sample .env
file.
Combinations with other tools and integrations
You can use fastlane in combination with other tools and integrations that Perfecto offers. The following sample project demonstrates the usage of the fastlane plugin in an end-to-end integration of an Android build life cycle: https://github.com/PerfectoMobileSA/FastlaneEspressoCircleCISlackSample.
The life cycle includes:
- Generating the .apk builds
- Testing the builds on Perfecto
- Running the builds in CircleCI
- Getting instant, suite-level reporting to Slack
- Verifying the test results with Perfecto Smart Reporting
For steps, expand the following scenarios.