J
Joshua Antony
Hi All,
I am working on modifying existing watir scripts, which are written in
the below format.
method_func1.rb , method-func2.rb and so on...
Each of these scripts have many methods which use assertions as
required, however these scripts are NOT test cases i.e they do NOT
extend Watir::TestCase
For testing these, there is a single test class written as below-
class TS_Smoke < Watir::TestCase
def test_smoke
func1 = Func1.new
func1.someMethod
func2 = Func2.new
func2.someMethod
..........
end
end
The problem with this is that I am not able to test the different
functionality independently , i.e testing only method_funnc1.rb and not
the other scripts.
Is there a way by which we can create test script for each module (i.e
extend Watir::TestCase) and then have a suite(like the one used in
JUnit) from which to execute these test cases?
And, I also believe that the best place to use assertion is in the test
class and not in normal ruby class - please correct me if I am wrong
Regards,
Joshua
I am working on modifying existing watir scripts, which are written in
the below format.
method_func1.rb , method-func2.rb and so on...
Each of these scripts have many methods which use assertions as
required, however these scripts are NOT test cases i.e they do NOT
extend Watir::TestCase
For testing these, there is a single test class written as below-
class TS_Smoke < Watir::TestCase
def test_smoke
func1 = Func1.new
func1.someMethod
func2 = Func2.new
func2.someMethod
..........
end
end
The problem with this is that I am not able to test the different
functionality independently , i.e testing only method_funnc1.rb and not
the other scripts.
Is there a way by which we can create test script for each module (i.e
extend Watir::TestCase) and then have a suite(like the one used in
JUnit) from which to execute these test cases?
And, I also believe that the best place to use assertion is in the test
class and not in normal ruby class - please correct me if I am wrong
Regards,
Joshua