banner cpptest
首页 > C++test > C++test与Safety Integrity Level 4(SIL4)-- 嵌入式单元测试案例系列

C++test与Safety Integrity Level 4(SIL4)-- 嵌入式单元测试案例系列

2010年8月24日 浏览: 

本文原载于软件测试人专业博客,任何转载均需保留原址:www.mytestlife.com/post/CppTest_SIL4.html

C++test与Safety Integrity Level 4(SIL4)-- 嵌入式单元测试案例系列

前言:嵌入式单元测试存在诸多难点,如目标机执行,回收测试结果,目标机资源受限等等因素,软件测试人专业博客将以系列文章的方式,介绍一些典型的嵌入式单元测试案例,期待与您更多交流。

Safety Integrity Level 4简介

SIL中文翻译为安全完整性等级,维基百科的定义:
Safety Integrity Level (SIL) is defined as a relative level of risk-reduction provided by a safety function, or to specify a target level of risk reduction. In simple terms, SIL is a measurement of performance required for a Safety Instrumented Function (SIF).

The requirements for a given SIL are not consistent among all of the functional safety standards. Within the European Functional Safety standards four SILs are defined, with SIL 4 being the most dependable and SIL 1 being the least. A SIL is determined based on a number of quantitative factors in combination with qualitative factors such as development process and safety life cycle management.
参见:http://en.wikipedia.org/wiki/Safety_Integrity_Levelhttp://cn.bing.com/reference/semhtml/Safety_Integrity_Level?sids=2&qpvt=ALARP&q=ALARP

困难

SIL分为4个等级,SIL4毫无疑问是最为严苛的安全完整性等级。此时对于软件开发中的测试要求非常高,比如我们碰到的一个案例:

客户开发环境主要是Tornado for PPC,VxWorks环境,为过SIL 4等级,必须使用一个VxWorks/Cert版,该版本是风河特别为过SIL4的客户定制的一个符合SIL4等级的VxWorks版本,与通常的VxWorks版本相比,在组件选择上其有如下特点:

1. 无文件系统;
2. 不能下载.out应用程序,而只能将应用程序与VxWorks操作系统构建成一个image下载到目标机执行;
3. 根据SIL4的要求,必须在目标机上执行单元测试;

解决之道

对于上述特点而言要实现SIL4所必需要求的单元测试非常困难,困难之处在于:

1. 需要将单元测试用例,单元测试驱动和应用程序及VxWorks操作系统构建成一个完整的image下载到目标机执行;
2. 如何回收测试结果?由于无文件系统,采用生成log文件的方式行不通,只能采取其他实时回收测试结果的方式。

针对上述难点,Parasoft C++test提供如下解决方式:

1. 首先将测试用例,测试驱动构建为一个lib库,将该库与VxWorks构建为一个image下载到目标机;
2. C++test支持TCP/IP通过以太网接口进行传输测试结果;

更多实施细节,可在软件测试人专业博客:www.mytestlife.com上留言,期待与您交流。

 

原文链接:http://www.mytestlife.com/post/CppTest_SIL4.html

withdreamer C++test Safety Integrity Level 4  SIL4