Hi Leema,
can you try adding this code..Usually if you run the component from QTP, current run will be nothing.. you can give it a try by adding the below code.
You can also get the running component name in QC by using the below code
Regards,
Ankesh
can you try adding this code..Usually if you run the component from QTP, current run will be nothing.. you can give it a try by adding the below code.
Code:
If QCutil.CurrentRun is Nothing then
strCurrentTestName=""
Else
strCurrentTestName=QCUtil.CurrentTest.name
End IF
You can also get the running component name in QC by using the below code
Code:
'If results are not stored in QC then function is not valid
If QCutil.CurrentRun is Nothing then Exit
Dim oFactory, oFilter, oIteration, sIteration
Set oFactory = QCUtil.CurrentRun.StepFactory
Set oFilter = oFactory.Filter
'Filter only iteration steps only. The current iteration
'will be the last one
oFilter("ST_STEP_NAME") = """Test Iteration*"""
'Get the last iteration
Set oIterations = oFactory.NewList(oFilter.Text)
'Filter outer the iteration no.
strComponentName = oIterations.Item(oIterations.Count).Name
Regards,
Ankesh