class Spectator::Report

Overview

Outcome of all tests in a suite.

Defined in:

spectator/report.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Object

should(matcher, message = nil) should, should_eventually(matcher, message = nil) should_eventually, should_never(matcher, message = nil) should_never, should_not(matcher, message = nil) should_not

Constructor Detail

def self.new(examples : Array(Example), runtime, counts : Counts, random_seed = nil) #

Creates the report. The examples are all examples in the test suite that were selected to run. The runtime is the total time it took to execute the suite. The counts is the number of examples for each type of result. The random_seed is the seed used for random number generation.


[View source]

Class Method Detail

def self.generate(examples : Enumerable(Example), runtime, random_seed = nil) #

Generates the report from a set of examples.


[View source]

Instance Method Detail

def counts : Counts #

Number of examples of each result type.


[View source]
def example_runtime #

Length of time it took to run just example code. This does not include hooks, but it does include pre- and post-conditions.


[View source]
def examples : Array(Example) #

Retrieves all examples that were planned to run as part of the suite.


[View source]
def failures #

Returns a collection of all failed examples.


[View source]
def overhead_time #

Length of time spent in framework processes and hooks.


[View source]
def pending #

Returns a collection of all pending (skipped) examples.


[View source]
def random_seed : UInt64? #

Seed used for random number generation.


[View source]
def random_seed? : UInt64 | Nil? #

Seed used for random number generation.


[View source]
def runtime : Time::Span #

Total length of time it took to execute the test suite. This includes examples, hooks, and framework processes.


[View source]