Wednesday, 27 January 2010

Unit Test Naming Conventions

Unit test names can be horribly long and misleading at times. I particularly hate...


Naming them in a concise, clear manner is important but consistency is the key. I use a simple convention to help me with naming my test methods that I've seen others use.

// MethodNameBeingTested_Input_Output

Steve Sanderson suggested (on his blog) that we call this naming convention SSR (Subject, Scenario, Result), sounds good to me :)

No comments:

Post a Comment