Slide 1

Slide 1 text

Amsterdam, 2018-11-02 Stefan Wagner Using requirements specification to speed up STPA-BDD in agile development

Slide 2

Slide 2 text

You can copy, share and change, film and photograph, blog, live-blog and tweet this presentation given that you attribute it to its author and respect the rights and licences of its parts. based on slides by @SMEasterbrook und @ethanwhite

Slide 3

Slide 3 text

!3 Agile Software Development

Slide 4

Slide 4 text

!4 Agile Software Development of Safety- Critical Systems? Safety analysis without an upfront architecture design? Unstable requirements that can change every few weeks?

Slide 5

Slide 5 text

!5 There are some approaches – S- Scrum Prerequisite SSRS with STPA Pre-Planning Meeting Sprint Planning Meeting STPA Regular Safety Meeting Daily Scrum Meeting TDD/BDD/CI Sprint Review Meeting Sprint Retrospective Meeting Final STPA Validation https://arxiv.org/abs/1703.05375

Slide 6

Slide 6 text

!6 Focus on communication

Slide 7

Slide 7 text

Based on: M. Cohn. Succeeding with Agile. Addison-Wesley, 2010 Test Code Refactor Test Code Refactor Test Code Refactor Passing acceptance test Refactor the test Customer acceptance Implement acceptance test(s) Failing acceptance tests Acceptance- test-driven development Test-driven development Identify conditions of satisfaction Select a user story

Slide 8

Slide 8 text

!8 Behaviour-Driven Development (BDD) Developer Tester Product Owner Examples Scenarios Automated Tests

Slide 9

Slide 9 text

Feature: Refund item Scenario: Jeff returns a faulty microwave Given Jeff has bought a microwave for $100 And he has a receipt When he returns the microwave Then Jeff should be refunded $100 Behaviour-Driven Development (BDD)

Slide 10

Slide 10 text

!10 STPA-BDD

Slide 11

Slide 11 text

!11 Example Unsafe Scenario from STPA Gherkin Scenario During auto-parking, the autonomous vehicle does not stop immediately when there is an obstacle up front. Given the autonomous vehicle is auto-parking When the ultrasonic sensor provides the feedback that the forward distance is smaller or equal to a threshold indicating that ther is an obstacle up front Then the autonomous vehicle stops immediately.

Slide 12

Slide 12 text

!12 Experimental results many safety requirements can be written into test cases within a limited time slot. 25 But: Communication effectiveness is significantly different! The developers consider the safety requirements deeply and initiatively. The business analysts are more confident about the test cases. It becomes easier to identify conflicts in business rules and test cases. The business analysts are clear about the status of acceptance testing. The business analysts could spend less time on sprint-end acceptance tests.

Slide 13

Slide 13 text

!13 Speeding it up with automation

Slide 14

Slide 14 text

!14

Slide 15

Slide 15 text

!15 Putting a formal basis below it

Slide 16

Slide 16 text

!16 Will we loose communication? Developer Tester Product Owner

Slide 17

Slide 17 text

!17

Slide 18

Slide 18 text

Prof. Dr. Stefan Wagner e-mail [email protected] phone +49 (0) 711 685-88455 WWW www.iste.uni-stuttgart.de/se Twitter prof_wagnerst ORCID 0000-0002-5256-8429 Institute of Software Technology These slides are available at www.stefan-wagner.biz Joint work with Yang Wang (now at Bosch) and John Thomas (MIT)

Slide 19

Slide 19 text

Pictures used in this slide deck Safety by GotCredit (https://flic.kr/p/qHCmfo, Got Credit) Scrum framework by Dr ian mitchell under CC BY-SA 4.0 (https:// en.wikipedia.org/wiki/Scrum_(software_development)#/media/ File:Scrum_Framework.png) Screenshot from http://agilemanifesto.org by Ward Cunningham