Test your Microsoft Copilot Studio bot

Important

Power Virtual Agents capabilities and features are now part of Microsoft Copilot Studio following significant investments in generative AI and enhanced integrations across Microsoft Copilot.

Some articles and screenshots may refer to Power Virtual Agents while we update documentation and training content.

As you design your bot in Microsoft Copilot Studio, you can use the Test bot pane to see how the bot leads a customer through the bot conversation.

To help you find and fix unexpected behavior, you can enable tracking between topics to take you through the bot conversation step-by-step, and go to the corresponding node in the authoring canvas.

Prerequisites

Use the Test bot pane to walk through your bot conversations as the user. It's a good way to make sure your topics are working and that conversations flow as you expect.

Follow a conversation through a topic

  1. If the Test bot pane is hidden, open it by selecting Test your bot.

    Screenshot of the Test bot button.

  2. In the Type your message field, enter some text. If the text is similar to a trigger phrase for a topic, that topic will begin.

    Screenshot of the Type your message field.

  3. Select the bot response in the Test bot pane. This takes you to the topic and the node that sent the response. Nodes that have fired display a colored checkmark and a colored bottom border.

    Screenshot of the node displaying a colored checkmark and border.

    Note

    As you continue the conversation with the test bot in the same topic, each node that fires is marked with the checkbox and bottom border and centered in the canvas.

  4. Continue the conversation, testing that the bot flows as intended in the topic.

You can update a topic at any time while interacting with the test bot. Simply save your topic to apply changes and continue the conversation with your bot.

Your conversation is not automatically cleared when you save a topic. If at any point you want to clear the conversation from your test bot and start over, select the Reset button.

Screenshot of the Test reset button.

Track topic-to-topic

You can automatically navigate across topics to each node that fires, by using the Track topic-to-topic setting.

  1. At the top of the Test bot pane, set Track topic-to-topic to On.

    Screenshot of the topic-to-topic toggle.

  2. Continue interacting with your bot. As you navigate to each node that fires, you can switch topics along with the conversation.

Test variable values

You can observe the values of your variables as you test your bot.

  1. Open the test bot.

  2. Open the Variables pane and select the Test tab. If a variable has values, it appears here. Any empty variables appear as undefined.

    Screenshot of the Variables Test pane.

  3. To inspect variable properties, select the link in the value to display variable details.

    Screenshot of the Variables list details pane.

For information about using the variable test pane to test slot filling, see Use entities and slot filling.

Save conversation snapshots

While you're testing your bot, you can capture the content of and diagnostics data about the conversation, and save it as a file. You can then analyze the data to troubleshoot issues, such as the bot not responding in the way you expect.

Warning

The snapshot file contains all your bot content, which may include sensitive information.

  1. At the top of the Test bot pane, select the menu icon (⋮), then select Save snapshot.

    Screenshot of the Save Snapshot option.

  2. Select Save to save the bot content and conversational diagnostics in a .zip archive file named botContent.zip.

    Screenshot of the Save Snapshot window.

The botContent.zip file contains two files:

  • dialog.json contains conversational diagnostics, including detailed descriptions of errors.

  • botContent.yml contains the bot's topics and other content, including entities and variables used.

Note

Help us improve Microsoft Copilot Studio by flagging issues with the Flag an issue command on the Test bot pane. This submits your conversation ID to Microsoft; the ID is a unique identifier that Microsoft uses to troubleshoot the issue of the conversation. Other information, such as is stored in the DSAT.zip file, is not sent when you flag an issue. All information collected remains anonymous and will be used to help improve bot quality.