Entries Tagged as tdd
Automated Testing with Selenium
December 30, 2009 · 5 Comments
A few weeks ago, I blogged about a fix for running Selenium with ant on Snow Leopard and several people have asked me to blog about the basic setup for which that fix applies since it is of much broader interest to developers... Yes, good point!
A bit of background first. I'm working on a large ColdBox project and one of the first things I did when I joined the project was to start creating some unit tests and integration tests. ColdBox has integration with MXUnit so you can fairly easily write unit tests for parts of your model and integration tests for your event handlers. Over time we've built a suite of over 100 MXUnit-based tests. If I had my way, we'd have a lot more by now but test-infecting your colleagues isn't always easy!
→ 5 CommentsTags: coldfusion · tdd
Selenium, ant and Snow Leopard
December 17, 2009 · 2 Comments
With the arrival of my new 27" iMac, I'm now doing all my development on Snow Leopard and that caused a problem today with my automated Selenium tests...
I use ant to drive Selenium to launch Firefox to run UI-based test suites. It's pretty slick and I'll blog about it soon. Unfortunately, on Snow Leopard, Selenium cannot launch Firefox from the command line (due to a security exception caused by a library mismatch it seems).
Myself and Peter Bell have been looking for a workaround for this for a few days and even started looking at the alpha builds of Selenium 2.0 which claim to resolve this (but we couldn't figure out how to drive those builds from ant).
Some Googling turned up Matt Patterson's blog post with a simple workaround. The root of the problem is the dynamic library load path in the environment and his workaround is simply to use a shell script wrapper that removes the environment!
Then you can specify browser="*chrome path/to/selenium-firefox" with your shell script in the selenese ant task and you're off to the races.
→ 2 CommentsTags: tdd
Static is Evil
December 12, 2009 · 1 Comment
This cropped up on the TDD mailing list and it made me smile so I wanted to share it along with some commentary. A fairly common request from folks in the CF community is for "static" methods (and data members) to be added to CFML. Folks look at Java, think it's a cool concept, and want it in CFML as well. I generally pop up and say it's a bad idea and that Java only has static because it doesn't have any concept of a global application scope (which CFML does, of course).
→ 1 CommentTags: architecture · coldfusion · tdd
What Makes Better Code?
November 09, 2009 · 6 Comments
As you might guess from some of my tweets and blog posts lately, I've been reading more about Agile, Lean and XP software processes, looking at how I can improve my own working practices and those of the teams I work with.
Once again the XP mailing list has provided a good read with a link to large-scale research at Microsoft into the effectiveness of certain software practices. As the researcher points out, the vast scale and diversity of Microsoft's software development ecosystem allows for some in-depth analysis that compares different approaches on similar teams.
The article is worth reading all the way through and shouldn't really contain any surprises but there are a couple of things I wanted to pull out and highlight.
→ 6 CommentsTags: programming · tdd
Testing a ColdBox Controller that Redirects
August 08, 2009 · 6 Comments
I'm working on a ColdBox project right now for a client and, as some may have gathered from my occasional tweets, I've set up Hudson as a Continuous Integration server that pulls the latest code from git, restarts the test server instance, reloads the test database and automatically runs the MXUnit-based test suite, whenever someone commits files to the main git repository.
We have unit tests for individual components and we have integration tests for the ColdBox event handlers. Luis has provided pretty good documentation for writing such tests but one of the challenges I faced in getting some of the integration tests working was that they redirected to a new event!
→ 6 CommentsTags: coldbox · coldfusion · tdd
Behavior-Driven Development with cfSpec slides posted
May 17, 2009 · No Comments
I just posted the slides (as a PDF) and the code example (account.zip) under PRESOS and SOFTWARE on my blog. You'll need to download cfSpec from RIAforge to run the sample code.
→ No CommentsTags: cfobjective · coldfusion · tdd
My cf.Objective() 2009 Schedule
May 11, 2009 · 2 Comments
In the absence of a printable schedule - sorry, Joe Rinehart says it's a problem with the Media3 hosting and he's been trying to get them to fix it for months! - here is my schedule for cf.Objective() 2009:
→ 2 CommentsTags: adobe · air · architecture · cfobjective · coldbox · coldfusion · coldspring · flex · iphone · j2ee · jquery · machii · orm · oss · ria · saas · swiz · tdd
TDD on ADC
April 20, 2009 · 4 Comments
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!
→ 4 CommentsTags: adobe · coldfusion · tdd
The value of unit testing?
February 27, 2009 · 2 Comments
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!
→ 2 CommentsTags: coldfusion · tdd
Behavior-Driven Development with cfSpec at cf.Objective() 2009
February 26, 2009 · 8 Comments
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!)
→ 8 CommentsTags: cfobjective · coldfusion · tdd
