Tuesday 30 December 2014

iMacros Web Automation Testing

iMacros:

iMacros makes it easy to test web-based applications. You can use iMacros for in-browser functional, performance, and regression testing of web applications. The built-in STOPWATCH command captures exact web page response times. iMacros can be integrated with all other testing and monitoring packages.

iMacros makes it easy for you to record and replay repetitious work and it’s the only web automation software that works with every website, including sites use dialog boxes, frames, Javascript, Flash, Flex, Java and AJAX.

iMacros is an automation tool provided free of charge by iOpus. It is not meant to be a load-testing tool but works fine as one. There are free add-ons for Internet Explorer, Firefox and Google Chrome. I personally use the Firefox version, as it’s available both for Windows, Mac and Linux, and is more powerful than the Chrome version.

iMacros records your web browsing activity so that you can later simulate the actions of a real Moodle user, all automatically. For example, you start up Firefox and set iMacros to record. You go about your daily business on Moodle as normal (e.g. login, view your course, add an assignment, answer some forum posts and logout), iMacros keeps a record of everything you click on during your session, including all the forms that you fill in until you press ‘Stop recording’. Those steps are saved in a macro, which you can then play back later by opening that macro. This means that you can press the ‘play’ button and Firefox will repeat all of the steps that you did during your session, without any more interactions from your part, thus automatically simulating the web browsing activities of a Moodle user. You can ‘loop’ the action to repeat it automatically as many times as you like.

I use iMacros to record simple tasks, for example:

Login > View course > View resource > Logout
Login > View course > View directory > Logout
Login > View course > Post to forum > Choice > Logout
Login > View course > Take quiz > Logout

iMacros is meant to only simulate one user at a time, which is hardly load-testing. There is a simple workaround, which is to start multiple instances of Firefox (Ctrl+N for Windows, Cmd+N for Macs) on your PC, you are then only limited by your computer’s ability to run multiple instances of Firefox (RAM, CPU and bandwitdh being the three biggest issues). Each instance of Firefox then simulates one user. On my computer, I can safely run approximately 25 instances of Firefox concurrently (please note that using different tabs will not work). If you have access to a large network of computers, you can save the macros on multiple computers and schedule them to run at set times, automatically using a task scheduler or cron.

Supported Platforms:

Chrome, Firefox, IE

Pros and Cons:

Pros:

Very easy to use for simple workflows (e.g. login, view course)
Gentle learning curve.
Exact replica of what a real user’s browsing experience is like.
Excellent support in the form of a vibrant community and wiki.
Macros are portable and can be saved/run on multiple computers, from within or outside your network.
Regression testing with iMacros is easy and very flexible.
Free for private and commercial use.
Scripting Interface (API) for use with any programming or scripting language, DirectScreen and ImageRecognition support.

Cons:

More demanding workflows require to dive into the code
Limited number of simultaneous users, unless macros are run from multiple computers.
Limited command line interface, no Scripting Interface, no DirectScreen and ImageRecognition support.
No Linux support available yet. Linux support is planned, if you are interested in beta testing, please contact info AT iopus.com.

What we can do with it:

1. Support for Internet Explorer, Firefox, and Chrome
2. Automate and Work More Efficiently.
3. Form Filling
4. Web Automation with Image Recognition.
5. Excel Web Queries
6. iMacros can interface your software with online databases and websites sites like Amazon, Ebay or salesforce.com, use a programming interface (API) to control (script) Internet Explorer or Firefox, and automate upload/download of data via a local, Intranet or Internet web interface.
7. iMacros can upload data from a spreadsheet to a website, or populate an Excel sheet with data from a website.


Sources:

http://www.iteachwithmoodle.com/2012/10/10/3-free-tools-to-test-if-your-moodle-server-can-cope-with-large-amounts-of-students/

http://imacros.net/