论文标题

Google Test/Google模拟以验证关键嵌入式软件

Google Test/Google Mock to Verify Critical Embedded Software

论文作者

Cheddadi, Hafsa, Motahhir, Saad, Ghzizal, Abdelaziz El

论文摘要

关键的嵌入式系统(CES)在医疗,汽车或工业上已经无处不在。此类系统中的软件故障可能是灾难性的,不仅在经济上而且威胁生命。但是,除了无所不能的情况外,CES的复杂性已经逐渐发展到极端措施,面对这种增加,制造商和供应商对测试逻辑正确性的有效方法越来越感兴趣,并验证软件零件是否无错误测试。SoftwareTesting是用于检测和纠正软件代码中发现和更正错误的方法的集合。软件测试的第一阶段是单元测试,这是一种广泛使用的技术,其中单个单元隔离,通常将其分为类和功能,并分别测试以帮助验证系统的行为和功能。在本章中,将执行Xunit C ++测试框架的概述(GTEST),并比较不同的可用单元测试框架以在C ++语言中使用。由于关键嵌入式系统提供的复杂性,很难隔离和测试系统的行为,因此,嘲讽的技术被认为使得能够用伪造的实现替代了真正的实现,允许替换来克服与硬件依赖关系和外部因素相关的挑战。此外,本章介绍了GoogleMock,这是Googletest C ++测试框架的一部分,该框架使测试隔离开展。

Critical embedded systems (CES) have become ubiquitous in whether medical, automotive, or industrial. Software failures in such systems are potentially disastrous and could lead to serious consequences not only financially but also life-threatening. However, besides their omnipresence, CES complexity have grown to extreme measures, faced with this increase, manufacturers and suppliers are increasingly interested in effective methods of testing logical correctness and verifying that software parts are error-free.Software testing is a collection of methods used to detect and correct bugs and faults found in software code. The first stage of software testing is unit testing, a widely used technique where individual units of source code are isolated, often divided up into classes and functions, and tested separately to aid in the verification of the behavior and functionality of the system. In this chapter, an overview of GoogleTest (GTest), a xUnit C++ testing framework will be performed, and a comparison of different available unit test frameworks for use in the C++ language. On account of the complexity provided by critical embedded systems, it is difficult to isolate and test the system's behavior, mocking techniques were considered to enable a real implementation to be replaced with a fake implementation, the replacement allowed to overcome the challenges related to hardware dependencies and external factors. Further, this chapter describes GoogleMock, a part of GoogleTest C++ testing framework that makes the tests run in isolation.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源