Skip to content

Releases: hcoles/pitest

1.2.5

29 Nov 21:12
Compare
Choose a tag to compare
  • #407 - SCM goal cannot be run from within module (thanks @sbuisson)
  • #256 - Inline style violate Content Security Policy (thanks @kiftio)
  • #403 - No css in the html report viewed from jenkins (thanks @kiftio)
  • #409 - Mutate based on changes across branched (thanks @sbuisson)
  • #418 - Avoid for loop increments
  • #424 - Avoid for each code
  • #389 - Widen matching of implicit null checks

1.2.4

02 Oct 18:27
Compare
Choose a tag to compare
  • #397 - Report reasons maven modules skipped
  • #389 - Filter junk getClass null checks in lambdas
  • #400 - Update to ASM 6.0

1.2.3

17 Sep 17:22
Compare
Choose a tag to compare
  • Updates to ASM 6 for Java 9 support
  • #388 - Mark maven plugin as threadsafe
  • #362 - Suppress common equivalent mutant in equals methods

1.2.2

06 Jul 20:39
Compare
Choose a tag to compare

Bugfix release for #367

Some projects experienced issues resolving core java classes during static analysis phase with 1.2.1. Although this seems to only affect a small number of projects it is recommended that everyone upgrade.

1.2.1

05 Jul 20:49
Compare
Choose a tag to compare

#347 - Avoid autogenerated code (e.g by lombok) anotated with @generated
#285 - Avoid compiler generated conditionals in switch on string. (thanks @Kwaq)
#218 - New "naked receiver" / method chain mutator. (thanks @UrsMetz)
#354/#356 - New extension point plus changes to reduce cost of random access to bytecode for static analysis
#353 - Improved static initializer code detection
#364 - Filter infinite loops via static analysis
#365 - Configuration system for plugins

Filtering by annotation

The new annotation filtering will work only with annotations that have class or runtime retention. Annotations such as javax.annotation.Generated are invisible to pitest as they have only source retention.

By default pitest will not create mutations in any methods or classes annotated with annotations named Generated, CoverageIgnore or DoNotMutate, regardless of the package name.

If you are using Lombok it can be configured to add a Generated annotation by setting

lombok.addLombokGeneratedAnnotation = true

in the Lombok configuration (not pitest's)

https://projectlombok.org/features/configuration

If the default annotations are not sufficient custom annotations can be configured using the new feature config system.

In maven pass

<feaures>
  <value>+FANN(annotation[com.example.MyAnnotation1] annotation[com.example.MyAnnotation2])</value>
</features>

And the custom annotations will be ignored.

Filtering of annotations can be disabled entirely by setting

<features>
  <value>-FANN</value>
</features>

Infinite loop detection

Pitest has always been able to deal with infinite loops, but each one it encounters costs several seconds of processing time.

As a performance enhancement pitest can now detect some types of infinite loop via static analysis and remove these mutations from the analysis.

Most users will not notice a performance improvement as the types of infinite loop detected are not generated by the default mutator set. If you have the REMOVE_INCREMENTS mutator or NON_VOID_METHOD_CALLS mutator enables you may however see a significant reduction in both the number of generated mutants and the analysis time.

Improvements will be made to this system in future releases.

To disable infinite loop filtering pass the feature name with a - in the features section of the config.

  • FINFINC - Filters mutations to increments that may cause infinite loops
  • FINFIT - Filters mutations that may cause infinite loops by removing calls to iterator.next

Features

As discussed briefly in the above sections this release provides a new way to configure some aspects of pitest's behaviour.

Several previously hard coded behaviours can now be configured in this way

  • FINFINC Filters mutations to increments that may cause infinite loops
  • FFBLOCK Filters mutations in code duplicated by finally block inlining
  • FSTATI Filters mutations in static initializers and code called only from them
  • FTRYWR Filters mutations in code generated for try with resources statements
  • FSTATINIT Filters mutations in static initializers and code called only from them
  • FLOGCALL Filters mutations in code that makes calls to logging frameworks
  • FINFIT Filters mutations that may cause infinite loops by removing calls to iterator.next
  • FANN Filters mutations in classes and methods with matching annotations of class or runtime retention

If pitest is run with verbose logging enabled a list of enabled and disabled features will be printed.

To enable a feature specify it with a leading + in the features config section.

To disable a feature specify it with a leading - in the features config section.

1.2.0

31 Mar 12:49
Compare
Choose a tag to compare

#318 - Separate main process code from code sharing client classpath
#295 - Ignore abstract TestNG tests
#215 - Automatic selection of target classes for maven
#314 - Do not fail for maven modules without tests or code
#306 - Do not fail when only interfaces are in changeset
#325 - Anonymous class in Spock test causing error
#334 - Compatibility with recent TestNG releases
#335 - Incorrect coverage with powermock

1.1.11

03 Dec 19:23
Compare
Choose a tag to compare
  • #269 - Not possible to break build on 1 mutant
  • #271 - Include method descriptor in line coverage
  • #170 - Exclusion by JUnit runner
  • #291 - Handle empty excludes
  • #287 - Check class hierarchy for annotations
  • #289 - Option to supply classpath from file

1.1.10

14 May 10:30
Compare
Choose a tag to compare
  • #260 - Initial support for mutating Kotlin code
  • #264 - Support for yatspec runner (thanks @theangrydev)
  • Break build when more than maxSurviving mutants survive

1.1.9

14 May 10:37
Compare
Choose a tag to compare
  • #132 - Allow analysis of only files touched in last commit (thanks Tomasz Luch)

1.1.8

02 Jan 13:11
Compare
Choose a tag to compare

#239 - Provide a shortcut to set history files via maven

Maven users can now set seup pitest to use an automatically managed history file in their temp directory by setting the property withHistory to true.

#240 - Support for regexes

Previous versions of pitest supported only glob style filters. As of this release if the filter begins with a ~ it will be interpreted as a regex.

#243 - Use ephemeral ports to communicate with minions