Lesson 4 of 5 Testing AI Solutions

Designing End-to-End Tests Across Dynamics 365 Apps

This lesson explains how to design scenario tests that follow processes across apps and AI components.

Learning outcomes

After completing this lesson, you will be able to:

  • Explain why cross-app solutions need end-to-end tests.
  • Describe how to design scenarios with checkpoints.
  • Identify environment, data and automation needs.

Why end-to-end testing matters

When an AI solution spans Sales, Customer Service, Supply Chain Management and Finance, each component may pass its own tests while the business process still fails: data may not synchronize in time, a security role may block an agent in one app, or a change in one app's data model may break an agent tool in another. End-to-end tests follow a complete business process across apps, through the AI components and the integrations, and verify the outcome that the business cares about, such as a correctly invoiced order.

Designing the scenarios

End-to-end scenarios are derived from the business processes the solution supports. Each scenario names the actors, the steps in each app, the AI components involved, the data that crosses apps, and the expected outcome at each checkpoint. The following table shows an example scenario for order-to-cash.

StepAppAI componentCheckpoint
Seller asks Copilot whether stock is availableSalesCopilot extension calling Supply Chain ManagementAvailable-to-promise date matches Supply Chain Management
Order is confirmed and createdSales to Supply Chain ManagementAgent flowSales order exists with correct lines
Customer reports a late delivery by emailCustomer ServiceCase Management AgentCase created and linked to the order
Invoice becomes overdueFinanceCollections assistanceReminder drafted with correct amount

Scenarios should include the common path and the important exceptions: an item out of stock, a customer with a credit hold, a user without permission, and an integration that is temporarily unavailable.

Environments, data and automation

End-to-end tests need environments in which all the apps and integrations are connected as in production, with test data that is consistent across apps, such as the same customer and items in Sales and Supply Chain Management, and with personal data masked or synthetic. Security testing runs scenarios with the real security roles of each persona.

  • Automate repeatable scenarios: the Regression Suite Automation Tool for finance and operations apps, Power Apps Test Engine for model-driven and canvas apps, and the Copilot Studio Kit for agent conversations.
  • Run the end-to-end suite before each release of any participating app, and before Dynamics 365 release wave updates, using early access to test new behaviour.
  • Record the AI components' outputs at each checkpoint, because non-deterministic steps may pass with different wording but must reach the same business state.
Worked example

Testing a cross-app service solution

A company's solution uses the Case Management Agent in Customer Service, an agent tool that checks warranty status in Supply Chain Management, and Copilot in Finance to issue credit notes for valid warranty claims. Each component passed its own tests, but in production some credit notes were issued for expired warranties. What should the end-to-end test design have included?

The failure crossed app boundaries: the warranty check and the credit note issuance were tested separately, but not together with real data states. End-to-end scenarios should have covered a claim with a valid warranty, a claim with an expired warranty and a claim where the warranty service is unavailable, following each from case creation to the credit note decision, with checkpoints confirming that an expired warranty never leads to a credit. Consistent test data across Customer Service and Supply Chain Management, and runs under the real security roles, would have exposed the gap.

Check yourself

Which tool automates regression tests for finance and operations apps?

Show answer

The Regression Suite Automation Tool (RSAT).

Exam Tips

Remember for the exam

  • End-to-end tests follow a whole business process across apps and AI components.
  • Scenarios name actors, steps, AI components, cross-app data and checkpoints, including exceptions.
  • Use connected environments with consistent, masked test data and real security roles.
  • Automate with RSAT, Power Apps Test Engine and the Copilot Studio Kit; run before releases and waves.