Small-Amp: Test amplification in a dynamically typed language

Author:

Abdi MehrdadORCID,Rocha Henrique,Demeyer Serge,Bergel Alexandre

Abstract

AbstractSome test amplification tools extend a manually created test suite with additional test cases to increase the code coverage. The technique is effective, in the sense that it suggests strong and understandable test cases, generally adopted by software engineers. Unfortunately, the current state-of-the-art for test amplification heavily relies on program analysis techniques which benefit a lot from explicit type declarations present in statically typed languages. In dynamically typed languages, such type declarations are not available and as a consequence test amplification has yet to find its way to programming languages like Smalltalk, Python, Ruby and Javascript. We propose to exploit profiling information —readily obtainable by executing the associated test suite— to infer the necessary type information creating special test inputs with corresponding assertions. We evaluated this approach on 52 selected test classes from 13 mature projects in the Pharo ecosystem containing approximately 400 test methods. We show the improvement in killing new mutants and mutation coverage at least in 28 out of 52 test classes (≈ 53%). Moreover, these generated tests are understandable by humans: 8 out of 11 pull-requests submitted were merged into the main code base (≈ 72%). These results are comparable to the state-of-the-art, hence we conclude that test amplification is feasible for dynamically typed languages.

Funder

fonds de la recherche scientifique - fnrs

flanders make vzw, the strategic research centre for the manufacturing industry

fonds wetenschappelijk onderzoek

lam research and fondecyt regular

Publisher

Springer Science and Business Media LLC

Subject

Software

Reference63 articles.

1. Abdi M, Rocha H, Demeyer S (2019a) Adopting program synthesis for test amplification. In: Proceedings of the 18th Belgium-Netherlands software evolution workshop. published at http://ceur-ws.org, http://ceur-ws.org/Vol-2605/11.pdf, Brussels, Belgium

2. Abdi M, Rocha H, Demeyer S (2019b) Test amplification in the pharo smalltalk ecosystem. In: Proceedings of the 14th edition of the international workshop on smalltalk technologies, IWST, vol 19, pp 1–7

3. Agibalov A (2015) What is a normal “functional lines of code” to “test lines of code” ratio? Teslarati. [on line] https://softwareengineering.stackexchange.com/questions/156883/ — last Accessed In April 2021

4. Athanasiou D, Nugroho A, Visser J, Zaidman A (2014) Test code quality and its relation to issue handling performance. IEEE Trans Softw Eng 40 (11):1100–1125. https://doi.org/10.1109/TSE.2014.2342227

5. Baudry B, Allier S, Rodriguez-Cancio M, Monperrus M (2015) Dspot: Test amplification for automatic assessment of computational diversity. CoRR: a computing research repository. arXiv:1503.05807

Cited by 5 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Shaken, Not Stirred: How Developers Like Their Amplified Tests;IEEE Transactions on Software Engineering;2024-05

2. A test amplification bot for Pharo/Smalltalk;Journal of Computer Languages;2024-03

3. A Literature Survey of Assertions in Software Testing;Engineering of Computer-Based Systems;2023-11-29

4. An empirical study of automated unit test generation for Python;Empirical Software Engineering;2023-01-31

5. Type Profiling to the Rescue: Test Amplification in Python and Smalltalk;2022 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER);2022-03

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3