API-Knowledge Aware Search-Based Software Testing: Where, What, and How


연구 분야: Verification



학회: ESEC/FSE 2023: Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering


초록

Search-based software testing (SBST) has proved its effectiveness in generating test cases to achieve its defined test goals, such as branch and data-dependency coverage. However, to detect more program faults in an effective way, pre-defined goals can hardly be adaptive in diversified projects. In this work, we propose KAT, a novel knowledge-aware SBST approach to generate on-demand assertions in the program under test (PUT) based on its used APIs. KAT constructs an API knowledge graph from the API documentation to derive the constraints that the client codes need to satisfy. Each constraint is instrumented into the PUT as a program branch, serving as a test goal to guide SBST to detect faults. We evaluate KAT with two baselines (i.e., EvoSuite and Catcher) with a close-world and an open-world experiment to detect API bugs. The close-world experiment shows that KAT outperforms the baselines in the F1-score (0.55 vs. 0.24 and 0.30) to detect API-related bugs. The open-world experiment shows that KAT can detect 59.64% and 9.05% more bugs than the baselines in practice.


Author Profile
Xiaoxue Ren

Zhejiang University Hangzhou China

China
Author Profile
Xinyuan Ye

Australian National University Canberra Australia

Australia
Author Profile
Yun Lin

Shanghai Jiao Tong University Shanghai China

China

📄 논문 정보

발행 연도 2023년
인용수 1
출판 국가 Australia, China
사이트 ACM
좋아요 수 0

연관 논문 목록 (282건)