class Cucumber::Formatter::Junit
def build_testcase(result, scenario_designation, output)
def build_testcase(result, scenario_designation, output) duration = ResultBuilder.new(result).test_case_duration @current_feature_data[:time] += duration classname = @current_feature_data[:feature].name filename = @current_feature_data[:uri] name = scenario_designation testcase_attributes = get_testcase_attributes(classname, name, duration, filename) @current_feature_data[:builder].testcase(testcase_attributes) do if !result.passed? && result.ok?(strict: @config.strict) @current_feature_data[:builder].skipped @current_feature_data[:skipped] += 1 elsif !result.passed? status = result.to_sym exception = get_backtrace_object(result) @current_feature_data[:builder].failure(message: "#{status} #{name}", type: status) do @current_feature_data[:builder].cdata! output @current_feature_data[:builder].cdata!(format_exception(exception)) if exception end @current_feature_data[:failures] += 1 end @current_feature_data[:builder].tag!('system-out') do @current_feature_data[:builder].cdata! strip_control_chars(@interceptedout.buffer_string) end @current_feature_data[:builder].tag!('system-err') do @current_feature_data[:builder].cdata! strip_control_chars(@interceptederr.buffer_string) end end @current_feature_data[:tests] += 1 end