A concise and well-defined development loop is very helpful when using a new programming pattern or practice. In this video, go over the Red/Green/Refactor technique and its application.
- We now have a basic understanding…of the theory behind test-driven development.…Let's move on to the main technique…we'll be using for the rest of the course.…Red, green, refactor.…Burn this into your mind's eye.…It's going to be your best friend…on every single one of your future…test-driven development projects.…This technique is essentially a closed development loop,…continually repeating itself until the test suite…is done and your project is shipped.…Let's break down the components individually.…
First, we write the minimum amount of code…we need to create a failing test.…This is the red phase.…Second, we write the actual implementation code…to make the failing test pass.…Now if your test passes, we're in the green phase.…Last, the refactor phase, where we look at any…repeated or extraneous code in our test functions,…and either move it into the test setup…or delete it entirely.…Keep the dry principle in mind here,…don't repeat yourself.…
Keep in mind that refactoring may extend…to multiple tests in your suite,…
- What is test-driven development?
- Creating and expanding a data model
- Creating a manager class
- Testing class methods
- Checking for duplicates
- Testing table views
- Mocking cells
- Testing cell selection
- Assembling the app
Skill Level Intermediate
1. Foundation and Theory
2. Getting Started
3. The Manager Class
4. TableView Testing
5. Finishing Touches
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.