class

Spectator::Report

Inherits Reference / Object

Outcome of all tests in a suite.

Constructors

new(examples : Array(Example), runtime : Time::Span, counts : Counts, random_seed : UInt64 | Nil = 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.

Source

Class methods

generate(examples : Enumerable(Example), runtime, random_seed = nil)

Generates the report from a set of examples.

Source

Instance methods

counts

Number of examples of each result type.

Source
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.

Source
examples

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

Source
failures

Returns a collection of all failed examples.

Source
overhead_time

Length of time spent in framework processes and hooks.

Source
pending

Returns a collection of all pending (skipped) examples.

Source
random_seed

Seed used for random number generation.

Source
random_seed?

Seed used for random number generation.

Source
runtime

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

Source

Nested types