What is the RKTracer Tool?
The RKTracer is an easy-to-use tool that helps you measure code coverage and find runtime errors in your software. It is designed for software developers, testers, and QA teams working on regular HOST computers, simulators/emulators, and embedded systems.
Whether your code runs on a host, server, embedded device, or even a GPU, RKTracer helps you track how much of your code is being tested. This makes it easier to improve software quality, especially in safety-critical projects.
Why the RKTracer Tool ?Why Choose RKTracer?
RKTracer makes code coverage simple. Just add the rktracer
keyword to your build command or enable it in your IDE, and rebuild your project. The tool takes care of the rest.
Key Features:
- Delta and Modified Line coverage
- Supports many languages: C, C++, CUDA, C#, Java, Kotlin, JavaScript, TypeScript, Python, Golang, and Swift.
- Works with all compilers and cross-compilers.
- Supports all IDEs and CI/CD tools like Jenkins, Azure DevOps,Gitlab and SonarQube.
- Works on both host systems and embedded or GPU targets (including NVIDIA CUDA for Windows and Linux).
- No need to change your build system—RKTracer auto-detects your compiler and adds everything needed.
- Gives detailed coverage reports.
- Function coverage
- Line and statement coverage
- Branch and decision coverage
- Multiple Condition and MC/DC coverage
Code Coverage Made Visual and Simple
RKTracer uses color-coded reports:
- Green—Code is fully covered
- Yellow—Code is partially covered
- Red—Code is not covered
Even if a single line has multiple conditions or statements, RKTracer shows exactly which parts were tested and which were not.
RKTracer vs Other Tools
Feature | RKTracer | Other Tools |
---|---|---|
Easy to use | ✅ Yes | ❌ Complex to set up |
Compiler support | ✅ All compilers & cross-compilers | ❌ Limited |
IDE & CI support | ✅ Jenkins, Azure, SonarQube | ❌ Partial support |
CUDA support | ✅ Full support for host & device code | ❌ No support |
Automatic runtime library linking | ✅ Yes | ❌ Manual work needed |
Programming languages supported | ✅ C, C++, CUDA, C#, Java, Kotlin, JS, GoLang, Swift etc. | ❌ Only a few |
Types of testing supported | ✅ Unit Tests, Functional Tests, Integration, System Tests. | ❌ Limited |
Coverage types | ✅ All major types incl. MC/DC | ❌ Basic only |
Coloring | ✅ In-depth per statement | ❌ Whole-line only |
Simple Setup, No Hassle
RKTracer was built with user feedback and is designed to be fast, light, and easy to set up:
- No environment variables required.
- Doesn’t interfere with other tools on your system.
- No need for extra wrappers or folder changes.
- Works smoothly with modern compiler settings and flags.
- Can be extended to support more languages easily.
How It Works
RKTracer isn’t just a code coverage tool — it’s a smart code coverage analysis solution that fits easily into your existing development environment and software testing tools.
Step 1: Integration with Build System
You don’t need to change your build system, source code, or test setup.
- Just enable the plugin in your IDE (like Visual Studio, Eclipse, IAR, CCS, etc.), or
- Add rktracer as a prefix to your make or build command in the terminal
- RKTracer will automatically attach itself to the compiler and linker.
Step 2: Code Instrumentation
When you build your software, RKTracer:
- Takes the preprocessed source files from compiler
- Adds instrumentation code to track what parts of your code are being tested
- Sends the instrumented code to the compiler for final compilation
This happens behind the scenes — no changes are needed in your code manually.
Step 3: Runtime Library Integration
RKTracer also includes a runtime library.
This library:
- Is added automatically during the build
- Works based on your compiler or cross-compiler
- Ensures test data is collected even on embedded devices, simulators, or servers
Step 4: Run Your Tests
Now, run your
- Unit tests
- Integration tests
- Functional tests
- System tests
RKTracer collects test coverage data while tests are running on a host, target device, simulator, or server. It stores this data in a text file.
Step 5: Generate Code Coverage Reports
After running the tests, just run the rkresults command.You will get:
- HTML reports – easy to view in a web browser
- XML reports – for CI/CD tools and SonarQube
- Detailed metrics like function coverage, branch coverage, MC/DC, and more
You can also generate delta coverage reports to check if newly added or modified code is tested.
RKTracer Automation Tool features
- It is a very easy-to-use tool.
- It supports unit testing, integration testing, functional testing, system testing, Docker testing, and cloud testing.
- It supports multiple programming languages: C, C++, CUDA, Objective-C, C#, Java, Kotlin, JavaScript (ReactJS/NodeJS), TypeScript, Python, Golang, and Swift.
- It automatically adds the runtime library for cross-compilation to the target device or GPU.
- It supports code coverage generation for CUDA on HOST and device (GPU) code.
- It supports all compilers, cross-compilers, embedded targets, microcontrollers, and cloud-based testing or testing applications in Docker.
- supports all build systems and testing frameworks.
- GNU Makefile, Cygwin, Nmake, gmake, QT Makefile,
- Scons
- CMake
- Microsoft Visual Studio CMake
- MinGW CMake
- Nmake CMake
- GNU CMake
- MSBuild C, C++, CUDA and C#
- Dotnet (.NET core)
- Gradle build and NDK build
- Maven builds
- ANT build
- Bazel
- The RKTracer tool plugin for IDEs.
- Microsoft Visual Studio IDE.
- IAR Embedded Workbench IDE
- Greenhill’s Multi IDE
- Code Composer Studio IDE
- Keil uVision/Keil MDK-ARM IDE
- DS-5 ARM IDE
- Simplicity Studio IDE
- Microchip MPLAB IDE
- Renesas e2 Studio IDE
- Android Studio IDE
- Tizen IDE
- Eclipse IDE
- NetBeans IDE
- Detailed code coverage information with different metrics.
- Function Coverage
- Line Coverage
- Green: Full Coverage
- Yellow: Partial Coverage
- Red: Not Covered
- Statement Coverage
- Branch or Decision Coverage
- Condition Coverage
- MC/DC Code Coverage
- Multiple-Condition Code Coverage
- Delta Code Coverage and Coverage for New or Modified Lines of Code
- Plugin for Continuous Integration: Jenkins, Azure DevOps, and SonarQube support.