mercredi 1 mai 2019

How to send data filled in from an Adaptive Card back to TestFlow and TestAdapter for testing?

There are some testing tools available on the Enterprise Bot Template with TestFlow and Adapter.

Can we use TestFlow to submit test data as if it was filled and submitted in an Adaptive Card back to the bot to test the response from a TestMethod? Instead of a text, a filled out response back.

enter image description here

The method is below, with comments placed where the appropriate actions should be.

[TestMethod]
public async Task TestSoftwareIssue()
{
    string response = "What sort of issue do you have?\n\n" +
                    "   1. Computer\n" +
                    "   2. Software\n" +
                    "   3. Insuffient Permissions for Access\n" +
                    "   4. Account expired\n" +
                    "   5. Other";
    await GetTestFlow()
        .Send(GeneralUtterances.GeneralIssue)
        .AssertReply(response)
        .Send("software")
        // .AssertReply("")
        .AssertReply(activity => CheckAttachment(activity.AsMessageActivity()))
        // How to send a Adaptive Card filled out message back?
        .StartTestAsync();
}


Aucun commentaire:

Enregistrer un commentaire