Model-based testing leveraged for automated web tests
Agile methods and their practices have fostered the widespread presence of automated test cases. Such test cases have been successfully and extensively adopted to test different software levels, from unit tests (e.g., JUnit) to end-to-end Web Graphical User Interface (GUI) tests (e.g., Selenium Webd...
Gespeichert in:
Veröffentlicht in: | Software quality journal 2022-09, Vol.30 (3), p.621-649 |
---|---|
Hauptverfasser: | , |
Format: | Artikel |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | Agile methods and their practices have fostered the widespread presence of automated test cases. Such test cases have been successfully and extensively adopted to test different software levels, from unit tests (e.g., JUnit) to end-to-end Web Graphical User Interface (GUI) tests (e.g., Selenium Webdriver). While test execution is mostly automated by existing tools, test design remains a manual task. In the pursuit of a more automated test case generation approach, the use of models has been advocated by the model-based testing (MBT) technique. Current MBT approaches assume a top-down workflow in which testers design models, test cases are generated from models, and then scripts are written to automate test execution. Nevertheless, writing automated tests is nowadays a developer’s responsibility and testers face a scenario in which automated tests might be reused to produce new model-based tests. This paper aimed to improve the synergy between existing automated tests and MBT. To do so, we present an approach that infers a model from existing tests, a tester leverages this model to include new tests, and then test code is generated. We analyzed the proposed approach in the context of Web applications with system-level GUI tests that employ the Page Object pattern. For MBT, we adopted event-driven models augmented with parameters and test input data. We evaluated the approach’s applicability with a prototype tool called MoLeWe and an experimental study with nine open-source Web applications. The results provide some evidence that using MoLeWe may help to include new tests faster than manually coding them, while increasing the overall code coverage of the test suite. |
---|---|
ISSN: | 0963-9314 1573-1367 |
DOI: | 10.1007/s11219-021-09575-w |