B
BenWMills
I'm using Test::Unit along with the Watir framework to run tests
against my website. I would like to be able to do 2 things:
1. Pass in a "server" parameter to allow the tests to be run against
the developement, staging or production sites.
I know how to get parameters using GetoptLong, but I can't figure out
how to pass these to my Test::Unit::TestCase class. I'm new to Ruby,
so forgive me if I'm way off, but it seems that an instance of the
TestCase class is created internally within Test::Unit. I can't see a
way of creating an instance of my TestCase, passing it the server it
should run the tests against and then running the tests.
2. Report any failures via email.
This time I know how to send the email, but I don't know how to access
the failures after the tests have run. I thought that the TestRunner
might give me access to the failures after the tests have run, but it
doesn't seem to be the case.
Any help on these 2 issues would be much appreciated.
Thanks,
Ben Mills
against my website. I would like to be able to do 2 things:
1. Pass in a "server" parameter to allow the tests to be run against
the developement, staging or production sites.
I know how to get parameters using GetoptLong, but I can't figure out
how to pass these to my Test::Unit::TestCase class. I'm new to Ruby,
so forgive me if I'm way off, but it seems that an instance of the
TestCase class is created internally within Test::Unit. I can't see a
way of creating an instance of my TestCase, passing it the server it
should run the tests against and then running the tests.
2. Report any failures via email.
This time I know how to send the email, but I don't know how to access
the failures after the tests have run. I thought that the TestRunner
might give me access to the failures after the tests have run, but it
doesn't seem to be the case.
Any help on these 2 issues would be much appreciated.
Thanks,
Ben Mills