[resurrecting an old thread]

the code Chris supplies below is useful in that I can use it to run all
tests in a given directory.

I've been struggling with how to package these tests into suites so I
can produce output with Test::Unit::Reporter

That is, I want to replace code like this with something more general:

require 'test/unit/ui/console/testrunner'
require 'test/unit/ui/reporter'

require 'TC_TestCase'

class TS_Suite
  def self.suite
    suite = Test::Unit::TestSuite.new('A Test Suite')
      suite << TC_TestCase.suite
    return suite
  end
end

Test::Unit::UI::Reporter.run(TS_Suite, 'C:/TestOutput/Sample')

Any ideas?


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris McMahon
Sent: Wednesday, May 24, 2006 12:51 PM
To: [email protected]
Subject: Re: [Wtr-general] Grouping Test Cases

On 5/24/06, Adrian Rutter <[EMAIL PROTECTED]> wrote:
>
> Could anyone tell me how they are grouping test cases and running 
> suites within Watir?
>

#run_suite.rb
topdir = File.join(File.dirname(__FILE__)) Dir.chdir topdir do
  tests = Dir["test*"]
  tests.each{|x| require x}
end

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to