Possible Values of LastRunResults Are
Passed--The most recent run passed.
Failed--The most recent run failed.
Warning--The most recent run returned a warning.
Running--The test or component is currently running.
Stopped--The current run was stopped.
Paused--The current run is paused.
Not applicable--There are no run results for this test or component.
So why can't you use a select case with these values and write corresponding numeric values to the log.
Some dummy code here.
assuming you have an excel file with first column as "TestName", 2nd col as "status"
Passed--The most recent run passed.
Failed--The most recent run failed.
Warning--The most recent run returned a warning.
Running--The test or component is currently running.
Stopped--The current run was stopped.
Paused--The current run is paused.
Not applicable--There are no run results for this test or component.
So why can't you use a select case with these values and write corresponding numeric values to the log.
Some dummy code here.
assuming you have an excel file with first column as "TestName", 2nd col as "status"
Code:
set fso=createobject("excel.application")
Set wb=fso.workbooks.open("D:\Documents and Settings\admin\Desktop\a.xls")
Set sh=wb.worksheets(1)
'i is iteration value in your loop
sh.cells(i,1)=environment("TestName")
retValue=qtTest.LastRunResults.Status
Select case retValue
case "Passed":sh.cells(i,2)=1
case "Failed":sh.cells(i,2)=0.
.
.
so on
End select
wb.save
wb.close
Set sh=nothing
Set wb=nothing
Set fso=nothing