Generating Automatic Unit Tests of JavaScript Code from UML Class and Activity Diagrams
Authors:
- Agnieszka Malanowska,
- Adrianna Małkiewicz-Błotniak
Abstract
As testing phase plays a significant role in the software lifecycle, all facilitations that can speed up and automate this process seem to be very useful. One of the biggest group of approaches covers automatic test generation. In this paper, we describe our solution for fully automated unit test generation from UML class and activity diagrams. We have adapted and completely redesigned two algorithms from the literature. The first of them tests conformance of types of attributes and method return values between the class diagram and class implementation. The second one serves as a basis for testing all paths of the activity diagram. As a result, we generate tests in dynamically typed language, JavaScript, in the format required by Jest testing framework. We have implemented this approach in the extensible UML2Test tool, a plug-in to StarUML modeling environment. The tool generates complete executable unit tests from the UML model, so it can be used in conjunction with the test-driven
- Record ID
- WUTae80f921956a4132a39899be23ed211f
- Author
- Pages
- 189-196
- Book
- Ali Raian, Raian Ali Kaindl Hermann, Hermann Kaindl Maciaszek Leszek A. Leszek A. Maciaszek (eds.): Proceedings of the 16th International Conference on Evaluation of Novel Approaches to Software Engineering, vol. 1, 2021, SCITEPRESS – Science and Technology Publications, 536 p., ISBN 978-989-758-508-1
- Keywords in English
- Automatic Test Generation, Unit Tests, JavaScript, UML, Class Diagram, Activity Diagram, Jest, StarUML, Test-driven Development
- DOI
- DOI:10.5220/0010401401890196 Opening in a new tab
- URL
- https://www.scitepress.org/PublicationsDetail.aspx?ID=GsKXBJsEip0=&t=1 Opening in a new tab
- Language
- eng (en) English
- Score (nominal)
- 70
- Score source
- conferenceList
- Score
- = 70.0, 06-05-2022, ChapterFromConference
- Uniform Resource Identifier
- https://repo.pw.edu.pl/info/article/WUTae80f921956a4132a39899be23ed211f/
- URN
urn:pw-repo:WUTae80f921956a4132a39899be23ed211f
* presented citation count is obtained through Internet information analysis and it is close to the number calculated by the Publish or PerishOpening in a new tab system.