end
3. 测试套封装
function WriteCaseName(sCaseName) --标记测试用例名,写入测试报告文件
CurrCase = sCaseName
local h = io.open(reportfile,"a")
io.output(h)
local sWriteStr = "\n【" .. sCaseName .."】" .. "\n"
if TestEntironment == Win32 then
print(sWriteStr)
end
io.write(sWriteStr)
io.close(h)
end
function WriteCaseStep(sStep) --标记测试步骤,写入测试报告文件
CurrStep = sStep
local h = io.open(reportfile,"a")
io.output(h)
local sWriteStr = " |--" .. sStep .. "\n"
if TestEntironment == Win32 then
print(sWriteStr)
end
文章来源于领测软件测试网 https://www.ltesting.net/