I was a Test Automation Developer in a regression testing project, in which a major public sector customer wanted to automate IT systems behind the e-business services it provided to its corporate clients.
As part of the e-business service, the corporate clients’ IT systems send required notifications to the customer in the form of XML messages. However, before corporate clients are authorized to use the e-business service, they must successfully complete a messaging test in the customer’s test environment.
Before Qentinel’s involvement, a civil servant in the public sector customer organization had to inform the corporate customer seeking access to the e-business service of when he or she would be available for the messaging test and would also check the validity of the message sent.
Qentinel provided an independent customer test environment that automated civil servants’ routine work so that their corporate clients could perform the test themselves.
Experimentation yields easy test automation for users
The challenge of automation lay in how to interpret the corporate clients’ notification messages, which only showed in our customer’s interface as an online form – almost like a screenshot.
The first trial, which involved using bitmaps for text and button recognition in the form, did not work, because the method was not sufficiently scalable. We next developed a procedure based on text recognition that identified the texts on certain buttons (e.g. the OK button) and directed the system click it. The advantage of text recognition was that it ensured faster testing progress and required less maintenance. The entire test was contained in a single file and the customer’s civil servant could immediately see what was happening in the test.
Upgrade your technology – experiment with applications designed for different purposes
Essential information about corporate clients appeared in specific data fields in the form and it was not possible for us to build a separate system to read this data directly from XML messages.
We first investigated whether we could utilize image recognition to read and check the information that the corporate clients had sent in their XML messages. This proved to be difficult because the software was an old-fashioned looking Java Swing application and the elements to be clicked would have each needed their own bitmap image. As a result, the number of bitmap images would have grown too large, making system maintenance too difficult.
We eventually developed a solution based on text recognition in which automation was used to recognize the required buttons and enabled the system to click the right ones.
We developed the text recognition method by conducting general research on ocular character recognition (text recognition) libraries, however they were not accurate enough. Java Swing uses aliased text (text with jagged, rough edges) that provides for a high degree of readability.
For the image processing library we adopted OpenCV, which uses the numerical computation library Numpy. In addition, we naturally used Robot Framework in a bid to make test creation as easy as possible. Our proprietary QVision computer vision library was used for test writing and maintenance.
Why did we succeed?
We succeeded because we dared to try an idea that might work. The idea and the resulting solution came from our talented test automation professionals. We were able to select the right keywords and the appropriate technologies to ensure the system would be fast enough and that it would deliver the required benefits to our customer.
Pekka Kiviniemi, Test Automation Developer