Skip to content
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

Adding an additional report-aggregate mojo #433

Merged
merged 3 commits into from
Jan 29, 2018

Conversation

rchargel
Copy link
Contributor

Works similarly to the mojo of the same name from Jacoco.

The idea here is that if you have a multi-module maven project, you can generate individual reports for each of your modules, but then have a "report-aggregation" module which can be used to build a final aggregated report.

The report-aggregation module would have to include the modules it is interested in as dependencies.

As an example, say I have some project called company-functions, that had a few sub-modules:

company-functions
|____ module-1
|____ module-2

A third module would be created, maybe "mutation-report-aggregation" , which has module-1 and module-2 as dependencies.

That mutation-report-aggregation module would use the report-aggregate goal for your maven plugin, and an aggregated report would be generated.

The only caveat is that both the Line Coverage report has to have been exported, and an XML formatted formatted version of the mutation report must be present.

@szpak
Copy link
Contributor

szpak commented Dec 16, 2017

@rchargel Thanks for looking at the (long awaiting) feature. One high level question from the person maintaining the Gradle plugin for PIT. Does that code have to be Maven dependent? Having it implemented in PIT itself would make it easier to reuse in Gradle/Sbt/Ant/...

@rchargel
Copy link
Contributor Author

rchargel commented Dec 17, 2017 via email

@szpak
Copy link
Contributor

szpak commented Dec 17, 2017

@rchargel Great, it would be useful. Nevertheless, it would be good to get an input from @hcoles before that.

@rchargel
Copy link
Contributor Author

rchargel commented Jan 3, 2018

@szpak and @hcoles As per the request above, I updated the PR to separate out the aggregation code into a separate module (pitest-aggregator). That module has one important class, ReportAggregator with a builder. The builder is provided with a list of source directories, compiled code directories, and the mutations and linecoverage XML files, and then the aggregator can build an aggregated version of the report.

The "report-aggregate" maven goal now just calls into the code above. This change would be very useful to my organization as most of our maven builds are separated into 10 or more sub-modules.

Thank you,
Rafael

@hcoles
Copy link
Owner

hcoles commented Jan 8, 2018

@rchargel Thanks for the PR - I've not had chance to look at it yet (sorry), but I should finally have some time this weekend.

@hcoles hcoles merged commit e83ae76 into hcoles:master Jan 29, 2018
@hcoles
Copy link
Owner

hcoles commented Jan 29, 2018

Finally merged - sorry for the delay

@hcoles
Copy link
Owner

hcoles commented Jan 30, 2018

@rchargel Could you create a PR against https://github.com/hcoles/pitest-site that adds documentation for the new mojo?

@rchargel
Copy link
Contributor Author

rchargel commented Jan 30, 2018 via email

@sarahBuisson
Copy link

sarahBuisson commented Mar 24, 2018

@rchargel Hello, I've trouble to use your plugin, have you a sample somewere?
And the command line to launch-it

@rchargel
Copy link
Contributor Author

rchargel commented Mar 25, 2018 via email

@JustAnotherSoftwareDeveloper

Can you write this documentation, or direct me to it. I've tried to generate an aggregate report based off the source code, but it isn't working.

@rchargel
Copy link
Contributor Author

rchargel commented Apr 18, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants