[dancer-users] How do you measure code coverage?

Иван Бессарабов ivan at bessarabov.ru
Fri Jan 31 06:15:17 GMT 2014


I have a small Dancer1 app and I have started writing tests for the web part.
I used to write unit tests, but I have never written tests that test
web component.
With Dander::Test the task of writing tests is very simple, thank you
for that module.

But I don't understand one thing. I'm using Devel::Cover to find out
what I haven't tests. It works fine with my application model that is
created without Dacner, but it does not work for the Dancer routes.

Devel::Cover does not create any metrics for such code:

    any ['get', 'post'] => '/login' => sub {
    ...
    }

Devel::Cover shows that all my Dacner code is 100% coverd, but this is
not true. So this tool does not answer the question what is tested and
what is not.

So my question is how do you measure coverage of code that is tested?


More information about the dancer-users mailing list