SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Mar 2001
    Location
    Mexico
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Parellel Testing

    I try to make a parallel testing runing the same script in two diferente target machines, my script use an include file with some variables declarations so I have abnormal behavior of the script, my question is: in this type of test all the variables are shared in each thread or only those variables that are declared in of the .inc file?

    Any comments, thanks in advance.

    ------------------
    Carlos Alvarez
    Test Engineer, GDL MX.

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

    Re: Parellel Testing

    Global variables are shared between the threads (and therefore carry the danger of two threads trying to alter them 'simultaneously'). Local variables can be declared with a limited scope, such that each thread has it's own set of local variables, which will not be shared.
    I recommend reading the chapter in the user guide on "Implementing Client/Server Testing", which gives full details about these issues, including "shareable" global variables.
    Also look up the SetMachineData() and GetMachineData() functions, which come in useful in these situations.

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

  3. #3
    Member
    Join Date
    Mar 2001
    Location
    Mexico
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Parellel Testing

    In fact I need that the global variables were unique for each thread, but I see that is not possible, I need to modify the scripts. Thanks for your help Vince.

    ------------------
    Carlos Alvarez
    Test Engineer, GDL MX.

  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Parellel Testing

    Welcome to the "obscure" corner of SilkTest
    The "share" and "access" keywords are used for multiple threads.

    Declare a variable as share

    share LIST OF STRING lsItems

    Then to use the variable
    access lsItems
    ListAppend (lsItems, sNew)

    This will prevent other threads from accessing the variable at the same time.

    Hope this helps


    ------------------
    John W Green
    jwgreen@automationexpertise.com
    http://www.automationexpertise.com

  5. #5
    Member
    Join Date
    Mar 2001
    Location
    Mexico
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Parellel Testing

    Thanks John!!

    ------------------
    Carlos Alvarez
    Test Engineer, GDL MX.

 

 

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:20 AM.

Copyright BetaSoft Inc.