SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Dec 2001
    Location
    Milpitas
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Tips on making scripts re-usable

    Please let me know some basic tips on how to write scripts that are re-usable. Here's what I'm attempting to do:

    Use Silk 5.5 to create a general testcase that can be run against a single Windows application. This application will of course change versions and therefore change slightly in terms of features. The UI will not change by much if at all as the versions rev. The goal being that I don't want to have to re-do the code every time QA gets a new build of the software.

    I have seen people mention writing code to have as methods or functions that will be called. Is this the way to go, or is there an even better way. Thanks in advance.

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

  2. #2
    Member
    Join Date
    Jan 2002
    Location
    Nuremberg, Germany
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tips on making scripts re-usable

    There are several ways to keep changes on your script small:

    - You mentioned it: Use functions to build your own small library of modules for test actions. This makes your script not only easy to read but leads to the situation that many changes have to be performed only in single places (the modules).

    - New features in the AUT will need new code (no precognition available :-), but in a script like above it's fairly easy to add new test actions to the script since large parts of what you'll need is already implemented in your modules.

    - If you want to run data-driven tests, organize your data in a tree structure according to the functionality you want to test. This allows you add new data for new functionality in a systematic way (and to determine the purpose of test data at once).

    - Keep your script flexible by controlling it by elements of your test data. Switch-case structures etc. allow lots of different test routes in the same script.

    I've made quite good experiences with that, & meanwhile I'm only using a (rather small) script file and an increasing number of functions held in my inc-files.

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

    Re: Tips on making scripts re-usable

    Basic idea in re-using for automation:

    1: static reference is perfect
    2: multi-tag reference is good
    3: nothing is forever, you will have to update the code, as long as you can use the code for the life cycle of the product it's not time wasted. That said automate early is always good(after feature freeze).
    4: separate the testcase with the testing tool. Basically do what Silk has done with VC++/COM to bring us a automation tool.
    5: Use varibles for tags.

    -------
    Don't be too idealistic about the re-using the code for automation. From experience this is not 90% possible in the real world.
    Our code started to be re-usable and then it became a Frenkestein. Silktest changes, product environment changes(ie:OS/IE),and product changes will all affect how the automation works.

    Also what is the point of a permanent QA Eng if everything is static

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

  4. #4
    Junior Member
    Join Date
    Dec 2001
    Location
    Milpitas
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tips on making scripts re-usable

    Thanks for the input. I really appreciate it.
    -Scuzzii

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

  5. #5
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tips on making scripts re-usable

    See Keith Zambelich's whitepaper:

    "Totally Data-Driven Automated Testing" at http://www.sqa-test.com/w_paper1.html

    Personally, I do not believe in "totally" data-driven testing (it leads you to leave out those important special cases).

    But I do agree with 80% of this, particularly the method of "Functional Decomposition".


    ------------------
    Rob Kapteyn
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  6. #6
    Junior Member
    Join Date
    Dec 2001
    Location
    Milpitas
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tips on making scripts re-usable

    Rob. Thanks for the link. I'm reading through it now.

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

  7. #7
    Junior Member
    Join Date
    Mar 2003
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tips on making scripts re-usable

    This is a great white paper. Thanks for sharing.

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

 

 

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 09:19 PM.

Copyright BetaSoft Inc.