Take a faster, smarter path to AI-driven C/C++ test automation. Discover how >>
Whitepaper
Before you jump in, get a preview below.
As the automotive industry continues to embrace an Agile development methodology, they start to uncover other processes that can be accelerated, such as delivery by DevOps, particularly including continuous testing. DevOps is aimed at automating all of the necessary steps required to take application code and deliver it to the end user.
DevOps works like a conveyor belt to move application code through the distinct phases. Today’s DevOps and “continuous everything” initiatives require the ability to assess the risks associated with a release candidate—instantly and continuously.
Continuous testing provides an automated, unobtrusive way to obtain immediate feedback on the business risks associated with a software release candidate. It guides development teams to meet business expectations and helps managers make informed trade-off decisions in order to optimize the business value of a release candidate. Much of this is performed through continuous integration (CI).
In this whitepaper, we’ll dive into the following best practices for DevOps in automotive software:
It’s important to fully understand the DevOps phases and when to start using the right tools for the best results. There are also various tried and true CI/CD pipeline tools or solutions in the market that support your DevOps deployment. Some tools used by the automotive industry include Parasoft, Jenkins, GitHub, GitLab, Azure DevOps, Bitbucket, Bamboo, Docker (containers), and more.
One of the core components in DevOps is continuous integration. CI is the merging of code features, fixes, or small changes backed by process which include version control and software build automation. The goal of CI is to establish a consistent and automated way to build, package, and test applications in what is called a software “pipeline.”
Testing, in most cases, is the roadblock to making CI seamless and efficient. Manual testing is out of the question, so it comes down to automating testing or not testing at all. Automated testing includes more than just unit testing, it also includes best practices such as static analysis and regression testing. Automated testing generates immediate feedback which is used to adjust and replan for the next iteration or sprint.
Test automation in DevOps involves automating your testing methods. It’s important to be familiar with each of the phases of this methodology and where to trigger your testing verification and validation methods.
You may have also heard the term DevSecOps, which is the practice of integrating security into the DevOps workflow. It requires a mindset shift in teams to integrate security tools and practices into this methodology. Security has become important for many auto manufacturers due to regulatory requirements from WP.29 R155 and the need to incorporate processes from standards like ISO 21434.
An important benefit of the CI/CD pipeline workflow is the feedback loop it provides to make the “continuous” part work properly. Any hangups in the loop cause inefficiencies that lead to delays in development and deployment.
Test automation tools provide a way around the following unit test hurdles:
By making testing more efficient within the CI/CD pipeline, it’s possible to improve test coverage with each cycle and not impede the progress of the project with continuous testing.
Static analysis tools are essential during the coding phase both from a quality and security point of view plus in terms of coding standard compliance. For automotive software that must conform to MISRA C or C++, for example, clean reports at the coding and check-in are needed to ensure continuous compliance.
The build stage triggers both application-wide static analysis and regression testing. At this stage static analysis tools run on the complete scope of the project, offering better precision, and finding potentially missed errors at the unit level. It’s also at this stage that regression tests are initiated. The results of regression tests drive the next phase, testing.
At this stage, testing for newly added features begins along with handling failed regressions tests. The results of regression and new tests drive the next planning cycle.
Continuous integration is just part of a continuous development process that needs testing and delivery to reap the benefits of the approach.
Continuous testing provides an automated, unobtrusive way to obtain immediate feedback on a software release candidate. Continuous testing isn’t simply more test automation. The purpose is to build quality and security into the product as part of a continuous integration/release/delivery process.
At the development level, automotive software isn’t much different than typical application development. It requires IDEs, compilers, static and dynamic analysis, and build tools. However, tools often target different architectures than they work on, for example, host versus target environment. Versions of tools are important to ensure a homogenous development environment across the team.
Automating testing for automotive software is more challenging due to the complexity of initiating and observing tests on embedded targets, not to mention the limited access to target hardware that software teams have. Software test automation is essential to making automotive testing workable on a continuous basis from the host development system to the target system.
Testing automotive software is particularly time consuming. Automating the regression test suite provides significant time and cost savings. In addition, test results and code coverage data collection from the target system are essential for validation and standards compliance.
Traceability between test cases, test results, source code, and requirements must be recorded and maintained, which means data collection is critical in test execution.
A solution like Parasoft C/C++test comes with an optimized test harness to take minimal additional overhead for the binary footprint and provides it in the form of source code, where it can be customized if platform-specific modifications are required.
One huge benefit that the Parasoft C/C++test solution offers is dedicated integrations with embedded IDEs and debuggers that make the process of executing test cases smooth and automated. Supported IDE environments include:
The Parasoft solution supports the creation of regression testing baselines as an organized collection of tests and will automatically verify all outcomes. These tests run automatically on a regular basis to verify whether code modifications change or break the functionality captured in the regression tests. If any changes are introduced, these test cases will fail to alert the team to the problem. During subsequent tests, C++test will report tasks if it detects changes to the behavior captured in the initial test.
The parity of capabilities of remote target execution with host-based testing means that automotive software teams can reap the same benefits of automation as any other type of application development.
Development teams know that CI/CD workflows can function the same, regardless of whether they’re containerized or not. The value that containers provide DevOps teams is that it allows applications to be easily deployed and patched. Organizations can scale containers to their needs to accelerate development, testing, and production within Agile and DevOps use cases.
When it comes to managing complex development environments, especially in the safety-critical space, teams usually struggle with the following challenges:
All these problems are easy to solve with containers. Within each container is the standardized versions of the development toolchain including static analysis tools, compiler, IDE, and build tools. These containers are updated in a centralized fashion and deployed on an as-needed basis when a developer is working on project code.
The consistency of the development environment eliminates any errors that might arise from developers having slightly different versions of tools on their desktop. It’s a good way to ensure everyone is using the correct version of each tool, which might be important later for regulatory compliance. Containers also provide a centralized way to update tools and ensure these updates are propagated immediately across the organization.
DevOps in automotive software demands instant, continuous insight into the risks and quality of each release candidate, which continuous testing delivers through automated, real-time feedback. Although shifting from traditional waterfall development to Agile and CI/CD can be challenging for embedded, safety-critical systems, it is achievable with the right preparation and best practices—including automating tests to support continuous integration, removing V&V bottlenecks by testing on both host and target systems, using containers to ensure consistent and secure development environments, expanding test coverage through automated test generation and smart execution, and leveraging centralized reporting for data-driven decisions. Together, these modern techniques significantly reduce the inefficiencies of manual automotive testing and make today’s automated approaches far more effective
Ready to dive deeper?