Abstract:
Software testing plays a critical role in ensuring the quality of software systems by verifying the system. To enforce quality, it is essential to identify testable quality attribute scenarios and predict relevant test cases. However, distinguishing between testable and non-testable scenarios can be a subjective and time-consuming process. Furthermore, generating test cases from quality attribute scenarios (QASs) poses significant challenges due to factors such as complexity, interdependency, and a lack of well-defined metrics for measuring quality attributes. In this study, we address the problems by developing a machine-learning model that classifies QASs and generates test cases from testable QASs. The proposed model first classifies QASs into testable or non-testable and then it generates test cases from testable QASs. We collected 1967 QASs from literature, textbooks, and publicly available software specification documents. The machine learning algorithms used to build the model are SVM, MNB and DTree for the classification of QASs and RF, AdaBoost and GBM for the generation of test cases. This study employed TF-IDF and word2vec techniques for feature extraction. Grid search techniques are used to tune the optimal value of hyperparameters from the predefined possible values. The QAS classification model prediction accuracies are 89%, 88%, and 82% DTree, SVM, and MNB with TF-IDF respectively and 70%, 79%, and 56% DTree, SVM, and MNB with word2vec respectively. For the generation of the test case, the proposed model performs 87%, 78%, and 86% RF, AdaBoost, and GBM with TF-IDF respectively, and 54%, 56%, and 62% RF, AdaBoost, and GBM with word2vec respectively. This study proposes a machine learning-based model for generating test cases from quality attribute scenarios, which can improve software testing efficiency, accuracy, and quality.
Keywords: Quality attribute scenario, quality attributes, test-case generation, testability, machine learning, testable quality attribute scenario.