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

Collect scoverage results from all Test tasks #100

Merged
merged 4 commits into from
May 22, 2019
Merged

Collect scoverage results from all Test tasks #100

merged 4 commits into from
May 22, 2019

Conversation

olisikh
Copy link
Contributor

@olisikh olisikh commented May 19, 2019

Hi guys,

Thanks for a wonderful plugin!

I managed to implement gathering of scoverage results for both test and integrationTest (custom task) in the previous version of the plugin (2.x.x).

The new version of the plugin breaks my last hack and requires a new hack to be implemented in order to migrate to newest version 😄
I don't know if it's a major problem but usually projects have not just one Test task, an example would be this plugin itself where we have test and functionalTest sourceSets and their respective tasks.

This implementation that I did has one problem I noticed so far - one of the tests fails (but that might be not an issue, just a bit different behaviour).

My problem is that I can't migrate to the new version of the plugin because I can't add my custom test tasks to scoverage reporting.

Do you mind please to have a look and tell me if I miss something of if there's a way to do what I need.
If you think this code make sense, please feel free to change it if you think there's something to be improved.

@maiflai
Copy link
Contributor

maiflai commented May 21, 2019

Thanks - I'll try to take a look in the next couple of days.

Stu

@olisikh
Copy link
Contributor Author

olisikh commented May 21, 2019

I figured out why the test was failing, that happened because for each test task executed (e.g. "reportTestScoverage" and "reportIntTestScoverage") we need to aggregate those reports using the "reportScoverage" task and the underlying aggregator was using the rootDir to search for the report files.

Using the method of scoverage tool that accepts folders helped.

@maiflai maiflai closed this May 22, 2019
@maiflai maiflai reopened this May 22, 2019
@maiflai maiflai merged commit b1a6378 into scoverage:master May 22, 2019
@eyalroth
Copy link
Contributor

eyalroth commented Aug 9, 2019

@alisiikh Thank you very much for this contribution! I admit to have skipped the idea of having multiple test tasks in a module 😄

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.

3 participants