Issue
TestFlow doesn't provide an easy way of write and debug tests for dialogs. Debugging step by step is cumbersome and the stack traces for test failures are hard to track.
Proposed change
Create a DialogTestClient that would allow developers to write unit tests for dialogs and use standard unit testing tools and frameworks.
The new testing client should be hosted in a separate package "Microsoft.Bot.Builder.Testing" that will host this class and the test framework for bots.
This package will be extended over time to include other testing classes and helpers.
Component Impact
- Create new Microsoft.Bot.Builder.Testing to host the classes
- Create new Microsoft.Bot.Builder.Testing.Tests to unit test the new classes
Implementation notes
- 3rd party frameworks to adopt for each platform are:
- Provide parity for SendActivity operations for test flow
- Use TestAdapter if possible but also provide the ability to pass a custom adapter and a custom callback if needed
- Provide the ability to pass a ChannelId to test different rendering conditions (right now TestAdapter passes ChannelId == "tests" which doesn't really allow the dev to test response rendering for different channels)
Customer Impact
NA: new feature
Tracking Status
Dotnet SDK (Tracked by 2028)
Javascript SDK (Tracked by 969)
Python SDK (Tracked by 198)
[dcr]