Use an Azure DevOps Release pipeline to trigger automated execution from Azure Test Plans. This setup provides controlled orchestration, validation, and monitoring of test runs by triggering an existing build pipeline that executes your Ranorex tests.
Prerequisites
Before you start, make sure you have the following in place:
- A build pipeline that executes Ranorex tests. See Create and execute an ADO pipeline.
A machine/agent that can run pipeline jobs (required for UI execution). See Set up an Azure Pipelines agent. - An Azure DevOps project and repo. See Create ADO project & Git repo.
- (Recommended) Test mappings created. See Map Ranorex tests to Azure DevOps Test Cases.
Create the Release pipeline
Create an empty Release pipeline to connect to your build pipeline and configure to trigger execution.
- In Azure DevOps, navigate to Pipelines > Releases.
- Select New pipeline.
- Choose the Empty job template.
- Enter the pipeline name: Trigger from testplan.
Configure the artifact source (build pipeline)
The Release pipeline uses a build pipeline as its artifact source. This is the pipeline that builds your solution and runs the Ranorex tests.
- In Artifacts, click + Add.
- Configure the artifact:
- Source type: Build
- Project: Select the applicable project (for example, Ranorex)
- Source (build pipeline): Select the pipeline that runs your Ranorex tests (for example, RanorexSetup)
- Source alias: Auto-generated or set manually (for example, _RanorexSetup)
- Click Add to confirm.
The Release pipeline can now reference and trigger the selected build pipeline.
Configure the Release stage
Stages define what the Release pipeline does and in what order. In this step, you rename the default stage to reflect its purpose.
- Open Stage 1.
- Rename the stage to: Trigger from test plan.
- Select 1 job, 0 task to begin configuring stage tasks.
Add the task that triggers the build pipeline
To trigger execution from Azure Test Plans, the Release stage must start the underlying build pipeline and wait for completion. This guide describes the recommended supported method.
Azure PowerShell task (recommended)
- Click + to add a task.
- Search for Azure PowerShell and add it.
- Configure the task:
- Display name: Trigger and wait for build pipeline
- Azure Subscription: Select the relevant subscription
- Script Type: Inline
- Azure PowerShell Version: Latest installed version
-
For the inline script, use the standardized implementation from:
ado-testplans-execution-pipeline.yml
Save and validate
Save your configuration so the Release pipeline can be used as the orchestrator for Azure Test Plans-triggered runs.
- Click Save.
- Enter the description: Added Test Plans integration.
- Confirm to store the configuration.
Your Release pipeline is ready to orchestrate automated runs triggered from Azure Test Plans by triggering and monitoring the configured build pipeline.