You’ve probably heard of Test Driven Development, or TDD. But what is it really? You’ve probably heard of JUnit. But how do you use it to do TDD?
In this episode, I’ll show you how to use JUnit to do TDD.
The promise of Test-Driven development is better software by thinking through how you want to test it, THEN writing code. At a high-level, you write enough of your class so that it runs.
Then you think through how the class should work, and write test cases to test it. The test cases all fail because there’s no code.
Finally, you write code until the test cases pass. And you’re done. So the testing of the software drives the entire process, which is why it’s called Test-Driven Development.
Sounds simple, but how do you get started? That’s what we’ll talk about in this video.
Subscribe to my channel: https://www.youtube.com/channel/UCAoqQ5DnRyLisPdzUodMrww
Source code link: https://github.com/makotogo/TddWithJUnit
Check out my blog: http://makotoconsulting.com/blog
Follow me on Twitter @jstevenperry
Music: Ditch Diggin’ by Jungle Punks, YouTube Audio Library: https://www.youtube.com/audiolibrary/music