Browsing All posts tagged under »unit testing«

A roadmap for unit testing

December 4, 2012


I was recently asked by an old friend how they can get started writing unit tests on their existing application.  He was looking for guidance and more or less a roadmap of how to get started.  I decided to share what I sent him here. So, if there is already code written for an application […]

Exploring Test Method Names

November 10, 2011


When coaching individuals on how to name unit test methods, I have struggled to come up with a standard that I like.  I have read numerous posts and books on the subject with a wide variety of results and standards.  In this blog I will explore the various standards for naming unit test methods and […]

Unit vs. Integration Tests

June 24, 2011


I have been doing more and more testing recently and I wanted to start capturing some of my thoughts on testing.  An important topic is the differences between a unit test and an integration test.  I feel like this is pretty straight forward, but is still worth clarifying, since I feel like it is done […]

Maven Tip: Disabling Profiles when a Property Does Not Exist

February 9, 2011


I wanted to share a method for enabling a Maven Build Profile in the absense of a system property.  I did not see this approach documented in the current version of the Maven Build Profile documentation, so I thought I would share it. I find this approach particularly useful for turning off build features whenever […]

A Practical Approach to Unit Testing

May 7, 2010


Last year I was asked to give a 1 day workshop on how to write unit tests. I put together a presentation and workshop format and it was a huge success. The team quickly took to not only writing unit tests but was able to quickly utilize mock frameworks and other testing tools. Code coverage for the application quickly jumped and management was pleased. I recently took another look at this presentation to see if I wanted to revise anything and I thought that I might want to share some of the thoughts here. These guidelines are intended to get somebody started with unit testing quickly, but could be a welcome refresher for somebody who has been writing tests for a while.