Share via


Automate testing and deployment of agents using pipelines in Power Platform

Automate testing and deployment of Copilot Studio agents using pipelines in Power Platform to support continuous delivery and improve governance throughout the deployment lifecycle. This article explains how to integrate Power Automate cloud flows with Dataverse and the Copilot Studio Kit to validate agent functionality with automated test runs, enforce quality gates, reduce manual steps and errors, and ensure only reliable agents reach production.

Requirements

The deployment process requires three environments:

  • Pipeline host environment: Environment that hosts the pipelines and their extensions. It's the central control point for the deployment process.
  • Development (source) environment: Environment where you develop and test the Copilot Studio agent. Copilot Studio Kit is installed here to enable automated validation of the agent's behavior.
  • Target (production) environment: The final destination for deployment, where the agent is published after it passes all validation checks.

Configuration steps

For detailed steps, download the following PDF: Automated Testing and Deployment of Copilot Studio Agents via Power Platform Pipelines.

The high-level steps are:

  1. Open the Deployment Pipeline Configuration app: Launch the app from the Power Apps portal to create and manage deployment pipelines.
  2. Configure the pipeline: Provide a pipeline name and link the development environments.
  3. Configure deployment stages: Add deployment stages to define target environments and enable pre-export and pre-deployment steps.
  4. Trigger on deployment request: The flow triggers when a deployment request is initiated for a solution that includes a Copilot Studio agent.
  5. Run automated tests: The flow pauses the deployment, runs automated tests, evaluates test results, and decides whether to proceed with deployment based on the test outcomes.