Abstract [eng] |
Software testing can take up to 50 % of the project time. Thus, testing process is being automated. In order to generate automatic tests, you need to have test cases and a method to evaluate results of those test cases. This work describes how is it possible to generate automatic tests using UML state machine model. UML state machine model allows to model dynamic behaviour of a class/system, by defining possible object‘s states and transitions among them. It is being proposed to use transitions and their constraints for test cases generation and use constraints specified in states for evaluations of results of test cases. By using such technique, a tool was designed and realized allowing to generate automatic tests, where checking of constraints is done by using reflection, which does not require altering of already created classes, nor revealing of any fields of classes. Also, to generate test cases Deijkstra’s algorithm is used, which allows visiting all states and transitions. Moreover, boundary value analysis is used to generate test data for tested methods invocation, allowing to cover more code and detect more defects. Also, this tool and technique was evaluated to check how much code it is possible to cover and how many incorrect program realizations tests are able to detect. It was determined that there is a possibility to cover 100 % of code and detect all incorrect program realizations. However, with the intent to achieve this, it is very important that state chart model would describe all possible system’s states and transitions. |