Using iMacros to speed up testing

We’ve all had a web application that works in such a way that you are required to complete two or three steps in a workflow to get to the specific page you’re currently developing. It’s a pain to fill out all those required fields, some with complicated regular expression validations (e.g. credit card numbers, e-mail addresses, phone numbers, etc.). It sucks. You have automated acceptance tests, but right now, you’re just exploring with some JavaScript or server code.

So what do you do? What is the normal answer to a boring, repetitious problem. Automate it baby! It’s not that hard at all.  In acceptance testing I’m a big fan of not using the record-and-play type automation. I like seeing the detailed chatter between the browser and the server, but for this throw away situation it’s perfectly fine.

There are two tools that I’ve used to record browser interactions; Selenium IDE and iMacros. Actually, now that I think about it, there are two more; ACT and VSTS Web Tests. I’m going to ignore the last two because I don’t find them very friendly and ill suited for what I’m doing.

Between the two main options, Selenium IDE and iMacros, I use iMacros only because of it’s nicer integration with Firefox. I like the docked sidebar window with all the scripts I’ve recorded as opposed to Selenium IDE’s floating window and needing to load a test suite before being able to run a test. With that said, I do drive all automated acceptance tests with Selenium. The IDE is very useful, the API to interact with the browser has allows all the control I need.  I am very happy with it.

iMacros gives me one button to click to show my scripts.

image

Then a double click takes me where I need to go; simple, fast, efficient.

Recording the scripts are just as easy; click record, use the browser, stop and save.

image

iMacro does have the assertions that Selenium IDE has, but in this scenario, I don’t care. I don’t want to run any assertions, I just want to get where I’m going. iMacros has a few other useful scenarios in our organization:

  • Quick smoke test of problem areas
  • Pre compile pages after deploying website

These two scenarios are probably better served by Selenium and automated through our build server, but it is really simple to setup a script to do whatever you need it to do. Don’t discount it’s power.

3 Comments so far

  1. [...] http://www.fooberry.com » Using iMacros to speed up testing [...]

  2. testagent0 on March 30th, 2010

    Which one would you prefer, which one is safer, lets say from security perspective

  3. mark on March 30th, 2010

    @testagent0 I’m not really sure if either differ in terms of security. What makes them distinct in my eyes is iMacros has really tight integration with Firefox while Selenium can be easily driven from a unit testing framework and worked into our build server. I use them both, but for different purposes.

Leave a Reply