As we all know, testing is an integral part of any application development process. It should not be relegated to a specific stage of the development cycle, and most definitely should not be the last thing on a To-Do list, just before handing over the application to your client. In a way, testing defines a successful completion of the development process. How else will you know if your fix for a minor bug disrupted a major function of the system? How else will the system be able to evolve into something more than is currently envisioned?
While developing the eclipse IRT application, intended to be used by multiple users simultaneously and who need access to consistent and accurate information 24 x 7, we were faced with a dilemma of how to replicate this particular scenario. We considered what would happen if thousands of people started using the application all at once. Would it crash and burn? We needed to create a high volume of web traffic, and calling upon family and friends was not an option.
Solution came in a way of Watir (pronounced “water”) which stands for Web Application Testing in Ruby. It is an open-source testing tool that allows you to write easy -to- read test scripts. Since it’s quite versatile, we have successfully used it for various projects, from simple web testing to web data entry.
Creating a standalone executable script with Watir was relatively straightforward as our test scenario was not extremely complicated. It consisted of the following steps: Open a web browser, navigate to the test site, login to the test site, add a subject, fill in all the visits of the subject, and then exit the web browser. If a single person were to sit in front of a computer and try to execute the same test scenario manually, it would take that person at least 20 minutes to complete this task. Watir, on the other hand, was completing the same test in around 40 seconds. We ran multiple copies of the script in a machine along with multiple machines simultaneously. It was fun to watch Watir script blazing through the web pages.
But, aside from all the fun, this simple test helped us weed out some unexpected bugs, such as a database deadlock issue on high volume interactions with the web application. The results of the test were considered a pass, and Watir web application successfully handled entire volume of requests generated by our scripts.
While testing might seem mundane and time consuming, with the right tools it can be fun. Most importantly, testing is absolutely necessary because mistakes can arise. Some of those mistakes can also be very expensive. As a company that prides itself on delivering Right technology with urgency and accuracy to our clients, we prioritize quality in everything we do. This tool allowed us to maximize testing quality while also increasing speed of testing.