In my opinion, the most important thing to do is building a strong suite of acceptance tests [for this Web App you're about to refactor.] I would probably use http://fitnesse.org/ for this.
"Cool," I thought to myself, "I've got a Web App to refactor, and I'd like to write tests, and I'd like to learn a cool tool!" So I checked Fitnesse out (I've looked at it before but never used it.) Now, after spending some time reading and poking around, it seems to me that Fitnesse actually doesn't include any tools for Web site testing -- there are no built-in fixtures for HTTP page requests, form submits, etc. So, Ilja, what extra pieces would you use? Has somebody already set something up with HttpUnit, for example?
Well, first, it seems to be accepted best practice in the Fit community to let the bulk of the tests *not* go through the GUI. The reason is that most often the GUI is much more fluctuating that the business logic, so you don't want your tests for the latter depend on the GUI. (Robert Martin reports from a client who can't change the GUI of a system any longer, because he has thousands of tests going through it.) Of course you will still need to write tests for the GUi - for web applications there is WATT. As far as I know, it consists of HtmlFixture - which basically checks the structure of a HTML page, and IEFixture, which can be used to script a web session using MS Internet Explorer. For more information see http://fitnesse.org/FitNesse.WebAcceptanceTestingTool http://groups.yahoo.com/group/fitnesse/message/1096 http://groups.yahoo.com/group/fitnesse/message/539 But it also wouldn't be too hard to write some fixtures based on httpunit or something. I did something similar with JfcUnit for Swing and had something running in less than a day (see http://sourceforge.net/projects/jfcfixtures ). There might even be someone on the fitnesse mailing list you could join forces with.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
author and iconoclast