Need help with Report and Logging capabilities with Test::Unit

S

Sagar Neve

Hi,
I am new to whole unit testing thing. I am starting to use
Test::Unit.

I need to run a bunch of test-cases on my device.

What I would like to know is Reporting/Resulting and Logging
capabilities of Test::Unit.

For example:
1) I would like to know what all "test_xxx" tests have failed in one
go at the end [ sort of aggregation]?

2) what type of logs can it be maintained by Test::Unit ?

3) If it does not support anything maintaining such information by
flat file system is the only way or is there any other way?

PS: I know there something like Test::Unit::TestResult ; please
provide sample-code for its usage, if thats the only way.

Just for more clarity below is the structure of my scripts:.

require "common.rb" # This will contain the common work/
functionalities needed.

Class ABC < Test::Unit::TestCase

def setup
end

def teardown

puts "#{@method_name} => " #{@test_passed }" # this is what currently
is used to know the pass/true fail/false

end

def test_One
# Some work for test-One.
end

def test_Two
# Some work for test-Two.
end


def test_Three
# Some work for test-Three.
end


def test_Four
# Some work for test-Four.
end
....
....
....
end
 
S

Sagar Neve

Hi,
I am new to whole unit testing thing.  I am starting to use
Test::Unit.

I need to run a bunch of test-cases on my device.

What I would like to know is Reporting/Resulting and Logging
capabilities of Test::Unit.

For example:
1) I would like to know what all "test_xxx" tests have failed in one
go at the end [ sort of aggregation]?

2) what type of logs can it be maintained by Test::Unit ?

3) If it does not support anything maintaining such information by
flat file system is the only way or is there any other way?

PS: I know there something like  Test::Unit::TestResult ; please
provide sample-code for its usage, if thats the only way.

Just for more clarity below is the structure of my scripts:.

require "common.rb"  # This will contain the common work/
functionalities needed.

Class ABC < Test::Unit::TestCase

def setup
end

def teardown

puts "#{@method_name} => " #{@test_passed }"  # this is what currently
is used to know the pass/true fail/false

end

def test_One
# Some work for test-One.
end

def test_Two
# Some work for test-Two.
end

def test_Three
# Some work for test-Three.
end

def test_Four
# Some work for test-Four.
end
...
...
...
end



Anyone ???
 

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,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top