SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Sep 2006
    Location
    CA, USA
    Posts
    425
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to change Reporter.RunStatus

    I use Reporter.RunStatus to log failure and just found out if I run 10 test cases and one of them failed, the micFail keeps to the end of the test.

    How can I turn it back to micPass, just like "Err.Clear" after logging the failure, or I have to find another way to check the status.

  2. #2
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: How to change Reporter.RunStatus

    You can't. It is a ready only status of the current running test. So if any action or any code reported a failure then this status will remain micFail for the whole test run

  3. #3
    Senior Member
    Join Date
    Sep 2006
    Location
    CA, USA
    Posts
    425
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to change Reporter.RunStatus

    Good to know that we can use Reporter.RunStatus only once. So I have to use other ways to check the verification results for each test iteration.

    I tried Last Error object and it turned out that while Reporter.RunStatus was micFail, Last Error returned "the operation reran seccessfully".

    Any suggestions on what I can try?

    Thanks!

  4. #4
    Super Member Jonty's Avatar
    Join Date
    Jan 2007
    Location
    India
    Posts
    1,266
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to change Reporter.RunStatus

    Will a failure from QTP run, say due to some checkpoint issues throw a corresponding err description through the Err object?

    If the failure is due to some run errors, then you may get the Error number and description.

    You would have to do your custom reporting and avoid depending on reporter.runstatus approach.
    Cheers
    Jonty..
    -- Here to Learn and share ---

  5. #5
    Senior Member
    Join Date
    Sep 2006
    Location
    CA, USA
    Posts
    425
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to change Reporter.RunStatus

    This is what I did to replace check on Reporter.RunStatus

    bolPass1 = Browser(xx).Page(xx).WebElement(xx1).CheckProperty "xx", "xx"

    bolPass2 = Browser(xx).Page(xx).WebElement(xx2).CheckProperty "xx", "xx"

    bolPass3 = Browser(xx).Page(xx).WebElement(xx3).CheckProperty "xx", "xx"

    If Not (bolPass1 And bolPass2 And bolPass3) Then
    'do something
    End If

    It works well.

 

 

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 05:45 AM.

Copyright BetaSoft Inc.