## 3 Methodology  
### The Proposed Method  
In this section, the proposed failure analysis approach is presented, highlighting the integration of the proposed DL-based clustering model into the HIL-based testing process at the system level. The framework, as can be seen in Figure 1, is divided into four distinct phases constituting the process of failure analysis for HIL testing, namely test development, test creation, test execution, and failure analysis. In the system development phase, the software behavioral model is designed in accordance with the requirements via a convenient development environment, e.g., MATLAB/Simulink [35]. However, since new features are added to the system during the life cycle, the model architecture is then upgraded by the developer. Once the model is updated, the testing phase is initiated to start the process of unit and integration testing of the SUT. Such type of testing is carried out in the form of black-box testing using real-time HIL simulation, without access to the source code. To be specific, the developed model is validated in real time against the requirements in three phases, i.e., test generation, test execution, and test evaluation. The testing workflow starts with the test generation phase, in which the TCs are generated from the functional requirements specification. Furthermore, the potential failure modes stated in the classification report are considered to be covered by the generated TCs. To this end, various techniques according to ISO 26262 are adopted to generate the required TCs. As a result of this phase, the TC specifications and the traceability matrix between the requirements, potential failure, and TCs are created. In the second phase, i.e., test execution, all generated TCs are automatically executed in the HIL test environment, which contains the test data, the environmental conditions, and the prerequisites of the expected results. The execution results of the TCs are then forwarded to the third phase, i.e., test evaluation. The assessment phase finally compares the real measured behavior with the anticipated theoretical behavior. Therefore, the output values of the executed TCs are compared with the expected values. As a result, a test report is automatically generated containing  
Figure 1: Proposed framework for failed test cases analysis during real-time HIL tests. the evaluation results, i.e., pass/fail. Following this approach, several regression tests are performed before the final release, resulting in a large amount of log data of failed TCs. Inspection of the test-run results is then conducted by test engineers, who focus on the failed TCs to determine the root cause and the category of the failure. Generally, a software debugging tool can be used by the tester for failure analysis of the failed TCs. However, the existing tools require access to the source code and need to be monitored at each step, which is not possible in HIL testing. Therefore, in HIL testing, expert knowledge is employed for manual failure analysis of failed TCs, which in turn increases the effort and cost for complex systems. Motivated by this, in this study, an intelligent model is developed and integrated into the testing process so that the failure analysis of failed TCs can be automatically conducted. To this end, various techniques for text preprocessing, feature extraction, and clustering have been employed. More specifically, the descriptions of the failed TCs are automatically extracted from the generated test report and fed to the preprocessing phase. Then, once the short text data are preprocessed, the nonlinear features are automatically extracted using the DL method, i.e., 1 dCNN-based AE. Subsequently, the extracted features are fed into the clustering phase, where the clusters of the corresponding failure analysis are determined. Finally, the determined clusters of failed TCs are reviewed by the test engineers in the failure analysis phase to confirm the reason behind the occurring failures.