Code Coverage with IntelliJ IDEA
Another subtle but nice feature of IntelliJ is integrated code coverage with Emma. The way this works is that you can setup code coverage metrics to be collected when you run unit tests. Additionally, these metrics can be aggregated across tests so that as you navigate through your code base you can visually see which paths have and haven’t been covered with your unit tests. IntelliJ colors the left half of the code editor’s gutter with green for covered code and red for uncovered code. Of course, if you’re working in a test driven manner then running across uncovered code should be the exception instead of the norm. But in this case seeing red should perhaps even be paid more attention to.
This image shows a simple bubble sort algorithm where one branch hasn’t been covered by a unit test:
IntelliJ also displays code coverage information at the package level in the project view as shown in this image:


I’m enjoying your blog. keep up the interesting information. I’m also interested in your thought concerning DSL? Can you blog more about that.
What about Rest as an architecture concern?
mark smith - November 28th, 2007 at 9:22 amMark, glad you enjoy the blog! I’ll do my best to post some follow up entries on DSLs. I haven’t spent much time investigating REST so unfortunately I don’t really have an opinion on it in terms of architecture.
rcoffin - December 2nd, 2007 at 4:08 pm