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.

Figure 1 : Comparison of Coverage Rates Between Test Script-Based Testing and Automated Comprehensive Testing

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.

Figure 2 : Example of Detecting Dead Code Using Automated Comprehensive Testing

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.

Author
Hiroshi Ueda

Ubiquitous AI Corporation

Embedded Business Unit 3, Deputy General Manager

Hiroshi Ueda

After university, Ueda joined a Tier 1 supplier and worked on ECU software development. He later worked overseas as an embedded software development engineer before returning to Japan, where he has been engaged in technical sales for automotive software since 1998. Drawing on his own experience, he sources overseas software products that help solve customers' development challenges and delivers them to engineers in Japan.

Related Insights

Get in Touch

For more details on GSIL

Contact Us

Want to learn more about GSIL or have challenges in automotive ECU software development?

Try GSIL for Free

Try GSIL for Free

We offer a free trial for corporations, including training and setup support.

Back to Product Page