Questions tagged [pitest]

PIT is a fast bytecode-based mutation testing system for Java.

PIT is a state of the art mutation testing system, providing gold standard test coverage for Java and the jvm. It's fast, scalable and integrates with modern test and build tooling (Gradle, Maven, IntellJ IDEA, Eclipse ...).

What is a mutation?
A mutation is a piece of code added or modified in an application code base.

What is mutation testing?
A mutation (fault) can create side effects or not at all. Those side effects can be detected (ie fault killed) by the application tests suite or not. The more faults killed by the application tests suite, the better the suite is. However, when a fault keeps living, here comes mutation testing.

How does PIT mutation testing work?
It detects whether each statement is meaningfully tested by running unit tests against automatically modified versions of the application code. PIT chooses and prioritises tests based on three factors: Line coverage, Test execution speed and Test naming convention.

More details: http://pitest.org, http://pitest.org/faq

165 questions
1
vote
0 answers

Kotlin delegation, what should I test?

In Kotlin the powerful construct of delegation can be used to extend functionality of existing interfaces by reusing existing implementations. class Demo : Map by HashMap {} Questions: What should I be testing? Testing hashmap from the example is…
Michiel Leegwater
  • 1,172
  • 4
  • 11
  • 27
1
vote
1 answer

Is there a config to include source files in the debug info?

Currently trying to get Micronaut to work with Pitest and it is failing due to an NPE caused by the fact Micronaut does not include the source file in the debug info of the outputted class. I was wondering if there is a way to configure Micronaut…
1
vote
1 answer

PIT-Cucumber plugin not finding scenarios in feature files

Try to institue PIT Mutation testing in a enterprise project. Got it to do existing JUNit tests, but we also have a lot of Cucumber tests that need to be part of the metric. Added pit-cucumber plugin to the maven project, but the output is no…
QuinnVT
  • 191
  • 1
  • 13
1
vote
1 answer

maven got old junit dependency in ./m2/repository from nowhere

I have java-maven project mvn instal gets .m2/repository/junit/junit/3.8.1 always, after I delete it. I don't understand where it comes from. I tried dependency-tree: mvn dependency:tree -Dverbose | grep "junit" But it prints only 5.4.0 junit…
1
vote
0 answers

Why is 'pitest-maven' build project on Jenkins server not loading the "org.slf4j.impl.StaticLoggerBinder" class?

While creating mutation tests on a pitest-maven integrated project this error is popping, I assume it's not creating logs in the project using 'Simple Logging Facade for Java (SLF4J)'. I need to know, Why is the mentioned below class not loading?? …
1
vote
1 answer

Pitest can't find mutations

I try to run "mvn clean test" to get the mutation coverage of my test's but it can't find anything. I ussed a lot of different settings but I can't find an solution. Could my settings be wrong ? Pom.xml
Elrond
  • 479
  • 1
  • 8
  • 21
1
vote
1 answer

PITEST incremental analysis cannot find local hash file

I'm currently trying PITest and so far it works properly. However, it is quite slow and the only solution so far is to use incremental analysis which potentially will solve the slowness. I've tried to set it as it's described in the documentation.…
Ducaz035
  • 3,054
  • 2
  • 25
  • 45
1
vote
1 answer

Pitest Report Failed to Generated In Intellij IDEA

I am using Pitest for mutation testing in IntelliJ IDEA (plugin: https://plugins.jetbrains.com/plugin/7119-pit-mutation-testing-idea-plugin). After running all test case, I got the following message at the end of execution: Exception in thread…
rilutham
  • 491
  • 5
  • 10
1
vote
1 answer

quality gate on pitest mutations is not triggerd when project does not run pitest

we are using pitest plugin in sonarqube and set up a quality gate on mutation coverage, since it is much more valuable than other coverage measurements. Only, when a project is pushed that does not use pitest, the quality gate is not triggerd at…
rdietrich
  • 11
  • 2
1
vote
1 answer

PIT Mutation Testing maven plugin skip all private methods

I believe that not all private methods should be tested as independent parts of code. That is why I want to exclude them from pit-reports of PIT testing tool maven plugin. I tried to find a way of doing this, but failed. Some close configuration…
Vladyslav Nikolaiev
  • 1,819
  • 3
  • 20
  • 39
1
vote
1 answer

Is there a plugin to mutate SQL for PIT

Is there a plugin to mutate SQL code during mutation testing using PIT?
user482745
  • 1,165
  • 1
  • 11
  • 31
1
vote
1 answer

Do plugins download the files like dependencies do for Maven projects?

I am trying to use the PIT tool that is available online to mutation testing and I noticed that it uses a plugin tag for the pom.xml file for maven projects. I have looked at the maven repository to see but they never mention if the plugins download…
1
vote
1 answer

Wildcard for directory name in Jenkinsfile using publishHTML not recognized

In my Jenkinsfile I use publishHTML to publish report for PIT. My step is as follows stage('Results') { publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'target/pit-reports/*/', reportFiles:…
David Baak
  • 944
  • 1
  • 14
  • 22
1
vote
1 answer

Setting up PITest for Guava

I'm trying to set up PIT for Guava (http://pitest.org/) to do mutation adequecy testing, but I am getting the following error when trying to run it. This is the error that I get : 12:19:47 PM PIT >> INFO : Sending 32 test classes to minion 12:19:47…
John Kim
  • 1,081
  • 10
  • 26
1
vote
1 answer

Maven site reporting fine for surefire tests, needs extra config for pitest mutationCoverage

If I set up the section in my pom as follows, I only get the surefire report, while the pitest report fails because it can't find any input. org.apache.maven.plugins
Adam
  • 5,215
  • 5
  • 51
  • 90