ChatAssert: LLM-Based Test Oracle Generation With External Tools Assistance

被引:0
|
作者
Hayet, Ishrak [1 ]
Scott, Adam [1 ]
d'Amorim, Marcelo [1 ]
机构
[1] North Carolina State Univ, Raleigh, NC 27695 USA
基金
美国国家科学基金会;
关键词
Chatbots; Codes; Measurement; Prompt engineering; Maintenance engineering; Large language models; Accuracy; Static analysis; Standards; Semantics; Test oracle generation; large language models (LLMs); tool-augmented LLMs; prompt engineering framework;
D O I
10.1109/TSE.2024.3519159
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Test oracle generation is an important and challenging problem. Neural-based solutions have been recently proposed for oracle generation but they are still inaccurate. For example, the accuracy of the state-of-the-art technique teco is only 27.5% on its dataset including 3,540 test cases. We propose ChatAssert, a prompt engineering framework designed for oracle generation that uses dynamic and static information to iteratively refine prompts for querying large language models (LLMs). ChatAssert uses code summaries and examples to assist an LLM in generating candidate test oracles, uses a lightweight static analysis to assist the LLM in repairing generated oracles that fail to compile, and uses dynamic information obtained from test runs to help the LLM in repairing oracles that compile but do not pass. Experimental results using an independent publicly-available dataset show that ChatAssert improves the state-of-the-art technique, teco, on key evaluation metrics. For example, it improves Acc@1 by 15%. Overall, results provide initial yet strong evidence that using external tools in the formulation of prompts is an important aid in LLM-based oracle generation.
引用
收藏
页码:305 / 319
页数:15
相关论文
共 37 条
  • [1] ChatUniTest: A Framework for LLM-Based Test Generation
    Chen, Yinghao
    Hu, Zehao
    Zhi, Chen
    Han, Junxiao
    Deng, Shuiguang
    Yin, Jianwei
    COMPANION PROCEEDINGS OF THE 32ND ACM INTERNATIONAL CONFERENCE ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, FSE COMPANION 2024, 2024, : 572 - 576
  • [2] LLM-Based Business Process Documentation Generation
    Zhu, Rui
    Hu, Quanzhou
    Wen, Lijie
    Lin, Leilei
    Xiao, Honghao
    Wang, Chaogang
    SERVICE-ORIENTED COMPUTING, ICSOC 2024, PT I, 2025, 15404 : 381 - 390
  • [3] LLM-Based Test-Driven Interactive Code Generation: User Study and Empirical Evaluation
    Fakhoury, Sarah
    Naik, Aaditya
    Sakkas, Georgios
    Chakraborty, Saikat
    Lahiri, Shuvendu K.
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2024, 50 (09) : 2254 - 2268
  • [4] Boosting LLM-Based Software Generation by Aligning Code with Requirements
    Yaacov, Tom
    Elyasaf, Achiya
    Weiss, Gera
    32ND INTERNATIONAL REQUIREMENTS ENGINEERING CONFERENCE WORKSHOPS, REW 2024, 2024, : 301 - 305
  • [5] LLM-based Control Code Generation using Image Recognition
    Koziolek, Heiko
    Koziolek, Anne
    2024 INTERNATIONAL WORKSHOP ON LARGE LANGUAGE MODELS FOR CODE, LLM4CODE 2024, 2024, : 38 - 45
  • [6] LLM-based and Retrieval-Augmented Control Code Generation
    Koziolek, Heiko
    Gruener, Sten
    Hark, Rhaban
    Ashiwal, Virendra
    Linsbauer, Sofia
    Eskandani, Nafise
    2024 INTERNATIONAL WORKSHOP ON LARGE LANGUAGE MODELS FOR CODE, LLM4CODE 2024, 2024, : 22 - 29
  • [7] The Power of Atmosphere: LLM-Based Social Task Generation of Robots
    Lee, Hanna
    Lym, Hyo Jeong
    Kim, Da-Young
    Kim, Min-Gyu
    2024 21ST INTERNATIONAL CONFERENCE ON UBIQUITOUS ROBOTS, UR 2024, 2024, : 532 - 538
  • [8] MedSyn: LLM-Based Synthetic Medical Text Generation Framework
    Kumichev, Gleb
    Blinov, Pavel
    Kuzkina, Yulia
    Goncharov, Vasily
    Zubkova, Galina
    Zenovkin, Nikolai
    Goncharov, Aleksei
    Savchenko, Andrey
    MACHINE LEARNING AND KNOWLEDGE DISCOVERY IN DATABASES-APPLIED DATA SCIENCE TRACK, PT X, ECML PKDD 2024, 2024, 14950 : 215 - 230
  • [9] LLM-based policy generation for intent-based management of applications
    Dzeparoska, Kristina
    Lin, Jieyu
    Tizghadam, Ali
    Leon-Garcia, Alberto
    2023 19TH INTERNATIONAL CONFERENCE ON NETWORK AND SERVICE MANAGEMENT, CNSM, 2023,
  • [10] LLM-Based Code Generation Method for Golang Compiler Testing
    Gu, Qiuhan
    PROCEEDINGS OF THE 31ST ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2023, 2023, : 2201 - 2203