Deploys app to device farm and starts a test run with a preconfigured test package and device pool.
Can be run directly with the bitrise CLI,
just git clone this repository, cd into it's folder in your Terminal/Command Line
and call bitrise run test.
Check the bitrise.yml file for required inputs which have to be
added to your .bitrise.secrets.yml file!
Step by step:
- Open up your Terminal / Command Line
git clonethe repositorycdinto the directory of the step (the one you justgit cloned)- Create a
.bitrise.secrets.ymlfile in the same directory ofbitrise.yml- the.bitrise.secrets.ymlis a git ignored file, you can store your secrets in - Check the
bitrise.ymlfile for any secret you should set in.bitrise.secrets.yml
- Best practice is to mark these options with something like
# define these in your .bitrise.secrets.yml, in theapp:envssection.
- Once you have all the required secret parameters in your
.bitrise.secrets.ymlyou can just run this step with the bitrise CLI:bitrise run test
An example .bitrise.secrets.yml file:
---
# These environments should NOT be checked into source control, they are used
# to populate your tests when running this step locally.
envs:
- AWS_ACCESS_KEY: ""
- AWS_SECRET_KEY: ""
- DEVICE_FARM_PROJECT: ""
- TEST_PACKAGE_NAME: "test_bundle.zip"
- TEST_TYPE: "APPIUM_PYTHON"
- PLATFORM: "ios+android"
- IOS_POOL: ""
- ANDROID_POOL: ""
- RUN_NAME_PREFIX: "testscript"
- AWS_REGION: "us-west-2"
- BITRISE_IPA_PATH: ""
- BITRISE_SIGNED_APK_PATH: ""
- BITRISE_BUILD_NUMBER: 0
bitrise run test- Note: This test requires additional configuration to pass:
AWS_ACCESS_KEYandAWS_SECRET_KEYmust be set in.bitrise.secrets.yml- An Amazon device farm project must be set up in the target region, and its ARN must be specified in the
device_farm_projectinput - If
platforminput is... 1. ... set toios, thenios_poolmust be set to the ARN of an iOS device pool andipa_pathor envvarBITRISE_IPA_PATHmust be set 1. ... set toandroid, thenandroid_poolmust be set to the ARN of an Android device pool andapk_pathor envvarBITRISE_SIGNED_APK_PATHmust be set 1. ... set toios+android, then all of the above inputs must be set
- see
step.ymlfor more info on obtaining ARNs
- Create a new git repository for your step (don't fork the step template, create a new repository)
- Copy the step template files into your repository
- Fill the
step.shwith your functionality - Wire out your inputs to
step.yml(inputssection) - Fill out the other parts of the
step.ymltoo - Provide test values for the inputs in the
bitrise.yml - Run your step with
bitrise run test- if it works, you're ready
For Step development guidelines & best practices check this documentation: https://github.com/bitrise-io/bitrise/blob/master/_docs/step-development-guideline.md.
NOTE:
If you want to use your step in your project's bitrise.yml:
- git push the step into it's repository
- reference it in your
bitrise.ymlwith thegit::PUBLIC-GIT-CLONE-URL@BRANCHstep reference style:
- git::https://github.com/user/my-step.git@branch:
title: My step
inputs:
- my_input_1: "my value 1"
- my_input_2: "my value 2"
You can find more examples of step reference styles in the bitrise CLI repository.
- Fork this repository
git cloneit- Create a branch you'll work on
- To use/test the step just follow the How to use this Step section
- Do the changes you want to
- Run/test the step before sending your contribution
- You can also test the step in your
bitriseproject, either on your Mac or on bitrise.io - You just have to replace the step ID in your project's
bitrise.ymlwith either a relative path, or with a git URL format - (relative) path format: instead of
- original-step-id:use- path::./relative/path/of/script/on/your/Mac: - direct git URL format: instead of
- original-step-id:use- git::https://github.com/user/step.git@branch: - You can find more example of alternative step referencing at: https://github.com/bitrise-io/bitrise/blob/master/_examples/tutorials/steps-and-workflows/bitrise.yml
- Once you're done just commit your changes & create a Pull Request
You can share your Step or step version with the bitrise CLI. Just run bitrise share and follow the guide it prints.