In this paper,an AIGC based unit testing method,CodeQwenTest,is introduced with the aim of improving the effi-ciency and quality of software testing.A well-designed focus dataset was constructed by collecting high-quality Java focus meth-ods and their corresponding unit tests from the open-source platform GitHub.Using this dataset,we conducted in-depth exper-iments on unit test generation and code generation tasks for six leading Large Language Models(LLMs).Based on these exper-iments,we selected the CodeQwen1.5-7B-Chat model and fine-tuned it with LoRA to further enhance its performance in unit test code generation tasks.Experimental results show that the fine-tuned CodeQwenTest significantly outperforms the baseline model in terms of line coverage and generates assertions efficiently.This finding confirms the effectiveness of the AIGC tech-nique in assisting software unit testing,bringing new tools and methods to the software testing field and providing new per-spectives on the automation of software testing.
artificial intelligence generated contentsoftware unit testingautomated test case generationlarge language mod-elssoftware engineering