Are you confident that your safety-critical automotive software applications are working as intended?
If the answer is “no”, you are not alone. And you have good reason to be apprehensive: in the past year, we’ve seen very public software-related recalls from automotive powerhouses like Toyota, Nissan and GM. “This is just the beginning of software recalls,” Roger Lanctot, associate director of Strategy Analytics says. “In the past it was all about mechanical failures.”
The short answer is that automotive recalls are on the upsurge because of an increase in software as a percentage of these systems, which in turn means more malfunctioning electronic systems. This surge in recalls signals a crisis in quality that is affecting the entire software industry, from the healthcare.gov web site to applets on your mobile phone.
How can you minimize the risk?
What can your organization do about the automotive software quality crisis? A good first step is to create a culture focused on quality. Some best practices for engineering high quality applications include:
- Build High Quality Requirements: During the design phase it is critical to build high quality and consistent requirements that do not just address the nominal features, but also edge cases, functional data ranges, and error handling.
- Prototype While Building Requirements: Ensure that the design is valid by creating prototypes of critical functionality. Will your algorithm scale from 10 data items to 10 million?
- Build Testable Software: No one would design a widget that could not be manufactured and tested efficiently, but engineers consistently build software that is hard to test. Small modules with well-defined pre and post conditions make testing easier.
- Coding Style: Adhere to organization standards for consistency, industry standards for dependability.
- Build Complete Test Cases: Correctness tests that map to requirements, robustness tests that stresses functional ranges, completeness tests that stress combinations of values.
- Meaningful Peer Review: Focused on the architecture, edge cases, and test cases.
- Automated Testing Infrastructure: Any test, run any time, by any user.
- A Culture of Quality: Quality is everyone’s responsibility – not just the QA department.
Tools of the trade
The good news is that with an investment in a handful of software development tools, you can greatly reduce the effort of implementing the best practices described above. Regardless of the tools selected, the work-flow implemented must be practical and repeatable. Here are the key tools for your toolbox, and some critical features they should support:
- Requirements Management
- Author, edit, and share requirements
- Cross-reference of requirements to code to tests
- Module, and Unit and Integration Testing
- Support for Agile, and Test-Driven Development
- Support for embedded target test execution
- Integration with compilers, debuggers, and emulators
- Code Coverage Analysis
- Low memory and CPU overhead for coverage data capture
- Flexible data retrieval from target environments
- Test Automation Platform
- Automated test execution and reporting
- Continuous Testing: run all tests all the time
- Change based testing: only re-run tests affected by source code changes
Where to learn more
With embedded software playing a growing role in today’s automobiles, addressing the software quality challenge is a critical engineering task. To learn more about this topic, take a look at this Vehicle Electronics Newsletter article I wrote. Titled “The Software Quality Crisis“, the article offers commentary about the current state of software quality in the automotive industry, insights about how to create a culture of software quality within the automotive industry, and best practices for driving high quality applications.