class Spectator::Report
- Spectator::Report
- Reference
- Object
Overview
Outcome of all tests in a suite.
Included Modules
- Enumerable(Spectator::Result)
Defined in:
spectator/report.crConstructors
-
.new(results : Array(Result), runtime : Time::Span, remaining_count : Int32 = 0, fail_blank : Bool = false, random_seed : UInt64 | Nil = nil)
Creates the report.
-
.new(results : Array(Result))
Creates the report.
Instance Method Summary
-
#each(&)
Yields each result in turn.
-
#error_count : Int32
Number of examples that had errors.
-
#errors
Returns a set of results for all errored examples.
-
#example_count
Number of examples.
-
#example_runtime
Length of time it took to run just example code.
-
#examples_ran
Number of examples run (not skipped or pending).
-
#failed?
Indicates whether the test suite failed.
-
#failed_count : Int32
Number of failing examples (includes errors).
-
#failures
Returns a set of results for all failed examples.
-
#overhead_time
Length of time spent in framework processes and hooks.
-
#pending_count : Int32
Number of pending examples.
-
#random_seed : UInt64 | Nil
Random seed used to determine test ordering.
-
#random_seed? : UInt64 | Nil | Nil
Random seed used to determine test ordering.
-
#remaining?
Indicates whether there were skipped tests because of a failure causing the test to abort.
-
#remaining_count : Int32
Number of remaining tests.
-
#runtime : Time::Span
Total length of time it took to execute the test suite.
-
#successful_count : Int32
Number of passing examples.
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
Creates the report. The results are from running the examples in the test suite. The runtime is the total time it took to execute the suite. The remaining_count is the number of tests skipped due to fail-fast. The fail_blank flag indicates whether it is a failure if there were no tests run. The random_seed is the seed used for random number generation.
Creates the report. This constructor is intended for reports of subsets of results. The results are from running the examples in the test suite. The runtime is calculated from the results.
Instance Method Detail
Length of time it took to run just example code. This does not include hooks, but it does include pre- and post-conditions.
Indicates whether there were skipped tests because of a failure causing the test to abort.
Number of remaining tests. This will be greater than zero only in fail-fast mode.
Total length of time it took to execute the test suite. This includes examples, hooks, and framework processes.