This may be more of a test/unit question than a watir question...
I have a test case, based on the Test::Unit::TestCase. How does one pass data
to the test in such a way that the test can be run multiple times with
different data.
For example:
class TC_CreateOrder < Test::Unit::TestCase
def test_NewOrder
assert "order successful"
end
end
Now, I want to be able to generate a new order for various order types, (TYPE1,
TYPE2, TYPE3, etc.)
class TS_OrderTests
def self.suite
suite = Test::Unit::TestSuite.new
suite << TC_CreateOrder.suite # TYPE1 goes here
suite << TC_CreateOrder.suite # TYPE2 goes here
suite << TC_CreateOrder.suite # TYPE3 goes here
return suite
end
end
Test::Unit::UI::Console::TestRunner.run(TS_OrderTests)
How do I pass the order type to the test, such that the test runs multiple
times, once for each order type.
Thanks in advance.
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general