question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pitest mutating methods called from static blocks

See original GitHub issue

Pitest mutates methods called from static initializer blocks with nested depth > 1.

Pit Report: https://vyom-yadav.github.io/pitest-all-latest/pitest-common/com.puppycrawl.tools.checkstyle/PackageObjectFactory.java.html

✅ Pit is not mutating code present in static blocks. Screenshot from 2022-07-29 12-39-31

✅ It is also not mutating private method called from static block i.e. fillShortToFullModuleNamesMap Screenshot from 2022-07-29 12-39-51

❌ But the methods called from this private methods are mutated by pit, these methods are only called from fillShortToFullModuleNamesMap but still they are mutated, see fillChecksFromAnnotationPackage Screenshot from 2022-07-29 12-40-11

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hcolescommented, Aug 3, 2022

released in 1.9.4

1reaction
hcolescommented, Aug 2, 2022

Should be fixed by #1069

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mutation operators - PIT Mutation Testing
Pitest will filter out equivalent mutations to methods that are already hard coded to return 0. Optional Mutators. Constructor Call Mutator (CONSTRUCTOR_CALLS).
Read more >
FAQ - PIT Mutation Testing
Mitigation. Pitest tries to avoid mutating static initializer code. It will not create mutants in. static initializers; private methods called only from static...
Read more >
Mutation testing systems for Java compared
Several mutation testing systems for Java exist, this page in an attempt to objectively categorise and compare the way in which they are...
Read more >
Command line quick start - PIT Mutation Testing
The command-line tool supports two methods of supplying the classpath to be mutated. By default the launch classpath will be used.
Read more >
Downloads - PIT Mutation Testing
These are old releases from before pitest was migrated to github. ... new remove conditionals mutator; support for mutating static initializers with TestNG ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found