-
Notifications
You must be signed in to change notification settings - Fork 354
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
pitest fails to execute on projects that don't have test classes #314
Comments
Pitest includes a |
Hi. Thanks for the answer. However if I'm correct this will mean override the plugin configuration in each module that doesn't have tests and the xwiki codebase that would be a lot of modules :) At this stage I only wanted to quickly test pitest and see what I could get out of it (without committing anything in the XWiki project yet). So indeed this would be an improvement but possibly a nice one :) (and should be pretty easy to do). Thanks! |
Would something like this work for you? <properties>
<pitest.skip>false</pitest.skip>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.1.10</version>
<configuration>
<skip>${pitest.skip}</skip>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>skip-pitest-if-no-main-dir</id>
<activation>
<file>
<missing>src/main/java</missing>
</file>
</activation>
<properties>
<pitest.skip>true</pitest.skip>
</properties>
</profile>
<profile>
<id>skip-pitest-if-no-test-dir</id>
<activation>
<file>
<missing>src/test/java</missing>
</file>
</activation>
<properties>
<pitest.skip>true</pitest.skip>
</properties>
</profile>
</profiles> |
Thanks that's very creative :) I think it worked but it's failing elsewhere now I think:
I've used this config:
Any idea? Thanks again |
word! (to get updated about this issue) |
I got chance to make a few changes that I'll merge I'll merge in shortly. The maven plugin now checks for that and both src and test folders are configured for each module and that those folders actually exist. If they do not the project is auto skipped. With no configuration set things seemed to work for xwiki but I haven't left it to complete a run so there may be issues I've not hit yet. |
Seems awesome @hcoles :) Waiting for it. |
That's merged in now and a 1.1.12 snapshot has been published. |
Seems to be working much better, thanks! I get a lot of the following, I don't know if that's "normal" though:
What would be awesome now would be to get an aggregated report, i.e. #41 :) Thanks again for your support, that's great. |
Some time outs are normal and expected (they happen when a mutation causes an infinite loop). A large number of them might indicate a problem. See http://pitest.org/faq/ |
Thanks. I need to do more reading (including the FAQ!) and see how I could use pitest now that I know it's working ;) |
When are you going to publish 1.1.12 on maven central? |
@khanhassan Yes, the next release is long overdue. Will publish when #334 has been addressed. |
Released in 1.2.0 |
For example running pitest on xwiki-commons-core (https://github.com/xwiki/xwiki-commons/tree/master/xwiki-commons-core) with the following configuration:
Leads to:
Note: The xwiki-commons-stability maven project doesn't have any test (and thus doesn't depend on junit).
The text was updated successfully, but these errors were encountered: