Importance of Structured Prompt Engineering to Generate Effective Test Cases

International Journal of Computer Science and Engineering
© 2025 by SSRG - IJCSE Journal
Volume 12 Issue 8
Year of Publication : 2025
Authors : Nagmani Lnu

pdf
How to Cite?

Nagmani Lnu, "Importance of Structured Prompt Engineering to Generate Effective Test Cases," SSRG International Journal of Computer Science and Engineering , vol. 12,  no. 8, pp. 27-30, 2025. Crossref, https://doi.org/10.14445/23488387/IJCSE-V12I8P104

Abstract:

As demand for Artificial Intelligence (AI) grows, best practices for using different AI tools are becoming critical. To scale AI implementation enterprise-wide, prompt engineering has become vital in developing AI-enabled applications and utilizing them to complete day-to-day engineering tasks. One such task is creating functional test cases. Software testing is a crucial stage in the Software Development Life Cycle and consumes a significant portion of the overall development timeline. This study was conducted while evaluating a test management tool that utilizes AI to generate test cases for UI (User Interface) and API (Application Programming Interface) applications. While generative AI is the future, using AI without proper guardrails and prompt standards can become counterproductive. This study demonstrates this by using multiple real-time industry use cases.

Keywords:

Artificial Intelligence, Functional Test Case, Hallucination, Prompt Engineering, Software Testing.

References:

[1] Time Estimation for Software Testing, Devmio - Software Know-How, 2016. [Online]. Available: devm.io/testing/time-estimation-for software-testing-128078.
[2] Sahelichakraborty, World Quality Report 2024 Shows 68% of Organizations Now Utilizing Gen AI to Advance Quality Engineering, Capgemini USA, 2024. [Online]. Available: www.capgemini.com/us-en/news/press-releases/world-quality-report-2024-shows-68-of organizations-now-utilizing-gen-ai-to-advance-quality-engineering/
[3] Prompting Techniques – Nextra, Prompt Engineering Guide. [Online]. Available: www.promptingguide.ai/techniques
[4] Theodore Reangpusri, and Cassandra Flur, “Test-Driven Development: Exploring Prompt Engineering,” Digital Scientific Archive, 2025.
[Google Scholar] [Publisher Link]
[5] Lahbib Naimi et al., “A New Approach For Automatic Test Case Generation From Use Case Diagram Using LLMS and Prompt Engineering,” International Conference on Circuit, Systems and Communication, Fes, Morocco, pp. 1-5, 2024.
[CrossRef] [Google Scholar] [Publisher Link]