Model-based testing Leverage for Web (MoLeWe) is a tool that supports test case generation for web applications.
Publication:
@Article{MattielloEndo2022SQJO,
author = {Mattiello, G.R. and Endo, A.T.},
title = {Model-based testing leveraged for automated web tests},
journal = {Software Quality Journal},
doi = {10.1007/s11219-021-09575-w},
url = {https://doi.org/10.1007/s11219-021-09575-w},
volume = {30},
number = {3},
pages = {621--649},
year = {2022}
}
- Eclipse IDE
- Download the source code from this repository and open the projects MBTS4MA and MBTS4MA-Runner in Eclipse IDE;
- Run the project MBTS4MA;
When you click in New Web App Project, the following screen will show up.
Filling the inputs, the tool will list the possible Page Object classes. The user must check the classes that represent them.
Click in the confirmation button. The model will be generated.
For a complete running example, click here.
The experimental package contains the following files:
- Projects and generated models (experimental-package.zip)
- Nine virtual machines with the web applications configured:
- Metrics collected: contains all the metrics collected.
- Instructions to access web applications: contains instructions to access the web applications with preconfigured users
- Responses of the modeling effort validation experiment: a spreadsheet containing the responses of the experiment.
- Responses of the concretization effort validation experiment: a spreadsheet containing the responses of the experiment.
Download the virtual machine for the application you want to use and the experimental-package.zip file. This file contains all the 18 participants projects. Read file Instructions to access web applications to get credentials and further configurations.
Each project in the experimental-package.zip file has the following directories and files:
- coverages-after-new-tests: This directory contains the line coverage achieved after running the new tests;
- coverages-before-new-tests: This directory contains the line coverage achieved by the original project;
- project - refactored before new tests: This directory contains the original refactored project;
- project - with new tests: This directory contains the project with the new test classes and PageObject classes. Here, abstract methods are not yet concretized;
- project - with new tests implemented: This directory contains the project with the new test classes and PageObject methods are already concretized;
- project X - after changes.png: Project model AFTER the extension step;
- project X - before changes.png: Project model BEFORE the extension step;
- ProjectX.mbtsma: Model project saved by the MoLeWe tool.
Start the application's virtual machine and check which IP the machine received. The credencials to log into the VM are:
- User: root
- Password: utfpr
There are two scripts on the virtual machine:
- /root/before_testing.sh: run before running the test suite, to clean up the line coverage collection;
- /root/after_testing.sh: run after running the test suite, to calculate line coverage;
Select a project and change the IP address (according to the VM's IP) using any IDE.
Run the test project.
After running the tests, access the line coverage through the browser:
We designed two surveys to assess the effort results collected about the model extensions and test concretization. Both surveys are available in the following links: