TCG: an approach to improving test-driven development by exploiting use case specifications
摘要
Test-Driven Development (TDD) is a powerful software development methodology where tests are written before code to improve reliability, enable faster feedback, and simplify maintenance. However, TDD is time-consuming and requires experienced developers to write test cases. To address these challenges, this paper proposes an approach to improve TDD through automated test case generation from requirements. We implemented this approach as TCG, a tool that converts Cockburn-style use cases into test cases. The paper details the TCG tool’s architecture and its algorithms for building CFGs and generating optimized test cases. By automating this process, we aim to reduce the required manual effort and enhance the coverage and quality of test cases. Additionally, the tool provides a user-friendly interface for uploading use case documents and displaying the generated test cases, making it accessible for software developers and testers. The approach is evaluated through several software projects, with initial results indicating that the generated test cases are minimal yet achieve high coverage, making them suitable for use in software development practice. These findings highlight the advantages of our approach. TCG enhances test coverage, reduces manual effort, and improves fault detection, making it suitable for integration into TDD workflows and practical software engineering environments.