SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1
    Member
    Join Date
    May 2000
    Location
    NY
    Posts
    52
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    + / - of dynamic declarations vs. use of declaration files

    There is some debate where I work going on regarding whether it is preferable to create and maintain declarations files, or to learn many objects dynamically as they appear through a testcase. I know that SQA robot takes the 'dynamic' approach, and learns its objects as it runs across them.

    Does anyone have any opinions on the advantages / disadvantages on each approach, and when one might make more sense than the other ?


    Thanks,
    Joe V.

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

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: + / - of dynamic declarations vs. use of declaration files

    Declaration vs Dynamic:

    Dynamic:

    1) requires no maintenance

    Declaration files:

    2) requires maintenance

    Should use dynamic declaration where it is easy and possible to do.



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

  3. #3
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: + / - of dynamic declarations vs. use of declaration files

    One advantage that I know from the 'use of declaration files' is that your lines of codes will be much shorter. So even if you can type 60 wpm, I'm sure you would prefer the shorter version especially if you have to write hundreds/thousands of scripts. Of course, if SilkTest recognizes all objects in your AUT, you can eliminate most of the typing by using the Recorder but, if your AUT is full of Custom objects, then the Recorder option is not applicable.

    For example:
    Declared:
    Notepad.Find.Cancel.Click ()
    vs
    Dynamic:
    MainWin("Notepad|Untitled*$C:\WINNT\system32\notep ad.exe").DialogBox("Find").PushButton("Cancel").Cl ick ()


    Another advantage with using declaration files is probably related to all or most of the SilkTest materials (from the SilkTest training courses to the SilkTest documentation down to the SilkTest Online Help and examples) where majority of things discussed/illustrated is showing the use of declaration files. So for new users of SilkTest, there isn't much articles about dynamic declarations.

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


    [This message has been edited by Gilbert (edited 04-02-2001).]

    [This message has been edited by Gilbert (edited 04-03-2001).]

  4. #4
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: + / - of dynamic declarations vs. use of declaration files

    It's not true to say that using dynamic recognition of objects reduces maintenance. If you have declaration files for your windows then if the tag for a control changes (e.g. caption is altered), it requires exactly one change in your scripting code - in your declaration file.
    On the other hand, if you use dynamic recognition of windows (as in the example:
    MainWin("Notepad|Untitled*$C:\WINNT\system32\notep ad.exe").DialogBox("Find").PushButton("Cancel").Cl ick ()

    then a control may be referenced more than once in your scripts, making you take longer maintaining the tags. Also, having the tags scattered about your scripts makes such maintenance more difficult than if there is just one reference in one place which is pretty trivial to find.

    Using either dynamic or declared tags, you will need to perform maintenance. Have declared tags means more effort involved in writing your scripts the first time round, but a lot less effort when maintaining them.

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

  5. #5
    Member
    Join Date
    May 2000
    Location
    NY
    Posts
    52
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: + / - of dynamic declarations vs. use of declaration files

    Another point to consider is readability. On a dynamic Web app with multiple nested tables, the object path is very long, and quite often, the tag name may not at all reflect what the object is.

    While it has always been a goal of mine (and a selling point for Segue), that the created scripts can be made very readable (almost self-documenting), I have rarerly achieved it witout enormous tweaking of the declarations files.


    Regarding the point that using declarations eases maintenance because a change to an added object or changed caption need only be made in one place, I strongly agree for small changes. HOWEVER, my experience in tweaking the declarations file for larger software changes has been that it is almost always easier to record a new declarations file and modify it than try to figure out how to tweak the old declarations file to allow my previously recorded scripts to work with the new software revision. This would incline me to give equal waiting to the dynamic approach - either the time is spent integrating the new declarations file, or re-recording the testcases. (Anyone have the same experience ?)

    My intuitition tells me that the declarations file offers many advantages, I just can't seem to find a convincing supporting argument.



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

  6. #6
    Senior Member
    Join Date
    Jul 2002
    Location
    Paris (France)
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: + / - of dynamic declarations vs. use of declaration files

    What about trully dynamic declarations that are found at run time. Thus, the page can change and your code doesn't break.

    I have my whole suite done this way - with a few tweaks to make it run almost as fast as the static declarations. There is no maintaince - as long as they don't change the DOM tags. The development time has also been greatly reduced since I am not spending the time to "clean-up" the declarations or the time to find the object path for each method that uses it.



    ------------------
    David Genrich
    Blackhog
    932 Hamlin Court
    Sunnyvale, CA 94089
    dgenrich@blackhog.com

  7. #7
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: + / - of dynamic declarations vs. use of declaration files

    DavidG,

    Can you elaborate a bit on how you're using SilkTest to do this? I'm intrigued by this whole discussion...



    [This message has been edited by DJGray (edited 04-04-2001).]

  8. #8
    Member
    Join Date
    May 2000
    Location
    NY
    Posts
    52
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: + / - of dynamic declarations vs. use of declaration files

    In discussing this topic with one of my "WinRunner" friends, I learned that another good reason to use declarations files is to allow a separate 'technical' automation group to own and maitain the object recognition portions of a test suite, while leaving it to the 'manual' test group to record and define the test data.

    If dynamic declarations are used, application changes must be modified by re-recording test scripts. With a declarations file, the automation specialists need not become domain experts to maintain automated tests, they just update the declarations files.

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

  9. #9
    Senior Member
    Join Date
    Mar 2000
    Location
    Dublin, Ireland
    Posts
    152
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: + / - of dynamic declarations vs. use of declaration files

    Hi,

    From my own experiences the dynamic approach can have a huge maintenance overhead if objects needed to be explicitly referenced and tested. However, if you have tests for groups of objects or object classes as opposed to individual objects then there are time savings, adopting the dynamic approach. For example, to test that all textfields on a window only take alphanumeric characters or to verify that all links on a web page correctly load the associated underlying anchor URLs. Even with these examples there is a drawback in that they really only save time if the application / web site is quite flat. Once you have to start drilling down through dialogs or links then the best approach is to declare your windows.

    The important thing to remember is that with the static declaration approach an object is declared once and can be referenced many times. During the AUT's development lifecycle, if an object changes only the object's declaration needs to change and any references to the object across the suite of testcases do not need to be modified.

    John.

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

    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com
    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com

  10. #10
    Senior Member
    Join Date
    Jul 2002
    Location
    Paris (France)
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: + / - of dynamic declarations vs. use of declaration files

    I am in the process of writing up a tutorial on how to do totally dynamic declarations that require no maintenance - even if new objects are added or if the underlying hidden tables change (unless they change the name of the object).

    The tutorial is a combination of some specialized libraries that allow for better performance and a methodology for coding that alows for a pretty fast development cycle. The tutorial will also be done using a dynamic web site rather than the blain (and easily automateable) GMO web site. I just started on it this weekend, and will try to get it out as soon as I can, but I am also quite busy at work at the moment getting performance testing going.

    Watch the SilkTest board here on BetaSoft for the posting of it.



    ------------------
    David Genrich
    Blackhog
    932 Hamlin Court
    Sunnyvale, CA 94089
    dgenrich@blackhog.com

 

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

Copyright BetaSoft Inc.