Autonomous vehicles are becoming a reality, are we ready to take our hands off the wheel?

Millions of cars have rolled off the production line since 2010 that have attractive in-dash controls, infotainment systems, and connected car functionality.

Many of these functions include voice commands, parking assistance, and automated braking. Years ago these features were seen as whimsical in cartoons such as The Jetsons. Now they are a reality with the connected car offering crash notifications, speed and safety alerts, and the ability for the driver to interact with their vehicle intuitively. The connected car initiative received a significant boost in 2014 when Google announced the formation of the Open Automotive Alliance (OAA) a group of automakers and technology companies that share a vision for making technology in the car safer.

Up to 40% of a new car’s value comes from the electronic components in it. The typical motor vehicle today has close to 50 electronic control units (ECUs) within it, this number can easily double for luxury models. These ECUs are performing many of the jobs that were previously done by mechanical or electrical linkages, managing everything from air-bags, door-locks and seat adjustments to ignition timing, throttle position, fuel injection, gear selection, cruise control, stability, and increasingly the brakes. The safety benefits of this new technology should make consumer adoption easy, however buggy software still causes many issues in vehicles, with 50% of recalls in recent times being due to software faultsFrost and Sullivan, a consultancy, expects the average car’s software content to grow exponentially from 10 million lines of computer code today to over 300 million lines within a decade. Even with the best programmers in the world, the average car of tomorrow could potentially be running software with 50,000 to 100,000 bugs.

With these statistics in mind, automotive manufacturers and their suppliers are working to improve development processes which can produce reliable software, and continue to increase consumer confidence in connected car technology.

Let’s take a look at one of these concepts.

Speak the Language of Test

Figure 1 – Connected vehicle systems

The best way to improve quality is to shorten feedback loops between team members, and ensure that there is a common language for team members to collaborate. Human language is a really inefficient way to define technical requirements or describe bugs. A much better way is to communicate via test cases. Requirements should be created as data tables that formalise: preconditions, allowable ranges of inputs, expected values for legal inputs, how to process out-of-range inputs, and post-conditions, just like a test case.

Code changes should be accepted only when accompanied by tests that map to the requirements, prove correctness, and provide complete code coverage of the change. Bugs should be described by automated tests that demonstrate the failure. Any other way of defining a bug will suffer from the same ambiguities as human language requirements, and result in the bug bouncing around the team with statuses of not-repeatable, need more information, works as designed etc.

A methodology where testing and QA is applied at the end of the development cycle is no longer an acceptable process when developing high quality software. Software quality must be a part of every team member’s responsibility.

Conclusion

The automobile is the most complicated electronic device that any consumer will buy, with six times as much code as a commercial aircraft (Boeing 787) and twice as much as the Hadron Collider at CERN.

In developed countries the average person spends more than an hour per day in a car. With so many humans trusting their lives on the systems in these cars, auto manufactures are working to produce the most robust systems possible by “speaking the language of test”. Autonomous cars will greatly raise the stakes, as early versions will be under intense scrutiny from both consumers and government agencies. The manufacturers who “get it right” and can instill confidence in the quality and safety of their autonomous cars will dominate.

This article originally featured in Electronics and has been updated for this post to reflect current market trends.