io.write(sWriteStr)
io.close(h)
end
function SetCurrModule(sModuleName)
CurrModule = sModuleName
temp = {Module = sModuleName,iRunCaseNum = 0,iOKCaseNum = 0,iNGCaseNum = 0}
tRunStatisticIndex = tRunStatisticIndex + 1
table.insert(tRunStatistic,tRunStatisticIndex,temp)
end
4. 自动化判断
--自动比较期望结果与测试结果
function AssertResult(sExpects,RealResult)
if sExpects == RealResult then
return "OK"
else
return "NG"
end
end
5. 测试日志
function WriteMsg(sMsg)
local h = io.open(reportfile,"a")
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/