Guiding Automated Test Case Generation for Transaction-Reverting Statements in Smart Contracts

Conference Paper (2022)
Author(s)

Mitchell Olsthoorn (TU Delft - Software Engineering)

Arie Van van Deursen (TU Delft - Software Technology)

Annibale Panichella (TU Delft - Software Engineering)

Research Group
Software Engineering
Copyright
© 2022 Mitchell Olsthoorn, A. van Deursen, A. Panichella
DOI related publication
https://doi.org/10.1109/ICSME55016.2022.00023
More Info
expand_more
Publication Year
2022
Language
English
Copyright
© 2022 Mitchell Olsthoorn, A. van Deursen, A. Panichella
Research Group
Software Engineering
Bibliographical Note
Green Open Access added to TU Delft Institutional Repository ‘You share, we take care!’ – Taverne project https://www.openaccess.nl/en/you-share-we-take-care Otherwise as indicated in the copyright section: the publisher is the copyright holder of this work and the author uses the Dutch legislation to make this work public. @en
Pages (from-to)
163-174
ISBN (print)
978-1-6654-7957-8
ISBN (electronic)
978-1-6654-7956-1
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

Transaction-reverting statements are key constructs within Solidity that are extensively used for authority and validity checks. Current state-of-the-art search-based testing and fuzzing approaches do not explicitly handle these statements and therefore can not effectively detect security vulnerabilities. In this paper, we argue that it is critical to directly handle and test these statements to assess that they correctly protect the contracts against invalid requests. To this aim, we propose a new approach that improves the search guidance for these transaction-reverting statements based on interprocedural control dependency analysis, in addition to the traditional coverage criteria. We assess the benefits of our approach by performing an empirical study on 100 smart contracts w.r.t. transaction-reverting statement coverage and vulnerability detection capability. Our results show that the proposed approach can improve the performance of DynaMOSA, the state-of-the-art algorithm for test case generation. On average, we improve transaction-reverting statement coverage by 14 % (up to 35 %), line coverage by 8 % (up to 32 %), and vulnerability-detection capability by 17 % (up to 50 %).

Files

Guiding_Automated_Test_Case_Ge... (pdf)
(pdf | 1.03 Mb)
- Embargo expired in 01-07-2023
License info not available