Success Story

Automated 
Link Stubbing for
Faster Isolated
C++ Unit Tests 
in TESSY

Customer/Partner:
Razorcat (TESSY)

Context

logo-TESSY

emmtrix completed a project for its long-standing partner Razorcat, the company behind TESSY, a widely used test automation tool in safety-critical and embedded software development.

While TESSY has long provided strong support for unit testing in C, creating isolated unit tests for C++ code was still associated with substantial manual effort. In particular, making individual or small sets of C/C++ source files linkable often required extensive hand-written stubs for missing functions, classes, and global variables.

Challenge

When unit testing isolated C/C++ files, linker errors occur when dependencies are missing. In C++, this problem is amplified by:

  • Constructors and destructors
  • Inheritance and virtual functions
  • Templates and standard library types
  • Complex object initialization semantics

This made C++ unit test creation significantly more time-consuming compared to C, limiting automation and slowing down test development.

Solution

On behalf of Razorcat, emmtrix developed the emmtrix Link Stubber, a Clang-based command-line tool that automatically generates stub implementations for unresolved C and C++ symbols.

The tool makes incomplete translation units linkable without requiring full implementations.

Implementation Highlights

  • Integrated directly into TESSY
  • Automated stub generation for C++ functions, classes, constructors, destructors, and globals
  • Support for inheritance, abstract classes, and standard library types
  • Seamless unit test creation for isolated C++ source files
  • Reduced manual effort compared to hand-written stubs

Results

  • Extended efficient unit test creation from C to modern C++
  • Reduced setup time for isolated C++ unit tests
  • Improved scalability and automation in C++ test workflows
  • Lowered the barrier for testing legacy and complex C++ codebases

Partner Feedback

Razorcat highlighted that automated link stubbing reduces recurring manual effort when setting up isolated C++ unit tests and improves the scalability of the workflow.

“Integrating automated link stubbing reduces the manual work required to set up isolated C++ unit tests and makes the workflow more scalable.”

Michael Wittner

CEO , Razorcat

Closing

This project shows how compiler-based tooling can reduce setup effort in C++ unit testing workflows, including in safety-critical environments.

If you would like to discuss similar requirements in C++ unit testing, automated stub generation, or test workflow automation for embedded software, feel free to contact us via our contact form or get directly in touch.

Portrait Rainer Heim

Rainer Heim

Cookie Consent with Real Cookie Banner