Testing Legacy Code

31 10 2008

The company I work for, Pillar Technology, recently created this really slick tool called Verde to generate unit tests for legacy code.  I have to admit at first I was very skeptical as I had seen some pretty ugly legacy code out there.  To make sure we’re on the same page here I personally define “Legacy Code” just as Michael Feathers does in his article “Working Effectively with Legacy Code” as code that has a lack of tests around it.  So by this definition code that was written even last week could conceivably be considered “Legacy” if there is a lack of tests.

So to get to the point, now that I’ve had some time to look at the tool, I’m rather pleasantly surprised.  I’ve seen this tool in action, and generate a bunch of integration tests for a service layer for an application, which will allow you to refactor confidently.  Jump over to the website (http://frogyourcode.com) and check it out.





Refactoring to RIAs - Agile 2008

30 01 2008

BJ and I have decided to throw our hat into the ring and submitted a session proposal to the Agile 2008 conference. You can read about it and comment on it on the Agile 2008 submission site here (http://submissions.agile2008.org/node/1676), or I’ve copied the summary below.

In 2002 Macromedia used the term “Rich Internet Applications” (RIA) to describe the next generation of web applications that have all of the benefits of a traditional desktop application, with the flexibility of being deployed via the Internet.

However, it’s 2008 and RIA has not been able to penetrate the business application sector with any real success. The old days of RIA are history. (Maintenance nightmares, weird or no unit testing, and little friendliness toward other agile developer practices.)

Read the rest of this entry »





Unit Testing JSP Custom Tags

25 01 2008

Testing J2EE components has always been a difficult task, which is probably why I see so many web projects that have few tests written for the web layer or sometimes none at all. Late last year Spring announced the release of Spring 2.5 , with some nice additions to the suite of mock testing objects for unit testing web components. That’s right unit testing web components, not in container testing. So like any good agile programmer let’s start with the test first. Read the rest of this entry »





Continuous Integration with Flex

16 01 2008

Earlier today I had posed a question to a mailing list in the .NET community asking about Continuous Integration with Flex in the .NET world. After a couple of answers from people who obviously did not understand the question, because they just told me to google CruiseControl.NET, someone with some knowledge of TDD and Agile practices stepped up and pointed out the obvious point I was trying to make. There currently is no real good way to automate your FlexUnit tests in such a way that a CI server like CC.NET or HudsonCI would know whether or not all of the tests for your Actionscript classes passed or failed.

So I’ve decided to start a Google Code project called agile-flex, where a couple of other developers and I will attempt to build some agile tools for the Flex framework, starting with a test runner that will help enable continuous integration for Java, .NET, or even just plain old Actionscript. The runner will likely be based off an article I found from Aaron Spjut here. In a nutshell we will create a test runner in Adobe AIR that will generate XML output similar to JUnit and NUnit for the CI server to be able to interpret. This will also enable the generation of report artifacts using the JUnit Report tasks or even a custom XSLT if desired. I’ll post more details as the project continues.

UPDATE… The Flex-Mojos project now fulfills this need, so I’ve deleted the Google Code Project that we started for this.