197 questions
0
votes
0
answers
28
views
How to use pitest CrossModule?
I have a set of maven projects.
civitas-ng-crypto contains classes I want to mutation test.
civitas-ng-cryptotest contains the tests for it.
civitas-ng-cryptotest/pom.xml contains:
<...
0
votes
1
answer
102
views
Clojure mutant – can't kill a surviving mutant in binary search
I'm writing a classic binary search function in Clojure and testing it with the mutant mutation testing library.
My tests work fine in terms of correctness, but mutation testing reports one surviving ...
1
vote
1
answer
260
views
Why does a mutant survive in PIT mutation testing despite seemingly causing infinite recursion?
I'm performing mutation testing using PIT in a Java project and encountered a case where a mutant survives even though it should cause a stack overflow error. I am able to fix the issue with different ...
0
votes
1
answer
141
views
Adding a prefix command to all ctest executions
I am following the instructions to use the mutation testing framework Mull and integrating it with CMake
https://mull.readthedocs.io/en/latest/tutorials/CMakeIntegration.html
The last step involves ...
2
votes
1
answer
194
views
Multi-threaded mutation testing with Laravel
I am trying to use Infection (https://infection.github.io/) on a Laravel 10 codebase and am running into issues when running Infection with more than 1 thread. Running it single threaded is not ideal ...
0
votes
1
answer
177
views
Why does Golang's coverage report mark case statements in a switch as not tracked?
I'm running into an issue with Golang's coverage report where case statements within a switch block are marked as not tracked, even though I have written tests that execute these cases. Is this a ...
1
vote
0
answers
260
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
424
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
vote
1
answer
72
views
Change execution directory
I'm playing around with stryker.net but get a file not found exception, which is not unusual, because I've got some dependencies which are stored in an other directory, where my output files are ...
1
vote
1
answer
171
views
C# - operator overloading through inheritance
I am trying to come up with the way to implement a way to perform a Mutation test on my class (yes I am aware of Stryker .NET).
For the sake of simplicity, let's say that I want to write a Mutator ...
1
vote
1
answer
2k
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 ...
0
votes
0
answers
447
views
Problem with pit mutation: "Replaced long addition with subtraction"
I'm newbie with mutation testing. I'm using Pit and in the following line of code there are 4 mutations of the same type: Replaced long addition with subtraction
long newsize = position + ...
0
votes
1
answer
312
views
Why Does Stryker Fail To Run For This TypeScript Express Project?
I have a public repo here that is a simple ExpressJS NodeJs project in TypeScript which uses Jest for unit tests.
When I run npx stryker run --fileLogLevel trace --logLevel debug though I get this ...
1
vote
2
answers
443
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>
<...
0
votes
2
answers
535
views
Simple mutation unit testing erroneously report survival of the mutation of the exception message
Suppose we have a Calculator with a divide method throwing error if the denominator is 0:
public class Calculator
{
public double Divide(int x, int y)
{
if (y == 0)
...
0
votes
0
answers
312
views
Stryker Mutation test fails when debug statement is added in c# method
Stryker fails to run any test cases under a xunit test class when debug statement is included in the code block.
I have a few test cases covering the below method. Stryker fails to run those tests and ...
0
votes
0
answers
922
views
Wht python package "mutmut" doesn't work with and command "mutmut results" returns error?
Good day. I have a problem with mutmut package. I have installed "mutmut" and create config.cfg
[mutmut]
paths_to_mutate=some_path/to/folder
tests_dir=some_path/to/folder/tests
After I run &...
0
votes
0
answers
79
views
Encountering an error when running mut.py: "mut.py: error: unrecognized arguments"
When i try to run mut.py i encounter this error
C:\Pprogs>mut.py --dcmotor_pid_control --dcmotor_tests -m
usage: mut.py [-h] [--version] [--target TARGET [TARGET ...]] [--unit-test UNIT_TEST [...
0
votes
1
answer
2k
views
Conflicting module dependence in python project
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
cosmic-ray 8.3.5 requires ...
0
votes
1
answer
417
views
Pitest mutation testing execute over kotlin files only
I arrived to a legacy project where multiple files are developed in Java and many others in Kotlin. I have be able to configure Pitest to execute the mutation test and i have a correct report.
Now I ...
0
votes
1
answer
116
views
Vertigo (mutation testing for Solidity) - Command not found on Mac OS
I am on a Mac and want to install and use Vertigo (software tool for mutation testing Solidity smart contracts).
I follow the installation instructions here: https://pypi.org/project/eth-vertigo/
And ...
-2
votes
1
answer
589
views
pieTest - Mutation Test failure
All, There is an issue while running mutation test cases.
Getting the mutation test case failures as follows:
removed call to java/util/List::sort → SURVIVED
removed call to java/util/List::forEach → ...
2
votes
0
answers
522
views
Mutants were not covered by tests in PHP Infection
I'm running some mutation tests ("infection/infection": "^0.26.1") and for some unknown reason PHP Infection claims that there are tests that are not covered even with the unit ...
1
vote
2
answers
8k
views
Pitest - Mutation Test failure - negated conditional → SURVIVED
I added a conditional operator in my code like:
String test;//assigned with some value
result = test != null ? test : "";
This fails in mutation testing with the reason of negated ...
1
vote
1
answer
2k
views
Pie Mutation test fails : org.pitest.mutationtest.engine.gregor.mutators.EmptyObjectReturnValsMutator
While running mutation test , there are survived cases . The reason is org.pitest.mutationtest.engine.gregor.mutators.EmptyObjectReturnValsMutator
The exact error message is : replaced return value ...
0
votes
1
answer
1k
views
Java | Mutation Testing | PiTEST | (negated conditional → SURVIVED) | (changed conditional boundary → SURVIVED)
I am getting piTest issues. Few mutations are getting survived.
PiTEST negated conditional → SURVIVED changed conditional boundary → SURVIVED
As per my understanding i am testing boundary conditions ...
1
vote
0
answers
754
views
I tried to do a Java mutation test using Pitclipse and the result did not show
I tried to do mutation testing on a program using pitclipse in Java but came across an issue and I do not know how to solve it.
I am using the Eclipse IDE and Java SE 1.8.
This is the code:
public ...
2
votes
2
answers
6k
views
Pitest is failing showing: No mutations found due to the supplied classpath or filters + Gradle
I'm trying to run a pitest report on a gradle + kotlin project, but I get the following error:
Exception in thread "main" org.pitest.help.PitHelpError: No mutations found. This probably ...
1
vote
0
answers
473
views
This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 2021.1.1 or newer
I am trying to use pitest plugin in a helloworld android studio project to do mutation testing. However after following the instruction it's giving following errors :
This version of the Android ...
0
votes
1
answer
485
views
How to programmatically alter source code in C++ file?
I need a way to take a C/C++ source code file, inspect and perform some modifications to it, and then write the modified variant back to disk. Possible use cases that I have for it are:
Mutation ...
1
vote
1
answer
565
views
How to incorporate Stryker.NET tool in Azure DevOps pipelines in case of multiple project dependencies in a test project?
I have a unit test project file which depends on two other projects. ABC.Service.UnitTest is the test project and its dependencies are XYZ.Service.csproj and LMN.Aggregator.csproj.
In this case, what ...
0
votes
1
answer
745
views
Unable to install Dotnet Stryker
I have tried the below commands to install dotnet stryker to my project to improve the mutation testing but getting below error message and it does not allow me to install the tool.
Could you please ...
0
votes
0
answers
1k
views
Pitest not finding test cases
I'm integrating mutaiton testing using pitest plugin in my intellij
here is my plugin for pitest
<plugin>
<groupId>org.pitest</groupId>
<...
2
votes
0
answers
559
views
npm run stryker fails Error: Cannot find module 'mutation-testing-report-schema/dist/src/api'
Stryker started failing because of unloaded module 'mutation-testing-report-schema/dist/src/api'. I tried deleting node_modules and npm clean install.
Here is my dependency list:
"@stryker-...
1
vote
1
answer
721
views
Where is the Pitest withHistory file stored?
So i'm using the -DwithHistory=true function for my Pitest configuration. Now i'm wondering where the history files are being stored to make sure that no other runner is overwriting this file.
The ...
0
votes
0
answers
164
views
Why pytest runner hammett not support pytest_mock?
Pytest version = 6.0.1
Pytest-mock version = 3.6.1
Hammett version = 0.9.2
Python version = 3.9.2
When I try to run the test cases by using hammett getting the below error
missing 1 required ...
0
votes
1
answer
727
views
Warnings importing PITEST reports into Sonarqube
Sorry for the cross posting:
https://community.sonarsource.com/t/importing-mutation-tests-with-pitest/52285/3
I am very new to Sonarqube and QA and I am making sure the code (and unit tests) a ...
0
votes
1
answer
129
views
How can I force pit to use a particular junit version
I am using pit 1.6.7 and I want to use JUnit 4.12, but it looks like pit is always using junit 3.8.1 even junit 4.12 is in the dependency.
How can I force PIT to use junit 4.12 in the maven pom file.
0
votes
3
answers
499
views
What is the competent programmer hypothesis in mutation testing?
While I am learning about mutation testing, I've read in Wikipedia:
The first is the competent programmer hypothesis. This hypothesis
states that most software faults introduced by experienced ...
0
votes
2
answers
3k
views
pitest report can't mix JUnit 4 and JUnit 5 tests
Recently, I introduced Pitest as the mutation testing tool to our team to diagnose test quality, and we loved it.
In our codebase, we have lots of preexisting JUnit 4, and now we're writing all of our ...
2
votes
1
answer
315
views
What is coupling effect in mutation testing?
While I am learning about mutation testing, I've read in Wikipedia:
The coupling effect asserts that simple faults can cascade or couple
to form other emergent faults.
Subtle and important faults are ...
0
votes
1
answer
768
views
Problem with mutation testing of expressjs app (Stryker mutator)
I have made an express app which is basically an RESTAPI and I have written tests in mocha for the application. Now I wanted to mutation test my app but I've run into a problem. My app listens to the ...
2
votes
1
answer
107
views
Compile another Maven project using Maven Compiler API (CompilerMojo)
I'm working on a Maven project that injects and runs some tests in another Maven projects. I already managed to inject them, however, I'm struggling to programmatically compile the other Maven project ...
1
vote
2
answers
1k
views
How to mock local object property which is been set in another method
I have similar to below code in my application.
public String someMethod(final Object obj) {
final ValidationResponse validationResponse = new ValidationResponse();
String responseMessage = ...
0
votes
1
answer
668
views
How to kill "Changed conditional boundary" mutant - for loop?
I perform mutation testing, and on this line
for(i=0;i<100;i++)
is created a mutant "Changed conditional boundary". I know that the operator '<' is changed to '<='. My question is ...
0
votes
1
answer
182
views
JS array mutation
Why does the first function mutate originalArr (although I created copyArr to perform methods only on that copy)? And why doesn't the second function mutate originalArr?
function removeSmallest(...
4
votes
2
answers
1k
views
Ignore log entries in Stryker mutation test
I'm adding Stryker.net to my C# project. I see that it mutates on all log entries. Is there any way I can ignore these in the config?
2
votes
1
answer
2k
views
Configure multiple project files in Stryker.Net test
I have a Stryker test with this stryker-config.json:
{
"stryker-config": {
"reporters": [
"progress",
"html",
"json"
],
...
1
vote
0
answers
1k
views
OutOfMemoryError: pittest mutation testing
I want to generate a mutation testing report for my module (I have 225 classes in my module) using pitest.
I've added the needed dependencies and configured the plugin. The problem is when I run the ...
0
votes
2
answers
417
views
How to know if test was killed by Junit assertion error in PIT Mutation testing
I am using PIT mutation testing (1.6.7) and a maven build system. There is information on which test killed the mutants. But, what I need is whether the mutants were killed by JUnit assertion ...