Obstacle Driven Development: Extending Test Driven Development

of 32 /32
Obstacle Driven Development Extending Test Driven Development ©odd.enterprises 31/10/2014

Embed Size (px)

Transcript of Obstacle Driven Development: Extending Test Driven Development

  1. 1. Obstacle Driven DevelopmentExtending Test Driven Developmentodd.enterprises31/10/2014
  2. 2. Obstacle Driven Development31/10/2014 odd.enterprises 2
  3. 3. ODD Control Model31/10/2014 odd.enterprises 3
  4. 4. ODD Process31/10/2014 odd.enterprises 4
  5. 5. BackgroundIdeas of Obstacle Driven Development (ODD) are based on numerous development processes including:ISO V-modelTest Driven DevelopmentISO specificationsRequirements analysis spiralAgile principles31/10/2014 odd.enterprises 5
  6. 6. Testing in HistoryTesting has been implemented on certain products for many years.Armour which was designed to be bullet proof would be testedNon standard components required this approach31/10/2014 odd.enterprises 6
  7. 7. Test Driven DevelopmentWhen using TDD there comes a very important and difficult stage of writing tests.Obstacle Driven Development is used to help define tests and extend TDD principles.Development of ODD began with the questionWhere do the tests come from?31/10/2014 odd.enterprises 7Write TestWrite CodeRefactor
  8. 8. Behaviour Driven Development 1Behaviour driven development has been described as TDD done rightSuggests that behaviours should influence the testing and design processODD is effectively a reordered and extended version of this process applied to all development stages31/10/2014 odd.enterprises 8Write TestWrite CodeRefactorThink
  9. 9. Behaviour Driven Development 2Reordering the BDD sequence gives a sequence similar to traffic lightsRed light now used for unverified and unvalidated processesAmber light now used when tests are created and code writtenGreen light used when the tests have been passed31/10/2014 odd.enterprises 9Write TestWrite CodeValidate / RefactorBehaviour
  10. 10. Obstacle Driven Development 1If tests are used to verify and validate code then the principle can be extended and adapted to create a new development model.Applications to hardware, software and embeddedLinks the stages with tests used for verification and validation31/10/2014 odd.enterprises 10VerifySolutionSolution forObstacleValidateSolutionObstacle
  11. 11. Obstacle Driven Development 2Obstacle Driven Development is used to find solutions to obstacles.An obstacle is broken into four stages of development when using ODD.AnalysisSpecificationSolutionProduction31/10/2014 odd.enterprises 11VerifySolutionSolution forObstacleValidateSolutionObstacle
  12. 12. Obstacle Driven Development 3Verification and validation processes for the stages.SpecificationVerification and validationSolutionTesting and designProductionQuality assurance and controlAnalysisUtilisation and elicitation31/10/2014 odd.enterprises 12
  13. 13. ODD Solution 1Using a specification allows the creation of tests based on the described behaviours.If a solution is designed to pass tests from the outset then testing becomes easierSolution is used to describe the individual and integrated designs31/10/2014 odd.enterprises 13Create TestDesign SolutionPassTestSpecification
  14. 14. ODD Solution 2ODD Solution is intended to be generic and used for software, hardware and embedded design.Red light now used for unverified and unvalidated specificationAmber light now used when tests are created and solution createdGreen light used when the tests have been passed31/10/2014 odd.enterprises 14Create TestDesign SolutionPassTestSpecification
  15. 15. ODD Specification 1A specification which is described directly from expected situations allows full coverageTests are used to verify and validate described behaviours cover situationsOnce all expected situations are covered and tests verified then the solution can be created confidently31/10/2014 odd.enterprises 15VerifySpecificationDescribeSpecificationValidateSpecificationSituation
  16. 16. ODD Specification 2ODD Specification is extended into a separate stage intended to be a full description of behaviours.Unit tests applied to a specification allow cross examination of behavioursImportant to create a full specification to allow detection of errors at an early stage31/10/2014 odd.enterprises 16VerifySpecificationDescribeSpecificationValidateSpecificationSituation
  17. 17. ODD Specification 3Adaption of ODD gives a sequence which followsRed light used for unverified and unvalidated behaviour for a situationAmber light used when verification tests are created and behaviour specifiedGreen light used when the behaviour has been validated31/10/2014 odd.enterprises 17VerifySpecificationDescribeSpecificationValidateSpecificationSituation
  18. 18. ODD Production 1A production process which is organised directly from the solution can have assured and controlled quality.Solution is used to ensure continuous and predictable qualityQuality assurance tests are created with passes a measure of quality control31/10/2014 odd.enterprises 18Assure Product QualityProduceProductControlProductQualitySolution
  19. 19. ODD Production 2Asolution is required to have production assured and controlled.Red light used for no quality assurance and controlAmber light used when tests for assuring product quality and production are createdGreen light used when quality control is passed31/10/2014 odd.enterprises 19Assure Product QualityProduceProductControlProductQualitySolution
  20. 20. ODD Analysis 1Once a product, and by extension the production process, has been created then utilisation is used to verify the product.Once the product is utilised in situations then elicitation can proceed as validationProcess used to link the stages to allow continuous improvement and adaption31/10/2014 odd.enterprises 20CustomerUtilisationSituationAnalysisElicitCustomersProduct
  21. 21. ODD Analysis 2Analysis may be performed to give feedback on the success of the product.Red light used for no utilisation and elicitation of productAmber light used when tests for customer utilisation are createdGreen light used when tests for customer elicitation are passed31/10/2014 odd.enterprises 21CustomerUtilisationSituationAnalysisElicitCustomersProduct
  22. 22. ODD Process 1A traffic light system has been developed. The lights have been arranged to demonstrate how one stage links the next.Each stage is began with a red light.Amber lights are obtained when tests are created for next stageGreen light is for when tests are passed and next stage linked31/10/2014 odd.enterprises 22
  23. 23. ODD Process 2Each part of analysis, specification, solution and production will have tests.Each process begins as unverified and unvalidatedTests are created to verify a processTests are passed to verify and validate the process31/10/2014 odd.enterprises 23
  24. 24. Testing ProcedureUnit testing is used and extended throughout the ODD testing procedure.Each stage and test is assigned a red light to beginAmber lights are obtained when tests are created for next stageGreen light is for when tests are passed and next stage linked31/10/2014 odd.enterprises 24
  25. 25. Unit Testing 1Unit tests are used in order to facilitate the testing process.Every stage is testedEach test has a single resultUnit tests can be combined to give complex testing processesGreen light is for when tests are passed and next stage linked31/10/2014 odd.enterprises 25
  26. 26. Unit Testing 2Analysis of situationsCreate a test to ensure a situation is covered by a behaviourPass the test ensuring a behaviour covers the situationSpecification of behavioursCreate a test to ensure a behaviour is implemented by solutionPass a test ensuring a behaviour is implemented by solution31/10/2014 odd.enterprises 26
  27. 27. Unit Testing 3Creation of solutionCreate a test to ensure a solution is created by productionPass the test ensuring a solution is created by productionProduction of productCreate a test to ensure a product is utilised in a situationPass a test ensuring a product is elicited in a situation31/10/2014 odd.enterprises 27
  28. 28. Linking Tests 1Situation A is analysedTests created to verify and validate Behaviour ABehaviour A covers Situation ATests created to verify and validate the testing and design of Solution A31/10/2014 odd.enterprises 28
  29. 29. Linking Tests 2Solution A implements BehaviourATests created to verify and validate the quality assurance and control of Production AProduction A implements Solution ATests created to verify and validate the utilisation and elicitation of product in Situation A31/10/2014 odd.enterprises 29
  30. 30. ODD Process Model31/10/2014 odd.enterprises 30
  31. 31. ODD Traffic Model31/10/2014 odd.enterprises 31
  32. 32. Legal StuffReferencesTest Driven Developmenthttp://en.wikipedia.org/wiki/Test-driven_developmentBehaviour Driven Developmenthttp://en.wikipedia.org/wiki/Behavior-driven_developmentUnit Testinghttp://en.wikipedia.org/wiki/Unit_testingDisclaimerThe ODD M-model and associated processes are provided by odd.enterprises and may be used for any purpose whatsoever.The names odd.enterprises and associated logos should not be used in any representation, advertising, publicity or other manner whatsoever to endorse or promote any entity that adopts or uses the model and/or associated processes.odd.enterprises does not guarantee to provide support, consulting, training or assistance of any kind with regards to the use of the model and/or processes including any updates.You agree to indemnify odd.enterprises and its affiliates, officers, agents and employees against any claim or demand including reasonable solicitors fees, related to your use, reliance or adoption of the model and/or processes for any purpose whatsoever.The model is provided by odd.enterprises as is and any express or implied warranties, included but not limited to the implied warranties of merchantability and fitness for a particular purpose are expressly disclaimed.In no event shall odd.enterprises be liable for any damages whatsoever, including but not limited to claims associated with the loss of data or profits, which may result from any action in contract, negligence or other tortious claim that arises out of or in connection with the use or performance of the model.31/10/2014 odd.enterprises 32