UnitTestBot: Automated Unit Test Generation for C Code in Integrated Development Environments
Authors:
- Alexey BabushkinABAlexey Babushkin
- Pavel IatcheniiPIPavel Iatchenii
- Alexey PleshakovAPAlexey Pleshakov
- 1 May 2023
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 380-384
Abstract
Symbolic execution (SE) is one of the most promising techniques for automated unit test generation, which is claimed to streamline the testing process and reduce developers' effort. There are symbolic execution engines working for Java, C, C#, C++, Python,. NET. The KLEE dynamic symbolic execution engine is one of the most elaborated ones - it is built on top of the LLVM compiler infrastructure and can automatically generate inputs for C code unit testing. There are numerous attempts to apply KLEE to real-life software projects, while the industry experience still shows little transfer from research to practice. The extensions to popular integrated development environments (IDEs) are supposed to be breaking down this barrier. As far as there are not so many working tools like this, we share our experience of implementing the KLEE-based Visual Studio Code and CLion extensions for generating ready-to-use test cases - UnitTestBot for C code- and describe the challenges we had to rise to. We also share the solutions we came up with: without introducing “new” techniques, we made automated unit test generation really automated and supplemented it with the simple wizard interface. That was enough for turning an effective but demanding technology into a user-friendly tool, which is easy to adopt. Finally, we provide examples of running UnitTestBot on the open-source projects as well as Huawei nonpublic code.Keywords
This publication has 15 references indexed in Scilit:
- On the techniques we create, the tools we build, and their misalignments2016
- Experience report: how is dynamic symbolic execution different from manual testing? a study on KLEE2015
- How and When to Transfer Software Engineering Research via Extensions2015
- A Survey on Unit Testing Practices and Problems2014
- Transferring an automated test generation tool to practice2014
- An orchestrated survey of methodologies for automated software test case generationJournal of Systems and Software, 2013
- Symbolic execution for software testingCommunications of the ACM, 2013
- Symbolic execution for software testing in practice2011
- Teaching and training developer-testing techniques and tool support2010
- Symbolic execution and program testingCommunications of the ACM, 1976