【发布时间】:2019-05-02 01:36:43
【问题描述】:
已经在机器人的企业模板 4.2.2 中编写了一些测试,到目前为止,它对于基于文本的响应非常有效。但是,当流程涉及自适应卡片时,有没有办法访问附件以确保一切按预期工作?
在此对话框中,选择软件时,将发送自适应卡。 从客户端看起来像这样。 https://imgur.com/a/aEDwFYl
[TestMethod]
public async Task TestSoftwareIssue()
{
string resp = "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(resp)
.Send("software")
// Check attachment somehow?
.AssertReply("")
.StartTestAsync();
}
任何关于如何验证自适应卡片输出的建议都会很棒。
我认为需要某种方式来访问发送给用户的 bot 的活动附件,但目前无法确定如何执行此操作。
谢谢!
【问题讨论】:
标签: c# unit-testing botframework integration-testing