News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Scott Mattocks:
U is for Unit Tests
October 19, 2012 @ 09:52:07

Returning with another part of his series on his concept of LUCID development, Scott Mattocks has this new post for the "U" about unit testing.

Unit tests are like Google Maps for your code. When you zoom in and look at small pieces, you can only go so far. However, when you zoom out and take a look from a greater distance, you can see the full path from A to B. The idea of unit testing, as it relates to LUCID development, is that it maps out all the different ways to get from one end of your application to the other. Unit tests take the question of "how does my data get from the my user's request, through my code and back to the user again?" They answer that question just like any well written application: by breaking it down into smaller more manageable chunks.

He talks some about the purpose of the tests themselves - finding the exact point where something goes wrong, answering one question at a time. He points out that testing isn't just something that's to be done when the code is first written. The tests need to be continuously groomed and updated as things change too.

You can find the first part of the series, "L is for Logging" here.

0 comments voice your opinion now!
lucid development principles unittest


blog comments powered by Disqus

Similar Posts

Federico Cargnelutti: TDD: Checking the return value of a Stub

NetTuts.com: Refactoring Legacy Code: Part 5 - Game's Testable Methods

Jason Sweat's Blog: PHP Oracle Web Development (Review)

SitePoint PHP Blog: pTest: PHP Unit Tester in 9 Lines Of Code

Codeception Blog: BDD Approach to Unit Testing with Codeception


Community Events





Don't see your event here?
Let us know!


language community conference symfony zendserver api developer tips introduction podcast list framework deployment interview voicesoftheelephpant series bugfix laravel library release

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework