Download presentation
Presentation is loading. Please wait.
Published byClaude Robbins Modified over 9 years ago
1
Future Media BBC MMXI TDD at the BBC David Craddock, Jack Palfrey and Tom Canter
2
Future Media BBC MMXI Who are we? David Craddock –Software Engineer Jack Palfrey –Developer In Test Tom Canter –Software Engineer
3
Future Media BBC MMXI 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
Future Media BBC MMXI What is unit testing?
5
Future Media BBC MMXI 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
Future Media BBC MMXI Tests are useful for real world applications
7
Future Media BBC MMXI Test last approach Design Code Test
8
Future Media BBC MMXI The TDD way Test Code Refactor
9
Future Media BBC MMXI 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
Future Media BBC MMXI Test driven development by Kent Beck
11
Future Media BBC MMXI 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
Future Media BBC MMXI 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
Future Media BBC MMXI Objections to writing test first
14
Future Media BBC MMXI Today’s tools Cloud 9 + Python + PyUnit
15
Future Media BBC MMXI Demo
16
Future Media BBC MMXI 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
Future Media BBC MMXI 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
Future Media BBC MMXI 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
Future Media BBC MMXI 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
Future Media BBC MMXI Practical
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.