Transforming User Requirements to Test Cases Using Model-Driven Software Engineering and Natural Language Processing
Testing continues to be the main approach to ensuring software quality during development. Although there have been many attempts to automate the generation of test cases from user requirements (formal or informal), creating test cases continues to be mainly a manual process. However, many studies have shown that automating the generation of test cases from requirements can substantially reduce costs and improve the efficiency of the testing process. Test automation has also been proven to show positive effects on software quality. With the advances in Model-driven Software Engineering (MDSE), Artificial Intelligence (AI), and Natural Language Processing (NLP), the possibility of further automating the generation of test cases from requirements is increasing. We present an automated test case generation approach that uses a model-to-model (M2M) transformation that converts user requirements into test cases with the support of a knowledge base and NLP. The key to this transformation process is defining meta-models for user requirements (use cases and user stories) and test cases. The proposed M2M transformation is composed of three phases. To validate each phase of the transformation process, case studies were conducted using a tool developed to evaluate the feasibility and accuracy of converting user requirements to test cases.