Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the embedded software unit test / integration test tool winAMS

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces the knowledge of "how to understand embedded software unit test / integration testing tool winAMS". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

CoverageMaster winAMS: unit testing / integration testing tools for embedded target code fully support embedded microcomputers! Verify the implementation of the module-by-module automated unit testing tool for the embedded CumberCraft + software.

There is no need for HookCode to directly use the target code for unit testing.

Joint static parsing tool [CasePlayer2], provide C0 (statement), C1 (decision), MC/DC coverage report, optimize test case production

A summary of the products certified by the third-party certification body TUVSUD for automotive functional safety ISO26262 software tools has been obtained.

[Coverage master winAMS] is an automated unit testing tool for embedded software, which implements module unit test and C0/C1/MCDC coverage test (coverage test) based on the function of embedded software. The target machine source code generates the target machine execution code through the cross compiler, and through the unit test in the same simulated processor environment as the actual processor, there is no need to make any changes to the execution code, which makes highly reliable module testing possible. In the field of high safety requirements such as automobile control software, unit testing has become an indispensable part. The use of target code for unit testing is also in line with the ISO26262 functional safety certification standards in the automotive industry.

Product specialty

Fully support embedded microcomputers! Verify the implementation of the module-by-module automated unit testing tool for the embedded CumberCraft + software.

As a detection method that can detect potential errors that can not be found only by system testing and overall testing, [unit testing] has been widely valued in the field of embedded development. At the same time, unit testing is also one of the certification projects required to be implemented in the field of functional safety (ISO26262) of automotive software.

[Coverage master winAMS] Unit testing is performed in a simulated processor environment by directly using the target code generated by cross-compilation. It can not only realize the logical unit verification of C language program, but also test the problems that may occur after the embedded microcomputer is assembled into a product with high reliability white box (white box) test.

No need for HookCode the only tool in the industry that makes it possible to use target code for unit testing directly

The unit testing tools of some companies often use the method of adding test code or test driver to the source code of the tested object, which leads to the difference between the code used in the test and the target machine code assembled into the product. Although the running function should be the same in theory, from the perspective of embedded development, it is like processing the optimized code generated by cross-compilation, which can not ensure the quality of the final product. Coverage master winAMS is the only tool in the industry that has the function of unit testing without any processing on the tested objects, especially in areas with high security requirements.

There is no need to establish a dedicated environment for unit testing, but you can do unit testing in a development cross-compilation environment.

Coverage master winAMS does not need to add any test drivers or test code, you can directly use the object code that will be assembled into the product for unit testing. Unit testing can use a common cross-compilation environment with software development, eliminating the need for special management of test resources and the establishment of other dedicated environments. Therefore, it not only facilitates program resource management, but also shortens the time required to prepare the test environment.

The best tool that meets the requirements of the Automotive functional Safety Standard (ISO26262) [using target code for unit testing without processing]

ISO26262 is a functional safety standard derived from IEC61508, which is applicable to the field of automobile manufacturing. Among them, Part.6-9 [Software Program Unit testing] includes the construction coverage testing of software programs and related specified projects. According to the automobile safety standard (ASIL), the recommended items of test statement coverage (statement coverage), branch coverage (branch coverage) and MC/DC coverage are put forward.

Another recommendation is

[make the unit test environment the same as the target environment as much as possible]

The rules. If unit testing is performed in a different environment from the target environment, you must indicate the difference between the source code and the target code, as well as the difference between the target environment and the test environment. Therefore, this requirement is difficult to meet for other companies that use computers that are different from the target computers for compilation and unit testing. Although some company's unit testing tools include cross-compilation environment and compilation functions, and can be tested in the same environment as the target environment, all tests need to insert test code and compile again, so testing can only be carried out in a different environment from the target environment.

Coverage master winAMS, a unit testing tool provided by GAIO, has

● adopts a computerized function test platform environment that fully supports embedded microcomputers.

● does not need to insert the test code to test directly with the target code.

To provide the necessary functions that meet the requirements of the ISO26262 standard. The Coverage master winAMS provided by GAIO is the only tool in the industry that complies with the ISO26262 standard [unit testing using packaged code directly].

On the correspondence of Automobile functional Safety ISO26262 and the acquisition of Certification it has obtained the certification of third-party certification body TUVSUD for ISO26262 software tools applicable to automobile functional safety.

On June 28, 2012, the "Coverage master winAMS / General" test tool was certified by a third-party certification body of TUVSUD in Germany for ISO26262 software tools with functional safety specifications for automobiles, and the certification was obtained for the first time in Asia, including Japan.

Through this certification, it shows that the company's unit testing tool "Coverage master winAMS / General" and program analysis tool "CasePlayer2" are tools that meet all safety levels in the field of static analysis and unit testing, and are guaranteed by TUVSUD certification bodies.

ISO 26262 requires developers to provide certificates for developing software tools at the tool confidence level (TCL) for different software tools. This certification applies to the most complex TCL3 tool certification standard in tool certification. Therefore, after the introduction of our company's unit testing tools, there is no need to authenticate parts of TCL, which can reduce procedures and time.

The main unit test function uses SSTManager management unit to test project

SSTManager is an application function of Coverage master winAMS, which is used to manage unit test project and make test data (test data). From setting up the test environment to reporting the test results, the integrated management is implemented by the computerized functional Test platform (ISS).

Use universal and convenient CSV files to manage the input and output of test data

Coverage master winAMS does not need to insert test code, but directly uses the target machine code for unit testing. Use the universal and convenient CSV file to manage the input and output data used in the test. At the end of the test, the output test results and the output expected values are displayed in the CSV file in the same format.

Automatic production function of C0/C1 coverage report (standard function)

Automatically report the C0/C1 test coverage results of the corresponding source code according to the input and output data of the test. It includes the function of displaying test data through graphics (viewer) and the corresponding source code path under test, which is used to analyze test results. As an option, MC/DC coverage testing is also included.

Automated testing function for MC/DC coverage (option function)

Provides MC/DC coverage testing as an option. The C0/C1 coverage test can directly use the target code without processing. However, MC/DC coverage testing for compound conditionals requires automatic insertion of HookCode to decompose the compound conditionals in order to test each conditionality. This may lead to the difference between the test code and the target code. In order to verify the appropriateness of HookCode, run the target code at the same time of the MC/DC coverage test to confirm that the running result is consistent with the expected value.

Note: the example on the right shows that in the compound conditional of the second if sentence, the branch is not tested when [gbc > 30] is false. In the case of C1 coverage test, its test result is OK;, while for MC/DC coverage test, its result is NG.

Note: the MC/DC coverage test function does not support C++ programs.

The efficiency of unit testing functions combined with the program parsing tool CasePlayer2 to achieve the efficiency of code reference parsing operations

By using the flow chart generated by CasePlayer2 and the link function between the module construction diagram (the construction diagram of the calling function) and the source code, the parsing work of the source code for unit testing is efficient.

It can automatically retrieve the external variables of the function under test and make the test condition setting efficient.

The joint program parsing tool CasePlayer2 automatically retrieves the external variables used by the function being tested. Shortens the work previously required to search the source code to find variables for input criteria. Moreover, it can prevent errors similar to the omission of variable assignments caused by manual operations.

According to the code parsing automation to make the test plan of the coverage rate of C0, C1, MCPX DC.

The joint program parsing tool CasePlayer2 can automatically produce the test data of the conditional branch if,switch,for,while which meets the coverage test requirements. The conditionals (if, switch, etc.) contained in the function under test can be displayed in a list on the data Viewer. Click on the condition, the tool will automatically start to retrieve the related variables, and then automatically generate the data needed for the coverage test from the boundary value of the set condition.

In order to achieve C1/MCDC coverage, the data of each function needs to be combined during the test. Using the parsing results provided by CasePlayer2, the conditional net construction is analyzed, and the C1/MCDC coverage test data is generated at the minimum limit of repeatability.

Support for MPU

CoverageMaster winAMS Supported Processor List (English)

Action environment

Manipulate PC/OS

IBM PC/AT compatible machine

CPU with Pentium (equivalent) 2GHz or above

Memory 512MB or above (recommended)

Monitor resolution XGA (10240768) or above (recommended)

Windows XP, Windows Vista, Windows 7 (32bit/64bit) (not supported by Windows 95/98/Me/NT/2000)

This is the end of "how to understand embedded Software Unit Test / Integration Test tool winAMS". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report