SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Jan 2002
    Location
    Hyderabad, Andhra Pradesh, India
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How a variable can be shared across sub plans

    I had a test plan which again has sub test plans. I wish to make a common variable available to all the scripts in all sub test plans. Can some one suggest me how to get it?

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

  2. #2
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How a variable can be shared across sub plans

    need to define a global variable in one of your include files and make sure all plans point to this inc

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  3. #3
    Senior Member
    Join Date
    Jun 2000
    Location
    Sunyyvale CA USA
    Posts
    422
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How a variable can be shared across sub plans

    declare it as global string stemp and add the following
    use "include file name.inc"

    in all testcases to make the testcases share this.

    ------------------
    Sree
    Sree

  4. #4
    Junior Member
    Join Date
    Jan 2002
    Location
    Hyderabad, Andhra Pradesh, India
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How a variable can be shared across sub plans

    i had different '.inc ' files for different sub test plans. And when i say "use filename.inc" only one inc file name is accepting. so again the problem of sharing a common variable remained for me.

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

  5. #5
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How a variable can be shared across sub plans

    why don't you use a common .inc file that they will all use to define the variable?

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  6. #6
    Junior Member
    Join Date
    Nov 2001
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How a variable can be shared across sub plans

    Hardly what I would describe as an ideal solution, but you can always write your variable to a .ini file, and read it from there with all of your subplans. I think it's more useful for values that you want to retain even when the testplan is over, (for example, a value you increment every time the testplan is run, etc.), but it would work in your case as well.

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

 

 

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

Copyright BetaSoft Inc.