Achieving 90%+ ECU Software Coverage — GSIL's Automated Exhaustive Testing

"No matter how many test cases we write, coverage won't budge," or "we keep missing bugs caused by unexpected combinations of inputs" — these are common complaints in automotive ECU software development. This column explains, from a Shift-Left perspective, how GSIL's automated exhaustive testing addresses both problems, with concrete figures.
1. What Is GSIL?
GSIL is a Software-in-the-Loop Simulation (SILS) tool for automotive ECU software development, co-developed by Ubiquitous AI Corporation and A&D Company. It provides a virtual environment where ECU software can run and be verified entirely on a PC, and supports application-level verification for a wide range of ECUs — engine, transmission, body, and more.
Key benefits of GSIL
- No real ECU, HILS, or hardware needed — verification can start on a PC from the earliest stage of development
- Semi-automated virtual ECU (vECU) construction — automatic correction of microcontroller-dependent code and automatic stub generation greatly reduce setup effort
- Low-cost parallel development — no limits imposed by a finite number of physical test benches
- Easy debugging — no need to separate software and hardware causes; testing is possible anytime, anywhere
- Automated testing and CI support — embedded CI pipelines can be built by combining Python test scripts with Jenkins or GitHub Actions
The cost of fixing a defect after release is said to reach 60–100 times the cost of fixing it at the requirements stage. Against this backdrop, GSIL helps teams find and fix bugs upstream — a "Shift-Left" approach — contributing to large reductions in overall development cost.
2. What Is "Constrained Random Testing"?
GSIL automatically generates a vast number of input combinations — far more than could be created by hand — through constrained random testing. Because this runs on a virtual ECU rather than waiting for real hardware, high-coverage verification can begin from the earliest stages of development. That's the essence of Shift-Left in practice.
The important point is that GSIL's "random" is not meaningless randomness:
- ❌ Meaningless randomness: inputs with no bound on range or rate of change
- ✅ Constrained randomness: inputs that vary randomly within a realistic range and rate of change
For example, constraints such as "vary the accelerator pedal randomly between 0–100% at a rate of ±1%/s" or "only toggle the autocruise switch after at least 10 seconds have passed" let GSIL automatically run meaningful combination tests that mimic behavior that can actually occur in a real vehicle.
This makes it possible to catch runtime errors that are hard to reproduce by hand — such as division-by-zero or null-pointer access — and to raise coverage with minimal engineering effort.
3. Reaching 90%+ Coverage in 10 Minutes
We ran a comparison using a sample autocruise application. The scripted test exercises a full sequence of autocruise behavior — acceleration, setting the target speed, cruise mode, ACC (accelerate), COAST (decelerate), and ending autocruise.
- Scripted test: Lines 60.9% / Branches 43.1%
- Automated exhaustive test (10 minutes): Lines 99.4% / Branches 93.1%
The automated exhaustive test raised line coverage from 60.9% to 99.4%, and branch coverage from 43.1% to 93.1%. Achieving this level of coverage without spending engineering effort creating or maintaining test cases is a significant win. The portion that doesn't reach 100% is explained in the dead-code section below.
4. Why It Never Reaches 100% — Detecting Dead Code
If, after exhausting every possible combination in automated exhaustive testing, some code still never executes, it can be judged with high confidence to be logically unreachable "dead code." This perspective — rarely offered by other tools — is something GSIL can visualize automatically.
In real examples, cases have been found where a switch statement's default clause meant one of five branches never ran, or where a particular conditional branch was logically impossible to satisfy and therefore never executed. Being able to clearly explain "why coverage doesn't reach 100%" is valuable as quality-assurance evidence, and the same capability applies directly to verifying dead-code prohibition rules such as those in MISRA.
5. Measuring Coverage — gcov and Testwell CTC++
GSIL supports unit-level coverage measurement using gcov, letting you check Lines, Functions, Branches, and Conditions metrics on a per-file basis.
gcov is a free coverage measurement tool bundled with gcc. It works well for PC-based coverage measurement as used by GSIL, but does not support MC/DC measurement or measurement on real hardware. When MC/DC or on-target measurement is required, our coverage tool Testwell CTC++, from Germany's Verifysoft, is available.
- Unit-level coverage with gcov: Lines / Functions / Branches / Conditions
- Testwell CTC++ support: MC/DC measurement and on-target coverage measurement
GSIL's distinctive strength is that coverage isn't just measured — automated exhaustive testing actively raises the coverage percentage itself.
6. Summary — What Only GSIL Can Do
GSIL's automated exhaustive testing uses constrained random inputs to automate combination verification that would be impossible by hand, reaching 90%+ coverage in a short time. It also identifies portions that never reach 100% as dead code, and combined with gcov and Testwell CTC++ measurement, clearly demonstrates evidence of both quality and coverage.
All of this automated exhaustive testing runs on GSIL's virtual ECU. Because high-coverage verification can start before real hardware is complete, Shift-Left and embedded CI (via Jenkins/GitHub Actions integration) follow naturally.
GSIL delivers all of the following in a single environment:
- Virtual ECU: verify behavior on a PC without real hardware or HILS
- Automated exhaustive testing: automatically verify millions of combinations using constrained randomness
- Coverage measurement: supports gcov / Testwell CTC++
- Embedded CI: integrates with Jenkins / GitHub Actions
No hardware required, early-stage verification, and automation — delivering all three at once is what sets GSIL apart from other SILS tools.
Related Insights
-
Making the Most of Test Assets in Automotive ECU Simulation
The importance of ECU control software keeps growing, and the test effort that comes with it has become enormous. How can teams make the best use of their test assets? Here we introduce techniques for using those assets effectively, along with the tools that support them.
-
Strengthening Competitiveness in Automotive Control ECU Software Development with SILS
In recent years, more automotive control-software teams have adopted Software-in-the-Loop Simulation (SILS) to make development more efficient. SILS allows code to be verified easily on a PC before hardware is complete, enabling more efficient software development and verification, along with reduced effort.
-
Reducing Rework Between OEMs and Suppliers by Sharing an ECU Control Software Environment
In ECU control software development, defects found later in the V-model require more rework. Learn why early defect detection is critical for reducing costs.
-
Applying GSIL to Continuous Integration (CI)
Learn how Continuous Integration (CI) improves development efficiency by automating code integration and testing, detecting defects early, and reducing rework.
-
Applying GSIL to MILS Development
If MILS enables model-based development, automatic code generation, and ECU validation, what additional benefits can a SILS tool like GSIL provide?
-
SILS Testing Using CAN — Vehicle-Wide Simulation and Test Case Reuse
SILS enables ECU software verification on a PC before hardware is available, supporting CI, automated testing, reduced rework, and improved reliability. GSIL adds CAN support for broader application.
-
Improving Development Efficiency in Embedded Control Software Through Simulation
Improve embedded control software development efficiency with GSIL simulation on PC. Reduce rework, enable automated testing and CI/CD, and boost reliability before hardware is ready.
-
Measuring System-Level Test Coverage
Coverage measurement helps track testing progress, but 100% coverage does not guarantee all input combinations have been tested or that defects are absent.
-
Challenges and Solutions for CI in Embedded Control Software
Continuous Integration (CI) automates static analysis, unit testing, and integration testing after each code commit, improving quality and development efficiency.
-
Improving ECU Reliability with GSIL's Comprehensive Automated Test Case Generation
Improve ECU reliability with GSIL’s comprehensive automated test case generation. Detect hard-to-find runtime errors like division by zero and buffer overruns through exhaustive simulation testing.
