51Testing软件测试论坛

标题: 有关testmanager 中test case results的问题 [打印本页]

作者: xiaochenghit    时间: 2008-4-27 17:56
标题: 有关testmanager 中test case results的问题
请问在做计算器自动测试的实例时,回放完以后在testmanager中test case result中是空的,怎么才能让它得到相关数据?谢谢
作者: 村上舞!舞!舞    时间: 2008-4-28 19:21
你是需要输出测试结果日志吗?
作者: xiaochenghit    时间: 2008-5-7 11:59
是的,我想看到错误发生在哪:实际结果和期望结果的对比,输入这些详细的数据
作者: 村上舞!舞!舞    时间: 2008-5-8 10:57
哦哦,如果开启日志输出的话,本身在脚本运行完后会自动输出日志到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




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2