Testing framework in ruby
Testing framework in ruby
I would like to present another case study of the work that I've done for testing on ruby for an MNC client of mine. I won't be disclosing the project details, you all can understand why, but I'll try to explain the different challenges that i along with the team working on the project faced & how we overcome it. So lets start.
One of my client (security product based company) has their product on linux platform. The frontend is web app & can be accessed by using browser & entire system can be configured, monitored & managed using it. Now this was a very big task to automate the testing of the product, as they have 3 product lines & every product has their own settings etc.
Kindly understand that being a security product company the product is extremely complex & has 3 layers. The upper most layer is the frontend or GUI ie browser(firefox, internet explorer). Then there's a middle layer. And the last layer or backend of the system.
There are different team of developers working on different layers of product, both in India as well as abroad. I was working with the testing team of the company as a consultant. The challenge was to automate the frontend & make an entire testing framework for testing, which will not only test the frontend but also the other layers in the product.
How it was accomplished
We made a framework using ruby. For testing the top most layer i.e web apps, we used firewatir for firefox & watir for Internet explorer and wrote entire applications for it. Watir & firewatir are excellent for testing the web apps. We were able to code & test at the most detailed levels. We could embed logic into the program & even made the GUI testing application very intelligent. By using this GUI testing app we could run endless test continuously in regression.
For the middle & backend layer we used different libraries of ruby & rubygems & even the power of shell scripting & created the drivers that generates the required data to be sent for GUI testing app & controls the entire testing app. For this we used various logic & config files (text as well as excel) as per the requirement. Then we checked whether the data entered in the frontend was recorded in the middle layer as well as the backend databases etc. Once we got this information we checked it with the expected results. We made a reporting structure which tells us which test are passed & which tests failed & at what level & with whatever error messages.
Believe me it was truly amazing. We could run hundreds of tests in no time. And seeing the error report we only concentrated on the failed tests & use it to check manually & reproduce the bug.
Please feel free to give your suggestions.
Arun Tomar
Solution Enterprises
web: http://www.solutionenterprises.co.in
- aruntomar's blog
- Login or register to post comments



