Unit tests are simply tests that exercise small amounts of isolated functionality. That is, if you have a function that adds two numbers, instead of depending on running a user function that eventually calls the function, exercise the function directly. This often requires the use of mock objects that pretend to be things that the function needs in order to test the function in isolation from other functions that it depends on. Unit testing and refactoring are often done hand in hand.
The cost of unit tests is in writing the tests themselves and refactoring code as new functionality is introduced to keep the unit tests testing at the right level. The benefit is that you can easily test changes quickly to find simple problems before doing more thorough and slower testing. It also provides a good safety net for refactoring, gets developers more involved in testing, and usually improves the design of the software.
So, if you were starting a new software company with your own hard-earned cash, would you use unit tests or wouldn't you?
Next: Poll - Stand-up Meetings, The Benefits
The business of coaching is growing rapidly and there are a mass of people out there calling themselves coaches. It can be very confusing for someone looking for a coach to find the right one for them. A quick search will find lots of different titles: life coach, business coach, executive coach, personal coach, career coach, health coach, conflict coach, dating coach, sports coach victimisation coach, leadership coach, performance coach, and so on.
Tuesday, February 10, 2009
Poll - Unit Tests, The Benefits
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment