- 重要な情報
- アプリ内
- インフラストラクチャー
- アプリケーションパフォーマンス
- 継続的インテグレーション
- ログ管理
- セキュリティ
- UX モニタリング
- 管理
With the Datadog CI Azure DevOps Extension, you can run Synthetic tests within your Azure Pipeline configuration and ensure all your teams using Azure DevOps can benefit from Synthetic tests at every stage of the software lifecycle. You can run SyntheticsRunTests
as a task.
To connect to your Datadog site, Datadog recommends setting up a custom service connection when configuring the Synthetics Run Test task.
You need to provide the following inputs:
app
): The name of the custom subdomain set to access your Datadog application. If the URL used to access Datadog is myorg.datadoghq.com
, this value needs to be set to myorg
.myorg.datadoghq.com
, this value needs to be set to myorg
.To connect to your Datadog account, create a Datadog CI service connection in your Azure pipelines project. Once created, all you need is the name of the service connection in the tasks.
SyntheticsRunTests
task.Your task can be simple or complex.
- task: SyntheticsRunTests@0
displayName: Run Datadog Synthetics tests
inputs:
authenticationType: 'connectedService'
connectedService: 'my-datadog-ci-connected-service'
publicIds: |
abc-d3f-ghi
jkl-mn0-pqr
synthetics.json
files- task: SyntheticsRunTests@0
displayName: Run Datadog Synthetics tests
inputs:
authenticationType: 'connectedService'
connectedService: 'my-datadog-ci-connected-service'
files: 'e2e-tests/*.synthetics.json'
- task: SyntheticsRunTests@0
inputs:
authenticationType: 'apiAppKeys'
apiKey: '$(DatadogApiKey)'
appKey: '$(DatadogAppKey)'
subdomain: 'myorg'
datadogSite: 'datadoghq.eu'
testSearchQuery
- task: SyntheticsRunTests@0
displayName: Run Datadog Synthetics tests
inputs:
authenticationType: 'connectedService'
connectedService: 'my-datadog-ci-connected-service'
testSearchQuery: 'tag:e2e-tests'
variables: |
START_URL=https://staging.website.com
PASSWORD=$(StagingPassword)
testSearchQuery
and variable overrides- task: SyntheticsRunTests@0
displayName: Run Datadog Synthetics tests
inputs:
authenticationType: 'connectedService'
connectedService: 'my-datadog-ci-connected-service'
testSearchQuery: 'tag:e2e-tests'
configPath
- task: SyntheticsRunTests@0
displayName: Run Datadog Synthetics tests
inputs:
authenticationType: 'connectedService'
connectedService: 'my-datadog-ci-connected-service'
configPath: './synthetics-config.json'
Name | Requirement | Description |
---|---|---|
authenticationType | required | The type of authentication you want Datadog to use, either connectedService or apiAppKeys . |
connectedService | optional | The name of the Datadog CI service connection to use when using the connectedService authentication type. |
apiKey | optional | Your Datadog API key when using the apiAppKeys authentication type. This key is created by your Datadog organization and should be stored as a secret. |
appKey | optional | Your Datadog application key when using the apiAppKeys authentication type. This key is created by your Datadog organization and should be stored as a secret. |
subdomain | optional | The name of the custom subdomain set to access your Datadog application when using the apiAppKeys authentication type. If the URL used to access Datadog is myorg.datadoghq.com , this value needs to be set to myorg . Default: app . |
datadogSite | optional | The Datadog site when using the apiAppKeys authentication type. Default: datadoghq.com . |
publicIds | optional | A list of tests IDs for Synthetic tests you want to trigger, separated by new lines or commas. If no value is provided, the task looks for files named synthetics.json . |
testSearchQuery | optional | Trigger tests corresponding to a search query. This can be useful if you are tagging your test configurations. For more information, see rules and best practices for naming tags. |
files | optional | Glob pattern to detect Synthetic tests’ config files. Default: {,!(node_modules)/**/}*.synthetics.json . |
configPath | optional | The global JSON configuration used when launching tests. For more information, see the example configuration. Default: datadog-ci.json . |
variables | optional | A list of global variables to use for Synthetic tests, separated by new lines or commas. For example: START_URL=https://example.org,MY_VARIABLE=My title . Default: [] . |
jUnitReport | optional | The filename for a JUnit report if you want to generate one. |
Additional helpful documentation, links, and articles: