Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

[PORT] Fix Random thread safety and control random seed to improve testability #799

Closed
2 of 3 tasks
tomlm opened this issue Aug 19, 2020 · 0 comments
Closed
2 of 3 tasks

Comments

@tomlm
Copy link
Contributor

tomlm commented Aug 19, 2020

Port this change from botbuilder-dotnet/master branch:
microsoft/botbuilder-dotnet#4429

Fixes #4361

Description

This PR aims to accept a "Microsoft.SetTestOptions" event, and apply the options to SDK.

Specific Changes

  1. Add setTestOptions event
  2. Save TestOptions into the conversation state. Including the Random seed and random value.
  3. Achieve the state from "dialogContext.State", and apply it to SDK code.
  4. Adjust random generator code to use the random in "TestOptions".

How to test

  1. Start project "Microsoft.Bot.Builder.TestBot.Json"
  2. Input 26 to see the dialog output.

Progress

  • Adaptive-expression
  • LG Evaluator/Expander
  • Random selector

Changed projects

  • AdaptiveExpressions
  • Microsoft.Bot.Builder.Dialogs.Adaptive.Testing
  • Microsoft.Bot.Builder.Dialogs.Adaptive
  • Microsoft.Bot.Builder.LanguageGeneration
  • AdaptiveExpressions.Tests
  • Microsoft.Bot.Builder.Dialogs.Adaptive.Tests
  • Microsoft.Bot.Builder.TestBot.Json
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants