An LLM-based Multi-stage Approach for Automated Test Case Generation from User Stories (S)
Requirements-driven testing is crucial for validating functionality and maintaining software quality during the early stages of development.It is usually done manually by experienced experts, which is timeconsuming and thus affects development efficiency.Although a number of approaches have been proposed to automate the generation of test cases, they primarily rely on (semi-)formalized requirements and thus cannot be applied to user stories and other natural language-based requirements specifications that are more prevalent in practice.In this paper, we propose an incrementally refined multi-stage method that utilizes LLM to generate test cases from user stories automatically.Specifically, we design a systematic process to incrementally refine user stories and transform them into test cases in multiple stages.We compare the consistency, reasonable, testability, coverage, and time consumption of test cases generated by our method to those designed by experts and find that our proposal outperforms baseline methods in terms of all metrics, achieving 4.8 points testability and 86.36% coverage compared to the baseline's 4.5 points and 44.64%.This indicates a promising direction for improving the practicality and efficiency of test case generation from user stories.
Authors
- Qixiang Zhou (ORCID: https://orcid.org/0000-0001-6632-8277)
- Jiahong Sun (ORCID: https://orcid.org/0009-0001-2342-2658)
- Jiaxuan Li (ORCID: https://orcid.org/0000-0002-3766-0876)
- Li Tong (ORCID: https://orcid.org/0000-0002-4197-7999)
Institutions
- Beijing University of Technology (CN)
Publication Details
- Journal
- Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering
- Published
- 2024-10-28
- DOI
- https://doi.org/10.18293/seke2024-087
- Citations
- 1
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.49
Funders
- National Natural Science Foundation of China