GithubHelp home page GithubHelp logo

hcoles / pitest Goto Github PK

View Code? Open in Web Editor NEW
1.6K 57.0 348.0 14.28 MB

State of the art mutation testing system for the JVM

License: Apache License 2.0

Java 99.21% Groovy 0.04% CSS 0.23% StringTemplate 0.35% Kotlin 0.17%
mutation-analysis mutation-testing coverage junit testng testing java

pitest's People

Contributors

4562448 avatar alexelin avatar aurelien-baudet avatar cannehal avatar dependabot[bot] avatar eis avatar eorloff avatar galovics avatar hcoles avatar iirekm avatar jasonmfehr avatar jon-bell avatar laurenttho3 avatar lkwg82 avatar maxgabut avatar nespera avatar oscarlvp avatar rchargel avatar ripdajacker avatar rnveach avatar rsvoboda avatar sbuisson avatar stefanpenndorf avatar szpak avatar theangrydev avatar thleu avatar ursmetz avatar vampire avatar velo avatar vrthra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pitest's Issues

Better description than "mutated return of Object value for"

From [email protected] on December 10, 2011 23:29:14

The description for org.pitest.mutationtest.engine.gregor.mutators.ReturnValsMethodVisitor#areturnMutation is hard to understand. I had to read the source code to be able to understand what "mutated return of Object value" means. It would be better for it to say how it was mutated, as with the other mutations in ReturnValsMethodVisitor. For example: "if (x != null) return null; else throw new RuntimeException();"

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=16

PathNamePredicateTest fails on Windows machine, MutationStatisticsTest fails with german locale

From [email protected] on February 09, 2012 20:19:35

The test org.pitest.internal.PathNamePredicateTest.shouldMatchRootsWithMatchingNames() fails on windows machines. This is due to the fact, that

DirectoryClassPathRoot(new File("/foo/bar")).cacheLocation().value() is "C:\foo\bar"

My solution is to use new File("/foo/bar").getAbsolutePath() as input to PathNamePredicate.apply().


MutationStatisticsTest fails when started with german locale as JVM default locale. DecimalFormat uses german decimal symbols for formatting the output, but test expectation is a special string with english decimal symbols.

I've fixed the locale of DecimalFormat used to Locale.ENGLISH.


I've fixed both tests in my default branch, see http://code.google.com/r/stefanpenndorf-pitest-improvements/source/detail?r=0850aaeb822d273d836c9c3a815b12ad30e05590&name=default

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=29

Concurrency mutation operators

From [email protected] on February 09, 2012 19:28:37

A subset of the mutation operators described in http://www.cs.queensu.ca/~cordy/Papers/BCD_ConcOps_Mutation06.pdf Should be straightforward to implement

eg

MXT - modify parameters to wait, sleep, join and await method calls
RSK/RSB - should boil down to removing monitors
RXTX - remove wait, sleep,,join, yield, notify, notifyall calls
RNA - replace notifyAll with notify
rjs - replace join with sleep

These would result in stubborn mutants that most test suites could not kill, and overlap to a degree with existing mutators so should not be enabled be default. They might however be valuable to a subset of users if implemented and placed in their own CONCURRENCY collection within the Mutator enum.

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=28

PIT should KILL slave process after timeout

From [email protected] on February 09, 2012 09:31:35

PIT should kill the slave process executing the test(s) against the mutation(s) after some time. If the test is badly designed or the mutation fails to stop a non-deamon thread, PIT hangs forever.

I've got a project that creates a ThreadPoolExecutor and fails to shutdown() that executor after the test finishes. The threads of the executor stay alive and prevent the slaves JVM from terminating. This causes PIT to hang forever waiting for the slave process to die.

It would be better if PIT does not wait forever put applies a timeout and kills the process after the timeout.

I've attached a patch with a system test demonstrating the scenario/issue.

Attachment: threadpool-fails-to-shutdown.patch

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=27

PIT maven plugin does not set paths like surefire does

From [email protected] on February 29, 2012 13:03:47

Current Situation:
In a multi module project. When executing my tests with surefire they'll always pass. When executing the same tests with PIT (maven plugin) inside the (sub)modules they'll pass. When executing PIT from the parent/aggregator project some tests fail.

The tests fail due to test fixtures that cannot be resolved:
new File("src/test/resources/fixture.file");

Problem Cause:
The surefire plugin modifies the system property "user.dir" and sets it to the current module's paths/working directory:

getInternalSystemProperties().setProperty( "user.dir", getWorkingDirectory().getAbsolutePath() );

PIT does not do that. Please note that the path needs to be restored after the mojo execution (inside a finally block).

Work Around:
Do not locate test fixtures relative to the current directory on disk. In maven builds text fixtures will be available via classpath. To locate the file from the example above use

String filePath = Thread.currentThread().getContextClassLoader().getResource("fixture.file").getPath();
File file = new File(filePath);

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=33

xstream problems with JDK 7

From [email protected] on August 19, 2011 20:07:59

PIT fails to run on JDK 7 as xstream runs in pure java mode.

Following output reported by user

[ERROR] Failed to execute goal org.pitest:pitest-maven:0.21:mutationCoverage (default-cli) on project ddna-server-persistence: fail: Cannot construct org.pitest.mutationtest.MutationCoverageReport as it does not have a no-args constructor : Cannot construct org.pitest.mutationtest.MutationCoverageReport as it does not have a no-args constructor
[ERROR] ---- Debugging information ----
[ERROR] message : Cannot construct org.pitest.mutationtest.MutationCoverageReport as it does not have a no-args constructor
[ERROR] cause-exception : org.pitest.xstream.converters.reflection.ObjectAccessException
[ERROR] cause-message : Cannot construct org.pitest.mutationtest.MutationCoverageReport as it does not have a no-args constructor
[ERROR] class : org.pitest.mutationtest.MutationCoverageReport
[ERROR] required-type : org.pitest.mutationtest.MutationCoverageReport
[ERROR] path : /org.pitest.mutationtest.MutationCoverageReport
[ERROR] line number : 1
[ERROR] -------------------------------
[ERROR]
[ERROR] Please copy and paste the information and the complete stacktrace below when reporting an issue
[ERROR] VM : OpenJDK 64-Bit Server VM
[ERROR] Vendor : Oracle Corporation
[ERROR] Version : 21.0-b17
[ERROR] Uptime : 2881

This may be the result of the following xstream issue http://jira.codehaus.org/browse/XSTR-651

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=4

Exception running mutationCoverage goal

From [email protected] on January 06, 2012 15:29:30

What steps will reproduce the problem? 1.Run the mutationCoverage goal against my project

What is the expected output?
Mutation coverage gets calculated

What do you see instead?
8:24:48 AM PIT >> INFO : Sent tests to slave
stderr : 8:24:48 AM PIT >> SEVERE : Error calculating coverage. Process will ex
it.
org.pitest.xstream.io.StreamException: Cannot create XmlPullParser
at org.pitest.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppD
river.java:60)
at org.pitest.xstream.X
stderr : Stream.fromXML(XStream.java:895)
at org.pitest.xstream.XStream.fromXML(XStream.java:886)
at org.pitest.internal.IsolationUtils.fromXml(IsolationUtils.java:188)
at org.pitest.util.SafeDataInputStream.read(SafeDataInputStream.java:52)

    at org.pitest.c

stderr : overage.execute.CoverageSlave.main(CoverageSlave.java:53)
org.pitest.xstream.io.StreamException: Cannot create XmlPullParser
at org.pitest.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppD
river.java:60)
at org.pitest.xstream.XStream.fromXML(X
stderr : Stream.java:895)
at org.pitest.xstream.XStream.fromXML(XStream.java:886)
at org.pitest.internal.IsolationUtils.fromXml(IsolationUtils.java:188)
stderr :

stderr : at org.pitest.util.SafeDataInputStream.read(SafeDataInputStream.
java:52)

stderr : at org.pitest.coverage.execute.CoverageSlave.main(CoverageSlave.
java:53)

Exception in thread "Thread-1" org.pitest.PitError: null

Please copy and paste the information and the complete stacktrace below when rep
orting an issue
VM : Java HotSpot(TM) Client VM
Vendor : Sun Microsystems Inc.
Version : 20.0-b11
Uptime : 6636
Input ->
1 : -Dclassworlds.conf=C:\apache-maven-3.0.3/bin/m2.conf
2 : -Dmaven.home=C:\apache-maven-3.0.3
BootClassPathSupported : true

    at org.pitest.util.Unchecked.translateCheckedException(Unchecked.java:22

)
at org.pitest.util.SafeDataInputStream.readByte(SafeDataInputStream.java
:67)
at org.pitest.util.CommunicationThread.receiveResults(CommunicationThrea
d.java:82)
at org.pitest.util.CommunicationThread.run(CommunicationThread.java:59)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:250)
at org.pitest.util.SafeDataInputStream.readByte(SafeDataInputStream.java
:65)
... 2 more
8:24:48 AM PIT >> INFO : Calculated coverage in 1 seconds.

What version of the product are you using?
.24
On what operating system?
Windows XP Please provide any additional information below.

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=22

Split report generation and analysis

From [email protected] on September 18, 2011 13:34:39

This enhancement ticket was created to track the progress on the task of splitting report generation and analysis process.

PIT is currently hard coded to produce only a html report. One should redesign the reporting stuff and provide an interface for the integration of other tools. There is already an enhancement request ( https://code.google.com/p/pitestrunner/issues/detail?id=8 ) for Sonar integration / a Sonar plugin. Other report formats could also be interesting. For example there could be a maven site integration / plugin for PIT reports.

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=9

Flags —-excludedClasses —-outputFormats XML doesn't work

From mstachniuk on January 07, 2012 23:03:21

Flags —-excludedClasses —-outputFormats XML doesn't work.

To reproduce my configuration please see attachment, and start runPitest.bat

I see only HTML files (I use —-outputFormats XML),

and in index.html link to: org.bitbucket.mstachniuk.mfccchart.presenter.PolygraphPresenter.html report site.

I use:
—-excludedClasses org.bitbucket.mstachniuk.mfccchart.view.,org.bitbucket.mstachniuk.mfccchart.presenter.
flag in this runPitest.bat file and PolygraphPresenter should not be in report.

WixXP, Java HotSpot(TM) Client VM 1.6.0_29.

Attachment: pitests_bug.zip

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=23

Should detect classes without line or source debug information

From [email protected] on February 23, 2012 12:54:36

If PIT is asked to mutate classes which have been compiled without line numbers it will currently report that all mutations have not test coverage rather than alerting the user to the fact.

If classes without source debug are mutated PIT will null pointer when generating the report.

A hard error or warning should instead be generated in each case.

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=30

maven-pit plugin changes order of classpath when running tsets

From [email protected] on April 12, 2012 15:50:43

What steps will reproduce the problem? 1. Having a unit test using "jmockit.jar". This jar need to be on the class "before" junit. 2. 3. What is the expected output? What do you see instead? I expect the tests to pass in mevn-pit, such as they pass using teh surefire-plugin.
I see instead jmockit complaining, that it is not "before junit on the classpath". Inspecting the maven-pit output, I see indeed taht the classpath is ordered differently.

Looking at the code, I noticed that in MojoToReportOptionsConverter, method convert(), the classpath elements are added to a HashSet, before they get further processed. Adding them to a Set, instead of a list, changes indeed their order (and removes duplicates, if any)

Please see the attached patch, which replaces the HashSet with an ArrayList.
This makes my tests pass.

I think, it would be better in general, if the maven-pit-plugin runs the tests with the same classpath(including order and duplicates) as the surefire plugin. What version of the product are you using? On what operating system? Please provide any additional information below.

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=39

Enhancement request: Create Sonar plugin to present PIT measures alongside test coverage details

From [email protected] on September 08, 2011 22:42:40

What steps will reproduce the problem? 1. N/A - Enhancement request What is the expected output? What do you see instead? N/A - Enhancement request What version of the product are you using? On what operating system? N/A - Enhancement request Please provide any additional information below. We have been using PIT for a few projects and found it to be a terrific product! Having a PITest plugin for Sonar would be a great way to analyze and present mutation testing results alongside existing cobertura/Jacoco coverage measures in Sonar. http://www.sonarsource.org/ There is documentation about Sonar plugins here: http://docs.codehaus.org/display/SONAR/Developing+Plugins A [Jira| http://jira.codehaus.org/browse/SONAR-2783 ] has been raised with SonarSource as well in case they are interested in adding PIT as one of the measures analyzed and reported in Sonar. If Sonar incorporates PIT directly, then a plugin would not be needed, but having a plugin available for PIT in the meantime could significantly increase usage of this excellent tool.

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=8

Eclipse Plugin

From [email protected] on December 17, 2011 16:17:27

Please create an Eclipse plugin with update site.

Whenever a class under test or a JUnit test case is saved, mutation tests should automatically run. If mutants survive, add a line to the problem window and a marker on the line in the class under test where the mutation was made.

The popup for the marker should show the mutation made.

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=21

Improve configuration options

From [email protected] on August 29, 2011 21:04:24

Today PIT is very cumbersome to use in a maven multimodule project due to the need for a local configuration file for each module.

Usually a lot of the rules would apply for all submodules and therefore could be configured once at the top level.

I propose an option to configure the plugin by:
-a classpath resource (could be a maven bundle added to the dependency section for the plugin
-an URL (for instance from a sonar plugin providing configuration over http).

as well as a local file

If the rules could be merged together this would allow for very flexible configuration - and one could factor out common rules.

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=6

Enhancement Request: Ability to override, and customize, TestSelection Strategy

From [email protected] on July 12, 2012 19:02:17

The default Test Selection Strategy employed by PIT is designed to minimize the number of tests to be run against each mutated class. This can lead to omitting classes from execution that should be run. This in turn leads to false positives for surviving mutants that would have been killed had the skipped tests run.

This is difficult to reproduce, as it's unclear from any given execution why PIT excludes certain tests from being run against a class.

In small Java Projects, the full suite of tests runs very fast, so re-running all the tests for each mutation would not be onerous.

It could be helpful if:

  • TestSelection was implemented as a Strategy
  • Defaults to the current behavior
  • Offers ALLTESTS as an alternate implementation which "skips" test selection and re-runs all tests identified by .
  • Can be overridden with a property, e.g.:
DEFAULT ALLTESTS com.package.MyTestSelectionStrategy

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=50

Mutation testing hangs when test uses UISpec4J

From [email protected] on December 06, 2011 09:12:06

What steps will reproduce the problem? 1. run the supplied test script "run.sh"
2. wait a few minutes, output goes to screen
3. notice output stops being sent to screen. What is the expected output? What do you see instead? Test to terminate, but it does not, even if left for a few hours. I have left a larger test over the weekend and it still does not complete. What version of the product are you using? On what operating system? PIT 0.24 (latest), JVM 1.6 (25), UISpec4J (latest).
Windows 7 (with cygwin) and Linux (Fedora 14) Please provide any additional information below. Attached ZIP file contains source and tests taken from UISpec4J web site. It is compiled and ready to run. The run.sh script includes the command line invocation of the test (showing the parameters used). The jstackTrace.txt file contains the stack trace of the hung slave process captured with jstack.
If the slave process is killed, testing continues to the next set of mutations (another slave process is created) and may complete.

Attachment: addressbook.zip

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=12

Do not mutate nor generate coverage reports for test classes (or make it optional)

From [email protected] on December 10, 2011 21:52:30

Not all test code is in the same classes as the test methods. The tests can start behaving funnily when the test code is modified (for example one of the mutations enabled some of my debug code and started writing files to my working directory). It can also produce false warnings, for example when JUnit tests extend from an abstract test class which has some contract tests (e.g. https://github.com/orfjackal/jumi/blob/master/jumi-actors/src/test/java/fi/jumi/actors/ActorsContract.java ), and then the reports complain that the tests did not fail when a mutation removed assertions from tests. What steps will reproduce the problem? 1. Create a Maven project and put into /src/test/java some utility classes which are not tests in themselves
2. Run pitest-maven What is the expected output? What do you see instead? I'm expecting to those utility classes to not be mutated and not be seen in the coverage reports. What version of the product are you using? On what operating system? pitest-maven 0.24

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=15

Do not mutate assert statements

From [email protected] on April 02, 2012 09:12:00

Right now asserts in production classes produce false warnings in the class initializer and every line that has an assertion. It would be nice if PIT would detect the assertion code and not mutate it.

This would require analyzing the bytecode to detect the assertion instructions:

In the class initializer there is a "invokevirtual java/lang/Class/desiredAssertionStatus()Z" and "putstatic TheCurrentClass/$assertionsDisabled Z" plus some code in between. This pattern is probably the same everywhere (though maybe compiler dependent), so detecting it should be relatively easy.

In the assertions there is "getstatic TheCurrentClass/$assertionsDisabled Z" followed by a conditional jump. Here it would be necessary to analyze the code paths of the current method, and exclude from mutations the code path which is executed when $assertionsDisabled is false.

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=37

Aggregated report for multi-module projects

From [email protected] on April 26, 2012 14:34:14

I would be useful to have a better support for multi-module projects. Currently it is possible to run pitest on multi-module project (tested with Maven plugin), but there are missing for me aggregated statistics.

Because it could be time consuming to implement at least links from a parent report to the child reports would be useful (now it is required to find reports for every module separately).

Probably others will have some other ideas about multi-module builds.

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=41

Do not fail a Maven build if there is no code in a module

From [email protected] on December 10, 2011 20:39:02

Right now the configuration for pitest-maven needs to be spread over all modules of a multi-module project, because it's not easy to write it once in the parent POM and inherit to all child POMs, so that 80% of the modules would need no configuration (and just a few modules would have extra configuration or disable the plugin). What steps will reproduce the problem? 1. Create a multi-module Maven project, with a common parent POM for all modules
2. Add pitest-maven to the parent POM, so that all child modules inherit it
3. Build What is the expected output? What do you see instead? I would expect the build to work, but now the build for the parent module fails with the error:
[ERROR] Failed to execute goal org.pitest:pitest-maven:0.24:mutationCoverage (default) on project parent: fail: No mutations found. This probably means there is an issue with either the supplied classpath or filters. What version of the product are you using? On what operating system? pitest-maven 0.24

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=13

An easy way to enable all mutations

From [email protected] on December 13, 2011 20:14:37

Right now, to enable all mutations, I will need to go through the list at http://pitest.org/quickstart/mutators/ and add them manually to my pitest-maven configuration. Then when pitest is updated, I will need to remember to manually check whether any new mutations were added, and update my configuration.

I think the typical use cases are that I want to enable all mutations, or then I want to enable the default mutations plus a couple more useful ones.

One idea would be to have aliases ALL_MUTATIONS and DEFAULT_MUTATIONS which I could enter into the configuration, and that would enable all mutations which belong into those groups.

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=19

ConcurrentModificationException while collecting coverage

From [email protected] on May 23, 2012 05:34:18

What steps will reproduce the problem? I don't know, I just ran pitest on a rather large project. What is the expected output? What do you see instead? I see a CME, and test coverage is incomplete because of this. (I know that there are tests in place where 0% coverage is reported by pit.)

stderr : 9:26:33 PM PIT >> INFO : Found 2234 tests
...
stderr : Exception in thread "Thread-1"
stderr : java.util.ConcurrentModificationException
stderr : at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
stderr : at java.util.HashMap$KeyIterator.next(HashMap.java:828)
stderr : at org.pitest.coverage.execute.CoveragePipe.recordTestOutcome(CoveragePipe.java:32)
stderr : at org.pitest.coverage.execute.CoverageDecorator.execute(CoverageDecorator.java:47)
stderr : at org.pitest.containers.UnContainer.submit(UnContainer.java:46)
stderr : at org.pitest.Pitest$3.run(Pitest.java:148) at java.lang.Thread.run(Thread.java:662)
...
9:44:49 PM PIT >> INFO : Created 1187 mutation test units What version of the product are you using? On what operating system? 0.27 linux

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=44

Occasional freeze at "Sent tests to slave"

From [email protected] on June 09, 2012 22:51:18

Today I've managed to get PIT freezing multiple times. The last thing PIT prints before freezing is "INFO : Sent tests to slave". It will continue only after stopping Maven with Ctrl+C or killing PIT's slave process.

I've attached thread dumps and console logs. This happened with revision 62a12e79dc302526d31bec1191e99635d64d6888 of https://github.com/orfjackal/jumi Environment:
pitest-maven 0.27
Windows 7
Java 1.6.0_31

Attachment: console.txt maven.txt slave.txt

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=45

Read source files using the correct file encoding

From [email protected] on December 10, 2011 21:40:28

What steps will reproduce the problem? 1. Create a maven project which is configured to use UTF-8 for all files:

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

2. Create a .java file with some non-ASCII characters, for example add a header "// Copyright © 2011"
3. Run pitest-maven What is the expected output? What do you see instead? Expected the "©" sign to show up correctly in the reports, but now it shows up as "©" and in the source code it is "©" What version of the product are you using? On what operating system? pitest-maven 0.24 Please provide any additional information below. The solution is documented at http://maven.apache.org/plugin-developers/common-bugs.html#Reading_and_Writing_Text_Files

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=14

Problem with using additional classpath

From [email protected] on June 17, 2012 21:55:26

Working on a PIT plugin for Gradle I've got following exception trying to call MutationCoverageReport.main(arg) directly:

Caused by: org.pitest.PitError: Tried to retrieve value but had None.
at org.pitest.functional.Option$None.value(Option.java:96)
at org.pitest.mutationtest.instrument.JarCreatingJarFinder.classBytes(JarCreatingJarFinder.java:116)
at org.pitest.mutationtest.instrument.JarCreatingJarFinder.addClass(JarCreatingJarFinder.java:110)
at org.pitest.mutationtest.instrument.JarCreatingJarFinder.createJarFromClassPathResources(JarCreatingJarFinder.java:94)
at org.pitest.mutationtest.instrument.JarCreatingJarFinder.createJar(JarCreatingJarFinder.java:70)
at org.pitest.mutationtest.instrument.JarCreatingJarFinder.getJarLocation(JarCreatingJarFinder.java:60)
at org.pitest.util.JavaProcess.addPITJavaAgent(JavaProcess.java:91)
at org.pitest.util.JavaProcess.createLaunchArgs(JavaProcess.java:81)
at org.pitest.util.JavaProcess.launch(JavaProcess.java:131)
at org.pitest.util.WrappingProcess.start(WrappingProcess.java:23)
at org.pitest.coverage.execute.CoverageProcess.start(CoverageProcess.java:29)
at org.pitest.coverage.DefaultCoverageGenerator.gatherCoverageData(DefaultCoverageGenerator.java:124)
at org.pitest.coverage.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:79)
... 71 more

After some debugging I noticed that problem occurs for org.pitest.boot.HotSwapAgent class and is caused by using JarCreatingJarFinder constructor which doesn't know about additional classpath. Attached path seems to fix that issue.

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=47

Member variable mutator does not correct the stack

From [email protected] on April 06, 2012 00:47:47

Right now the MemberVariableMutator just removes the PUTFIELD instruction, but does not consume from the stack the values which would be consumed by PUTFIELD. This can result in invalid bytecode or general weirdness when the stack contains some values for the use of instructions after the PUTFIELD command.

The expected behavior would be for the mutator to pop 2 or 3 values from the stack, depending on the field's type (single-word or two-word).

Reproducing: On jdk1.6.0_24 following test (when inserted to MemberVariableMutatorTest) fails with the message "org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 4: First argument: expected I, but found Lorg/pitest/mutationtest/engine/gregor/mutators/experimental/MemberVariableMutatorTest$AssignmentAfterSomeValuesOnStack_SingleWord;"

static class AssignmentAfterSomeValuesOnStack_SingleWord implements Callable<String> {

    private int member = 1;

    public String call() throws Exception {
        // bipush 100
        // aload_0
        // iconst_2
        // dup_x1
        //      -> stack: 100, 2, this, 2
        // putfield
        //      -> stack: 100, 2
        // iadd
        // istore_1
        int i = 100 + (member = 2);
        return "" + member + " " + i;
    }
}

@Test
public void consumesValuesFromStackTheSameAsPutfieldWouldConsume_SingleWord() throws Exception {
    createTesteeWith(mutateOnlyCallMethod(), new MemberVariableMutator());
    final Mutant mutant = getFirstMutant(AssignmentAfterSomeValuesOnStack_SingleWord.class);
    assertMutantCallableReturns(new AssignmentAfterSomeValuesOnStack_SingleWord(), mutant, "1 102");
}
// TODO: the same test for two-word values (long or double)

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=38

JVM crash when mutating apache wicket project

From [email protected] on April 30, 2012 21:51:53

Crash seems to be deterministic when mutating a closed source wicket project.

All mutators have been individually enabled. Crash only seen with the following

RETURN_VALS
CONSTRUCTOR_CALLS
EXPERIMENTAL_INLINE_CONSTS
EXPERIMENTAL_MEMBER_VARIABLE

However, this does not necessarily imply that the issue is limited to these mutators.

Excerpts from example traces :-

A fatal error has been detected by the Java Runtime Environment:

Internal Error (oops/constantPoolOop.hpp:305), pid=8104, tid=6292

guarantee(tag_at(which).is_klass()) failed: Corrupted constant pool

JRE version: 6.0_30-b12

Java VM: Java HotSpot(TM) 64-Bit Server VM (20.5-b03 mixed mode windows-amd64 compressed oops)

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006d8f62ae, pid=8068, tid=6440

JRE version: 6.0_30-b12

Java VM: Java HotSpot(TM) 64-Bit Server VM (20.5-b03 mixed mode windows-amd64 compressed oops)

Problematic frame:

V [jvm.dll+0x462ae]

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=42

JDK7 try-with-resources with catch produces failing mutations for autoclose code

From [email protected] on June 23, 2012 02:42:05

What steps will reproduce the problem? 1. Use a try-with-resources with a catch for IOException What is the expected output? What do you see instead? No failing mutations from autoclose What version of the product are you using? On what operating system? 0.27, Ubuntu 12.04 x64 Please provide any additional information below. try (StringWriter writer = new StringWriter())
{
}
catch (IOException e)
{
throw new RuntimeException(e);
}

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=48

ArrayIndexOutOfBoundsException with MemberVariableMutator

From [email protected] on March 29, 2012 23:28:08

Pitest 0.26 from sonatype repo running from Maven got ArrayIndexOutOfBoundsException when EXPERIMENTAL_MEMBER_VARIABLE is enabled. Report is generated anyway.

Error should be reproducible with "mvn package org.pitest:pitest-maven:mutationCoverage" using tagged version of AppInfo:
git clone git://appinfo.git.sourceforge.net/gitroot/appinfo/appinfo
git checkout topic/pitest-0.26-reproducible-exception

12:16:35 AM PIT >> INFO : Mutation -> className=net.sf.appinfo.reader.FileManifestReader, index=0, mutator=org.pitest.mutationtest.engine.gregor.mutators.experimental.MemberVariableMutator KILLED by net.sf.appinfo.reader.FileManifestReaderTest._
Exit code was OK
12:16:35 AM PIT >> INFO : Skipping test Description [testClass=null, name=mutation test] as no mutations found
12:16:35 AM PIT >> INFO : 1 mutations left to test
stderr : 12:16:35 AM PIT >> INFO : Running mutation internalGetManifest : 46 -> Removed assignment to member variable manifest (0)

stderr : 12:16:35 AM PIT >> WARNING : Error during mutation test
java.lang.ArrayIndexOutOfBoundsException: 0
at org.pitest.asm.Frame.a(Unknown Source)
at org.pitest.asm.Frame.a(Unknown Source)
at org.pitest.asm.MethodWriter.visitMaxs(Unknown Source)
at org.pite
stderr : st.asm.MethodAdapter.visitMaxs(Unknown Source)
at org.pitest.asm.MethodAdapter.visitMaxs(Unknown Source)
at org.pitest.asm.MethodAdapter.visitMaxs(Unknown Source)
at org.pitest.asm.ClassReader.accept(Unknown Source)
at org.pitest.asm.ClassReader.accept
stderr : (Unknown Source)
at org.pitest.mutationtest.engine.gregor.GregorMutater.getMutation(GregorMutater.java:125)
at org.pitest.mutationtest.execute.MutationTestWorker.processMutation(MutationTestWorker.java:108)
at org.pitest.mutationtest.execute.MutationTes
stderr : tWorker.run(MutationTestWorker.java:75)
at org.pitest.mutationtest.execute.MutationTestSlave.main(MutationTestSlave.java:91)

Exit code was UNKNOWN_ERROR
12:16:35 AM PIT >> WARNING : Slave encountered error or timeout

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=35

optionally suppress timestamped folders

From [email protected] on May 21, 2012 23:46:01

What steps will reproduce the problem? 1. run any pitest report What is the expected output? What do you see instead? - reports are placed in a timestamped subdirectory of the pit-reports directory

  • I would like to optionally suppress the timestamped subdirectory and just place results in the pit-report directory, e.g. if '--timestampedReports false' is specified What version of the product are you using? On what operating system? 0.27, Mac OS X Lion & Windows. Please provide any additional information below. I'm quite keen to (optionally) suppress the timestamped folder when generating PIT reports. Is this possible with the current pitest?

My motivation is that the CI server I use (TeamCity 6.5) has support for displaying HTML reports from build artefacts, as long some user-specified start page is in a very specific and well known place. With the generation of the timestamped folder, I can't predict the exact path of that start page.

I do think that having timestamped folders is a good idea by default, but in the special case of my build server I know it's a clean build and there'll be no pre-existing reports.

Do you think this is a feature worth adding? I was thinking of an optional parameter 'timestampedReports' which defaults to true. (An alternative could be to always generated the timestamped report but optionally additionally copy the output to a fixed subdirectory, so the contents of pit-reports might be, for example:

201205191922
201205191924
latest

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=43

Removed assignment to member variable - false warning when field initialized with default value

From [email protected] on April 02, 2012 08:50:29

What steps will reproduce the problem? Create a class with a member variable that is initialized to the default value of that type, for example 0. An example is the "private int workers = 0;" in https://github.com/orfjackal/jumi/blob/master/jumi-core/src/main/java/fi/jumi/core/runners/WorkerCounter.java What is the expected output? What do you see instead? Now the above class gives the report "Removed assignment to member variable workers : SURVIVED". I think it would be better to not remove the assignment of initializers with default value, because that mutation changes nothing - the field will be initialized to the same value regardless of the assignment. (Making the initializer explicit can improve code readability, so that's why I often use them, instead of using the implicit default value.) What version of the product are you using? On what operating system? 0.26, Win 7

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=36

"Replaced constant value of 31 with 32 : KILLED" but "Substituted 31 with 32 : SURVIVED"

From [email protected] on December 13, 2011 19:59:31

I enabled all mutations and I'm having some confusing test results between INLINE_CONSTS and EXPERIMENTAL_INLINE_CONSTS. Could one of them have a bug? What steps will reproduce the problem? 1. Checkout the code from https://github.com/orfjackal/jumi 2. Build it with Maven: mvn clean verify -P coverage-report
3. See the report for TestId at \jumi-api\target\pit-reports What is the expected output? What do you see instead? The report shows two mutations which seemingly do the same thing, but one of them is killed and another survives:

Replaced constant value of 31 with 32 : KILLED -> fi.jumi.api.drivers.TestIdTest.hashCode_has_good_dispersion(fi.jumi.api.drivers.TestIdTest)
Substituted 31 with 32 : SURVIVED What version of the product are you using? On what operating system? pitest-maven 0.24
jdk1.6.0_24 64-bit
Windows 7 64-bit Please provide any additional information below. I've attached the pitest's HTML report and the .class file in question.

The source code of the method being mutated: https://github.com/orfjackal/jumi/blob/3c33370a5e82423401c343c23cbe977bfe8908c0/jumi-api/src/main/java/fi/jumi/api/drivers/TestId.java#L91 The test which kills the other mutation - the test is deterministic: https://github.com/orfjackal/jumi/blob/3c33370a5e82423401c343c23cbe977bfe8908c0/jumi-api/src/test/java/fi/jumi/api/drivers/TestIdTest.java#L46-67 The bytecode of the method being mutated:

public int hashCode();
Code:
0: iconst_1
1: istore_1
2: aload_0
3: astore_2
4: aload_2
5: invokevirtual #6; //Method isRoot:()Z
8: ifne 29
11: bipush 31
13: iload_1
14: imul
15: aload_2
16: invokevirtual #11; //Method getIndex:()I
19: iadd
20: istore_1
21: aload_2
22: invokevirtual #7; //Method getParent:()Lfi/jumi/api/drivers/TestId;
25: astore_2
26: goto 4
29: iload_1
30: ireturn

Attachment: fi.jumi.api.drivers.TestId_and_2_others.html TestId.class

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=17

org.codehaus.classworlds.NoSuchRealmException

From [email protected] on April 18, 2012 15:31:55

I am just playing with pitestrunner and it returns with :

Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : Java HotSpot(TM) 64-Bit Server VM
Vendor : Sun Microsystems Inc.
Version : 20.1-b02
Uptime : 2924192
Input ->
1 :
stderr : -Dmx1024m
2 : -javaagent:133475599904208463859518360803.jar
3 : -Dmx.sysinfo=amd64-Linux-c213cxx614
4 : -Dclassworlds.conf=/usr/share/maven2/bin/m2.conf
5 : -Dmaven.home=/usr/share/maven2
BootClassPathSupported : true

at org.pitest.util.Unchecked.tra

stderr : nslateCheckedException(Unchecked.java:22)
at org.pitest.util.SafeDataOutputStream.writeString(SafeDataOutputStream.java:46)
at org.pitest.util.SafeDataOutputStream.write(SafeDataOutputStream.java:51)
at org.pitest.coverage.execute.CoveragePipe.recordTes at org.pitest.util.SafeDataInputStream.read(SafeDataInputStream.java:52)

at org.pitest.mutationtest.CoverageCommunicationThread$Receive.apply(CoverageCommunicationThread.java:99)
at org.pitest.util.CommunicationThread.receiveResults(CommunicationThread.java:87)

stderr : t(CoveragePipe.java:35)
at org.pitest.coverage.execute.CoverageDecorator.execute(CoverageDecorator.java:40)
at org.pitest.containers.UnContainer.submit(UnContainer.java:46)
at org.pitest.Pitest$3.run(Pitest.java:148)
at java.lang.Thread.run(Thread.java
at org.pitest.util.CommunicationThread.run(CommunicationThread.java:62)
stderr : :662)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutp
stderr : utStream.java:65)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109)
at java.io.DataOutputStream.write(DataOutputStream.java:90)
at java.io.DataOutputStream.write(DataOutputStream.java:90)
at java.io.FilterOutputStream.write(FilterOut
stderr : putStream.java:80)
at org.pitest.util.SafeDataOutputStream.writeString(SafeDataOutputStream.java:43)
... 6 more
15:22:05 PIT >> INFO : Finished
Exception in thread "main" org.pitest.PitError: Broken pipe

Please copy and paste the information and the com
15:22:07 PIT >> INFO : Calculated coverage in 2925 seconds.
stderr : plete stacktrace below when reporting an issue
VM : Java HotSpot(TM) 64-Bit Server VM
Vendor : Sun Microsystems Inc.
Version : 20.1-b02
Uptime : 2924193
Input ->
1 : -Dmx1024m
2 : -javaagent:133475599904208463859518360803.jar
3 : -Dmx.sysinfo=amd64-Lin
stderr : ux-c213cxx614
4 : -Dclassworlds.conf=/usr/share/maven2/bin/m2.conf
5 : -Dmaven.home=/usr/share/maven2
BootClassPathSupported : true

at org.pitest.util.Unchecked.translateCheckedException(Unchecked.java:22)
at org.pitest.util.SafeDataOutputStream.flush

stderr : (SafeDataOutputStream.java:58)
at org.pitest.coverage.execute.CoveragePipe.end(CoveragePipe.java:51)
at org.pitest.coverage.execute.CoverageSlave.main(CoverageSlave.java:99)
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream
stderr : .socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.B
stderr : ufferedOutputStream.flush(BufferedOutputStream.java:123)
at java.io.DataOutputStream.flush(DataOutputStream.java:106)
at java.io.DataOutputStream.flush(DataOutputStream.java:106)
at org.pitest.util.SafeDataOutputStream.flush(SafeDataOutputStream.java:56
stderr : )
... 2 more

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
org.codehaus.classworlds.NoSuchRealmException: plexus.core
at org.codehaus.classworlds.ClassWorld.getRealm(ClassWorld.java:128)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:434)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=40

org.pitest:pitest-parent missing for Maven plug-in

From [email protected] on June 10, 2011 09:45:18

What steps will reproduce the problem? 1. I downloaded and installed pitest-0.19
2. I added pitest to pom.xml
3. I ran mvn clean install on my project What is the expected output? What do you see instead? My project doesn't want to build as pitest-parent seems to be missing. What version of the product are you using? On what operating system? I'm using Ubuntu 11.04, and mvn --version returns the following:

Apache Maven 2.2.1 (rdebian-4)
Java version: 1.6.0_22
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: nb_NO, platform encoding: UTF-8
OS name: "linux" version: "2.6.38-8-generic-pae" arch: "i386" Family: "unix"

Here's the output from Maven:

Downloading: http://repository.apache.org/snapshots//org/pitest/pitest-parent/0.19/pitest-parent-0.19.pom [INFO] Unable to find resource 'org.pitest:pitest-parent:pom:0.19' in repository apache.snapshots ( http://repository.apache.org/snapshots/ )
Downloading: http://repo1.maven.org/maven2/org/pitest/pitest-parent/0.19/pitest-parent-0.19.pom [INFO] Unable to find resource 'org.pitest:pitest-parent:pom:0.19' in repository central ( http://repo1.maven.org/maven2 )
Downloading: http://repo1.maven.org/maven2/org/pitest/pitest-parent/0.19/pitest-parent-0.19.pom [INFO] Unable to find resource 'org.pitest:pitest-parent:pom:0.19' in repository central ( http://repo1.maven.org/maven2 )
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).

Project ID: org.pitest:pitest-maven:maven-plugin:0.19

Reason: Cannot find parent: org.pitest:pitest-parent for project: org.pitest:pitest-maven:maven-plugin:0.19 for project org.pitest:pitest-maven:maven-plugin:0.19

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=2

ConcurrentModificationException in CoveragePipe.recordTestOutcome

From [email protected] on July 04, 2012 01:41:53

Recently PIT 0.27 started reporting one of my classes as having no coverage, even though it's covered by tests and that class nor its tests haven't been changed recently - I only changed some other classes in the same module. I'm guessing the cause to be this exception which just now started happening:

Exception in thread "Thread-1"
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at org.pitest.coverage.execute.CoveragePipe.recordTestOutcome(CoveragePipe.java:32)
at org.pitest.coverage.execute.CoverageDecorator.execute(CoverageDecorator.java:47)
at org.pitest.containers.UnContainer.submit(UnContainer.java:46)
at org.pitest.Pitest$3.run(Pitest.java:148)
at java.lang.Thread.run(Thread.java:662)

I'm getting this only on my Linux CI server, not on my Windows desktop. I'm guessing it to be related to what classes the project has and in what order the file system lists them.

I've attached the console log. The exception is at "pitest-maven:0.27:mutationCoverage (default) @ jumi-actors". The project in question is revision 1aab3ca2f94bdf5e34bc5e8675c94360d82099a2 of https://github.com/orfjackal/jumi

Attachment: console.log

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=49

JUnit Assumptions not handled corretly

From [email protected] on February 27, 2012 12:16:31

JUnit has the concept of assumptions since version 4.4 (see http://junit.sourceforge.net/doc/ReleaseNotes4.4.html#assumptions for details): If an assumption fails the test will be silently marked as passed. A failed assumption will be signaled by an org.junit.internal.AssumptionViolatedException thrown from the test code. The org.pitest.junit.CustomRunnerExecutor is not aware of this feature.

PIT reports all tests with failing assumptions as failed during the initial, unmutated run. This might also affect the mutated test run.

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=31

4 unit tests failing when trying to compile the code

From [email protected] on June 10, 2011 09:10:20

What steps will reproduce the problem? 1. I downloaded the source code using hg clone https://pitestrunner.googlecode.com/hg/ pitestrunner
2. Ran mvn install in the pitestrunner directory
3. The build failed. What is the expected output? What do you see instead? What version of the product are you using? On what operating system? I'm running Ubuntu 11.04 with the following version of Maven:

fvl@fvl-Precision-M6500:~/dev/pitestrunner$ mvn --version
Apache Maven 2.2.1 (rdebian-4)
Java version: 1.6.0_22
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: nb_NO, platform encoding: UTF-8
OS name: "linux" version: "2.6.38-8-generic-pae" arch: "i386" Family: "unix"

This is the end of the output from Maven:

Exit code was - OK
All ok
Got stats from slave Some(org.pitest.mutationtest.instrument.Statistics@9e0c79)
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.938 sec
Running org.pitest.TestMethodTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
Running org.pitest.functional.FArrayTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec
Running org.pitest.teststeps.NameStringConstructorInstantiateStepTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec
Running org.pitest.mutationtest.engine.gregor.mutators.ConditionalsMutatorTest
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.127 sec
Running org.pitest.junit.TimeoutProcessorTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
Running org.pitest.reflection.ReflectionTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running org.pitest.internal.EqualitySetTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running org.pitest.mutationtest.engine.gregor.mutators.InvertNegsMutatorTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.02 sec
Running org.pitest.distributed.master.ClusterManagerTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.063 sec
Running org.pitest.mutationtest.engine.gregor.mutators.ReturnValsMutatorTest
returnOne : 40 -> replaced return of integer sized value with (x == 0 ? 1 : 0)
returnTwo : 44 -> replaced return of integer sized value with (x == 0 ? 1 : 0)
returnThree : 48 -> replaced return of integer sized value with (x == 0 ? 1 : 0)
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.067 sec
Running org.pitest.MultipleTestGroupTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec
Running org.pitest.mutationtest.MutationTestFinderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec
Running org.pitest.functional.predicate.AndTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec

Results :

Failed tests:
shouldRecordVisitedLinesInInitialisedField(org.pitest.coverage.codeassist.CoverageTransformationTest)
shouldBeAbleToFindMultipleClassesUsingRegexNameFilter(org.pitest.extension.common.testsuitefinder.ClasspathSuiteFinderTest)
shouldReturnRegexMatchesWhenUsingRegexNameFilter(org.pitest.extension.common.testsuitefinder.ClasspathSuiteFinderTest)
shouldBeAbleToMixGlobAndRegexFilters(org.pitest.extension.common.testsuitefinder.ClasspathSuiteFinderTest)

Tests run: 506, Failures: 4, Errors: 0, Skipped: 8

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.

Please refer to /home/fvl/dev/pitestrunner/pitest/target/surefire-reports for the individual test results.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 30 seconds
[INFO] Finished at: Fri Jun 10 10:05:44 CEST 2011
[INFO] Final Memory: 21M/115M
[INFO] ------------------------------------------------------------------------

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=1

Constructor Call Mutator cannot mutate creations of super class in constructor

From [email protected] on February 29, 2012 21:43:38

The MethodCallMethodVisitor has one draw back/problem: In a constructor it cannot mutate creations of the super class as they do not differ from the own constructor call:

public class A extends B {
   private B b;
   public A() {
     super();
     this.b = new B();
   }
}

does not result in any mutation because the visitor cannot distinguish
between "super()" and "new B()". I don't have a solution to this
problem. Both method calls can only be distinguished by their
context/position.

A use case for that issue would be an object used as lock:

public class MyThreadSafeClass { // note: extends java.lang.Object
  private final Object lock;
  public MyThreadSafeClass() {
    super();
    this.lock = new Object();
  }
  // some code using lock in synchronized blocks
}

Original issue: http://code.google.com/p/pitestrunner/issues/detail?id=34

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.