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

被引:1
|
作者
Ren, Xiaoxue [1 ]
Ye, Xinyuan [2 ]
Lin, Yun [3 ]
Xing, Zhenchang [2 ,4 ]
Li, Shuqing [5 ]
Lyu, Michael R. [5 ]
机构
[1] Zhejiang Univ, Hangzhou, Peoples R China
[2] Australian Natl Univ, Canberra, ACT, Australia
[3] Shanghai Jiao Tong Univ, Shanghai, Peoples R China
[4] CSIROs Data61, Eveleigh, NSW, Australia
[5] Chinese Univ Hong Kong, Hong Kong, Peoples R China
来源
PROCEEDINGS OF THE 31ST ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2023 | 2023年
关键词
Software Testing; Test Case Generation; Knowledge Graph; TEST-CASE GENERATION;
D O I
10.1145/3611643.3616269
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:1320 / 1332
页数:13
相关论文
共 50 条
  • [1] The Cloudification Perspectives of Search-based Software Testing
    Martin, Diego
    Panichella, Sebastiano
    2019 IEEE/ACM 12TH INTERNATIONAL WORKSHOP ON SEARCH-BASED SOFTWARE TESTING (SBST 2019), 2019, : 5 - 6
  • [2] SBSTFrame: a Framework to Search-Based Software Testing
    Machado, Bruno N.
    Camilo-Junior, Celso G.
    Rodrigues, Cassio L.
    Quijano, Eduardo H. D.
    2016 IEEE INTERNATIONAL CONFERENCE ON SYSTEMS, MAN, AND CYBERNETICS (SMC), 2016, : 4106 - 4111
  • [3] Search-Based Secure Software Testing: A Survey
    Khari, Manju
    Vaishali
    Kumar, Manoj
    SOFTWARE ENGINEERING (CSI 2015), 2019, 731 : 375 - 381
  • [4] Broadening the Search in Search-Based Software Testing: It Need Not Be Evolutionary
    Feldt, Robert
    Poulding, Simon
    2015 IEEE/ACM 8TH INTERNATIONAL WORKSHOP ON SEARCH-BASED SOFTWARE TESTING (SBST), 2015, : 1 - 7
  • [5] Defect Prediction Guided Search-Based Software Testing
    Perera, Anjana
    Aleti, Aldeida
    Bohme, Marcel
    Turhan, Burak
    2020 35TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2020), 2020, : 448 - 460
  • [6] The Maturation of Search-Based Software Testing: Successes and Challenges
    Cohen, Myra B.
    2019 IEEE/ACM 12TH INTERNATIONAL WORKSHOP ON SEARCH-BASED SOFTWARE TESTING (SBST 2019), 2019, : 13 - 14
  • [7] An extensive evaluation of search-based software testing: a review
    Khari, Manju
    Kumar, Prabhat
    SOFT COMPUTING, 2019, 23 (06) : 1933 - 1946
  • [8] Instance Space Analysis of Search-Based Software Testing
    Neelofar, Neelofar
    Smith-Miles, Kate
    Munoz, Mario Andres
    Aleti, Aldeida
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2023, 49 (04) : 2642 - 2660
  • [9] An extensive evaluation of search-based software testing: a review
    Manju Khari
    Prabhat Kumar
    Soft Computing, 2019, 23 : 1933 - 1946
  • [10] Footprints of Fitness Functions in Search-Based Software Testing
    Oliveira, Carlos
    Aleti, Aldeida
    Li, Yuan-Fang
    Abdelrazek, Mohamed
    PROCEEDINGS OF THE 2019 GENETIC AND EVOLUTIONARY COMPUTATION CONFERENCE (GECCO'19), 2019, : 1399 - 1407