Automated Test Case Generation From Natural Language Requirements Using Natural Language Processing

Authors

  • Arooj Fatima Department of Software Engineering, University of Sargodha, Sargodha 40100, Pakistan.
  • Alishba Haider Department of Software Engineering, University of Sargodha, Sargodha 40100, Pakistan.
  • Summair Raza Department of Software Engineering, University of Sargodha, Sargodha 40100, Pakistan.

Keywords:

Test Case Automation, Natural Language Processing, Machine Learning, Contextual Embedding, BERT

Abstract

Software testing is a vital process in the assurance of reliability and accuracy of the software systems, but manual testing is a slow, tedious, and error-prone process. The generation of test cases is a promising way, and currently, the existing approaches are frequently constrained by uncertainties in terms of natural language demands, low adaptability, and the lack of scalability. To alleviate such difficulties, this study proposes an end-to-end model based on Natural Language Processing (NLP), contextual embedding of BERT, and machine learning for automatic translation of unstructured requirements into structured and verifiable test cases. The proposed pipeline then involves requirement preprocessing, ambiguity detection, validity assessment, semantic representation, and classification, and then any structured test case documentation is done to assure traceability and completeness. The framework was tested on the DAMIR dataset and compared with the state-of-the-art methods, such as the scatter search, the NLP-based requirements formalization, and the generation of acceptance test cases based on NLP. Experimental outcomes demonstrate that the proposed model had high performance with an accuracy of between 92% and 97% and a maximum accuracy of 96.69, which is much higher than the current methods. Accuracy, recall, and F1-scores also confirmed the soundness of the framework in categorizing valid and invalid requirements. This paper illustrates how NLP-based test automation can be used to scale agile and continuous integration environments, to increase the reliability of the testing process, and to reduce human involvement. It provides the framework for future studies in multilingual requirement processing, domain-specific applications, and integration with large language models to enable greater flexibility.

Downloads

Published

2025-09-01

How to Cite

Arooj Fatima, Alishba Haider, & Summair Raza. (2025). Automated Test Case Generation From Natural Language Requirements Using Natural Language Processing. Journal of Computing & Biomedical Informatics, 9(02). Retrieved from https://jcbi.org/index.php/Main/article/view/1093