I am trying to write a method which read the all the test cases name from destination folder, and verify runtime with given test case name.
Below is the code written by me which doesn't return anything.
Function TE_MoveTestCase(testCase, destinationFolderPath)
On Error resume next
Dim Desc
Dim TreeMgr,TestTree, TestFactory, TestList
Dim myTestCase
Set TreeMgr = QCConnection.TreeManager
Set TestTree = TreeMgr.NodeByPath(destinationFolderPath)
Set TestFactory = TestTree.TestFactory
Set TestList = TestFactory.NewList("")
for each myTestCase In TestList
if myTestCase.Field("TS_NAME") = testCase then
Desc = myTestCase.Field("TS_NAME").value
msgbox & Desc
Exit For
end if
next
on error goto 0
end Function
I have debug the code but my TestList element doesn't return anything. It seems to be empty.
Please suggest any solution.