Welcome to the Bot Framework samples repository. Here you will find task-focused samples in C#, JavaScript/TypeScript, and Python to help you get started with the Bot Framework SDK!
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.
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.