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

run scoverage for specific set of tests #111

Open
SamKacer opened this issue Sep 5, 2019 · 3 comments
Open

run scoverage for specific set of tests #111

SamKacer opened this issue Sep 5, 2019 · 3 comments

Comments

@SamKacer
Copy link

SamKacer commented Sep 5, 2019

As far as I can see there is no way to run scoverage for just a specific set of tests, just to either run scoverage for unit tests or integration tests. The test suite for my team's project takes 30 minutes to run altogether, so when I want to just check how the one Test class I am developing is changing scoverage, it would be much more efficient to be able to just run that one class.

If this feature already exists, I apologize and would be very grateful if someone pointed out to me how to use it.

@eyalroth
Copy link
Contributor

eyalroth commented Sep 5, 2019

Take a look at the documentation of the available tasks, specifically reportScoverage. If you have multiple test tasks -- say, test and integrationTest -- you can run only the specific report task associated with each of them; for instance, reportIntegrationTestScoverage.

If you want to run only a specific test class, you can use the --tests technique. Note that you'll have to use the --tests argument with the test task rather than the report task, like so: gradle reportIntegrationTestScoverage integrationTest --tests *MySuite.

If you have a multi-module project, you'll need to use the tasks of the specific module you're after: gradle :myProjectA:reportIntegrationTestScoverage :myProjectA:integrationTest --tests *MyProjectASuite.

@SamKacer
Copy link
Author

@eyalroth
Thanks, I missed that. appreciate it

@atais
Copy link

atais commented Oct 13, 2020

what about aggregateScoverage ?
I have two jobs;

  • test - regular
  • slowTest - integration

I don't want to run integration tests for the purpose of aggregation, but for the moment I have no choice, or do I?

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

No branches or pull requests

3 participants