in IntelliJ IDEA with jUnit Text. Can I see how much of the project was covered in test

in IntelliJ IDEA with jUnit Text.  Can I see how much of the project was covered in test cases


Yes. You need to run the test with code coverage. You can use the Run With Coverage buton run-with-coverage.png. This button was a recent add (IDEA 12 I believe). Prior to it you need to turn coverage on in the run/debug configuration. In both cases, you can configure how the code coverage executes on the "Code Coverage" tab in the test's run/debug configuration.

p.s. I forgot to mention, after running you will see red and green areas on the left gutter to indicate covered (green) and not covered (red). For more information, See Help> Help Topics >IntelliJ IDEA Usage Guidelines > Code Coverage for more information.


thanks.. I try it tomorrow... good night.... starting to love this tool so much..



  I tested this today and it worked great.  thanks.. I love the report output... anyway to get it to run if I do a maven test from within IDEA


Please sign in to leave a comment.