class Minitest::StatisticsReporter
A reporter that gathers statistics about a test run. Does not do any IO because meant to be used as a parent class for a reporter that does.
If you want to create an entirely different type of output (eg, CI, HTML, etc), this is the place to start.
Example:
class JenkinsCIReporter < StatisticsReporter def report super # Needed to calculate some statistics print "<testsuite " print "tests='#{count}' " print "failures='#{failures}' " # Remaining XML... end end
A reporter that gathers statistics about a test run. Does not do any IO because meant to be used as a parent class for a reporter that does.
If you want to create an entirely different type of output (eg, CI, HTML, etc), this is the place to start.
Example:
class JenkinsCIReporter < StatisticsReporter def report super # Needed to calculate some statistics print "<testsuite " print "tests='#{count}' " print "failures='#{failures}' " # Remaining XML... end end
Attributes
untyped
Total number of assertions.
Total number of assertions.
untyped
Total number of test cases.
Total number of test cases.
untyped
Total number of tests that erred.
Total number of tests that erred.
untyped
Total number of tests that failed.
Total number of tests that failed.
untyped
untyped
Total number of tests that where skipped.
Total number of tests that where skipped.
untyped
untyped
untyped
Total number of tests that warned.
Total number of tests that warned.
Public Class Methods
Public Instance Methods
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/minitest/0/minitest/statistics_reporter.rbs, line 23
def passed?: () -> untyped
(untyped result) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/minitest/0/minitest/statistics_reporter.rbs, line 25
def record: (untyped result) -> untyped
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/minitest-6.0.6/lib/minitest.rb, line 896 def report aggregate = results.group_by { |r| r.failure.class } aggregate.default = [] # dumb. group_by should provide this self.total_time = Minitest.clock_time - start_time self.failures = aggregate[Assertion].size self.errors = aggregate[UnexpectedError].size self.warnings = aggregate[UnexpectedWarning].size self.skips = aggregate[Skip].size end
Report on the tracked statistics.
Report on the tracked statistics.
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/minitest/0/minitest/statistics_reporter.rbs, line 24
def start: () -> untyped