add executed commands to JUnit error output

This commit is contained in:
Johan Holmberg 2016-11-28 14:59:34 +01:00
parent 4164dd7752
commit 592005f808

View File

@ -48,9 +48,15 @@ module Cmdtest
def testmethod_begin(method)
@err_assertions = []
@err_skip = nil
@progress = []
@t1 = Time.now
end
def cmdline(cmdline_arg, comment)
@progress << ">>> cmdline: #{cmdline_arg}\n"
@progress << ">>> comment: #{comment}\n" if comment != nil
end
def testmethod_end(method)
@t2 = Time.now
@duration = @t2 - @t1
@ -62,7 +68,7 @@ module Cmdtest
elsif @err_assertions.size > 0
message = @err_assertions[0].split(/\n/)[0]
type = "assert"
text = @err_assertions.join
text = [@progress + @err_assertions].join
@ts.err_testcase(@duration, _xml_class, method, message, type, text)
else
@ts.ok_testcase(@duration, _xml_class, method)