RKtracer tool

A Comprehensive Offline Unit Testing and Code Coverage Tool for C and C++

Unlock the true potential of embedded software quality with RKTracer tool. As a unit testing, integration testing and code coverage tool, RKTracer ensures reliable and error-free software deployments. Explore the benefits, features, and best practices to elevate your software development lifecycle.

RKTracer Tool

RKTracer is an offline software testing automation tool designed for unit testing, integration testing, and code coverage analysis of both embedded and enterprise applications. Developed by RKValidate Software, its main objective is to save developers time, effort, and money by generating automated unit and integration tests, tailored especially for applications written in C and C++.

Capabilities of the RKTracer

  • You can integrate the RKTracer automation tool into your existing development or testing environments.
  • Generates unit test cases for applications written in C and C++, such as games, GUIs, Android apps, device drivers and embedded systems.
  • Generate code coverage metrics for unit tests and integration tests for application testing on the host platform or embedded target.
  • Improve your testing processes by generating code coverage analysis reports and mutation coverage reports.

Advantages

RKTracer is compatible with a wide range of compilers, cross-compilers, debuggers, embedded targets, IDEs, and build systems, catering to diverse development environments.

Effortlessly integrate RKTracer into your existing build system or testing environment without the need to shift your project to external vendor IDs. Whether you’re working on an embedded system, device driver, GUI application, or a game, RKTracer has you covered.

The tool facilitates cross-platform embedded system testing, automatically incorporating the required libraries for cross-compilation.

RKTracer autonomously generates unit test cases by instrumenting the application source code.

In instances where certain modules or components are missing during testing, RKTracer enables the creation of stubs (to mimic absent function definitions) and drivers (to emulate controlling modules).

RKTracer goes beyond mere unit testing, allowing integration testing, system testing, and user interface testing on both build machines and embedded targets, ensuring the code functions as expected.Full control over how you run unit tests on embedded targets.

  • Function Coverage,
  • Line Coverage: In Depth coverage analysis with covered(green), partial(yellow) and uncovered(red)
  • Statement Coverage, 
  • Decision Coverage, 
  • Condition Coverage, 
  • MC/DC Coverage 
  • Multiple Condition Coverage.
  • Mutation Coverage and Coverage for refactored codes.
  • Supports Agile and Test Driven Development.

This feature helps developers identify sections of the application influenced by code modifications, facilitating focused testing

It seamlessly integrates with CI/CD tools and supports agile and test-driven development.

User Interface for Generating Unit Tests

The RKTracer UI showcases a hierarchical project layout. The left side displays a list of source files and their respective functions. On the right, users can find detailed information about each function, including parameters, initialization processes, mocking, stubbing, and more.

  • Generating test cases for selected functions.
  • Creating parameterized test cases for functions or member functions based on user-defined input values, expected outputs, assert checks, or boundary conditions.
  • Generating stubs for missing function definitions.
  • Testing private, protected, and file static functions without altering the application code.
  • Full customization of the auto-generated unit test cases, with the flexibility to run them independently of RKTracer on either the host platform or target device.

How does it work?

1. Integration

Integrate RKTracer with your preferred Integrated Development Environment (IDE) such as IAR Embedded Workbench, Eclipse, Keil μVision, Visual Studio, and more. RKTracer offers plug-ins for smooth integration into your workflow. For command-line users, RKTracer can be easily integrated with your build settings.

2. Configuration

Simply turn ON RKTracer. The tool automatically recognizes the compiler or cross-compiler from your build system and adds the necessary runtime libraries. This makes the configuration process straightforward, supporting both host and target testing environments.

3. Generation and Execution

RKTracer will generate unit test cases using frameworks like Google Test or Unity. Here’s how it works:

  • Test Case Generation: RKTracer scans your source files (e.g., simple.cpp) and generates corresponding unit test cases (e.g., simple_rk_test.cpp). These files include all necessary dependencies, stubs, and mocks.
  • Adding to Project: The generated test files are saved in your local project directory but are not automatically added to your build system. You must manually add these test files to your project to execute them.
  • Customization: If your project includes static or private functions, RKTracer generates wrappers, which can be seen in the test files. Comments in the generated test file highlight the sections where wrappers are created for specific functions.
  • Test Execution: After adding the test files to your project build system, you can run these unit test cases to validate the functionality.

4. Code Coverage Reports

After running the tests, generate detailed code coverage reports with a single click. RKTracer provides coverage analysis for both host and target machine testing, giving you comprehensive insight into your application’s performance.

By following these steps, you can efficiently use RKTracer to generate unit tests and code coverage reports, ensuring a thorough verification of your application.

Don’t take our word for it. Try the RKTracer tool for a 30-day free trial?

Do you have Questions? Email us @ info@rkvalidate.com or call us +91-8971088344