Continuous Testing and Bitrise
Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel,
n'hésitez pas à nous contacter.
Overview
With the synthetics-test-automation-bitrise-step-upload-application
step, you can upload a new version of your application to Datadog to run Synthetic tests against during your Bitrise CI, ensuring that all your teams using Bitrise can benefit from Synthetic tests at every stage of the software lifecycle. This step uses the Datadog CI Synthetics command, and requires that your application already exists.
Setup
This step is not available on the official Bitrise Step Library.
To get started:
- Add the following git URL to your workflow. See the official Bitrise documentation on how to do that though the Bitrise app. You can also configure it locally by referencing the git URL in your
bitrise.yml
file.
- git::https://github.com/DataDog/synthetics-test-automation-bitrise-step-upload-application.git@1.8.0:
- Add your API and application keys to your secrets in Bitrise.
- Configure your step inputs. You can also configure them in your
bitrise.yml
file. The only required inputs are the two secrets you configured earlier. For a comprehensive list of inputs, see the Inputs section.
How to use this step locally
You can run this step directly using the Bitrise CLI.
To run this step locally:
- Open your terminal or command line.
git clone
the Bitrise repository.cd
into the directory of the step (the one you just git clone
d).- Create a
.bitrise.secrets.yml
file in the same directory of bitrise.yml
. The .bitrise.secrets.yml
file is a Git-ignored file, so you can store your secrets in it. - Check the
bitrise.yml
file for any secret you should set in .bitrise.secrets.yml
. - Once you have the required secret parameters in your
.bitrise.secrets.yml
file, run this step with the Bitrise CLI with bitrise run test
.
An example .bitrise.secrets.yml
file:
envs:
- A_SECRET_PARAM_ONE: the value for secret one
- A_SECRET_PARAM_TWO: the value for secret two
Usage
Example task using a global configuration override with configPath
This task overrides the path to the global datadog-ci.config.json
file.
- git::https://github.com/DataDog/synthetics-test-automation-bitrise-step-upload-application.git@1.8.0:
inputs:
- api_key: <DATADOG_API_KEY>
- app_key: <DATADOG_APP_KEY>
- config_path: './synthetics-config.json'
For an example configuration file, see the global.config.json
file.
Example including all possible configurations
For reference, this is an example of a complete configuration:
- git::https://github.com/DataDog/synthetics-test-automation-bitrise-step-upload-application.git@1.8.0:
inputs:
- api_key: <DATADOG_API_KEY>
- app_key: <DATADOG_APP_KEY>
- config_path: './global.config.json'
- latest: true
- mobile_application_version_id: '123-123-123'
- mobile_application_version_file_path: 'path/to/application.apk'
- site: 'datadoghq.com'
- version_name: 'example 1.0'
Name | Requirement | Description |
---|
apiKey | required | Your Datadog API key. This key is created by your Datadog organization and will be accessed as an environment variable. |
appKey | required | Your Datadog application key. This key is created by your Datadog organization and will be accessed as an environment variable. |
configPath | optional | The global JSON configuration is used when launching tests. See the example configuration for more details. |
latest | optional | Marks the application as latest . Any tests that run on the latest version will use this version on their next run. |
mobileApplicationVersionId | required | ID of the application you want to upload the new version to. |
mobileApplicationVersionFilePath | required | Override the application version for Synthetic mobile application tests. |
site | optional | The Datadog site to send data to. Your Datadog site is . . If the DD_SITE environment variable is set, it takes precedence. |
versionName | required | Name of the new version. It has to be unique. |
Outputs
Name | Description |
---|
DATADOG_UPLOADED_APPLICATION_VERSION_ID | The version ID of the application that was just uploaded. Pass it to the datadog-mobile-app-run-tests step with the mobile_application_version input to test this version of the application. |
Further reading
Additional helpful documentation, links, and articles: