Testing as Art
My first assignment at VRBO was to come up with a story for integration testing the site. This is ugly but totally necessary work. My initial take on this was a set of NUnit tests that would hit the site using HttpWebRequest and use SgmlReader to parse the response, and then rely on some combination of XPath and other assertions on the resulting DOM to write NUnit tests. The problem with this is that the site uses enough Javascript that not executing the JS would mean that the test coverage would really not be realistic, so we went in search of other options.
At this point, I started heading in the direction of doing some sort of code generation. I ran into TestGen4Web, a FireFox plugin that happens to be able to do recording and playback. Naturally, the limitation here is that it limits your testing to FF, but what interested me is that the recordings are saved in a fairly readable XML format. This seemed like an interesting starting point for some sort of code generation solutino, but still left unsolved the issue of what to do with the Javascript. Actually, today Brian Reischl told me about the Selenium IDE project, which seems similar. I'll have to look into Selenium at some point.
Finally, my co-worker Dave Scofield ran into Art Of Test, which produces a tool that really suited our situation well. We're a small company with no formal QA department, which means that we have developers doing the QA. AoT's WebAii tool puts a .NET wrapper around the browser, so you can drive a browser session using an NUnit or Visual Studio test framework. At this point, we weren't willing to sink a lot of time into a code generation solution, so we were hand-coding the tests, which wasn't a pleasant task, but not altogether un-doable either.
WebAii is still in beta and has a few beta-type issues, mostly around handling popups and system dialog boxes. Still, the product works well overall and we were very happy with the result. I expect that we could really ease the pain of testing by coupling something like TestGen4Web with a code generation step. However, it's a great tool if you're stuck with having developers write tests.
One thing that this whole process brought home to me is that you really need to design for testability in the UI as well. Many of the VRBO pages are fairly non-descript as far as markup, in that there isn't a lot of structure to guide an automated tool around. We found that simply adding ids to a few elements really improved things as far as the automation was concerned.
— Gordon Weakliem at permanent link
Room Without A View
26 floors lower than the old office, the view is much less impressive. I've been told that some people paint scenery on the inside of the window well. I'm not to that point yet. The kitty condo is placed strategically in the hope that Dylan will decide to park himself on it, rather than my desk. That hasn't quite worked as planned.
It's very strange working from home, though the coffee is better. I'm getting used to it, finally. It helps to have noise. I have a small television that I turn on sometimes, and between my small iTunes collection and my CD collection that somehow never got unpacked in the 18 months since we moved, it's not totally silent. And the sound of kids crashing around upstairs. Isabella has shown a great liking for very noisy objects, particularly our metal pie pans, which make a very satisfying crash on the hardwoods in the kitchen.
The strangest thing was today when I was asked to look into a crash dump file from one of the servers. After configuring windbg and loading up the dump, I completely lost myself for about an hour in it. I keep going back to it, poking around, finding interesting things on the heap, asking questions like "why do I have a 1 megabyte CacheItemRemovedCallback on the heap?". I haven't been able to get that lost in a pile of data in a while. Either I've really gone crazy or there's something to this whole working from home thing.
