SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8

Thread: Debugging issue

  1. #1
    Member
    Join Date
    May 2007
    Location
    Nashville, TN
    Posts
    72
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Debugging issue

    Hi all,
    Usually I write codes in Test Script mode of TestPartner. Also, once the code expands it is pain in the butt to debug. For example, let's say I have 200 line of code. When I press F8 Or from the menu bar Debug-Step Into, no matter where my cursor is....it always puts that debugging arrow to the begging of the line 1 which happens to be Sub Main(). Then I literally have to drag that arrow all the way to line 200 and then click on play button to execute code from line 200.

    TestPartner do have some StepOut info but they don't really demomstrate step by step how to do it.

    Let me summarize it, I want to run the code in debug mode from line 200. How do I do that? If question becomes confusing, please let me know. I will explain.

    Thanks
    Lean and Mean machine

  2. #2
    Member
    Join Date
    Sep 2007
    Location
    Denver, Colorado
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Debugging issue

    Are you saying that you don't want to execute lines 1 - 199 of your code, but start the execution at line 200?

    If you wanted to just stop at line 200 to begin debugging you can put a break point on that line... The execution will start at line 1 and stop for debugging when it hits line 200. Then you can F8 through the code as needed.
    Using TestPartner 6.0 Build 462
    Test Scripts & Visual Tests

  3. #3
    Member
    Join Date
    May 2007
    Location
    Nashville, TN
    Posts
    72
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Debugging issue

    That's right, I don't want to execute line 1 through 199, but I want to start executing from line 200.

    Here is the reason, our app is so big that it contains about 100 different pages. By the time I am at line 200 of code, I am at page 90. I don't want to execute entire code again to reach line 200 in order to test that piece of code. Hence, I want to execute my codes directly from line 200 and skip all the above lines. How do I do that?
    Lean and Mean machine

  4. #4
    Senior Member
    Join Date
    Jun 2007
    Location
    USA
    Posts
    876
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Debugging issue

    Have you tried creating individual scripts and then linking them in a driver script?
    "I think when you spread the wealth around, it's good for everybody." -- Toledo, Ohio, Oct. 12, 2008

  5. #5
    Advanced Member
    Join Date
    Jan 2002
    Location
    Detroit, Michigan
    Posts
    522
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Debugging issue

    Use GoTo to jump over code, e.g.
    <font class="small">Code:</font><hr /><pre> GoTo MyStartPoint

    ' Lines 1 - 199

    MyStartPoint:

    ' Line 200 onewards </pre><hr />

    Better still split the thing into a number of differnt sub routines and use the goto trick, e.g.
    <font class="small">Code:</font><hr /><pre> Sub Main

    GoTo MyStartPoint

    Call Page_1_Sub
    Call Page_2_Sub
    Call Page_3_Sub
    Call Page_4_Sub

    MyStartPoint:
    Call Page_90_Sub

    End Sub</pre><hr />
    //*eggbox

  6. #6
    Member
    Join Date
    May 2007
    Location
    Nashville, TN
    Posts
    72
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Debugging issue

    Thanks guys, I was wondering though whether there is a command which will bring me directly to line 200 and I can start debugging from that point. It was do able in QTP and other automation tools but I couldn't find it in TestPartner.
    Lean and Mean machine

  7. #7
    Moderator
    Join Date
    Jun 2006
    Location
    Spain
    Posts
    630
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Debugging issue

    Why can't you do that with a Eggbox's Goto start point? You start with F8, which goes to sub main, F8 again executes Goto start point, F8 again continues from line 200, which you have labelled as starting point.
    And a bonus is, you can movee start point to anywhere in your code for when you need to debug some other function.

  8. #8
    Senior Member
    Join Date
    Sep 2004
    Location
    Toronto, Canada
    Posts
    555
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Debugging issue

    By the way, this has nothing to do with TestPartner. This is the VBA development environment that they use. It's the same if you use VBA in office programs too.

    You simply cannot start code execution at a specific point without doing what you already are doing, or use goto suggestion.

    Other options:
    - put a breakpoint at the start of your code, and then instead of dragging the yellow "you are here" point to line 200, simply go to (not Goto) the line and right click and choose "Set Next Statement" (or CTRL+F9) and the hit F5
    - comment out all the code you don't want to run

    Aracknid
    TestPartner:
    Current AUT running test scripts on TP 6.3 build 183, SQL 2000 DB.
    Legacy AUT running on TP 5.6.0 Build 81 and TP 6.2 build 449 with SQL 2000 DB.

    Test Environment:
    TP/IE Clients on VMWare ESX 4.1 server, AUT Servers on VMWare ESX 3.5 server.

    Application Under Test (AUT):
    Client/Server based, IE 7/8 interface with SQL 2005/2008 DB.

    Automating with TP since August 2004.

 

 

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 8.57%
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:54 PM.

Copyright BetaSoft Inc.