-
Fix parsing of empty rspec descriptions
-
Remove support for EOL Ruby-3.0. Remove another invalid mutation to super().
-
Remove invalid mutation operator.
-
Add ordering mutations to full and light operator set,
#find/#detect/#min/#max/#min_by/#max_by -> #first/#last
. These mutations force to provide test cases with more than one element to observe the extra semantics by these methods over just#first
and#last
.Add
#first -> #last
and#last -> #first
to full operator set. These where highly controversial in the past and thus where removed. People who do not care about ordering of their collections can choose the light operator set. -
Change mutants test runner to always report in test definition order deterministically. Before results where recorded in order of arrival, which could result a fast test that started late to be reported before a slow test that started early. Basically it makes parallel test execution reporting deterministic.
Change the behavior of reporting test errors on fail fast to only display the fist test that failed. Parallel test execution can result in one or more tests failing before the execution engine has time to adhere to the fail fast setting.
Drop the license gem, entirely. This reduces DRM in mutants code base to the absolute minimum. Mutant is still comercial software that requires payment if used on a commercial code base!
Migration:
- Commercial users: Add
usage: commercial
to your config file (or--usage commercial
to your CLI) - Opensource users: Add
usage: opensource
to your config file (or--usage opensource
to your CLI)
-
Fix const pattern mutation to not generate invalid ast. The generic node mutation would generate invalid AST. This also removes some recursion into the nested pattern. Still this is preferable till we add explicit pattern mutation operators.
-
Add source match expression, source
source:$glob_expression
, examplesource:{app,lib}/**/*.rb
works with anything thatPathname#glob
suppors.Allows to match all toplevel class/module constants defined in the matched ruby files.
-
Also factor in Rspec 3.9+ signal
rspec_is_quitting
to detect rspec not being able to load examples.
-
Improve rspec integration. Mutant now properly exits early if rspec cannot load examples.
-
Add integration setup hooks.
setup_integration_pre
- called before the test integration setup.setup_integration_post
- called after the test integration setup.
-
#1426 Fix mutations to unintentionally change constant scope. This fixes: mbj#1422.
-
#1421 Change to optional warning display via --print-warnings environment option.
-
#1418 Fix mutation to invalid pattern match.
-
#1416 Fix CLI parsing issue where arguments given to
mutant environment
where silently ignored. -
#1415 Change to report efficiency instead of overhead. Efficiency is defined by
killtime / runtime
. -
Add
Process.warmup
optimization for ruby-3.3+ which yields a noticable speed improvement.
-
Update to parser-3.3.0 dependency.
-
Fix config file support for AST pattern ignores. Before this fix the AST ignore patterns would only be picked up when specified via CLI.
-
Drop support for ruby 2.7.
-
Add support for commercial organization wide licenses
-
Fix restarg and kwrestarg nested mutations.
-
Fix restarg and kwrestarg invalid mutations.
-
Introduce mutation operators config 'light' and 'full'. Mutant will default to light set that for the moment does not include
#== -> #eql?
.
-
Upgrade to unparser 0.6.8 dependency which ships an important bugfix on unparsing of csend AST nodes on binary operators.
-
Change to
--integration
from--use
on CLI andintegration_name
fromintegration
key in config file.The old key is still supported but deprecated.
Add ability to provide multiple
--integration-argument
options that get passed down directly to rspec. Also available in the config file.
-
Significantly optimize parsing overhead during boot. Smaller projects may see boot time speedups of 10-20%. Larger projects may see boot time improvements of 2-3x or greater. Memory consumption is also greatly reduced (by a factor of 5x or more in some small changesets).
-
Add support for user defined mutation worker process hooks. These hooks are triggered before the mutation worker process starts processing mutations. They can be used so setup separate test databases to avoid clobbering between mutation threads or do other isolation mechanisms.
-
Add
#available_tests
to integrations, differentiating tests eligible for mutation testing from all tests availabe in the integration. This will allow to re-use mutants test runner for all integration tests, outside of mutation testing.
-
Fix crash on code that must have been a ternary on original source.
-
Change to more performant rspec integration. Significant rspec runner speed improvement on projets with a very large number of tests.
-
Add ruby-3.2 support.
-
Upgrade regexp-parser to 2.6.1. This also re-implements the regexp mutation emitter to be more maintainable, no semantic changes expected.
-
Adapt to behavior change in ruby 3.1.3 where methods inherited from module inclusions that just got visibility changes are now owned by the included module/class.
-
Add execution profiling via
--profile
. The output format is not stable yet, still this profile is very useful to differentiate mutant load time from target application load time. -
Improve worker process termination speed. Reduces pause before report print especially on high core count machines.
-
Fix ignore patterns support for single node def nodes. Fix config merge support for ignore patterns.
-
Fix to provide a well formed
Mutant::Config::DEFAULT
constant at all times. Primarily useful for custom 3rd party integrations that use mutants API directly.
-
Change to improved AST matching performance. Mutant boot performance is positively affected mostly on larger projects with larger AST node count per file.
-
Fix AST structure metadata issues.
- Add support for org wide opensource licensing.
-
Add user defined mutation filtering.
Mutant will not emit mutations for AST patterns defined by the new mutation specific option
ignore_patterns
.mutation: ignore_patterns: - send{selector=log} # does no emit any mutation for `logger.log` or similar.
The supported syntax is way more powerful than this simple example.
-
Fix: [#1308] again.
Properly normalize repository names on OSS license check.
-
Deprecate
mutation_timeout
toplevel configuration key.Now use:
mutation: timeout: 10.0
-
Add support for minitest-0.5.16, and its srant initalization. Currently mutant randomizes selected minitest tests by default. AS this is also the minitest default for versions past 0.5.16 this should be a good enough behavior.
-
Add mutation AST filtering. This allows to not emit mutations on user specified ASTS.
-
Fix incomplete mutations for regexp capture groups. As an example,
/(\w\d)/
now gets mutated to/(\W\d)/
and/(\w\D)/
instead of just the former case.Fix capture group -> passive group mutations which would not get properly generated in many cases. As an example,
/(\w\d)/
would get mutated to/(?:\w)/
instead of/(?:\w\d)/
like it will now.
-
Fix incomplete mutations for named regexp capture groups. As an example,
/(?<name>\w\d)/
now gets mutated to/(?<name>\W\d)/
and/(?<name>\w\D)/
instead of just the former case. -
Add graceful but urgent exit on SIGINT.
-
Add explicit mutation handler for xstr nodes.
-
Fix crash with certain block argument edge cases such as
foo { |(*)| }
.Fix mutation from
foo { |(a, b)| }
tofoo { |(_a, b)| }
andfoo { |(a, _b)| }
instead of the less useful mutation to onlyfoo { |_a| }
.Add
foo { |(a, b)| }
->foo { |a, b| }
mutation.
-
Remove useless
loop { code }
->loop { nil }
mutation.
-
Add inline mutant disable configuration. This allows individual subjects to be marked as disbled directly in the code.
Use:
class Something # mutant:disable def some_method end end
-
Fix regexp mapper to do full, ruby version specific unicode property mapping.
-
Fix forward arg mutations.
-
Fix visibility of mutated methods to retain original value.
Fix: [#1242]
-
Change to fully enforced license.
-
Remove support for Ruby-2.6 as its EOL.
-
Change to ignore case mismatches in git repository names on license check.
-
Add full Ruby 3.1 support.
-
Change to parser/unparser that works on 3.1 syntax. This does not mean mutant is yet fully 3.1 compatible. Mostly that mutant does not block the parser dependency anymore. And unparser is ready for Ruby 3.1.
-
Prevent multipath matches. Should multiple match expessions evaluate to the same subject, mutant now only visits that subject once.
This prevents blowing up the mutation testing work on bigger applications with more complex match expressions.
-
Add descendants matchers. These matchers allow to select subjects in inheritance trees that are not namespace based.
This is very useful for non namespaced (rails) applications. As users can now use match expressions like
descendants:ApplicationController
to match all descants ofApplicationController
includingApplicationController
.This feature is not bound to rails inheritance trees and can be used with any inheritance tree.
-
Improve matching speed. This is especially noticeable in larger projects. Mutant now creates way less objects while matching subjects.
-
Fix: #1273
Prevent crashes on degenerate object interfaces where method reflection returns methods that are later not accessible via
#instance_method
. -
Add ability to set environment variables via the CLI. The environment variables are inserted before the application is loaded. This is especially useful to load rails in test mode via setting
RAILS_ENV=test
.For CLI use the
--env
argument. For config file use theenvironment_variables
key.
-
Add sorbet method matching. Allows mutant to operate on methods with a sorbet signature. Does not yet use the signature to constrain the mutations.
This adds a direct
sorbet-runtime
dependency to mutant. Note that Mutant intents to use sorbet directly for its own code.sorbet-runtime
is itself a clean dependency, that unless told to: Will not perform core extensions.As mutant is a development dependency it should not be an issue for a project that mutant itself will soon use sorbet type checks to accelerate its development.
Please report any issues the addition of the
sorbet-runtime
dependency to mutant causes.Bumping minor version to signal this more out of the ordinary change.
- #1269
Add
mutant environment irb
command. Starts an IRB session for the configured mutant environment. Very useful for iterating on environment setup issues.
-
#1252 Remove not universally useful binary left negation operator.
-
#1253 Remove support for Ruby-2.5, which is EOL.
-
#1255 Remove invalid mutations to invalid syntax
-
#1257 Fix crash on numblock mutations.
-
#1258 Add improved UI on detecting 0 tests. This should be beneficial in onboarding scenarios or after manual persistend rspec selections.
- #1249
Add
mutant util mutation
subcommand to allow inspect mutations of a code snippet outside a booted environment. This eases debugging, learning and mutant developers life.
-
#1234 Add mapping for latin regexp properties to fix crash on mutating
\p{Latin}
regexp nodes.Fix: #1231
-
- Add beginless range mutations
-
- Remove float literal negation mutations (
1.0
->-1.0
).
- Remove float literal negation mutations (
-
- Remove integer literal negation mutations (
1
->-1
).
- Remove integer literal negation mutations (
-
- Ignore methods defined in non
.rb
files during matching.
- Ignore methods defined in non
-
Fix exception serialization form rails infected code bases. This case can happen when the killfork terminates abnormal, and the resulting exception in the worker has to be propagated to the main process for reporting. On "normal" Ruby the exceptions are dump/loadable but rails and its core extensions break this invariant. Hence mutant now captures the essence of the exception in an attribute copy for propagation.
-
- Remove
#eql?
->#equal?
mutation
- Remove
-
- Remove generic mutation to
self
- Remove generic mutation to
-
- Add
#reduce
->#sum
mutationsa.reduce(:+)
->a.sum
a.reduce(0, &:+)
->a.sum(0)
- Add
-
- Add
/\Astatic/
->#start_with?
mutations:a.match(/\Atext/)
->b.start_with?('text')
a.match?(/\Atext/)
->b.start_with?('text')
a =~ /\Atext/
->b.start_with?('text')
- Add
/static\z/
->#end_with?
mutations:a.match(/text\z/)
->b.end_with?('text')
a.match?(/text\z/)
->b.end_with?('text')
a =~ /text\z/
->b.end_with?('text')
- Add
-
- Add unused group name mutation:
/(?<foo>bar)/
->/(?<_foo>bar)/
.
- Add unused group name mutation:
-
- Add
mutant environment test list
subcommand. Useful to verify which tests mutant detects as candiates for test selection.
- Add
-
- Allow constants to be passed to minitest integrations
cover
declaration.cover SomeClass
is equivalent tocover 'SomeClass*'
.
- Allow constants to be passed to minitest integrations
-
- Add mutation from named capturing group to non-capturing group:
/(?<foo>bar)/
->/(?:bar)
.
- Add mutation from named capturing group to non-capturing group:
-
- Fix configured match expression loading to properly display error messages on invalid expression syntax.
-
- Add mutations from predicate-like methods (methods ending in ?) to
true
/false
a.b?
->false
a.b?
->true
- Add mutations from predicate-like methods (methods ending in ?) to
-
Add additional
*
->+
regexp quantifier mutations:/a*?/
->/a+?/
/a*+/
->/a++/
-
Add
a === b
->a.is_a?(b)
mutation -
- Add mutation from
=~
->#match?
- Add mutation from
#match
->#match?
- Add mutation from
-
Allow subject matcher configuration in the configuration file.
-
Reintroduce regexp mutation support
-
- Remove unuseful kwarg mutations.
- Remove argument promotion on kwarg mutations. These yield AST that when unparsed have invalid syntax.
-
- Add ruby-3.0 syntax and mutation support.
-
- Add mutation from
#any?
to#all?
and vice versa.
- Add mutation from
-
- Add GIL scaling and memory optimization via intermediary sub-processes. This architecture improves mutant performance slightly on the average (incremental) case but has a significant increase for longer coverage runs. Mostly this process model reduces the friction from forking from an ever growing main process. Also it reduces the chance of GC amplification, while enabling future optimizations in the area.
- Substantially improve performance on coverage attempts that involve many selected tests.
- Reduce (but not eliminate) performance degeneration on larger subject sets.
- This release for many average cases should get 2x the performance.
-
- Change to strict integration version bounds.
- Mutant is evolving the integration interface, and will keep doing so.
- Before this change integrations would declare they can work with many future mutant releases, but this is actually not the case.
-
- Add
defined?(@a)
->instance_variable_defined?(:@a)
mutation. - Remove invalid mutations from
defined?
->true
. - Remove mutations of
defined?()
arguments, thedefined?
method is not fully evaluating the argument but instead partially evaluates the AST, or inspects the AST. Delegating to the value semantics based "generic" mutation engine does create too many hard to cover mutations.
- Add
-
- Add support for unicode ruby method names.
- Fixes long standing bug on expression parsing of method operators. This means that mutant is now selecting a more narrow / correct set of tests for operators. As a side effect measure coverage may drop. But for a good reason as mutant before would select way more tests even if a specific test for such an operator was available. Enforcing that this specific test actually covers the subject.
-
- Fix matching non existing constants.
-
- Improve minitest integration to also render minitest failures in reports. This is useful when reacting to noop errors.
-
- Add subcommand
environment subject list
. It allows to list all matched subjects.
- Add subcommand
-
Fix low frequency stuck isolation reads.
-
Minor performance improvements on small runs.
-
Add support for incremental mutation testing when the working directory is not the git repository root.
-
Change process abort coverage criteria to also cover nonzero killfork exits.
-
Fix to properly propagate coverage criteria from config file.
-
Fix absent jobs on CLI to not shadow file configuration.
-
Performance improvements on caching more work in the master process.
-
Add
environment show
subcommand to display environment without coverage run. -
Fix unspecified integration to have dedicated error message.
- Fix CLI overwrites of config file. #1127.
- Add support for specifying multiple subject expressions with the RSpec integration. #1125
-
Add support for process abort as coverage condition.
This allows mutation to be covered on abnormal process aborts, such as segfaults.
-
Add support for external mutation timeouts.
New config file settings.
mutation_timeout
andcoverage_criteria
to control timeouts and coverage conditions. -
Improve CLI reporting to be less noisy:
-
Fix crash on static send mutation. #1108
-
Add more verbose configuration documentation.
- Change to always display help on invalid CLI. #1093
- Fix config inheritance between environment, config file and CLI options.
- Fix mutant-minitest and mutant rspec to not rely on git anymore in gemspec. #1087
- Fix mutant-minitest to ship minitest/coverge file. #1086
- Fix type error on subscription show subcommand with active commercial license. #1074
- Add support for multiple cover expressions in minitest integration #1076
- Add 2.7 syntax support. #1062.
- Add symbol-to-proc block mutations (
map(&:to_s)
->map(&to_str)
) #1048 - Add block-pass mutations (
foo(&method(:bar))
->foo(&public_method(:bar))
) #1047 - Add new mutation of
Array(foo)
->[foo]
#1043 - Add new mutation to mutate dynamic sends to static sends ({
foo.__send__(:bar)
,foo.send(:bar)
,foo.public_send(:bar)
} ->foo.bar
) #1040 and #1049 - Change packaging to not rely on git anymore. #1053
- Remove mutation to equivalent semantics on endless ranges #1036.
- Remove bounds to allow
diff-lcs 1.4.x
#1032. - Fix crash on endless ranges #1026.
- Fix memoized subjects to preserve freezer option #973.
- Add support for mutating methods inside eigenclasses
class <<
. #1009
- Remove
<
-><=
and>
->>=
mutations as non canonical. #1020 - Remove
true
->nil
andfalse
->nil
mutations as non canonical. #1018
- Change to generic catch all node mutator. This allows better cross parser version compatibility.
- Bump parser dependency to 2.7.1, note this still does not support Ruby 2.7 syntax. But it supports running bundling with that parser version.
- Nail diff-lcs to 1.3 till output difference for 1.4 can be addressed.
- Dependencies upgrade, should not change user facing semantics.
- Bump license nudge to 40s
- Change to 2.7 parser series. This does not drop support for < 2.7 but enables to in the future add full Ruby 2.7 support.
- Bump unparser dependency
- Change to soft dependency on mutant-license. Rationale its fine to bundle mutant if not used. This can easily happen on transitive dependencies.
- Upgrade to parser ~> 2.6.5
- Packaging bugfix.
- New license.
- Fix mutations to void value expressions to not be reported as integration error.
- Remove regexp body mutations
- Remove restarg mutations
- Remove support for rspec-3.{4,5,6}
- Change to {I,M}Var based concurrency
- Remove actors
- Change to always insert mutations with frozen string literals
- Fix various invalid AST or source mutations
- Handle regexp
regexp_parser
cannot parse but MRI accepts gracefully
- Improved isolation error reporting
- Errors between isolation and tests do not kill mutations anymore.
- Remove hard ruby version requirement. 2.5 is still the only officially supported version.
- Change to modern ast format via unparser-0.4.1.
- Replace internal timers with monotonic ones.
Find older changelogs in the project history