Join Simon Allardice for an in-depth discussion in this video The process of TDD revisited, part of Foundations of Programming: Test-Driven Development.
- There's several ways the basic idea…of test-drive development can be described.…We have this phrase Red Green Refactor…as a quick summary of the TDD process.…Red, make a task that fails.…Green, make that task pass.…And then refactor, make it right.…And this isn't done once, this is a cycle.…We repeat that throughout the lifetime of our project.…Or taking a different approach, I could even perhaps say…that test-driven development has two simple steps.…Step one, before you write any new code,…you first write a failing test.…
And step two, pass the test.…Then go back to step one and keep repeating this.…This is technically accurate, this is TDD,…but that's too simplistic,…it doesn't really give us any guidance.…I could break this apart a little bit and say instead…that test-driven development has six steps.…Step one, we write a test.…Step two, we watch that test fail, we go red bar.…Step three, we will quickly write an application code…to pass the test, and we're talking here…about the simplest thing that could possibly work.…
The course explores the jargon of TDD—test suites, test harness, mock and stub objects, and more—and covers how TDD is used in the most common programming languages and environments. Plus learn to create, run, and manage the tests and move to a test-first mindset.
- What is test-driven development?
- Using unit testing frameworks
- Creating tests
- Using assertions
- Creating multiple test methods
- Naming unit tests and test methods
- Testing return values
- Setting up and tearing down
- Introducing mock objects
- Measuring code coverage