In the development process of basic automotive software, the importance of testing has become increasingly obvious. Testing is used to detect whether the function is implemented as expected. Testing is a measure of software quality. Through early testing, bugs in the software can be discovered as soon as possible, thereby improving software quality and ensuring product quality.
The basic steps of the test chain are as follows:
Ø Static testing of code
Ø Unit testing for detailed design
Ø Integration testing for architecture
Ø Demand-based system testing
Static testing checks the correctness, readability, and maintainability of the source program by analyzing the syntax, structure, process, and interface of the source program. The static test provided by ZC mainly uses QAC to test static code according to the MISRA C specification, and provides corresponding detailed test reports.
Metrics that can be detected by QAC testing:
Ø STCYCFunction cyclic complexity STCYC
Ø STPTH Path complexity STPTH
Ø STMIF Nested depth STMIF
Ø STELF IF ELSE Quantity STELF
Ø other metrics
Advantages of static testing:
Ø Found syntax errors in the program
Ø Check whether the software meets programming standards
QAC静态分析界面
A variety of metrics can be tested in QAC testing. By selecting the metrics to be tested, the measurement results of each function in the code can be displayed on the interface in a line chart format.
Measurement of various functions in QAC
The source file reference nesting relationships shown can help reduce unnecessary nested calls and reduce the complexity of code calls.
The file nesting relationship
The QAC static analysis report provided by the test includes Metrics, a list of MISRA errors that violate programming specifications, and an error list-used to display QAC errors that appear in the file and recommendations for correction.
QAC static analysis report
Unit testing is an important part of the software development V model (see Figure 5). After completing the coding work, the test engineer conducts unit testing according to the detailed design to verify whether the function of the function is implemented according to the detailed design, and through unit testing. Discover potential bugs. To this end, we launched Tessy unit test service (C language), which includes PC-side simulation testing and actual chip environment testing.
Software V model development part
Role of unit testing:
Ø Detection function error
Ø Missing detection function
Ø Detect parts that exceed requirements
Tessy's actual chip test environment is complex, and ZC also provides environment construction services.
ZC currently provides the environment for building:
Design corresponding test cases according to the provided design requirements to test whether the functions implemented by the code meet the requirements and ensure the traceability of functions and requirements.
Tessy unit test interface
Check whether the path coverage of the code can be satisfied to ensure that all paths in the code can operate normally.
Tessy unit test test case coverage view
Build a real-machine environment for the target chip under the corresponding compiler and debugger, and provide an xml environment configuration file.
Construction of Tessy's real-machine environment
The Tessy test can generate four types of reports, including Details Report, Overview Report, Planning Coverage Report, and Execution Coverage Report.
Tessy Overview report
Tessy test path coverage report
Click to download the product manual