I have an Erlang application that uses Rebar, and has tests written using Common Test. I'd like to see the test coverage report for these tests, so I included the following line in my rebar.config
file:
{cover_enabled, true}.
However, the "Coverage log" link in the Common Test report just leads to a page that says "Cover tool is not used". How can I get it to use the cover tool and give me a cover report when running the tests?
The
cover_enabled
setting inrebar.config
is necessary but not sufficient to activate cover reports for Common Test. You also need to create a file calledcover.spec
in the root directory of your application, containing:(Substitute the name of your application for
foo
.)That should give you a cover report for your application.