On 6 April 2010 16:52, Bob McConnell <r...@cbord.com> wrote:
> I have a test harness set up with a series of Selenium test scripts.
> Each script tests a specific scenario on my web site. But I have some
> scenarios that I want to test multiple times with different data entered
> each time. Currently I am using environment parameters to pass the test
> data into each script. But that doesn't work for multiple passes, since
> I have no way to save the base data and restore it after modifying it.
>
[snip]
>
> Is there a cleaner way to pass those variables into each test script?
>
> How can I make this loop through some tests multiple times with
> different sets of data each time?

Hi Bob,

I suppose you could group your variables by testcase and put them into
a configuration file (say testcases.yml) and get each test to read in
the configuration using Config::Any. With Config::Any you can use most
config file formats: XML, YAML, JSON, .ini, etc.

Also you can use prove.exe to run tests under harness rather than
using your perl one-liner. http://search.cpan.org/perldoc?prove for
details though I normally just do "prove -bv t/*.t".

Phil

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to