io.output(h)
local sWriteStr = sMsg .. "\n"
if TestEntironment == Win32 then
print(sWriteStr)
end
io.write(sWriteStr)
io.close(h)
end
6. 测试报告
--将测试结果写入测试报告文件
function WriteReport(sAssertResult,sRealResult)
local h = io.open(reportfile,"a")
io.output(h)
local sWriteStr = " " .. sAssertResult .." (RealResult:" .. sRealResult .. ")\n"
if TestEntironment == Win32 then
print(sWriteStr)
end
io.write(sWriteStr)
io.input(h)
io.close(h)
AddRunStatistic(sAssertResult)
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/