SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Apprentice
    Join Date
    Dec 2006
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Not getting the list of steps in QC using OTA API

    Hi All,
    my requirement is to update all steps for passed Testcases in QC using QTP.

    I've used OTA API method and my code is working fine upto identifying the No of TCs, but failing at RUNFactory object and stepfactory creation, getting zero count for the StepsList.

    my code is:

    Set tdc= QcUtil.TDConnection
    ' Condition to check the QC conncetion Status
    If tdc.Connected = False Then
    MsgBox "Could Not Connect to QC",VbCritical,"QCConnection"
    Else
    FnQcConnection() ' calling QCconnection function
    End If

    Set tdTrMgr=tdc.TestSetTreeManager
    Set tdFolder=tdTrMgr.NodeByPath(testSetPath)
    Set tsetFact = tdFolder.TestSetFactory
    Set tsetList = tsetFact.NewList("")

    ' Test Set Seletion - For Loop
    For Each tset in tsetList
    Msgbox ("Test Set Name = " & tset.Name)
    MsgBox tsetList.Count

    Set TestSetF1=tset.TSTestFactory
    Set TestSetList=TestSetF1.NewList("")

    MsgBox TestSetList.Count

    ' Test Case Seletion - For Loop
    For Each myTestCase In TestSetList
    Msgbox ("Test Name = " & myTestCase.Name) Set myTestCaseID=TestSetF1.Item(myTestCase.ID)
    myTCName=myTestCase.Name
    myTCId=myTestCase.ID
    myTcStatus=myTestCase.Status
    Set myTestStepRunF=myTestCaseID.RunFactory
    Set myRun=myTestStepRunF.Item(myTestCase.ID)
    Set myStepF=myRun.StepFactory
    Set myStepList=myStepF.NewList("")
    MsgBox myStepList.Count ' here getting ZERO as Steps count

    For Each myStepRun In myStepList
    Set myTestStepID=myStepF.Item(myStepRun.ID)
    myTcStepId=myTestStep.ID
    myTcStepStatus=myTestStep.Status
    MsgBox myTcStepStatus
    Next

    Next

    Next

  2. #2
    Member apchinni's Avatar
    Join Date
    Jun 2005
    Location
    SLC
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Not getting the list of steps in QC using OTA

    I worked on the same kind of requirement. But i copied design steps to Testlab and validated expected and actual results from testcase. Here is what i used..try this

    Set myRun=myTestStepRunF.Item(myTestCase.ID)
    myrun.CopyDesignSteps
    myRun.Post
    myRun.Refresh
    Set myStepF=myRun.StepFactory
    'Here create an object for Step
    set st=myStepF.Step
    Set myStepList=st.NewList("")
    msgbox myStepList.Count

    Thanks

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:49 AM.

Copyright BetaSoft Inc.