An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Entries Tagged as tdd


April 20, 2009 ·

The Adobe Developer Center has a great article on Test Driven Development in ColdFusion by Bill Shelton and Marc Esher of MXUnit fame. If this is a new concept for you, read this article! If this is a familiar concept for you but you want to feel better about what you already do, read this article! Seeing this sort of stuff on the Adobe Developer Center is very encouraging because it says a lot about what is considered current best practice!

Tags: adobe · coldfusion · tdd

The value of unit testing?

February 27, 2009 ·

Sammy Larbi has a great blog post responding to the recent unit testing controversy sparked by Joel Spolsky and Jeff Atwood. If you're skeptical about unit testing, Joel and Jeff's piece would probably ring true for you but Sammy shares some good insights as to why they might have the wrong end of the stick. Whichever side of the fence you're on regarding TDD, you need to read his blog post!

Tags: coldfusion · tdd

Behavior-Driven Development with cfSpec at cf.Objective() 2009

February 26, 2009 ·

Nic Tunney just notified me that my BDD talk has been picked up for cf.Objective() 2009! Check the conference schedule for more details - a couple of new sessions by Mark Drew have also been added. Here's the abstract for the BDD talk:
The natural way to develop software is to start with requirements - the expected behavior - of the system. We work our way down the line through design to implementation and somewhere in there we do some testing. Unit testing focuses on implementation, even if you write the tests first. Behavior-Driven Development is intended to let you write the expected behavior - the requirements - in a testable format so that you can develop software top-down, in a natural manner. cfSpec is a great new framework that supports BDD for ColdFusion. Find out how it can help you develop testable, high-quality software in a natural way.
After cf.Objective(), I'll be happy to give this talk to CFUGs via Connect (Salt Lake CFUG - this means you!)

Tags: cfobjective · coldfusion · tdd

cfSpec and Railo / OpenBD

February 04, 2009 ·

I'm working on a specification suite with Pat Santora, who recently joined the Edmund Event-Driven Model project as a contributor (more on that shortly), and we're using cfSpec to define the expected behavior of Edmund.

[

Tags: coldfusion · edmund · openbd · railo · tdd

cfSpec 0.1.1 adds suites and many new matchers

January 11, 2009 ·

Ron just posted a new version of cfSpec to RIAForge that improves performance, adds a convenient way to run a directory full of specs and overhauls the "should" matchers to provide a much richer set of expectations. Check out Ron's blog post for more details of this new release.

Tags: coldfusion · tdd

Post-MAX BACFUG Double Bill recording posted

January 08, 2009 ·

I finally got around to adding the recording URL to Charlie Arehart's UGTV. It's a bit of a wild ride: it's two hours long with a 5-10 minute pizza break in the middle (sorry, Connect doesn't let you edit out the middle of a recording, only the start / end). If I'd known how limited the Connect editing was, I'd have made two separate recordings. Anyway, here is Unit Testing Improves Your Love Life - and - Groovin' To The Fusion: Marc Esher and Bill Shelton of MXUnit fame kick off the first hour and then Joe Rinehart of Model-Glue fame carries the second hour, explaining why a mixed language technology stack can make ColdFusion even more productive.

Tags: adobemax08 · bacfug · coldfusion · oss · tdd

Getting Started with cfSpec

January 06, 2009 ·

Ron has posted a great step-by-step tutorial for writing testable specs with cfSpec. Using an e-commerce shopping cart as an example, he builds up the spec, one expectation at a time, showing how cfSpec performs intuitive tests on the underlying objects, allowing you to write simple, expressive code, driven by your specification. cfSpec now includes "stub" objects (with true "mock" objects coming soon) so that you can specify the behavior of components independent from each other (so you don't have to write multiple objects just to get one object's expectations satisfied).

Tags: coldfusion · tdd

2008 in review

January 04, 2009 ·

As "usual", I start the year with a round-up of the highlights of last year, based on things that I blogged. It's been a strange year for me. After (seven) years with Macromedia / Adobe and most of 2007 spent freelancing, I took a full-time job with a startup and hired some amazing CFers to be part of my team. I (finally) learned Flex (and AIR). I learned a new language (Groovy) and did a lot less CFML programming than I've done in years while at the same time joining first the Open BlueDragon Steering Committee and then the CFML Advisory Committee, as well as attending more ColdFusion-related conferences than usual (cf.Objective(), Scotch on the Rocks, CFUNITED, Wee Dram of Scotch, MAX).

[

Tags: adobemax08 · air · bacfug · bluedragon · broadchoice · cfdevcon08 · cfml-advisory · cfobjective · cfunited08 · cfunited09 · coldfusion · coldspring · edmund · flex · fusebox · grails · hosted · iphone · openbd · oss · personal · railo · ria · saas · scotch08 · tdd · weedram08

cfSpec - Behavior-Driven Development for ColdFusion

January 02, 2009 ·

As folks know, I'm a big advocate of automated testing in general and unit testing in particular. I've gradually become a big fan of Test-Driven Development (TDD) where you write tests first and then write the code to satisfy the tests. I'm pleased to see unit testing well enough established in CFML development now that we have several unit testing frameworks (my current favorite being MXUnit, which I think has become the de facto standard choice for most CFers who are doing unit testing). Getting into TDD is not easy, however, and I think there are a couple of conceptual problems that take a while to get your head around. One is just a simple case of "Where do I start?". Given a blank piece of paper, how do you just start writing tests that are an accurate representation of what the yet-to-be-written system is supposed to do?

[

Tags: coldfusion · oss · tdd

Unit Testing Improves Your Love Life

November 25, 2008 ·

Oh, sorry, that was the title of the BACFUG presentation by Bill Shelton and Marc Esher (of MXUnit fame)! Unit testing has defined my working day. I've been working on the licensing subsystem of the next build of the Broadchoice Workspace today and because we practice Test-Driven Development (thanx Brian!), that means writing unit tests "first" or at least alongside the production code. I started by writing the License bean and an accompanying LicenseTest. The bean has a handful of properties and two methods. The unit test has nine test methods. Fairly confident that the bean was correct, I moved on to the data layer. Apart from encryption, this mostly follows our well-tested generic Hibernate DAO. That meant only a couple of unit tests. Once those tests passed, I moved on to the service layer. Six unit tests for four service methods. At this point I'm ready to write the remote service facade (which implements user-level security) but I'm fairly confident our licensing subsystem will work as expected. 623 lines of code, just over half of which is unit tests (327 lines to 296 production code). I'll probably add some more data layer unit tests since I have a couple of "untested" methods (they're used in the service layer tests). Unit tests may seem dull and tedious but they really can make your life easier.

Tags: broadchoice · tdd