| In the software development process,the requirements engineer will describe the expectations of the software functions in detail to form a requirement document.On this basis,the developers will develop the software according to the requirement document,and finally produce a software product that meets the expectations.In this process,due to the inherent ambiguity of natural language requirements documents and the negligence of software development engineers,inconsistencies between requirements and implementations frequently occur.However,for embedded control software in safety-critical areas such as aerospace and railway control systems,the consequences and losses caused by such inconsistencies can be very serious.Therefore,how to help engineers quickly find the inconsistency between requirements and implementation becomes important issues.The use of test cases is often used as a means of confirming the consistency of implementation and requirements.High-quality test cases can make testing more efficient and accurate.However,the existing method of manually writing test cases in the field of rail transit control system requires personnel who need to have rich professional knowledge,which is time-consuming,labor-intensive,and error-prone.However,the existing methods of generating test cases from UML models cannot be used because the modeling methods cannot accurately express the characteristics of the requirements documents in this field.Therefore,there is an urgent need to find a way to automatically generate test cases from requirements in the field of rail transit control systems to assist testers in completing their work efficiently.Due to the importance of test cases in ensuring consistency between requirements and implementations,there are also DO-333 standards and EN50128 standards in the industry that have strict requirements.To address the above problems,we proposed a method to automatically generate test cases from the requirements for the embedded control software in the railway control domain after deeply understanding the characteristics of the requirements documents in this domain.At first,we use a lightweight domain formal description language named CASDL(Casco Accurate Specification Description Language)to transform requirements in natural language to requirements in CASDL in the first step of the method.And then proposed an algorithm for automatically generating test inputs that follow the MC/DC criteria,and obtain the expected output by simulating based on the transformed requirements.Finally,in order to evaluate the effectiveness of this method,we conducted experiments on the ATP(Automatic Train Protection)requirements document provided by Casco Signal Co.,Ltd.,one of the largest track control system companies in China.In the 129 requirement items,40 of them were found to be inconsistent with the code implementation.At the same time,to support this research work,we also implemented a supporting tool to visually display the generated test cases.Part of the work results of this paper have been published in the paper at the conference TASE 2021.The main contributions are as follows:1)Proposed a method to automatically generate test cases that comply with the DO-333 and EN-50128 standards and follow the MC/DC criteria based on requirements.The generated test cases can help find the inconsistencies between the system code and the requirements document,thereby helping engineers to ensure that the software implementation meets expectations.2)The framework was tested on the ATP system requirement document provided by CASCO.The test cases generated by the method in this article found 40 requirement documents and code implementation inconsistencies among 129 requirement items.3)The test cases generated by the method in this article conform to the MC/DC standard,which helped the partner Casco Signal Co.,Ltd.to pass the EN-50128 standard.4)Implemented support tools,with document import,document editing and saving,grammar checking,test case generation and other functions,which are convenient for users to use. |