jamoma / jamoma2

A header-only C++ library for building dynamic and reflexive systems with an emphasis on audio and media.
MIT License
30 stars 6 forks source link

Unit Test Coverage #36

Open tap opened 9 years ago

tap commented 9 years ago

Use tools for determining how much of our code is actually being tested. Integrate these tools into our Continuous Integration.

tap commented 9 years ago

For CI we could use something like Coveralls, which I've set up for Jamoma2 @ https://coveralls.io/repos/69110

Another project where I've seen Coveralls used is https://coveralls.io/github/mapbox/variant

The best looking setup procedure I've seen is @ https://github.com/JoakimSoderberg/coveralls-cmake with an example using it @ https://github.com/JoakimSoderberg/coveralls-cmake-example

tap commented 9 years ago

For doing coverage reports locally, I found this article to be hugely helpful: http://logan.tw/posts/2015/04/28/check-code-coverage-with-clang-and-lcov/

For prerequisites, I had to do the following:

Having done those I was able to follow the instructions and get a really nice web page showing code coverage and highlighting lines that we never execute, etc.

The make files for the unit tests currently always generate the code coverage flags, so that part of the article doesn't need to be fussed about.

tap commented 9 years ago

Demo at http://youtu.be/EJr-ELeOth4

@lossius @nwolek