With the synthetics-test-automation-bitrise-step-run-tests step, you can run Synthetic tests 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.
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.
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.
cd into the directory of the step (the one you just git cloned).
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: 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
Your Datadog API key. This key is created by your Datadog organization and will be accessed as an environment variable.
app_key
required
Your Datadog application key. This key is created by your Datadog organization and will be accessed as an environment variable.
batch_timeout
optional
The duration (in milliseconds) after which the batch fails as timed out. The default is 30 minutes.
config_path
optional
The global JSON configuration is used when launching tests. See the example configuration for more details.
device_ids
optional
Override the mobile device(s) to run your mobile test.
locations
optional
String of locations separated by semicolons to override the locations where your tests run.
fail_on_critical_errors
optional
A boolean flag that fails the CI job if no tests were triggered, or results could not be fetched from Datadog. The default is set to false.
fail_on_missing_tests
optional
Fail the CI job if at least one specified test with a public ID (using publicIds or listed in a test file) is missing in a run (for example, if it has been deleted programmatically or on the Datadog site).
fail_on_timeout
optional
A boolean flag that fails the CI job if at least one test exceeds the default test timeout. The default is set to true.
The filename for a JUnit report if you want to generate one.
mobile_application_version
optional
Override the default mobile application version for a Synthetic mobile application test. The version must be uploaded and available within Datadog. This version is also outputted by the datadog-mobile-app-upload step.
Public IDs of Synthetic tests to run, separated by newlines or commas. If no value is provided, tests are discovered in *.synthetics.json files.
site
optional
The Datadog site to send data to. If the DD_SITE environment variable is set, it takes precedence. Your Datadog site is datadoghq.com. .
subdomain
optional
The name of the custom subdomain set to access your Datadog application. If the URL used to access Datadog is myorg.datadoghq.com, the subdomain value needs to be set to myorg.
test_search_query
optional
Trigger tests corresponding to a search query. This can be useful if you are tagging your test configurations. See best practices for more information on tagging.