Cyber-Physical Systems (CPSs) play a central role in the behavior of a wide range of autonomous physical systems such as medical devices, autonomous vehicles, and smart homes, many of which are safety-critical. CPSs are often specified iteratively as a sequence of models at different levels that can be tested via simulation systems at early stages of their development cycle. One such model is a hybrid automaton; these are used frequently for CPS applications and have the advantage of encapsulating both continuous and discrete CPS behaviors. When testing CPSs, engineers can take advantage of these models to generate test cases that target both types of these behaviors. Moreover, since these models are constructed early in the development process for CPSs, they allow test cases to be generated early in that process for those CPSs, even before simulation models of the CPSs have been designed. One challenge when testing CPSs is that these systems may operate differently even under an identically applied test scenario. In such cases, we cannot employ test oracles that use predetermined deterministic behaviors; instead, test oracles should consider sets of desired behaviors in order to determine whether the CPS has behaved appropriately. In this paper we present a test case generation technique, HYTEST, that generates test cases based on hybrid models, accompanied by appropriate test oracles, for use in testing CPSs early in their development cycle. To evaluate the effectiveness and efficiency of HYTEST, we conducted an empirical study in which we applied the technique to several CPSs and measured its ability to detect faults in those CPSs and the amount of time required to perform the testing process. The results of the study show that HYTEST was able to detect faults more effectively and efficiently than the baseline techniques we compare it to.
翻译:信息物理系统(CPS)在医疗设备、自动驾驶汽车和智能家居等广泛自主物理系统的行为中发挥着核心作用,其中许多系统属于安全关键型。CPS通常在其开发周期早期阶段通过仿真系统进行迭代式建模,以不同层级的模型序列加以规范。混合自动机是此类典型模型,它广泛应用于CPS应用场景,具有同时封装连续与离散CPS行为的优势。在测试CPS时,工程师可利用这些模型生成针对两类行为的测试用例。此外,由于这些模型在CPS开发早期即已构建,因此即便在CPS仿真模型尚未设计完成之前,即可据此生成测试用例。CPS测试面临的一个挑战是:即使采用完全相同的测试场景,系统也可能表现出不同行为。在此情况下,无法采用基于预设确定性行为的测试预言,而应通过考虑期望行为集合来判定CPS是否运行正常。本文提出基于混合模型的测试用例生成技术HYTEST,该技术能生成与相应测试预言相结合的测试用例,适用于CPS开发周期早期的测试。为评估HYTEST的有效性与效率,我们开展了实证研究,将该技术应用于多个CPS系统,检测其故障发现能力及测试执行耗时。研究结果表明,与基准技术相比,HYTEST在故障检测的有效性与效率方面均表现更优。