Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samples should include SetTestOptionsMiddleware #2694

Open
chrimc62 opened this issue Aug 24, 2020 · 1 comment
Open

Samples should include SetTestOptionsMiddleware #2694

chrimc62 opened this issue Aug 24, 2020 · 1 comment
Labels
feature-request A request for new functionality or an enhancement to an existing one. needs-triage The issue has just been created and it has not been reviewed by the team.

Comments

@chrimc62
Copy link
Contributor

A convenient way to generate a test is to generate a transcript using the emulator and then turn that transcript into a test script. The issue is that randomness in bots makes it impossible to replay a transcript. In order to fix this, the SDK has:

Defined SetTestOptionsMiddleware in Adaptive.Testing to pick up a SetTestOptions custom event and copy the payload into conversation.testOptions. We made the payload open ended.
Defined randomSeed to seed a random number generator or randomValue to return a constant value from all calls to random and adjusted all users of random to make use of that.
Defined a bf plugin that converts a transcript into a test script that supports the history and mocking.

Samples should include SetTestOptionsMiddleware so that when a transcript is recorded with a bot you can control randomness.

@EricDahlvang EricDahlvang transferred this issue from microsoft/BotFramework-BlogSamples Aug 24, 2020
@EricDahlvang
Copy link
Member

@chrimc62 chrimc62 added needs-triage The issue has just been created and it has not been reviewed by the team. enhancement labels Aug 25, 2020
@gabog gabog added feature-request A request for new functionality or an enhancement to an existing one. and removed enhancement labels Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A request for new functionality or an enhancement to an existing one. needs-triage The issue has just been created and it has not been reviewed by the team.
Projects
None yet
Development

No branches or pull requests

3 participants