← All insights

Architecture guideLens: United States3 min read

How to test Copilot Studio agents before every change: test sets, evaluation methods and what they miss

Copilot Studio agent evaluation can generate and run test sets, score answers and run from CI/CD. How to build a test set that catches real regressions, and the gaps you must cover yourself.

A round bubble level, close up, in La Madre duotone, beside the words Test before you publish
Photo: Dmeranda (Wikimedia Commons, Public domain)

Most Copilot Studio agents are tested the same way: the maker types a dozen questions into the test pane, the answers look right, the agent is published. Three weeks later someone edits the instructions to fix one complaint, and four other answers quietly get worse. Nobody notices until a user does.

Copilot Studio has a built-in answer to that, agent evaluation, and most teams underuse it. This guide covers how it works, how to build a test set worth running, and what it cannot catch. It reflects Microsoft’s documentation as of November 2026.

What agent evaluation does

A test case is one simulated interaction: a single question or a whole conversation, optionally with the answer you expect. A test set is a group of test cases you run together. You can generate test cases, import them or write them by hand. When you run a test set, Copilot Studio sends the questions, records the agent’s answers, compares them with the expected answers or a quality standard, and scores each case. For each one you can open the transcript, the activity map and the knowledge sources the agent used.

Each test set can apply several test methods at once, such as comparing meaning with an expected answer. Four safety evaluators also check responses for hateful or unfair content, sexual content, violence and self-harm.

Evaluations can run from the Copilot Studio interface, through Power Platform REST APIs, or from flows and Power Automate, which means they can run in a CI/CD pipeline before each publish.

Four details that change how you test

Evaluations run as the signed-in user. If the agent answers differently by user, or reads SharePoint with the user’s permissions, an evaluation run by the maker tests the maker’s view. To test as another role, sign in as that user and run it again. For agents with access rules, keep test accounts per role.

Authentication limits. Evaluation supports agents set to no authentication or “Authenticate with Microsoft”; agents set to authenticate manually are not supported, and neither are Fabric data agents.

Language consistency is checked. For multilingual agents, the compare-meaning method fails an answer given in the wrong language, which is useful if you serve several markets.

Testing can cost credits. On the Standard harness, test chat and designer test runs of agent flows do not consume capacity. On the Microsoft Copilot harness, Microsoft’s billing documentation says previewing, testing and generating and running evaluations consume Copilot Credits. Budget for evaluation as a recurring cost, not a one-off.

Building a test set that catches regressions

  1. Start from real questions. Take 30 to 50 from pilot users, support tickets or the people who will use the agent. Generated cases are useful for coverage, but real phrasing is what breaks agents.
  2. Write expected answers with the business owner and record which source document each answer should come from.
  3. Include questions the agent must refuse or escalate: out of scope, requests for restricted data, actions it may not take. A good refusal is a pass.
  4. Add the cases that failed in production. Every serious complaint becomes a permanent test case.
  5. Cover each role that sees different content, with a separate run per test account.
  6. Run the full set before every change to instructions, knowledge, tools or model, and compare scores with the last approved run.

What evaluation does not catch

Silent knowledge drift. A test set checks the answers you wrote down. If someone uploads a new version of a policy, the expected answer is now wrong, and the agent may still pass. Tie each test case to its source document and review both when the document changes.

Actions in other systems. Evaluation scores the conversation. Whether the agent flow it called created the right record has to be checked in the target system.

Errors that score well. A fluent answer that combines two sources into a false statement can score high on similarity. As AWS showed in its own example of a false claim with a high groundedness score, some failures need explicit hard checks, not averages.

Ownership of the test set. Tools run tests. People decide what correct means. Name the owner of each test set, as you name the owner of the agent.

For knowledge problems that show up as failed tests, see our guide to Copilot Studio knowledge sources. For the overall product, our Copilot Studio guide. Testing is part of every agent we take to production.

Have an AI use case stuck between prototype and production?

Tell us what you’re trying to ship. We’ll reply with honest next steps.

Discuss a use case