| | 180 | === Coverage reports === |
| | 181 | |
| | 182 | If we want to generate coverage reports, we only need to load `Devel::Cover`. We can do it with the `PERL5OPT` environment variable: |
| | 183 | |
| | 184 | {{{ |
| | 185 | #!sh |
| | 186 | $ export PERL5OPT='-MDevel::Cover=+ignore,/(test|LC|CCM|CAF|Test|dependency)/' |
| | 187 | $ mvn test |
| | 188 | }}} |
| | 189 | |
| | 190 | There is now a `cover_db` directory. If we run |
| | 191 | |
| | 192 | {{{ |
| | 193 | #!sh |
| | 194 | $ cover |
| | 195 | }}} |
| | 196 | |
| | 197 | We'll get a very detailed HTML report. Review the full documentation of `Devel::Cover` for more details. |
| | 198 | |
| | 199 | Note that generating the coverage reports slows down the execution of your tests. But it's unvaluable help to find subtle bugs. |
| | 200 | |
| | 201 | |