end
7. 測試執行統計
function AddRunStatistic(sAssertResult)
--統計測試執行情況
tRunStatistic[tRunStatisticIndex].iRunCaseNum = tRunStatistic[tRunStatisticIndex].iRunCaseNum + 1
if sAssertResult == "OK" then
tRunStatistic[tRunStatisticIndex].iOKCaseNum = tRunStatistic[tRunStatisticIndex].iOKCaseNum + 1
else
tRunStatistic[tRunStatisticIndex].iNGCaseNum = tRunStatistic[tRunStatisticIndex].iNGCaseNum + 1
--將失敗的插入tRunNG
if (tRunNG[CurrNGModuleIndex]~= nil)and(tRunNG[CurrNGModuleIndex][1] == CurrModule) then --存在Module記錄
if (tRunNG[CurrNGModuleIndex] [2][CurrNGCaseIndex][1]~= nil)and(tRunNG[CurrNGModuleIndex][2] [CurrNGCaseIndex][1] == CurrCase)
then --存在Case記錄
--添加Step項
table.insert(tRunNG[CurrNGModuleIndex][2][CurrNGCaseIndex][2],CurrStep)
else
--增加Case項
table.insert(tRunNG[CurrNGModuleIndex][2],{CurrCase,{CurrStep}})
CurrNGCaseIndex = CurrNGCaseIndex + 1
end
else --增加Module項
文章來源于領測軟件測試網 http://www.kjueaiud.com/