Coverage goal selector for combining multiple criteria in search-based unit test generation

Zhou, Z., Zhou, Y., Fang, C., Chen, Z., Luo, X., He, J. and Tang, Y. (2024) Coverage goal selector for combining multiple criteria in search-based unit test generation. IEEE Transactions on Software Engineering, (doi: 10.1109/tse.2024.3366613) (Early Online Publication)

[img] Text
320987.pdf - Accepted Version

4MB

Abstract

Unit testing is critical to the software development process, ensuring the correctness of basic programming units in a program (e.g., a method). Search-based software testing (SBST) is an automated approach to generating test cases. SBST generates test cases with genetic algorithms by specifying the coverage criterion (e.g., branch coverage). However, a good test suite must have different properties, which cannot be captured using an individual coverage criterion. Therefore, the state-of-the-art approach combines multiple criteria to generate test cases. Since combining multiple coverage criteria brings multiple objectives for optimization, it hurts the test suites’ coverage for certain criteria compared with using the single criterion. To cope with this problem, we propose a novel approach named smart selection . Based on the coverage correlations among criteria and the subsumption relationships among coverage goals, smart selection selects a subset of coverage goals to reduce the number of optimization objectives and avoid missing any properties of all criteria. We conduct experiments to evaluate smart selection on 400 Java classes with three state-of-the-art genetic algorithms under the 2-minute budget. On average, smart selection outperforms combining all goals on 65.1% of the classes having significant differences between the two approaches. Secondly, we conduct experiments to verify our assumptions about coverage criteria relationships. Furthermore, we assess the coverage performance of smart selection under varying budgets of 5, 8, and 10 minutes and explore its effect on bug detection, confirming the advantage of smart selection over combining all goals.

Item Type:Articles
Additional Information:Z. Zhou and Y. Tang are partially sponsored by Shanghai Pujiang Program (No. 21PJ1410700) and National Natural Science Foundation of China (No. 62202306). Y. Zhou is partially sponsored by National Natural Science Foundation of China (No. 62172205). C. Fang and Z. Chen are partially sponsored by Science, Technology and Innovation Commission of Shenzhen Municipality (CJGJZD20200617103001003).
Status:Early Online Publication
Refereed:Yes
Glasgow Author(s) Enlighten ID:Tang, Dr Yutian
Authors: Zhou, Z., Zhou, Y., Fang, C., Chen, Z., Luo, X., He, J., and Tang, Y.
College/School:College of Science and Engineering > School of Computing Science
Journal Name:IEEE Transactions on Software Engineering
Publisher:IEEE
ISSN:0098-5589
ISSN (Online):1939-3520
Published Online:16 February 2024
Copyright Holders:Copyright © 2024 IEEE
First Published:First published in IEEE Transactions on Software Engineering 2024
Publisher Policy:Reproduced in accordance with the publisher copyright policy

University Staff: Request a correction | Enlighten Editors: Update this record