1 / 20

TDD at the BBC

TDD at the BBC. David Craddock, Jack Palfrey and Tom Canter. Who are we?. David Craddock Software Engineer Jack Palfrey Developer In Test Tom Canter Software Engineer. What do we do?. Work in the BBC in Salford Quays. David works on the server-side code of Connected Red Button

miach
Download Presentation

TDD at the BBC

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TDD at the BBC David Craddock, Jack Palfrey and Tom Canter

  2. Who are we? • David Craddock • Software Engineer • Jack Palfrey • Developer In Test • Tom Canter • Software Engineer

  3. What do we do? Work in the BBC in Salford Quays. David works on the server-side code of Connected Red Button Jack teaches BDD and TDD principles to developers and writes the BDD framework tools we use Tom works on the front-end code of Connected Red Button

  4. What is unit testing?

  5. Benefits of Tests • Finding problems early • Code coverage upto 75% • Reduce bug fixing time • Monitoring your code base • Gives confidence when low level changes are required • Real low level regression tests • Real documentation that never lies

  6. Tests are useful for real world applications

  7. Test last approach Design Code Test

  8. The TDD way Test Refactor Code

  9. What is TDD • Think about what the test will do • Write tests before code • Tests ‘drive’ • An indication of ‘intent’ • Tests provide a specification and documentation

  10. Test driven development by Kent Beck

  11. TDD steps • Implement a single failing test • Watch it fail • Write the simplest code to pass the test • Rerun the test and watch it pass • Refactor the code and tests to remove duplication • Repeat

  12. TDD best practices • Keep your test and model code separate • For every production class have a test class • Write useful tests • Agressively refactor production code • Isolate your tests • Maintain your tests • Tests should test one thing • Don't refactor with a failing test

  13. Objections to writing test first

  14. Today’s tools • Cloud 9 + Python + PyUnit

  15. Demo

  16. Development at the BBC • Work in teams with pair programming • Agile planning / task boards / sprints / standups • Source control - branching / commiting / merging • BDD - Behaviour Driven Development • Continuous Integration and automated builds • XP techniques, pairing, TDD, no overtime

  17. Development at the BBC (continued) • Expected to pick up languages ad hoc, you are not solely a 'Java developer' • Regular code reviews and discussions - very collaborative • Regularly get sent on courses on many different technologies • Masters course available • Innovation time available, where you can work on what you want

  18. Work at the BBC • Graduate scheme - a 2 year scheme with 4 x 6 month developer placements • Visit bbc.co.uk/careers/trainee-schemes/digitalmediascheme for more info and to apply, by 28th Feb for this year's intake • Shorter work experience placements are available separately to the graduate scheme.

  19. Practical session: Fizz Buzz • Write a program that prints the integers from 1 to 100. • But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". • For numbers which are multiples of both three and five print "FizzBuzz". • But do this in a test-first (TDD) way

  20. Practical

More Related