Sign inSubmit
computersciencejournal.org is not ours. This journal is published only at thescipub.com/jcs. Report a suspicious emailcomputersciencejournal.org is not ours · Report
ArticleMetrics
Research Article · Open access · Published 11 February 2021

Estόria: A Framework for Code and Execution Reuse between Test Classes

Lucas Pereira da Silva1 & Patrícia Vilain1

Journal of Computer Science, Volume 17, Issue 2, pp. 90–111 · doi.org/10.3844/jcssp.2021.90.111

7,019 accesses3,665 downloads0 citations (Crossref)Metrics
Cite Check for updates

Abstract

Manual implementation of test code can lead to maintainability problems such as test code duplication. Strategies to avoid test code duplication and to promote test code reuse exist in the literature. However, it becomes increasingly difficult to apply these strategies as the system evolves and the number of test increases. In this study, we present a novel strategy to reuse test setup code from other test classes without breaking the independency principle of the Test Automation Manifesto. We implemented this strategy in a framework called Estόria. Beyond test code reuse, the framework also enables the reuse of setup execution. Test execution reuse is important because it reduces testing runtime and allows a quicker feedback to test developers. The overall impact in promoting both code and execution reuse of test setup is an improvement in test maintainability and a reduction in testing effort. Experimental results showed a reduction of 47.62% of duplicate test lines using our strategy. In addition, execution reuse allowed to reduce the execution time by a ratio of 8.

Licence and reuse

Open access. This article is licensed under a Creative Commons Attribution 4.0 International Licence (CC BY 4.0), as printed on the article, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original authors and the source. No permission is needed.

How to reuse this article

Responses (0)

Have a comment on this research? Sign in to respond. Responses are moderated and published with your name and affiliation; the authors are invited to reply. How we use your dataWrite a response

About this article

Cite this article

da Silva, L. P. & Vilain, P. (2021). Estόria: A Framework for Code and Execution Reuse between Test Classes. Journal of Computer Science, 17(2), 90–111. https://doi.org/10.3844/jcssp.2021.90.111

Licence
CC BY 4.0
Issue
Volume 17, Issue 2
Policies
Editorial independenceUse of generative AIData availabilityAppeals and complaints
Version
Version of record
Estόria: A Framework for Code and Execution Reuse between Test ClassesJournal of Computer Science · Volume 17, Issue 2 · pp. 90–111 · CC BY 4.0Download