Wednesday, October 24, 2007

Monkey Testing

I received resume of one of the senior members being hired for test lead position. It was quite an ordinary resume containing chronological work-ex, education and courses/trainings undergone. The catchiest part of the resume was a phrase which read "Monkey Testing". I've to confess that I was absolutely ignorant about it. Neither did any of team members knew what on earth was "Monkey Testing". We discussed what possibly it could be, some gave great ideas like letting the monkeys to do the testing. I couldn't help myself googling out for it and was more than surprised to know what it was.

Monkey testing is random testing performed by automated testing tools (after the latter are developed by humans). These automated testing tools are considered "monkeys", if they work at random. We call them "monkeys" because it is widely believed that if we allow six monkeys to pound on six typewriters at random, for a million years, they will recreate all the works of Isaac Asimov or Shakesphere (Infinite Monkey Theorem).
There are "smart monkeys" and "dumb monkeys". "Smart monkeys" are valuable for load and stress testing; they will find a significant number of bugs, but are also very expensive to develop. "Dumb monkeys", on the other hand, are inexpensive to develop, are able to do some basic testing, but they will find few bugs. However, the bugs "dumb monkeys" do find will be hangs and crashes, i.e. the bugs you least want to have in your software product. "Monkey testing" can be valuable, but they should not be your only testing

Wikipedia says:
Monkey test is a unit test that runs with no specific test in mind. The monkey in this case is the producer of any input. For example, a monkey test can enter random strings into text boxes to ensure handling of all possible user input or provide garbage files to check for loading routines that have blind faith in their data.

All said and done, I was very much fascinated by the phrase. Maybe we should have more names suggesting the relevance of the test, something like a "Donkey Testing" for load testing or a "Leopard testing" for a speed testing. What say?
Post a Comment