未解决
知从悟空自动化测试流程介绍ZC.WuKong Automated Testing Process Guide

ZC.WuKong Automated Test Process Guide Manual_页面_01.jpg

1  方案介绍 

汽车电子软件正遵循 AUTOSAR(汽车开放系统架构) 标准,MCALMicrocontroller Abstraction Layer,微控制器抽象层)处于底层软件栈的核心,负责提供对硬件外设的统一访问接口。在 ISO 26262 等安全标准要求下,MCAL 模块的测试需具备可追溯、可复现、可自动化等特点。传统 MCAL 集成测试依赖手工配置、命令行脚本和分散工具,存在流程不统一、效率低、难追溯等问题。项目需要在统一的图形化平台中完成 配置代码生成 → 编译 → 测试执行 → 报告生成 全流程,并支持多种测试模式和工具链。

MCAL测试的四个环节:

  1. 配置代码生成:基于 ZC.MuNiu或者EB Tresos,按测试用例生成 MCAL 配置代码。

  2. 编译构建:支持 Makefile + HighTec/IAR,实现增量/全量编译。

  3. 测试执行:支持在目标板中执行集成测试

  4. 报告生成:输出集成测试报告、VSMD 测试报告等。

1.png

FIGURE 1ZCWuKongTOOL

2.png

FIGURE 2Test Process

2  配置代码生成

知从科技可以为客户提供CONFIGURATION CODE GENERATION完整方案,并可针对项目特定需求定制开发,实现的数据文件生成配置代码包括:

  • 根据不同组arxml配置文件调用ZC.MuNiu命令行生成配置代码。 

  • 根据不同组epc配置文件调用EB_Tresos命令行生成配置代码。

ZC.MuNiu(木牛)是知从科技自研的 AUTOSAR 配置代码生成工具,以标准 .arxml 文件为输入,通过命令行生成与 AUTOSAR 底层软件模块(MCALBSP 等)匹配的 C 源码与头文件。支持 MCAL 驱动、BSP AUTOSAR 模块的配置生成,可满足不同芯片与项目形态的定制需求。

EB_Tresos  Elektrobit  AUTOSAR 配置工具,通过命令行 tresos_cmd.bat 根据 .epcECU Package Configuration)配置生成 C 源码和头文件;平台通过传入目标芯片、派生型号等参数实现自动化、批量化配置代码生成。

3  编译构建

知从科技可为客户提供 COMPILATION AND BUILD(编译构建) 完整方案,并根据项目实际需求进行定制,实现的能力包括:

  • 编译验证:对项目或工程进行编译,仅验证能否成功,不涉及后续测试。

  • 集成测试编译:集成测试流程中的编译阶段,针对多组配置和测试用例分别编译。

客户可根据项目实际情况在以下工具链中任选其一或组合使用:

  1. HighTec:通过 Makefile + Cygwin make 调用 HighTec 工具链(tricore-gcc / ld 等)完成编译。

  2. IAR:针对已有 .ewp 工程时,可调用 iarbuild.exe 进行全量或增量编译;集成测试编译则通过 Makefile + IAR 工具链(iccarm / ilinkarm 等)实现,与 HighTec 的集成测试流程在逻辑上一致。

3.png

FIGURE 3Compile Procedure

4  测试执行

知从科技可为客户提供 TEST EXECUTION(测试执行) 完整方案,并根据项目需求进行定制,实现的测试方式包括:

  • 构建验证测试 (Build Verification Test):基于编译生成的 ELF  MAP 文件,调用平台验证逻辑检查产物是否完整、有效。

  • 集成测试 (Integration Test):基于编译生成的 ELF 文件,通过 Lauterbach TRACE32 调试器将程序下载到目标板,在真实硬件上运行测试用例并读取测试结果。

  • VSMD 测试 (VSMD Test):基于 EPD  AUTOSAR 模块描述文件,调用 EB Tresos 命令行执行模块级校验,验证软件模块描述与实现的符合性。

5  报告生成

知从科技可为客户提供 REPORT GENERATION(报告生成) 完整方案,并可针对项目特定需求进行定制开发,实现的报告类型包括:

  • 集成测试报告 (Integration Test Report):根据不同模块的测试执行结果,调用Excel 模板 生成集成测试报告,汇总各测试用例的通过/失败状态。

  • VSMD 报告 (VSMD Report):基于 VSMD 测试输出(如 _VSMDReport.txt 等),调用 VSMD_Check_Summary  Excel 模板,整理并生成 VSMD 校验汇总报告。

  • Summary 测试报告 (Summary Test Report):基于各模块的 集成测试 Excel 数据,调用 HTML 模板 生成 AUTOSAR MCAL 风格的模块级汇总测试报告。

  • 资源与 Profiling 报告 (Resource & Profiling Report):基于 编译产物(ELFMAP 等),调用分析脚本生成 Stack/Flash/RAM 等资源统计报告及编译 Profiling 报告。

FIGURE 4Resourceanalysisreport

FIGURE 5SummaryTestreport

FIGURE 6vsmdTestreport

FIGURE 7IntegrationTestreport-Excel

FIGURE 8IntegrationTestreport-HTML


1  Introduction to the Solution

Automotive electronic software complies with the AUTOSAR (Automotive Open System Architecture) standard, in which the MCAL (Microcontroller Abstraction Layer) sits at the core of the low-level software stack, providing a unified access interface to hardware peripherals. Under the requirements of safety standards such as ISO 26262, the testing of MCAL modules must be traceable, reproducible, and automatable. Traditional MCAL integration testing relies on manual configuration, command-line scripts, and disparate tools, leading to issues such as inconsistent processes, low efficiency, and poor traceability. The project requires a unified graphical platform that supports the complete process of configuration code generation  compilation → Test Execution → Report Generation, while accommodating multiple testing modes and toolchains.

The four phases of MCAL testing:

  • Configuration Code Generation: Generate MCAL configuration code according to test cases based on ZC.MuNiu or EB Tresos.

  • Compilation and Build: Supports Makefile + HighTec/IAR, enabling incremental/full compilation.

  • Test Execution: Supports executing integration tests on the target board.

  • Report Generation: Outputs integration test reports, VSMD test reports, etc.

1.png

FIGURE 1ZCWuKongTOOL

2.png

FIGURE 2Test Process

2  Configuration CODE Generation

ZC can provide customers with a complete CONFIGURATION CODE GENERATION solution and offer customized development for specific project needs. The data file generation configuration code includes:

  • Based on different groups of arxml configuration files, invoke the ZC.MuNiu command line to generate configuration code.

  • Based on different groups of epc configuration files, invoke the EB_Tresos command line to generate configuration code.

ZC.MuNiu is an AUTOSAR configuration code generation tool independently developed by Zhicong Technology. It takes standard .arxml files as input and generates C source code and header files matching AUTOSAR underlying software modules (such as MCAL and BSP) via command line. It supports configuration generation for AUTOSAR modules including MCAL drivers and BSP, and can meet customization requirements for different chips and project configurations.

EB_Tresos is an AUTOSAR configuration tool from Elektrobit. It uses the command-line tool tresos_cmd.bat to generate C source code and header files based on .epc (ECU Package Configuration) configurations. The platform achieves automated and batch configuration code generation by passing parameters such as the target chip and derivative model.

3  Compilation and Build

ZC can provide customers with a complete COMPILATION AND BUILD solution, which can be customized according to actual project requirements. The capabilities include:

  • Compilation Verification: Compiles the project or workspace to verify only whether the compilation succeeds, without involving subsequent testing.

  • Integration Test Compilation: The compilation phase within the integration test process, where compilation is performed separately for multiple sets of configurations and test cases.

Customers can choose any one of the following toolchains or use them in combination based on the actual needs of the project.

  • HighTec: Invokes the HighTec toolchain (tricore-gcc / ld, etc.) via Makefile + Cygwin make to perform compilation.

  • IAR: For existing .ewp projects, iarbuild.exe can be invoked to perform full or incremental compilation; for integration test compilation, it is achieved via Makefile + IAR toolchain (iccarm / ilinkarm, etc.), which is logically consistent with the HighTec integration test process.

    3.png

FIGURE 3Compile Procedure

4  TEST EXECUTION

ZC can provide customers with a complete TEST EXECUTION solution, which can be customized according to project requirements. The implemented test methods include:

  • Build Verification Test: Based on the ELF and MAP files generated from compilation, the platform's verification logic is invoked to check whether the artifacts are complete and valid.

  • Integration Test: Based on the ELF file generated from compilation, the program is downloaded to the target board via the Lauterbach TRACE32 debugger, test cases are executed on real hardware, and the test results are read.

  • VSMD Test: Based on AUTOSAR module description files such as EPD, the EB Tresos command line is invoked to perform module-level verification, validating the conformance between the software module description and its implementation.

5  Report Generation

ZC can provide customers with a complete REPORT GENERATION solution, and can carry out customized development for specific project requirements. The types of reports implemented include:

  • Integration Test Report: Based on the test execution results of different modules, invokes an Excel template to generate an integration test report, summarizing the pass/fail status of each test case.

  • VSMD Report: Based on the VSMD test output (such as _VSMDReport.txt, etc.), invokes Excel templates like VSMD_Check_Summary to organize and generate a VSMD verification summary report.

  • Summary Test Report: Based on the integration test Excel data of each module, invokes an HTML template to generate an AUTOSAR MCAL-style module-level summary test report.

  • Resource & Profiling Report: Based on the compilation artifacts (ELF, MAP, etc.), invokes analysis scripts to generate resource statistics reports such as Stack/Flash/RAM, as well as a compilation profiling report.

FIGURE 4Resourceanalysisreport

FIGURE 5SummaryTestreport

FIGURE 6vsmdTestreport

FIGURE 7IntegrationTestreport-Excel

FIGURE 8IntegrationTestreport-HTML



标志.png

发布于 2026-03-24 17:22:43
写回答
好问题0
好问题0
已收藏
收藏问题
写回答