Questions tagged [pitest]
PIT is a fast bytecode-based mutation testing system for Java.
pitest
175
questions
0
votes
0
answers
21
views
Pitest Android: tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite
I'm having a lot of issues trying to make Pitest run against my Android project. I've solved a lot of problems related with Java/Gradle/Kotlin versions but now I'm stuck in a custom Pitest error:
...
0
votes
0
answers
23
views
The value for task ':pitest' property 'mainClass' is final and cannot be changed any further
Pi test failing with following error. Im using spring boot 2.7.18 & gradle 6.9
The value for task ':pitest' property 'mainClass' is final and cannot be changed any further.
My build.gradle ...
0
votes
1
answer
43
views
PiTest failure. please suggest
trying to run pitest & its failing. im using gradle 6.9 & springboot 2.7.18
pitest {
targetClasses = ['com.cti.stan.*']
enableDefaultIncrementalAnalysis = true
reportDir = file(&...
0
votes
0
answers
11
views
How to get pitest-bdd to run a directory of .feature files against a single Python test script
Sorry i am new to to pytest-bdd and am having trouble finding resources on how to run a directory of .feature files against a single Python test script.
Example of one of these feature files:
Feature:
...
0
votes
0
answers
17
views
Using .story files for python Pitest
Hello i am new to pytest and was wondering how are SQL .story files interpreted in pytest and if there any best practices when doing so.
Example of story
Narrative:
Check if data parameter exists in ...
1
vote
0
answers
90
views
How to exclude calls that are being done inside a logger when using PIT Mutation Testing?
I'm using PIT mutation testing in a Java project (version 21), and I'm facing an issue regarding the exclusion of log calls from the mutation process.
In my codebase, I have several log statements ...
0
votes
1
answer
113
views
Can I run Pitest on only 2 test files (no mutations found issue)?
So I'm having issues with the following error when running Pitest "Skipping coverage and analysis as no mutations found". The advice I've seen so far seems to be editing the maven or gradle ...
-1
votes
1
answer
31
views
Mutation threshold in PITest: is there a way to set a default average threshold globally across multiple projects or modules?
I now have set mutation configuration on the main project pom and I want it to be calculated as an average instead of each module separately.
Is there a way to do that?
<mutationThreshold>80</...
0
votes
1
answer
686
views
PITest with gradle Unsupported class file major version
I'm trying to get pitest running in this java gradle project but having a VERY difficult time... 😢
I have at least two problems: one about packages and one about Java versions.
1)
The first issue is ...
1
vote
1
answer
89
views
How to test BufferedReader using Junit and Mockito
I have below code which reads CSV file and puts the values into HashMap on application startup. I am new to Junit, please suggest how to test below class.
@Component
public class Cache implements ...
0
votes
1
answer
170
views
JUnit to test how object changes mid process along with final assertions
I have a private method which is used by multiple processes and I'm writing unit test for a public method, during pitest a mutation which removes call to a line survives so in order to fix it(without ...
1
vote
0
answers
1k
views
Pitest plugin is not detecting junit5 dependency
I'm upgrading an old application and it has the pitest plugin to improve the unit testing. Some newer tests are junit 5, so I added the junit5 plugin. However when I run the tests, it does not detect ...
1
vote
2
answers
299
views
Facing (Kill ratio is NaN% (0 0)) Issue when running Mutation test pittest in Jenkins
Hi we recently migrated from java 11 to java 17 after migration, We are facing following Issue when running MutationTest in Jenkins
Kill ratio is NaN% (0 0) when we run in Jenkins
<plugin>
<...
2
votes
1
answer
183
views
Pitest failing after spring/springboot/gradle upgrade
Facing the below build error while upgrading project to springboot 2.7.7 / spring 5.4/junit 5/gradle 7.2 and pitest vesion from 1.4.0 to 1.9.0.
Cannot set the value of a property of type org.gradle....
0
votes
1
answer
131
views
Pitest is not finding my JUNIT tests on <targetTests> param
I introduced the Pitest as a stage in our development schedule, but in one of the project it is not working and generating this info message:
Skipping project because:
[INFO] - Project has no tests, ...