My IDE layout for unit tests

by dan on April 2, 2009

my ide layout

my ide layout

I have found this to be a particulary effective way to layout my IDE when I’m writing a unit test.  Let me explain every part in detail.

  • Editor split vertically: This is the key part.  With my editor split vertically, I can keep the test and the production code open at the same time.  Without this split, I’d constantly have to switch between the two files.
  • Test on left & Production on right: I think it makes sense to put the file you type more on on the left side.  Keep in mind I type left to right.
  • Hide file system: The file system takes up precious horizontal space and should be ignored.  I focus just on the test and the unit of code I’m testing.
  • Tested code & Untested code: Code coverage shows me how much of this unit I have tested.
  • Test just this unit: This prevents other integration tests from interfering with the code coverage report.  I want to know how well this unit test covers the production code.

{ 2 comments }

Tom April 6, 2009 at 9:57 am

I don’t write in java, so I don’t recognize the editor – which is it? Eclipse? And how does Code Coverage work? Are there false positives or negatives?

Matt Moriarity April 6, 2009 at 11:10 am

@Tom

The editor looks to be Intellij IDEA

Comments on this entry are closed.