masterThesis
Leveraging automated web tests into model-based testing
Fecha
2020-04-29Registro en:
MATTIELLO, Guilherme Ricken. Leveraging automated web tests into model-based testing. 2020. Dissertação (Mestrado em Informática) - Universidade Tecnológica Federal do Paraná, Cornélio Procópio, 2020.
Autor
Mattiello, Guilherme Ricken
Resumen
Background: Agile methods have driven automated execution of test cases, which have been adopted at different test levels, from unit testing to GUI testing. However, the tools that support automated testing focus on execution, leaving the generation of test cases as a manual task. In this way, the model-based testing (MBT) approach studies the generation of automated test cases through models, which are used to derive the test cases in a top-down workflow, where the model is created and from it are extracted the test cases that are subsequently executed. However, since testing implementation is currently the developer’s own responsibility, the tester may come across a scenario where there is already a test suite that must be reused to produce new model-based tests. Objective: This work aims to present an approach that uses existing automated tests to facilitate the adoption of MBT in this scenario, allowing the reuse of GUI tests to derive new test cases. To support the evaluation of the approach, we developed a tool that uses the PageObjects pattern for the abstraction and structuring of existing test cases in event-based models. Method: The tool developed to evaluate the approach, called MoLeWe, supports the three steps of the approach: model inference, model extension and test case generation. The experiment was conducted with 18 students, who developed test cases in Java with the PageObjects pattern for 9 web applications. The tool generated models for the developed test projects, which were extended and used to generate new test cases. Results: The experimental study collected data such as line coverage of the new test cases, execution time, effort spent to generate new tests and information that gave evidence of the feasibility of the approach and reuse of the existing test suites. On average, line coverage increased by 38.97% with the new test cases, the execution time gave evidence of linear growth in relation to the size of the projects and the approach proved feasible, reusing most of the existing test suites, since, on average, 70.54% of the new events created were already concretized.