Many people have tried using ChatGPT to help them with various programming tasks and have achieved good results. However, there are some issues with using ChatGPT directly. Firstly, the generated code often fails to execute correctly, leading to the famous saying "five minutes to code, two hours to debug". Secondly, it is inconvenient to integrate with existing projects as it requires manual interaction with ChatGPT and switching between different platforms.
ChatUniTest is an innovative framework designed to improve automated unit test generation. ChatUniTest utilizes an LLM-based approach enhanced with "adaptive focal context" mechanism to encompass valuable context in prompts and adheres to a "Generation-Validation-Repair" mechanism to rectify errors in generated unit tests. we have developed ChatUniTest Core, a common library that implements the core workflow, complemented by the ChatUniTest Toolchain, a suite of seamlessly integrated tools enhancing the capabilities of ChatUniTest.
Publication | Implementation | Paper Titile |
---|---|---|
Arxiv | ChatUniTest maven-plugin IDEA-plugin |
ChatUniTest: a ChatGPT-based automated unit test generation tool, by Zhuokui Xie. |
Arxiv | ChatTester | No More Manual Tests? Evaluating and Improving ChatGPT for Unit Test Generation, by Zhiqiang Yuan. |
Arxiv | TestSpark | TestSpark: IntelliJ IDEA’s Ultimate Test Generation Companion, by Arkadii Sapozhnikov . |
Arxiv | SymPrompt (Under construction) |
Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLM, by Gabriel Ryan . |
Arxiv | TELPA (Under construction) |
Enhancing LLM-based Test Generation for Hard-to-Cover Branches via Program Analysis, by Chen Yang . |
Our work has been submitted to arXiv. Check it out here: ChatUniTest.
Please refer to the python branch if you want to see the original version of ChatUniTest for the paper.
@inproceedings{chen2024chatunitest,
title={ChatUniTest: A Framework for LLM-Based Test Generation},
author={Chen, Yinghao and Hu, Zehao and Zhi, Chen and Han, Junxiao and Deng, Shuiguang and Yin, Jianwei},
booktitle={Companion Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering},
pages={572--576},
year={2024}
}
@misc{xie2023chatunitest,
title={ChatUniTest: a ChatGPT-based automated unit test generation tool},
author={Zhuokui Xie and Yinghao Chen and Chen Zhi and Shuiguang Deng and Jianwei Yin},
year={2023},
eprint={2305.04764},
archivePrefix={arXiv},
primaryClass={cs.SE}
}
If you have any questions, please feel free to contact us via email. The email addresses of the authors are as follows:
- Corresponding author:
zjuzhichen AT zju.edu.cn
- Author:
yh_ch AT zju.edu.cn
,xiezhuokui AT zju.edu.cn