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)
延伸閱讀
文章來源于領測軟件測試網 http://www.kjueaiud.com/