This package contains a Postman collection and a Postman environment for debugging Microsoft Bot Framework chatbots through the Direct Line API 3.0.
After downloading this folder, you can import the whole package in one step into Postman by using it's Import Folder functionality.
To make the authentication against the Direct Line work, you need to get your Direct Line secret and set it as the value of the directLineSecret variable in the freshly imported Direct Line 3.0 environment in Postman.
The collection contains four requests that you can use for testing your chatbots through the Direct Line:
- Start conversation
- Send event
- Send message
- Receive activities
The names of the requests are pretty self-explanatory if you are familiar with the Direct Line API 3.0.
Using those four request types, the default testing workflow looks like this:
- Create a new conversation by issuing a Start conversation request.
- Using Send event and Send message to trigger the bot logic being tested.
- Check the conversation history with Receive activities to see if everything is okay.
In the above list, sending an event and sending a message are pretty similar, since they are POST-ing the very same endpoint, but with a different body. Based on these and the schema's documentation, you can easily send your own Activity object.
For implementation details please refer to this blog post.