a618d82fb1
This clearly is a WIP. We know have the reporter granularity to capture per mutation test outputs + per mutation test selections. This adds all infrastructure to address: * #185 we know which tests are run in reporter * #180 fine grained information available for the reporter * #178 minitest project integration only needs to return an enumerable with metadata * #174 We can now "see" all test, allowing to generate a default matcher. * #158 Ability to steer test selection centralized for all integrations * #125 We have the required objects in graph * #96 We have finer granularity in reporter graph Because we know signal more complex state from killforks to parent I need to bring back killfork partent signalling, but this time with sending complex data around (Test::Report). Should be easy with Marshal.{dump,load} but my OSS time budget is exhausted for now.
47 lines
823 B
Ruby
47 lines
823 B
Ruby
module Mutant
|
|
# Abstract base class for test that might kill a mutation
|
|
class Test
|
|
include AbstractType, Adamantium::Flat
|
|
|
|
# Object to report test status
|
|
class Report
|
|
include Anima.new(
|
|
:test,
|
|
:output,
|
|
:success
|
|
)
|
|
|
|
alias_method :success?, :success
|
|
|
|
# Test if test failed
|
|
#
|
|
# @return [Boolean]
|
|
#
|
|
# @api private
|
|
#
|
|
def failed?
|
|
!success?
|
|
end
|
|
|
|
end # Report
|
|
|
|
# Run tests
|
|
#
|
|
# @return [Test::Result]
|
|
#
|
|
# @api private
|
|
#
|
|
abstract_method :run
|
|
|
|
# Return subject identification
|
|
#
|
|
# This method is used for current mutants primitive test selection.
|
|
#
|
|
# @return [String]
|
|
#
|
|
# @api private
|
|
#
|
|
abstract_method :subject_identification
|
|
|
|
end # Test
|
|
end # Mutant
|