Skip to content
This repository has been archived by the owner on Aug 7, 2020. It is now read-only.

Can you fail build based on configurable coverage number #97

Open
JonCook opened this issue Jun 28, 2013 · 3 comments
Open

Can you fail build based on configurable coverage number #97

JonCook opened this issue Jun 28, 2013 · 3 comments

Comments

@JonCook
Copy link

JonCook commented Jun 28, 2013

For example could I configure my build to fail if coverage isn't 80% or configurable number?

Thanks

@cameroncan
Copy link

+1 I'd like to see this as well

@simoami
Copy link

simoami commented Dec 22, 2013

I'd want to see a more concrete use case. Are you talking about overall coverage or per test? i.e. every new test requires at least 80% coverage. If it's overall coverage, with big projects, it might take long before one reaches that number, which makes it difficult to enforce this rule from the get go.

I'd suggest looking into incorporating Sonar as part of your CI setup, as it specializes in code quality metrics and has a maven build breaker plugin that can be set to fail your builds based on specific rules.

This way saga can specialize in reporting coverage and sonar or other tools can collect code coverage and decide what to do with it.

@JonCook
Copy link
Author

JonCook commented Dec 22, 2013

It would be nice to put into the mvn configuration a value representing overall coverage which causes mvn to fail your build if it is not satisfied, that way it would plug straight into tools like jenkins and you wouldn't need to worry about looking at heavy weight tools like sonar for this simple use case.

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

No branches or pull requests

3 participants