Generating raport

L

Luke

I practice at ruby and I've done some example test case,now I would
like to
create test suite and generate report
can someone look at this code and explain me what's wrong? I still get
message :

C:/Test/ruby/lib/ruby/site_ruby/1.8/test/unit/ui/reporter.rb:63:in
`run':
uninitialized constant Test::Unit::UI::Reporter::StringIO (NameError)
from
C:/Testy/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
C:/Testy/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from
C:/RadRails/plugins/org.rubypeople.rdt.testunit_0.8.0.604272100PRD/ruby/RemoteTestRunner.rb:260
thnx4help

require 'watir'
include Watir

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

class AttachClass<Test::Unit::TestCase
def test_example
#some code
end
end

begin
Test::Unit::UI::Console::TestRunner.new(AttachClass.suite).start
suite = Test::Unit::TestSuite.new
suite << AttachClass.suite
FileUtils.mkdir_p 'build/report'
Test::Unit::UI::Reporter.run(suite, 'build/report',:html)
end
 

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

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,743
Latest member
WoodrowMea

Latest Threads

Top