Continuous Integration for Safety Critical Systems Thomas Schütz Protos Software GmbH ASQF Safety Day 24.06.2014
Protos Software GmbH Methods and Tools Domain Specific Languages (DSL) Modelingtools Embedded Software Toolchains Protos builds tools, toolchains and domain specific languages (DSLs) for Embedded Systems Protos automates development processes Protos implements prototypes or production quality embedded systems Protos leads the Eclipse Projekt etrice
Why do we care about safety? Because the customer forces us to care? Because the marketing forces us to care? Because the law forces us to care?
Why do we care about safety? That s why!
So what do we need? Quality (Robustness, Reliability, )
Can Continuous Integration help? What is Continuous Integration? Why do we need Continuous Integration? How can Continuous Integration help?
The Integration Problem Developer 1 this is integration hell Developer 2 Developer 3 30 changes The Integrator Developer 4 70 changes Developer 6 Developer 5 Developer n
The Bug Fixing Problem Source: http://www.agitar.com/images/defect_chart.gif
Project Requirements not all requirements and objectives can be met 100%
Project Objectives
Basic Assumption for CI QUALITY = SPEED
What is Continuous Integration? (the long version) Continuous integration (CI) is the practice, in software engineering, of merging all developer working copies with a shared mainline several times a day. It was first named and proposed as part of extreme programming (XP). Its main aim is to prevent integration problems, referred to as "integration hell" in early descriptions of XP. CI can be seen as an intensification of practices of periodic integration advocated by earlier published methods of incremental and iterative software development, such as the Booch method. CI isn't universally accepted as an improvement over frequent integration, so it is important to distinguish between the two as there is disagreement about the virtues of each.
What is Continuous Integration? (the short version) a methodology for development daily development integration (or more frequently) verification by automated builds and tests
How does it work? An example: CI watches changes in repositories CI automates build of all related software projects CI automates test execution and reporting CI creates releases and delivers the software (Continuous Delivery) In case of an error, only the committers of the last changes will be informed
Where can CI help with safety? Example 26262 Part 6: Initialization of product development Specification of software safety requirements Software architectural design Unit design and implementation Unit testing Software integration and testing Verification of software safety requirements
How can CI help with safety? Unit testing: Automated build and test execution triggered by every change Very fast and specific response for developers Early detection, early fixes Software integration and testing: Continous automated integration of dependent projects including variants and different targets Automated integration tests (also HIL possible) Side effects of changes on other projects can be detected Early detection, early fixes
How can CI help with safety? Further help with safety requirements: Automated test reporting Automation of quality metrics like test coverage, complexity, Integration of static code analysis Different views for management and development Many open source or proprietary plugins or tools available or easy to integrate
Hudson Demonstration
Continuous Integration in the Process
Rules Commit early, commit often Never commit broken code Fix build problems immediately Fail fast (staging) Act on metrics Build for all targets Release and Deliver always Automate safety relevant metrics and tests
Caveats Continuous Integration is there to help you it is not a goal of the project to build the perfect CI start with the low hanging fruits (some builds, some tests, some deliveries) don t use all tools or plugins (stop in time)
Conclusion Continuous Integration can help to speed up your project to drive quality to keep everybody on the same page to start to focus on the important things to build confidence to introduce tests and metrics
... any questions? Thomas Schütz ts@protos.de http://www.protos.de