Re: [Wtr-general] error with running a testsuite
Change your method name from default_test to test_default. test/unit thinks method is a test only when method name starts with test_. No tests were specified. error means that you do not have any method which name starts with test_. -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] error with running a testsuite
Can you post the complete code for your unit tests? I notice the `ie` not found variable; I'm assuming you have either: a) tried to create a Watir IE object like: myIE = ie.start( www.url.com ) - in this case the Watir IE object must be capitalized b) created your Watir IE object correctly like myIE = IE.start( www.url.com ) but make this variable only local to the setup(() method. If you define your ie variable in the setup method you must make it global, like $ie = IE.start( www.url.com ). These are just some suggestions based on what I see here. Hope this help, Nathan Christie - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6256messageID=17598#17598 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] error with running a testsuite
Try changing the name of the test method from 'newprojectso' to 'test_01_newprojectso'. Test::Unit looks for methods that start with 'test_'. John --- sarita [EMAIL PROTECTED] wrote: I got this error while running a test thru testsuite: Loaded suite C:/TESTSU~1.RB Started FE Finished in 15.124 seconds. 1) Failure: default_test(TC_newprojectso) [c:/ruby/lib/ruby/1.8/Test/Unit.rb:278 C:/TESTSU~1.RB:44]: No tests were specified. 2) Error: default_test(TC_newprojectso): NameError: undefined local variable or method `ie' for #TC_newprojectso:0x34be648 C:/TESTSU~1.RB:40:in `teardown' 1 tests, 1 assertions, 1 failures, 1 errors My code was like this: require 'Test/Unit' require 'watir/WindowHelper' require 'watir' class MyTests include Watir def self.suite suite = Test::Unit::TestSuite.new suite TC_newprojectso.suite return suite end end class TC_newprojectso Test::Unit::TestCase def setup --- end def teardown --- end def newprojectso end end How to avoid this error - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6256messageID=17585#17585 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/features_spam.html ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] error with running a testsuite
sarita wrote: def self.suite suite = Test::Unit::TestSuite.new suite TC_newprojectso.suite return suite end end Why are you doing this? ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] error with running a testsuite
I replaced ie with $ie throughout the code. The second error didn't come, but the first one still coming. This time in testsuite, I used two tests the following error came: C:\testsuite.rb Loaded suite C:/TESTSU~1.RB Started FF Finished in 34.139 seconds. 1) Failure: default_test(TC_newprojectsoisec) [c:/ruby/lib/ruby/1.8/test/Unit.rb:278 C:/TESTSU~1.RB:101]: No tests were specified. 2) Failure: default_test(TC_newprojectsounity) [c:/ruby/lib/ruby/1.8/test/Unit.rb:278 C:/TESTSU~1.RB:101]: No tests were specified. 2 tests, 2 assertions, 2 failures, 0 errors - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6256messageID=17636#17636 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general