SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Jan 2003
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    function or scripts ????

    hi,

    i have around 31 scripts which does various operations. i'll be calling these scripts from other scripts whenever needed.

    My question is: if i change these 31 scripts into a single compiled module with 31 functions, will that be of any use(like speed,memory related issues).

    thanks in advance.
    kcm

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

  2. #2
    Senior Member
    Join Date
    Mar 2002
    Location
    Irvine, CA 92606 USA
    Posts
    384
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: function or scripts ????

    Speed and Organization.

    The ability to load and unload the "Compiled Modules" when running a large number of "Test Scripts". When you have a large number of tests to run and need access to many Functions you can have many "Compiled Modules" loading and Unload them as needed. (to conserve memory)

    Taken from User Manual:

    About Creating Compiled Modules
    A compiled module is a script containing a library of user-defined functions that you want to call frequently from other tests. When you load a compiled module,
    its functions are automatically compiled and remain in memory. You can call them directly from within any test.

    Compiled modules can improve the organization and performance of your tests. Since you debug compiled modules before using them, your tests will require
    less error-checking. In addition, calling a function that is already compiled is significantly faster than interpreting a function in a test script.


    ------------------
    cranem451 - cranem@addendum.com

  3. #3
    Senior Member
    Join Date
    Aug 2002
    Posts
    172
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: function or scripts ????

    I'd prefer a script for significant actions on the GUI and functions for everything else.

    Note, that no checking functions are allowed in compiled modules.

    Another point is that it is often better to use global variables (scalars or arrays) instead of script parameters if the script has arguments. If you use parameters, you will quickly entagle yourself in nightmarish eval("call_close ... statements.This is an aspect of WinRunner that I find most displeasing.

    ------------------
    Cordialement
    Cordialement

  4. #4
    Senior Member
    Join Date
    Mar 2002
    Location
    Irvine, CA 92606 USA
    Posts
    384
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: function or scripts ????

    When you say no "checking functions" are allowed in compiled modules please give several "simple" examples that work in a test script but don't work in a Compiled Module. I am aware that some thing don't work in Compiled Module's but know one has given me the reson why.

    An example would be like this:

    # GUI checkpoint of Menu Items
    win_check_gui("WndNotepad", "list1.ckl", "gui1", 1);

    What other TSL functions do not work in Compiled Module?




    ------------------
    cranem451 - cranem@addendum.com

  5. #5
    Senior Member
    Join Date
    Mar 2002
    Location
    Bangalore,Kar,Ind
    Posts
    112
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: function or scripts ????

    I feel having test functionality in scripts or functionality should be decided more from ease of maintenance than anything else. Because from my experiance I find that speed is rarely a priority in running test scripts.

    Next about some things working or not working in compiled scripts will never be big issue since there is always a work around for most of the things.

    Third talking about using check point functions of winrunner I believe rarely people use these functions especially by those who strongly advocate KeyWord method of test scripting etc.

    So we should be planning our script organisation from maintenance point of view.

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

  6. #6
    Senior Member
    Join Date
    Aug 2002
    Posts
    172
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: function or scripts ????

    I think any checkpoint that takes a file as an argument won't work.

    I've tried with a fully parmetrized db_check statement, which works in a script, but not in a compiled module.



    ------------------
    Cordialement
    Cordialement

  7. #7
    Moderator
    Join Date
    Apr 2001
    Location
    Atlanta, GA, USA
    Posts
    2,167
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0

    Re: function or scripts ????

    Let me toss out an example of simple GUI actions that I've turned into functions:

    Navigation.

    I want to go from Point A to Point B in my application. I can script it, or, if I know that no matter what screen I'm on, I can go to a main point, and navigate from there, I've got one line of code that covers moving from place to place in the app.

    ------------------
    WinAmp. Llama Tested. Mother Approved.
    Jordan Gottlieb
    President, Charlotte Mercury User Group
    Qualitech Solutions, Inc.
    jgottlieb@qualitechsolutions.com
    Jordan Gottlieb
    Senior Consultant, Orasi Software
    Twitter: @JG_QA

 

 

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 10.00%
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 08:12 AM.

Copyright BetaSoft Inc.