שתף דרך


Performance test reference sample and guidelines

Use the reference sample built using Apache JMeter available on GitHub as a starting point to create your own performance tests.

The reference sample demonstrates the following principles:

  • Communicating with Direct Line over WebSockets
  • Driving multi-turn conversations
  • Running multiple thread groups, each driving a distinct conversational user case

The reference sample is built using JMeter, a popular open-source tool. You can create performance test scripts for Copilot Studio agents with other tools too. Use selection criteria such as:

  • Community support: Choose a tool with a strong and active community for troubleshooting and resources.
  • Plugin availability: Ensure the tool supports necessary plugins, especially for WebSocket protocols.
  • Rich reporting: Look for tools that offer comprehensive reporting, either built-in or extendable with plugins.
  • Scalability: Opt for tools that can easily scale test execution. Both JMeter and Locust are compatible with Azure Load Testing.

When designing performance test scripts for agents built with Copilot Studio, ensure they accurately simulate real-world usage and align with your production setup. The following key guidelines help you create effective and realistic test scripts:

  • Simulate realistic delays: After capturing the agent's last response, introduce a realistic delay (for example, 30 seconds to 1 minute) before sending the next user message. This delay mirrors how real users take time to read, think, and respond during conversations.
  • Error handling in multi-turn conversations: Include error checks after every turn in the conversation. If an error occurs (for example, a missing or incorrect response), stop the simulated conversation to prevent cascading issues and to reflect realistic user behavior.
  • Match your production communication protocols: Ensure your test script uses the same communication protocols as your production setup, such as WebSockets or HTTP GET. This approach ensures the performance test accurately reflects real-world conditions.