TestScript.Test(String, String, String, UInt32, String, Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
public Microsoft.Bot.Builder.Dialogs.Adaptive.Testing.TestScript Test(string userSays, string expected, string description = default, uint timeout = 3000, string path = "", int line = 0);
member this.Test : string * string * string * uint32 * string * int -> Microsoft.Bot.Builder.Dialogs.Adaptive.Testing.TestScript
Public Function Test (userSays As String, expected As String, Optional description As String = Nothing, Optional timeout As UInteger = 3000, Optional path As String = "", Optional line As Integer = 0) As TestScript
参数
- userSays
- String
要发送的消息的文本。
- expected
- String
来自机器人的消息的预期文本。
- description
- String
如果实际响应不符合预期,则发送的消息。
- timeout
- UInt32
预期响应的时间量(以毫秒为单位)。
- path
- String
路径。
- line
- Int32
行号。
返回
一个新的 TestScript 对象,用于将此交换追加到建模的交换。
例外
机器人未按预期响应。
注解
此方法不会修改原始 TestScript 对象。