|
哦哦,如果开启日志输出的话,本身在脚本运行完后会自动输出日志到TM的Result里去...基本可显示脚本运行成功与失败.和一些验证点的成功或失败状态..如果要输出特定的内容的话是要在脚本里写相关日志输出的代码的.给个例子看一下
Sub Main
Dim Result As Integer
Dim Value As Variant
SQALogMessage sqaNone, "Starting test of Acme Application...", ""
Window SetContext, "Caption=Acme Inc.", ""
Result = SQAGetProperty ("Type=PushButton;Text=OK", "Enabled", Value)
If Result = sqaSuccess Then
If Value = TRUE Then
Result = sqaPass
Else
Result = sqaFail
End If
SQALogMessage Result, "Test to see if OK button is enabled", ""
Else
SQALogMessage sqaWarning, "Unable to perform OK button test", "Error" + Str$(Result) + ": " + Error$(Result)
End If
End Sub |
|