Wednesday, September 2, 2009

Kinds of Tools

Tools are everywhere. We use a hammer and nail to get a picture onto a wall. Chimps use a stick to pull termites out of mounds (snack time!). And we use software tools to help us build and test (and ship) software.

One thing I've discovered is that there are a lot of different kinds of tools:
  • Throwaway tools. These are the bash scripts I put together in about 10 min because without them I forget to start the server before I start the client and then the client blows up (darnit!). I chuck 'em when I'm done with whatever test I'm doing.
  • Third-party tools that just work. Wireshark, a debugger, etc. Some of them save me a lot of time. Install and go, and I'm a happy tester.
  • Tools to work with other tools. This is when I'm staring at a tool that kinda sorta does some stuff but needs some help to be used or to do what I want (I'm looking at you, Selenium!). So I write a bunch of glue code to stick the pieces together, add some error handling to attempt to reduce the brittleness, expand (or create) the reporting, etc.
  • Test infrastructures. These are the things that you write as a basis for long-term tests. I'm going to use these over and over for years, across a lot of different kinds of tests, and they have to work reliably. These we design and build as we would a product (complete with tests that test the framework!).
I'm sure there are more types, but these are the ones coming to mind at the moment. I should also note that something I started as a throwaway script sometimes ends up in the test infrastructure, but usually I rewrite it a bit as it goes in.

I find it helps to think about the purpose of the tool as I'm writing or starting to use it. That way I don't spend a lot of time on something that doesn't need it, but if it needs to be done right I at least don't shoot myself in the foot with a hack job.

No comments:

Post a Comment