Implementing Automated User Interface Testing With Custom Made Script Language

OData support
Benedek Zoltán
Department of Automation and Applied Informatics

As the code base of an application grows so does its complexity and the number of potential bugs as well as the cost of maintenance. Code reviews and best practices in coding – like Clean Code or the SOLID principles - can significantly reduce the number of defects, but even so the program must be tested before each release. In many software projects this is often ignored or done manually instead of automating certain parts of the testing process.

In my thesis I will start with a short introduction to software testing: why automated testing can be beneficial, the different types of tests and how UI Testing is positioned there. Before presenting my own solution I will also list some of the more popular user interface testing tools.

After presenting the Windows application that is the subject of testing, I will describe how the testing tool I implemented should behave, with sample codes from the designed scripting language.

The next part will cover the parser of the script language, written in C#. I will describe the chosen parsing framework for the job and some alternative tools as well. While unit testing isn't the focus of the thesis, it was used extensively for the language parser, so I will dedicate some pages to it and also for showing the coding practices I followed to keep the application clean and maintainable.

Once the language parser is ready, it needs to invoke another layer that simulates the user interactions in the system. I will focus on the basics of Windows UI Automation SDK, how it is used with the scripting language and how the Application Under Test needs to modified in order to be used effectively with the framework.

As the last part of the implementation I will show how the command line tool is used and how it reports the test results to the developers.

Finally I will describe how automating the UI tests resulted in a lower defect rate and how it can be developed further to make release management easier.


Please sign in to download the files of this thesis.