SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Mar 2002
    Location
    Pune, MH, India
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pros/Cons of writing class instead of capturing ?

    Hi,

    To test one of web based application, I have prepared test cases as follows.

    Captured window using SilkTest's Record Window Declarations feature and stored in INC files.
    Wrote source code and stored in .t file.

    Instead of capturing I plan to create a class for window as follows.

    [-] winclass MyDialog : DialogBox
    [-] PushButton OK
    [ ] tag "OK"
    [-] PushButton Cancel
    [ ] tag "Cancel"
    [-] StaticText Message
    [ ] tag "#1"
    [ ]

    What are advantages and disadvantages of this approach ?

    [Niteen]


    ------------------

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pros/Cons of writing class instead of capturing ?

    There is no advantage to exclusively performing one OR the other, because they are complimentary activities.

    Record Window Declarations saves time by quickly identifying and capturing the contents of whole windows and dialogs.

    Reviewing those declarations to identify common attributes and characteristics and moving them into classes is good coding practice which can reduce long term maintenance.


    John


    ------------------

  3. #3
    Member
    Join Date
    Oct 2001
    Posts
    93
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pros/Cons of writing class instead of capturing ?

    As John says, these activities go hand in hand. If you create your new window class before recording your window declaration, you will find that when you record window declarations, all DialogBoxes will actually be recorded as MyDialogBox. This may or may not be a good thing depending how generic your new window class is in your application.

    Paul

    ------------------
    Paul Tucker
    Merit AT
    www.merit-at.com
    Paul Tucker
    Merit AT
    www.merit-at.com

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pros/Cons of writing class instead of capturing ?

    To avoid what Paul mentions of every new recorded declaration showing up as your new class, put the following into your class at the top:
    setting DontInheritClassTag = TRUE

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  5. #5
    Member
    Join Date
    Mar 2002
    Location
    Pune, MH, India
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pros/Cons of writing class instead of capturing ?

    Hi,
    Thanks guys for your valuable inputs.
    I liked suggestion of dcreed.

    [Niteen]


    ------------------

 

 

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 08:56 PM.

Copyright BetaSoft Inc.