SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Aug 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pointing to different environments

    Thank you for all answering my earlier newbie question. Here's another one -
    I develop scripts pointing to our QA environment and that is where most of the testing is done. However, I will have to occassionaly run scritps pointing to our production environment. Obviously the URLs are different and this will throw the scripts off.
    I appreciate your suggestions.

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

  2. #2
    Member
    Join Date
    Mar 2001
    Location
    nashville, tn, usa
    Posts
    86
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pointing to different environments

    We have setup a configuration include file for the test scripts.

    In the config file, there are string pointers to the different environments.
    sEnvironmentURL = http://production
    or
    sEnvironmentURL = http://qa

    Within the test scripts, all URL references are relative.
    Change http://production/homepage.html
    to
    {sEnvironmentURL}/homepage.html

    When you need to run in different environments, you just comment and uncomment in the configuration include file.



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

  3. #3
    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: Pointing to different environments

    Always keep in the back of your mind the idea of script portability. You'll want to identify anything that will tie your script to a particular machine or environment (paths, usernames, ip addresses, etc.) and define those as variables outside your script. There are a number of ways to do this. Our team uses an ini file. Others will prefer a database or a flat file. Choose what works best for you, but certainly choose something because as you have seen, hard coded data ties your script to one machine or environment.



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

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

    Re: Pointing to different environments

    I have an include file for each environment that defines all of the approriate constants, variables, and even a special function that is different in each: "EnvironmentXXX.inc" and "EnvironmentYYY.inc".

    On each test machine I then define a SilkTest compiler constant called "EnvironmentConfigFile" which is set to one of these.

    All of my other ".t" and ".inc" files then start with "use EnvironmentConfigFile".
    I can then point my tests to either environment by editing the compiler constant.

    ------------------
    Rob Kapteyn

    [This message has been edited by RobKapteyn (edited 10-10-2002).]
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

 

 

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 02:16 AM.

Copyright BetaSoft Inc.