tags:

views:

132

answers:

2

I'm currently building a suite of Watir tests for my .net web application.

I have wired the watir tests into the Thoughtworks Cruise continuous build using Rake.

What is the best way to pass a number of server urls to the watir tests so I can run the tests against a number of different environments? e.g. build, test, uat etc.

Cheers!

A: 

I store server URLs simply in a variable. If there are more than one, array could be useful. You can store them in a file (YAML format is popular). What is the problem you are trying to solve? URLs are changing a lot?

Željko Filipin
Hi, thanks for taking the time to help.. So the problem is I want to use the same 12 test scripts against 3 different environments - buid, test, uat. I want the test scripts to stay the same and just the configuration of the cruise/rake build task to change. A yaml file sounds like a good option, will take a look. Thanks!
j3r3m7
Yes, yaml was perfect, thanks for the suggestion.
j3r3m7
I am glad I could help. :) Thanks for accepting the answer.
Željko Filipin
A: 

j3r3m7 How did you set the url variable in the yaml file? I've had success importing Watir settings into the scripts, but not the variables for said scripts. An example would be much appreciated. Thanks.

NooannoB