Alexa中的实际回复
我:提供我的计划详细信息
Alexa:您已经注册了价值78美元的Creditlock年度计划,还想做什么?
Convo文件
我#:提供我的计划详细信息
Bot#:您已经注册了creditlock,计划了价值$的交易,您还想做什么?
I want to assert only the part of info which i've mentioned in the convo file .
Why I do this because in my application from user to User the plan and its cost changes.So globally i only check for the basic structure of the response message for smoke test purpose
答案 0 :(得分:1)
这可以通过 SCRIPTING_MATCHING_MODE capability 进行控制。
在您的情况下,可以使用通配符或 regexp (从Botium Box 1.8开始可以使用通配符)。
使用通配符,您可以使用星号(*)用作convo文件中所有内容的通配符。
#me
Give my plan details
#bot
You've enrolled in creditlock * plan worth * What else would you like to do?
使用 regexp 时,您必须使用成熟的正则表达式进行匹配-更复杂,但功能更强大。
#me
Give my plan details
#bot
You've enrolled in creditlock, \w+ plan worth \$[0-9]+ What else would you like to do \?
您必须注意正确引用要用作文字字符的所有正则表达式控制字符