語言

TestScript.Test(String, String, String, UInt32, String, Int32) 方法

定義

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 物件。

適用於