quickfixj
quickfixj copied to clipboard
Integration with JaCoCo and Coveralls
I was able to integrate with JaCoCo code coverage and Coveralls plugins. The configuration excludes auto generated code so it covers only quickfixj-core logic (as it should). The build takes 30 seconds more on Travis - no impact on local builds as the goals are not executed.
Since the project is public there are no tokens required etc. The only post requisite is to login to Coveralls and add quickfix-j/quickfixj repo via QuickFIX/J organization from one of the members. Coverage status badge already points to it.
At the moment coverage is 78% which will make the badge red (> 80% orange, > 90% green), but I will be happy to improve the coverage later on.
Please have a look at my branch view in Coveralls. https://coveralls.io/github/the-thing/quickfixj
There are also other code coverage projects such as Code Climate, but they do more than that. Coveralls seems to the most feasible for pure code coverage.
Thanks for the PR. I've authorized Coverall for this repo.
Cool.
I'm not able to see it on Coveralls though. Is this the right link? https://coveralls.io/github/quickfix-j/quickfixj?branch=master
@the-thing , link should work now. Had to add it manually on Coveralls.
Seems to wok. Uploaded successfully to Coveralls. https://coveralls.io/github/quickfix-j/quickfixj
There is a problem with coverage for quickfix.field.converter classes. It seems that JaCoCo is not able to detect the common inclusion/exclusion for quickfix.field.* and quickfix.field.converter.*. I'm getting the same reports locally and I think this is because of JaCoCo plugin filtering being different.
We can either exclude fields and converters from the report or include them both. The way to fix it would be to move out converters to a different package e.g. quickfix.converter (package changes + pom exclusion pattern change). However, this will be a breaking change if somebody is using converters in their code directly.
Local coverage after moving converters.

@the-thing :+1: for quickfix.converter package. The change should be OK for 3.0.0 milestone. However, we probably need to decouple this from the Coveralls change.
Ok. Leaving this PR as is.
Sorry for the long delay, still busy with other stuff. :-( Will hopefully be able to get back to this soon...
No problem, I was on holidays myself. I'm actually more keen on merging https://github.com/quickfix-j/quickfixj/pull/305.
@the-thing I see that you did this change for Travis. Would it be much work to integrate this into the Java CI jobs?
Not sure, but I will have a look sometime this week. Yes, this seems to be obsolete change atm.