You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the classpath is generated by org.pitest.pitclipse.core.PitCoreActivator.start(BundleContext) (and also by org.pitest.pitclipse.runner.PitRunnerTest.classPathWithPitestAndJUnit()) by putting the required bundle location and the same required bundle location with the appended "/bin".
This assumes that the ".class" files are always generated into the output "bin" folder, but that's not the case during the Maven/Tycho build, which generates into "target/classes". During the Tycho build the classpath works thanks to the actual bundle location, which in that case is NOT a project folder, but the JAR.
Thus, it works basically but it raises a few false positives like in the org.pitest.pitclipse.runner.PitRunnerTest.shouldRunPitest(): when run from Eclipse the PIT runner actually generates mutants (since it finds the class to mutate in the test, PitOptions, in the "bin" folder"); when run from Tycho no mutants are generated, since it does not find the class (the classpath is the JAR and the JAR location + "/bin", which of course does not exist). The test however succeeds, because it only checks whether the HTML report dir can be found. In previous versions of PIT the HTML report dir is always generated but in the newer versions it is not, in fact, the test fails with an NPE in #123
The test can be fixed by running PIT in that test by using a test and a class in the same test projects, e.g., org.pitest.pitclipse.example.ExampleTest.
In any case, I'd suggest configuring all the .classpath files to generate into target/classes so that the output will be the same in Eclipse and during the build. This should avoid us some bad headaches in the future
The text was updated successfully, but these errors were encountered:
Currently, the classpath is generated by org.pitest.pitclipse.core.PitCoreActivator.start(BundleContext) (and also by org.pitest.pitclipse.runner.PitRunnerTest.classPathWithPitestAndJUnit()) by putting the required bundle location and the same required bundle location with the appended "/bin".
This assumes that the ".class" files are always generated into the output "bin" folder, but that's not the case during the Maven/Tycho build, which generates into "target/classes". During the Tycho build the classpath works thanks to the actual bundle location, which in that case is NOT a project folder, but the JAR.
Thus, it works basically but it raises a few false positives like in the org.pitest.pitclipse.runner.PitRunnerTest.shouldRunPitest(): when run from Eclipse the PIT runner actually generates mutants (since it finds the class to mutate in the test,
PitOptions
, in the "bin" folder"); when run from Tycho no mutants are generated, since it does not find the class (the classpath is the JAR and the JAR location + "/bin", which of course does not exist). The test however succeeds, because it only checks whether the HTML report dir can be found. In previous versions of PIT the HTML report dir is always generated but in the newer versions it is not, in fact, the test fails with an NPE in #123The test can be fixed by running PIT in that test by using a test and a class in the same test projects, e.g.,
org.pitest.pitclipse.example.ExampleTest
.In any case, I'd suggest configuring all the
.classpath
files to generate intotarget/classes
so that the output will be the same in Eclipse and during the build. This should avoid us some bad headaches in the futureThe text was updated successfully, but these errors were encountered: