SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Dec 2007
    Location
    UK
    Posts
    45
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Using OTA API - QC Test Passing When Steps Failing

    Hi
    I am controlling the passing / failing of steps in QC thru QTP:

    Set ObjRun = QCUtil.CurrentRun
    Set oSteps = QCUtil.CurrentTest.DesignStepFactory
    Set sfact = QCUtil.CurrentRun.StepFactory
    Set allSteps = oSteps.NewList("")
    set mystep = sfact.AddItem(Null)

    mystep.Field("ST_STEP_NAME") = allSteps(1).StepName
    mystep.Field("ST_DESCRIPTION") = allSteps(1).StepDescription
    mystep.Field("ST_EXPECTED") = allSteps(1).StepExpectedResult
    mystep.Field("ST_ACTUAL") = "not as expected"
    mystep.Field("ST_STATUS") = "Failed"
    mystep.Post

    The step successfully appears as "failed" in the results in QC, but the test itself is showing as "passed". Can anyone help? I have tried adding the following:

    ObjRun.Status = "FAILED"
    ObjRun.Post

    but the status always ends up as passed. Any help would be greatly appreciated.

  2. #2
    Moderator
    Join Date
    Jan 2007
    Location
    Pittsburgh, PA
    Posts
    2,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Using OTA API - QC Test Passing When Steps Fai

    Not sure how to update test status pass/fail.

    But here is the workaround, insert a reporter statement with option micpass/micfail at the end of your test case that will make test status passed/failed.

  3. #3
    Member
    Join Date
    Dec 2007
    Location
    UK
    Posts
    45
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Using OTA API - QC Test Passing When Steps Fai

    Thanks TReddy, yes as far as I can see this is the only way to ensure the script ends with the correct status. It appears that QTP over-rides the status upon exit otherwise. Thanks for taking the time to reply.

  4. #4
    Member
    Join Date
    Dec 2007
    Location
    UK
    Posts
    45
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Using OTA API - QC Test Passing When Steps Fai


 

 

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 07:22 AM.

Copyright BetaSoft Inc.