'******************************CheckPoint**********************
'******result---ReportEvent的状态
'******stepName---测试的名称
'******Detail---详细信息
'******Bool---布尔值,是否截屏并插入图片至报告中
'*****************************************************************
Function
CheckPoint(result,stepName,detail,Bool)
TestDir=Environment.Value(
"TestDir"
)
TestName=Environment.Value(
"TestName"
)
ActionName=Environment.Value(
"ActionName"
)
If
Bool
Then
fileName=Left(createobject(
"Scriptlet.TypeLib"
).Guid,38)
filePath=TestDir&
"\"&TestName&"
_
"&ActionName&"
_
"&fileName&"
.png"
Desktop.CaptureBitmap filePath,true
Reporter.ReportEvent result,stepName,detail,filePath
else
Reporter.ReportEvent result,stepName,detail
End
If
End
Function
|
标签: