I don't know, what process creates the "Terminated"-message, but you could try the following:
Add a
def setup
puts "Start test #{self.__name__}"
STDOUT.flush
end
def teardown
puts "Finished test #{self.__name__}"
STDOUT.flush
end
to all of your tests.
Example:
require 'test/unit'
class Mytest < Test::Unit::TestCase
def test_1
assert_equal(1,1)
end
def test_2
assert_equal(1,1)
exit 1 ##stops the execution
end
def test_3
assert_equal(1,1)
end
end
results in
Loaded suite test
Started
.>Exit code: 1
The test is stopped and you don't see where. I hope this is a similar situation to your "Terminate"-message.
Now add some code:
require 'test/unit'
class Mytest < Test::Unit::TestCase
def setup
puts "Start test #{self.__name__}"
STDOUT.flush
end
def teardown
puts "Finished test #{self.__name__}"
STDOUT.flush
end
def test_1
assert_equal(1,1)
end
def test_2
assert_equal(1,1)
exit 1 ##stops the execution
end
def test_3
assert_equal(1,1)
end
end
This results in:
Loaded suite test
Started
Start test test_1
Finished test test_1
.Start test test_2
Finished test test_2
The last mentioned test_2
is the one with the problem.
You may also add the setup
and teardown
to each TestCase (but if you have own definitions ot setup/teardown they will not contain the testcode).
require 'test/unit'
class Test::Unit::TestCase
def setup
puts "Start test #{self.__name__}"
STDOUT.flush
end
def teardown
puts "Finished test #{self.__name__}"
STDOUT.flush
end
end
Don't forget to remove the code - it is only to identify where your problem may be.