class Spectator::Formatting::JUnitFormatter

Overview

Produces a JUnit compatible XML file containing the test results.

Defined in:

spectator/formatting/junit_formatter.cr

Constructors

Instance Method Summary

Instance methods inherited from class Spectator::Formatting::Formatter

close close, dump_failures(_notification) dump_failures, dump_pending(_notification) dump_pending, dump_profile(_notification) dump_profile, dump_summary(_notification) dump_summary, example_error(_notification) example_error, example_failed(_notification) example_failed, example_finished(_notification) example_finished, example_passed(_notification) example_passed, example_pending(_notification) example_pending, example_started(_notification) example_started, message(_notification) message, start(_notification) start, start_dump start_dump, stop stop

Instance methods inherited from class Object

should(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should(matcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should
, should_eventually(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_eventually, should_never(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_never, should_not(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should_not(matcher : Spectator::Matchers::NilMatcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not(matcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not

Constructor Detail

def self.new(output_path = OUTPUT_FILE) #

Creates the formatter. The output_path can be a directory or path of an XML file. If the former, then an "output.xml" file will be generated in the specified directory.


[View source]

Instance Method Detail

def close #

Invoked at the end of the program. Allows the formatter to perform any cleanup and teardown.


[View source]
def dump_summary(notification) #

Invoked after testing completes with summarized information from the test suite. Unfortunately, the JUnit specification is not conducive to streaming data. All results are gathered at the end, then the report is generated.


[View source]
def start(_notification) #

Prepares the formatter for writing.


[View source]