class Spectator::Formatting::JUnitFormatter

Overview

Formatter for producing a JUnit XML report.

Defined in:

spectator/formatting/junit_formatter.cr

Constructors

Instance Method Summary

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

end_example(result : Result) end_example, end_suite(report : Report, profile : Profile | Nil) end_suite, start_example(example : Example) start_example, start_suite(suite : TestSuite) start_suite

Instance methods inherited from class Object

should(matcher) should, should_eventually(matcher) should_eventually, should_never(matcher) should_never, should_not(matcher) should_not

Constructor Detail

def self.new(output_dir : String) #

Creates the formatter. By default, output is sent to STDOUT.


[View source]

Instance Method Detail

def end_example(result : Result) #

Called when a test finishes. The result of the test is provided.


[View source]
def end_suite(report : Report, profile : Profile | Nil) #

Called when a test suite finishes. The results from the entire suite are provided. The profile value does nothing for this formatter.


[View source]
def start_example(example : Example) #

Called before a test starts.


[View source]
def start_suite(suite : TestSuite) #

Called when a test suite is starting to execute.


[View source]