Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP and QC issue_During run time
#5
Not Solved
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.
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
Reply


Messages In This Thread
QTP and QC issue_During run time - by leema - 06-14-2012, 12:29 PM
RE: QTP and QC issue_During run time - by leema - 06-14-2012, 02:45 PM
RE: QTP and QC issue_During run time - by Ankesh - 06-14-2012, 04:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Loading QRS files at Run time dvkbabu 2 10,016 03-24-2017, 09:04 PM
Last Post: UrmilaSaha
  Missing Resources, Information Pane, Debug Viewer, Run time Data Table not visible Aurodeepta 3 6,973 05-28-2015, 02:52 PM
Last Post: Aurodeepta
  Object Identification not working on Run Time Ajatshatru 2 3,258 05-06-2015, 07:27 PM
Last Post: Ajatshatru
  Error while adding Object to Object repository at run time SaranKumarV 3 8,642 02-02-2015, 01:40 AM
Last Post: dubeyvin
Rolleyes How can we run QTP on virtual machine at scheduled time through VB script. ritugoyal 13 22,577 11-23-2012, 11:03 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 2 Guest(s)