Prompt Driven Test Generation: Leveraging Large Language Models and Knowledge Graphs for Quality Assurance in Data Intensive Software System
摘要
Quality assurance in data-intensive software systems is challenging due to complex code-data interactions and diverse data scenarios. Traditional testing methods often fail to address these issues, particularly for edge cases and domain-specific constraints. We propose Prompt-Driven Test Generation (PDTG), a novel framework that integrates large language models (LLMs) and knowledge graphs to automate test case generation. PDTG uses engineered prompts to guide LLMs, enriched by knowledge graphs that provide semantic context and domain constraints. Evaluated on three real-world applications (financial, healthcare, ecommerce), PDTG achieves a 27.3% increase in data scenario coverage, 35.8% better fault detection, and 41.2% less manual effort compared to baselines like EvoSuite and Randoop. This approach enhances test relevance and coverage, offering a scalable solution for testing complex systems, with applications in collaborative intelligence and distributed workflows.