New bies question - design of test scripts

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top