The Dopefly Tech Blog

<< The Dopefly Tech Blog Main page

Software quality update

posted under category: General on March 4, 2008 at 1:00 am by MrNate

I said a few months back that I had decided to go head first into software quality as a general scope to become proficient at, so here's an update. I'm proud to announce that I've been making good progress.

I have been using Selenium to test some of my web applications. It can get complicated, but so far it has been marginally worth it. After figuring out the system, I set up a test suite for one app and have been working on it. I will blog about this experience soon.

I looked into CFUnit and CFCUnit. These are both CFC unit testing tools. If you google it, you won't learn which is better. They both have really good pluses. I went with CFCUnit because Sean Corfield and Chris Scott said so and it was easier to get working. Unit testing, even on the handful few components I applied it to, has already paid off really well. I will be doing more of this.

I made a couple Ant scripts. It's definitely starting to pay off, so I'm not giving up. I think I just now "get" the paradigm, so things are picking up. I will blog this one soon, probably after Selenium.

I will be playing with these new tools for a long while now before declaring myself king (or whatever it is I do before I get bored and move on).

Some day, I would like to explore some sort of DBUnit testing. I am seeing at least half a dozen angles for this, but two in particular. First, to test database relational integrity and just performing crud operations on all the tables, I would need a framework to support that - this isn't unthinkable to do in CFCUnit. Second, to snapshot my data's current state for when the data changes due to any testing and I would like to be able to change it back, quickly and easily.

Too old to comment!
On Mar 5, 2008 at 1:00 AM Jim Priest ( said:
All good stuff. I'm working though Selenium right now. Struggling with some Ajax/jQuery stuff but getting there.

Also looking at MXUnit - the new kid on the block for unit testing...

On Mar 5, 2008 at 1:00 AM Nathan Strutz ( said:
Jim, Thx for the comment - My selenium post is materializing slowly, but will be out eventually.

I'll try to hit the cf meetup for mxUnit tomorrow (3/6/08). Hope to see you there.

On Mar 5, 2008 at 1:00 AM Jaime Metcher (jmetcher, who breathes said:
DBUnit sounds cool, but it could be a false trail depending on what you're doing.

It's a valuable tool if you are writing ETL (extract/transform/load) processes and want to be sure that your rampaging queries haven't overstepped the mark. Its ability to snapshot and compare the entire database is great for this.

On the downside:
1. It's brittle in the face of schema evolution
2. Getting it working with auto generated keys, timestamp fields etc takes a bit of time and effort - and this invested setup time adds to the brittleness.
3. If you're really interested in testing CF code rather than SQL code, having to use your own domain objects to setup, query and teardown test data is a great way to both exercise the domain layer and refine its API.
4. You shouldn't need a clean database for unit testing most application code. Your domain code is robust, right? Having all sorts of crud lying around the data tables can be a great reality check - and top quality crud can't be faked. Our test environment is an amalgam of a copy of the production databases along with a dozen different people's experiments and partial test data

On Jul 11, 2008 at 1:00 AM QA Analyst Abhijeet ( said:
We have been using Selenium in many of the projects in my organization. We introduced it to many of the projects where client does not want to pay for expensive tool licenses but willing for automation. I observed that it's going well, but would like to see more of the experiences from you guys. I am just glad that while browsing all AIR blogs, I stumbled here at this post.

Too old to comment!