-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coverage generation fails when using pitmp for multi-module project #20
Comments
Referring to Update: Looks like pitmp is bailing when the module doesn't have test classes. I tried to skip the failing module using
Also , pitest seem to have a fix for this problem where they just skip if both source and test are not found, hcoles/pitest#314 . Should it work out of box in pitmp? |
I also noticed that skippedModules might not be working at the moment. The problem is indeed caused by a module without tests. A solution would be to additionally declare the JUnit dependency in the parent pom (note that root and parent pom may be different files). Make sure to declare the dependency in the root dependencies tag and not in the dependencies tag within the buildManagement tag. |
Thanks @nrainer , I will try that approach, however I have lots of modules(~20) without test classes so adding JUnit dependency to parent poms might be tricky . |
Do you think you would get some time to resolve this issue in the plugin as a clean fix sooner? I can try to look at the code and create a PR if its trivial fix. |
Skipping modules will be fixed with #22. |
Hi @nrainer , do you have plan to bump the version to 1.3.5 in maven central sooner? I have verified the fix on a snapshot version and it works fine. Also, is there a fix for skipping modules without test classes as well? |
Hi @sushantchoudhary, I just provided the patch. I am not in charge of and do not have the repository rights to release a new version. You need to contact @CaelInria. |
Cool, thanks a lot @nrainer . As for the modules without test classes , it doesn't seem to work with latest master since I am still getting this error
Hi @CaelInria , could you share schedule for bumping version to 1.3.5 . |
I have several modifications to include in the next release, I hope I can release a new version by next Friday. |
Hi @CaelInria , any update on the 1..3.5 release? |
Yes ! :-) |
v1.3.6 is available. |
Characteristics
Description
One of the modules fails with following error,
Error : SEVERE : Error generating coverage. Please check that your classpath contains JUnit 4.6 or above.
JUnit version on my local machine is 4.12.
[ERROR] Please copy and paste the information and the complete stacktrace below when reporting an issue
[ERROR] VM : Java HotSpot(TM) 64-Bit Server VM
[ERROR] Vendor : Oracle Corporation
[ERROR] Version : 25.171-b11
[ERROR] Uptime : 69769
[ERROR] Input ->
[ERROR] 1 : -Xmx2048m
[ERROR] 2 : -Xms512m
[ERROR] 3 : -Dbulk.download.url=https://maven-bulk-downloader.prod.atl-paas.net
[ERROR] 4 : -XX:+TieredCompilation
[ERROR] 5 : -XX:TieredStopAtLevel=1
[ERROR] 6 : -Dclassworlds.conf=/Users/xyz/.mvnvm/apache-maven-3.5.0/bin/m2.conf
[ERROR] 7 : -Dmaven.home=/Users/xyz/.mvnvm/apache-maven-3.5.0
[ERROR] 8 : -Dmaven.multiModuleProjectDirectory=/Users/xyz/Development/abc/xyz
[ERROR] BootClassPathSupported : true
Steps to reproduce
mvn eu.stamp-project:pitmp-maven-plugin:run
Reference : https://github.com/hcoles/pitest/blob/master/pitest-entry/src/main/java/org/pitest/coverage/execute/DefaultCoverageGenerator.java#L136
The text was updated successfully, but these errors were encountered: