Been trying to work out what browser based testing is good for and not good for. Went to a talk to the other night at syncnorwich about testing at google scale. Seems they do use browser based testing but more as a top level of icing above a lot more tests of smaller units of functionality at code level.
It seems to make sense to test things as they are seen by the client, so I’ve been poking at Watir which allows for remote control of web browsers and therefore integration into automated tests. Apparently its jut one way of going about doing this and its a thin wrapper around selenium and web driver. I’m currently also interested in Ruby though so I went with watir (pronounced water apparently).
it seems browser based testing is good for a few use cases
- Different browser
- End to end tests
- Random inputs
Pounding on a url with random urls
It seems like probably browser based testing is good for end to end overview testing. Making sure that even though all your unit tests work the web application works fine when all put together.
Daniel Wagner-Hall mentioned fuzzy testing to me which seems an interesting idea and something easy to automate but its not something I’d heard of before.
So I started on wikipedia
“Fuzz testing or fuzzing is a software testing technique, often automated or semi-automated, that involves providing invalid, unexpected, or random data to the inputs of a computer program. The program is then monitored for exceptions such as crashes, or failing built-in code assertions or for finding potential memory leaks. Fuzzing is commonly used to test for security problems in software or computer systems.”
This seems like something that watir would be good for pounding on a page/site with random form inputs testing out back and forward browser actions, clicking random links etc. Cat walks across the keyboard style. The kind of thing a monkey would be good at one of the monkeys that aren’t busy typing the complete work of shakespeare. Never really understood why would a monkey would want to type shakespeare surely monkey fiction would be quite interesting?.
So anyway I’ve given my monkey something more interesting to do. You will need to have Watir installed/setup and I’m using Firefox but you could swap that out for your browser of choice.
web monkey script