SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Member
    Join Date
    Aug 2000
    Location
    oakland,ca,u.s.a
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Un-nesting test results with ResCloseList( ) ....

    I use ResOpenList()
    and ResCloseList() within my testcases to make the logging in the results file more readable. However when I run testcases from a scripts main() function, each subsequent test case result is nested under the previous. How do I alleviate this?

    here's some sample output from the .res file:

    [-] Testcase TestCorporateSave (Corp_Profile) - 1 Error
    [ ] *** Error: Function gentag should return a value

    [+] Testcase TestCorporateSave (Corp_Plan) - 2 Errors

    *** Error: Function gentag should return a value



    [This message has been edited by darnold (edited 11-28-2000).]
    Dave
    QA Engineer
    CareBid.com

  2. #2
    Senior Member
    Join Date
    Sep 1999
    Location
    San Jose,CA,USA
    Posts
    340
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Un-nesting test results with ResCloseList( ) ....

    This is kind of a strange question from
    my point of view. I have use these functions myself (I think they are great also).

    Are you basically saying that when
    you run the test casses normally you want
    these functions to perform, and when you
    run them via main you don't??

    I am as you can see confused by the context of the question? I mean the code is preety much doing what you told it to right? So assuming I got what you want maybee you can pass a parameter to the testcase to turn this off?

    Then if you anticipate doing this a bunch
    have a ResOpen and Close function of your own that takes this parameter as input. But
    I dunno sounds like you got wheels within wheels here!!!


    Smoke me a kipper, I'll be back for breakfast!
    Sincerely
    Richard Weth
    Sr. QA Engineer

  3. #3
    Member
    Join Date
    Aug 2000
    Location
    oakland,ca,u.s.a
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Un-nesting test results with ResCloseList( ) ....

    Nope, you misunderstood my question. What I'm saying is the results for separate testcases are not being displayed as separate in the .res file, i.e. say I run 10 testcases from main(). All of the results will appear nested under test1 hierarchical display like so:

    [-]test1 - 1 Error
    hello1
    [-]test2 - 1 Error
    Error
    [-]test3 - Passed
    hello3
    [-]test4 -Passed
    ....
    [+]test10

    if I close the tree for test1 I see this:
    [+]test1 //what happened to the other tests???

    Instead it should appear as:

    [+]test1
    [+]test2
    [+]test3
    ....
    [+]test10
    Dave
    QA Engineer
    CareBid.com

  4. #4
    Member
    Join Date
    Aug 2000
    Location
    oakland,ca,u.s.a
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Un-nesting test results with ResCloseList( ) ....

    I forgot to mention that the entire reason for this problem is that I'm using ResOpenList() in the beginning of the testcase() and some exception or early exit from the testcase is not calling ResCloseList() before exiting, thus the list is still open so subsequent prints to the result file will continue under the last open list.

    The problem is how can you anticipate that a Result List was open when you get an exception? Calling "ResCloseList()" when no result list is open causes an exception and your test run will abort. Even if you use "Do Except" to handle your exceptions, how do you know if the result list was Opened or Closed already? I am unaware of anyway to check if a result list is closed
    or open.

    Dave
    Dave
    QA Engineer
    CareBid.com

  5. #5
    Member
    Join Date
    Aug 2000
    Location
    oakland,ca,u.s.a
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Un-nesting test results with ResCloseList( ) ....

    Nice Solution...Very clean. By separating the ResCloseList() into a single statment inside the function ResClean(), there's only one possibly exception "No List Open", so catch it and ignore it if it occurs. I will put this to use. Thanks Rick!

    Dave
    Dave
    QA Engineer
    CareBid.com

  6. #6
    Senior Member
    Join Date
    Aug 1999
    Location
    MA
    Posts
    129
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Un-nesting test results with ResCloseList( ) ....

    I'd suggest the following in your testcases, to ensure ResCloseList() is called even if an exception occurs:

    [This message has been edited by styler (edited 11-29-2000).]
    Steven Tyler
    Manager - Performance Engineering

    Kronos Incorporated
    tel: +1 978 947 4219

  7. #7
    Member
    Join Date
    Aug 2000
    Location
    oakland,ca,u.s.a
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Un-nesting test results with ResCloseList( ) ....

    I am very liberal and generous with my use of the ResOpenList() statement so it's not as simple as you propose. Within one testcase I may have 3 or 4 different results lists opened and closed, some are nested within others like so:

    Dave
    QA Engineer
    CareBid.com

  8. #8
    Senior Member
    Join Date
    Sep 1999
    Location
    San Jose,CA,USA
    Posts
    340
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Un-nesting test results with ResCloseList( ) ....

    Ok if you want to stick with the simplistic approach I showed before there is really only one issue. You cannot start a main
    ResOpen List because ResClean will "mess it up for you by closing it after the first test".

    If you can live with that it will work great. Since the Test Case report tends to open it's own list report anyway I think it will look good without the extra ResOpen in the main anyhow. The only enhancement is in ResClean just keep looping closing open res lists UNTILL you get an exception and handle that.

    By the way I somehow knew you would be very generous indeed with ResOpen .. seems like no test case can employ just one:

    Ok that is my final word on this one .. for some reason it this problem stuck with me!

    Smoke me a kipper, I'll be back for breakfast!
    Sincerely
    Richard Weth
    Sr. QA Engineer

  9. #9
    Member
    Join Date
    Aug 2000
    Location
    oakland,ca,u.s.a
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Un-nesting test results with ResCloseList( ) ....

    Thanks Rick, you're very persistent and it's appreciated. Your solution is very simple and effective. I now ask myself...why didn't I think of that?

    Dave
    Dave
    QA Engineer
    CareBid.com

  10. #10
    Senior Member
    Join Date
    Sep 1999
    Location
    San Jose,CA,USA
    Posts
    340
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Un-nesting test results with ResCloseList( ) ....

    Aha Now I get it!!

    See what you think of this:


    Only problem is .. hmmm if you don't have an error you will close off your main list after tst1 .. bummer! Let me think about it some more!



    [This message has been edited by rick_weth (edited 11-29-2000).]
    Smoke me a kipper, I'll be back for breakfast!
    Sincerely
    Richard Weth
    Sr. QA Engineer

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 02:29 PM.

Copyright BetaSoft Inc.