G-Test Adaptability in Embedded C Framework

2026-26-0562

To be published on 01/16/2026

Authors
Abstract
Content
Software quality is a vital aspect of software engineering, where unit testing plays a significant role in ensuring code reliability and validating individual components against their design specifications. In this paper, we explore the implementation of Google Test, an open-source C++ testing framework, to facilitate automated unit testing for embedded C projects. The adoption of Google Test in C projects introduces multiple challenges, especially for embedded systems and Windows environments, due to configuration complexity, limited direct support for C files, and dependency handling. This work provides a practical and structured solution to overcome these hurdles by integrating Google Test using a customized Makefile and CMakeLists. The Makefile automates the complete testing pipeline: compiling source files, linking with the G-Test framework, executing test cases, and generating reports. This significantly reduces manual effort and the risk of human error in the build and test processes. Additionally, the paper outlines how mock files are created to isolate units under test, enabling accurate testing of software modules in isolation. Test automation also supports rapid iteration, saving time during regression testing cycles. We demonstrate how integrating tools such as LCOV and GCOV can generate detailed code coverage reports, ensuring maximum visibility into test execution. Furthermore, this approach aligns with industry standards like ASPICE, where software testing is classified into different levels: unit, integration, and qualification testing. By following the solutions and practices outlined in this paper, teams can improve test coverage, reduce configuration errors, and accelerate the software testing lifecycle. This methodology is particularly beneficial for developers and testers working in embedded environments who are seeking a reliable, open-source, and cost-effective testing framework.
Meta TagsDetails
Citation
Chavan, S., Upadhyay, S., Athavale, S., and Anilkumar, S., "G-Test Adaptability in Embedded C Framework," SAE Technical Paper 2026-26-0562, 2026, .
Additional Details
Publisher
Published
To be published on Jan 16, 2026
Product Code
2026-26-0562
Content Type
Technical Paper
Language
English