Function FunTestIterationNumber()
On Error Resume Next
If err.Number = 0 Then
Dim stepFact, stepList, strIterationNumber, intStpCounter
Set stepFact = QCUtil.CurrentRun.StepFactory
Set stepList = stepFact.NewList("")
strIterationNumber = ""
For intStpCounter = 1 to stepList.Count
If instr(1, stepList(intStpCounter).Name, "Test Iteration", 1) > 0 Then
strIterationNumber = strIterationNumber & stepList(intStpCounter).Name & ","
End If
Next
strIterationNumber = split(left(strIterationNumber,len(strIterationNumber) - 1), ",",-1,1)
FunTestIterationNumber= trim(replace(strIterationNumber(Ubound(strIterationNumber)),"Test Iteration ", ""))
Set stepFact = Nothing
Set stepList = Nothing
Else
FunTestIterationNumber = 1
End If
'Set qtResultsOpt = Nothing
Err.Clear
End Function
On Error Resume Next
If err.Number = 0 Then
Dim stepFact, stepList, strIterationNumber, intStpCounter
Set stepFact = QCUtil.CurrentRun.StepFactory
Set stepList = stepFact.NewList("")
strIterationNumber = ""
For intStpCounter = 1 to stepList.Count
If instr(1, stepList(intStpCounter).Name, "Test Iteration", 1) > 0 Then
strIterationNumber = strIterationNumber & stepList(intStpCounter).Name & ","
End If
Next
strIterationNumber = split(left(strIterationNumber,len(strIterationNumber) - 1), ",",-1,1)
FunTestIterationNumber= trim(replace(strIterationNumber(Ubound(strIterationNumber)),"Test Iteration ", ""))
Set stepFact = Nothing
Set stepList = Nothing
Else
FunTestIterationNumber = 1
End If
'Set qtResultsOpt = Nothing
Err.Clear
End Function
No comments:
Post a Comment