I'm working now on my first bot with Microsoft Bot Framework, with ASP.NET.
After manually testing with the bot emulator, I'm looking for the best method to create automatic testing for the bot.
Considering two problems:
One alternative is doing functional tests using DirectLine. The caveat is that the bot needs to be hosted but it's powerfull. Check out the AzureBot tests project to see how this works.
Another alternative, is doing what the BotFramework team is doing for some of their unit tests.
If you are using Dialogs, you can take a look to the EchoBot unit tests as they are simple to follow.
If you are using Chain, then take a look to how their are using the AssertScriptAsync method.
https://github.com/Microsoft/BotBuilder/blob/master/CSharp/Tests/Microsoft.Bot.Builder.Tests/ChainTests.cs#L360
https://github.com/Microsoft/BotBuilder/blob/master/CSharp/Tests/Microsoft.Bot.Builder.Tests/ChainTests.cs#L538
If you are looking for a way to mock up Luis Service, see this.
You may want to consider Selenium. Selenium is web browser automation software allowing you to write tests that programmatically read and write to the DOM of a web page. With a Selenium script you can:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With