arXiv:2610.24475cs.SEOct 2026

Manuscript Offprint

arXiv:2610.24475

Safety Analysis of CPSs Over-the-air Updates: Test Case Prioritization and Selection

Andrea Bombarda, Luca Carminati, Nunzio Marco Bisceglia, Mehrnoosh Askarpour, Sahar Kokaly, Ramesh S, Marsha Chechik, Claudio Menghi

Andrea Bombarda§, Luca Carminati§, Nunzio Marco Bisceglia, Mehrnoosh Askarpour, Sahar Kokaly, Ramesh S, Marsha Chechik, Claudio Menghi

Abstract—Over-the-air (OTA) updates for Cyber-Physical Systems (CPS) allow engineers to modify their software wirelessly. In the automotive domain, for instance, they enable manufacturers to update software without physical access to the vehicle. However, OTA updates can generate a large number of possible software configurations. For example, end users may decide whether or not to install any given OTA updates. The combinatorial explosion of these configurations hampers software testing, a standard practice for detecting errors in CPS. To overcome this limitation, we propose CRISP (CRlticality-based Selection and Prioritization), a novel framework supporting test case prioritization and selection in the context of OTA updates. Our framework leverages test case robustness, i.e., how far they are from violating the system requirements, to drive test case prioritization and selection. It enables engineers to rank test case executions from most to least critical, and to select only the critical test cases relevant to a given OTA update. We evaluated our approach using a representative software product line consisting of seven different vehicles, 22 driving scenarios, and two software components. We considered 224 test cases, requiring 59 hours of execution time. We assessed the effectiveness of CRISP across five OTA updates. We compared our solution with (a) a random test case prioritization and selection algorithm, and (b) AP-DISC, identified as the state-of-the-art solution in a recent empirical study on the subject. Our results show that CRISP outperforms our baselines in finding failure-revealing test cases, and that our selection procedure can be configured to find reasonable and practical tradeoffs among accuracy (percentage of failure-revealing test cases identified) and computational time (time required to find them). CRISP allows for saving up to ≈4 hours with an accuracy of 95.6% for some OTA updates and, on average, up to ≈3.3 hours with an accuracy of 78.8% across all updates.

Index Terms—Safety Analysis, Test Case Prioritization, Test Case Selection, Software Product Lines, Robustness

1 INTRODUCTION

Cyber-physical systems (CPS) consist of multiple software (cyber) components [1], [2], [3] acting on their physical environment to provide the desired functionality, combining cyber and physical capabilities [4]. Considering these capabilities, software failures of CPS can have catastrophic consequences and lead to significant economic losses [5], [6]. Therefore, engineers need to ensure that hazards are sufficiently mitigated and systems are thoroughly tested [7], [8] to guarantee the system's safety and prevent failures.

The presence of many components, often developed by third-party companies, hampers hazard mitigation [9], [10]. This activity is further complicated by the presence of software updates deployed via over-the-air updates (OTA) [11]. OTA updates are becoming the standard practice to update CPS software. For example, OTA updates are extensively used by automotive manufacturers to modify the vehicle entertainment and navigation system or the software executed by the electronic control units [12]. They offer a convenient solution for updating the vehicle's software since customers do not have to travel to the dealership. While providing remarkable benefits, OTA updates are challenging software engineering activities [13], [14]: the frequent changes and updates in software components can lead to many software configurations that are impossible to analyze manually without automated support. Consequently, OTA can lead to safety breaches. For example, Jeep recently sent out an OTA software update that led vehicles to lose drive power [15], and Tesla issued an OTA update that often disabled Autopilot [16].

Software testing is the primary means of preventing such software defects. It is used in many domains, including real-time, embedded, and safety-critical systems [17]. Testing typically feeds some (automatically generated or manually defined) inputs to the software and analyzes its output. OTA updates over a fleet of vehicles occurring over a course of time give rise to a multiplicity of software configuration, each of which need to be tested separately. Executing the test cases for all the software configurations is impractical and time-consuming, as confirmed by industrial evidence. BMW reports delivering OTA software updates to more than 10 million vehicles across multiple brands, model series, and drive types [18]. Similarly, Volkswagen regularly performs OTA updates for all ID models [19]. Industrial OTA platforms explicitly identify multi-ECU updates, regional variant complexity, and configuration management as key engineering challenges [20]. Since modern vehicles and industrial systems may contain between 70 and 150 ECUs,

A. Bombarda is with the University of Bergamo, Bergamo, Italy - e-mail: {andrea.bombarda@unibg.it}; L. Carminati is with the University of Bergamo, Bergamo, Italy - e-mail: {l.carminati13@studenti.unibg.it}; N. M. Bisceglia is with the Gran Sasso Science Institute, L'Aquila, Italy - email: {nunziomarco.bisceglia@gssi.it}; Mehrnoosh Askarpour and Sahar Kokaly are with General Motors Canada and McMaster University, Hamilton, Canada - e-mail: {mehrnoosh.askarpour@gm.com, sahar.kokaly@gm.com}; Ramesh S is with General Motors, Warren, Michigan, USA - e-mail: {ramesh.s@gm.com} M. Chechik is with the University of Toronto, Toronto, Canada - e-mail: {chechik@cs.toronto.edu}; C. Menghi is with the University of Bergamo, Bergamo, Italy and the McMaster University, Hamilton, Canada - e-mail: {claudio.menghi@unibg.it}

§ These two authors contributed equally.

validating OTA updates across all possible configurations is not always possible. Therefore, software engineers need techniques for effective prioritization and selection of test cases.

This paper presents CRISP (CRIticality-based Selection and Prioritization), a novel framework which reuses requirement-margin (robustness) information computed before an OTA update to guide regression test prioritization and configurable test selection after the update. Instead of recomputing criticality after each software update, CRISP leverages robustness values from baseline testing as a reusable signal to prioritize and reduce regression testing effort. Our work is driven by two research hypotheses:

• Hypothesis 1 - For OTA updates that preserve the relationship between baseline criticality and post-update behavior, re-executing test cases in descending order of baseline criticality enables earlier detection of failure-revealing test cases.

• Hypothesis 2 - For the test case selection following an OTA update, running a single configuration from a set of behaviorally equivalent options improves testing efficiency, i.e., reduces overall execution time, with minimal impact on effectiveness, i.e., capability of detecting the failure-revealing test cases.

To validate our research hypotheses, we implemented CRISP in the Simulink [21] environment, a widely used tool [22], [23] employed across industries, such as medical, avionics, and automotive [24], [25]. We considered test cases developed using the support provided by Simulink ®^{\circledR} Test TM^{TM} [26], i.e., specified via the Test Sequence and Test Assessment blocks. Test Sequence and Test Assessment blocks let users construct complex test inputs [27] and specify the procedure to check the requirements of interest [28]. To assess the criticality of test cases across different inputs, we rely on HECATE [29]. It is an academic tool used to perform Search-based Testing of Simulink ®^{\circledR} models. Starting from a Test Assessment block, it generates a metric that measures how far the test case is from violating (or satisfying) the requirements. HECATE has been assessed on a large variety of models, including a cruise controller for an industrial simulator [30], a controller for e-Bikes [31], models from an international competition on falsification-based testing tools [32], from the web ([33], [27], [34], [35], [36], [37]), a model developed by Toyota [38], and models from a Lockheed Martin benchmark [39], [40]. CRISP is implemented as a software prototype within HECATE, offering a novel way to leverage the robustness metric of HECATE to guide test case prioritization and selection in line with our research hypothesis. Our prototype offers two execution modes that respectively support the prioritization and selection of the test cases.

To assess the effectiveness of CRISP, we considered a representative software product line (SPL) consisting of seven different vehicles, 22 driving scenarios, and two software components (an Adaptive Cruise Controller — ACC and a Lane Keeping Assist — LKA). Our software product line is associated with 224 test cases. Running all of these test cases requires 59 hours. We evaluated how capable our test case prioritization solution is in finding failure-revealing test cases (RQ1) and how effective our test case selection solution is in extracting failure-revealing test cases (RQ2). For RQ1, we compared our test case prioritization solution with two baselines: Random Ordering for test case execution and AP-DISC (Anti-patterns based on Discontinuity) [41]. Our empirical evaluation also characterizes the conditions under which CRISP remains effective, showing that the approach is most beneficial for incremental OTA updates and SPLs exhibiting limited behavioral variability across configurations. For RQ2, we assessed our solution's ability in finding failure-revealing test cases and the time required to do so depending on the chosen threshold. Our solution effectively achieves practical trade-offs between accuracy (percentage of failure-revealing test cases identified) and computational time (time required to find them). More specifically, CRISP allows for saving up to ≈\approx4 hours with an accuracy of 95.6% for some OTA updates and, on average, up to ≈\approx3.3 hours with an accuracy of 78.8% across all updates.

To summarize, our contributions are as follows:

• A representative exemplar of an automotive SPL obtained by considering seven different vehicles, 22 driving scenarios, and two software components (Section 2);

• A test suite for the exemplar consisting of 224 test cases and five different OTA updates targeting two software components: the Lane Keeping Assistant (LKA) and the Adaptive Cruise Controller (ACC) (Section 2);

• CRISP, a novel regression-testing technique that reuses requirement-margin (robustness) information computed during baseline testing as a reusable signal for post-update test prioritization and configurable test selection, together with an implementation targeting MATLAB/Simulink ®^{\circledR} (Section 3);

• An extensive empirical evaluation on our exemplar, considering both our test case prioritization and selection techniques, and comparing the effectiveness of our solution with two baselines from the literature that rely on well-established metrics (Section 4);

• An empirical characterization of the applicability conditions of CRISP, showing that the proposed approach is most effective when OTA updates preserve the relationship between baseline criticality and post-update behavior, and when configuration variability induces limited behavioral differences across configurations (Section 5);

• A thorough reflection on our results and lessons learned, and a discussion of the threats to validity (Section 5);

This paper is structured as follows. Section 2 introduces our motivating example and defines our problem. Section 3 outlines our solution. Section 4 evaluates our contribution. Section 5 discusses our results. Section 6 discusses related work. Section 7 presents our conclusions.

References (65)