Developing a Concept for Transformations and Refactorings of Domain Models for a Model-based Testing Tool
Database-driven application systems represent an important group of software systems in today’s companies: E-Commerce shops managing customer and product data as well as accepting orders, healthcare or insurance systems managing accident histories and claims or reservation systems for the booking of hotel rooms, cars, train or flight tickets, just to name a few examples.
One main characteristic of these systems is their internal use of databases to store information. These databases add additional complexity to the testing activities because different test cases may require the databases to contain different information (test data). For instance, one functional test case may require a customer with two contracts of certain contract types. Another test case may require a customer with unpaid invoices or without any contracts at all.
To tackle the challenges of defining and generating appropriate test data, our research group is developing a new approach for the Specification-based testing of application systems using the ideas of Domain-specific modeling and Model-based testing: Domain Model-based Test Data Generation (DomTDG). The approach includes a prototype to allow demonstration and evaluation at our industrial cooperation partners. The prototype is based on Java and Eclipse utilizing Xtext, Xtend as well as EMF.
Problem Statement
Domain models (or database schemas) are often quite large which makes it hard to maintain an overview. It is even more difficult for a tester to identify relevant tables and columns and also to specify the required data for a given test case.
In addition, oftentimes applications degenerate and contain technical debt making it even more difficult for the tester: For instance, there could be columns which are deprecated (i.e. no longer used) but which are still present and require some dummy values or columns of type ‘char’ which only accept ‘Y’ and ‘N’ as its values instead of using a boolean type. It can become even more complicated when an integer is used as a type and only certain numbers are allowed, e.g. a ‘state’ column with 10 representing an ‘active’ state, 20 meaning ‘inactive’, 30 ‘pending’, 40 ‘under review’, …
Such things are often not explicitly documented but rather hidden somewhere in the source code of the application leading to test cases which are difficult to develop, difficult to understand and therefore also difficult to maintain.
Goals of the Thesis
The development and maintenance of test cases could be greatly simplified by applying some transformations and refactorings to the domain model. For instance, tests most often only rely on a small subset of all tables and the unnecessary tables could be hidden. If necessary, default values could be assigned to certain columns to hide them as well. The char column could be refactored to boolean and the integer column could be refactored to use an enum instead.
The goal of this thesis is to develop a concept to simplify the domain models for the tester by relying on Model-based techniques and refactoring. The concept should also be implemented and integrated into the existing prototype.
Literature
- DSL Engineering: http://dslbook.org
- Eclipse Xtext: http://www.eclipse.org/Xtext/
- Eclipse Xtend: http://www.eclipse.org/xtend/
Info
- Language: English, German
Supervisor
Partner
Generali