What is Testing?
Lab: Unit & Integration Testing Basics
Video Runtime: 10:24
Notes | Transcript | Playlist
Notes
So before we can go too far down the rabbit hole, we need to start right now and define what “testing” is. I want you to cement this in your mind. I’ve already talked about the benefits to you. But now we need to what it is. And then we’re going to break it down into different classifications.
The Testing Formula
Write this down:
test { function name } should do { the expected behavior } when { this condition(s) } occurs.
Identify each of the conditions and expected behaviors for a given function. Those are the tests you need to build.
Testing validates your code to the expected behavior for a given set of conditions and scenarios. It also helps you to think through how the function will work and different scenarios that will happen. That makes your code better and more robust.
Transcript
You will grow in this profession when you incrementally and systematically stretch yourself....bit-by-bit.
Episodes
Total Lab Runtime: 04:26:49
- 1 Lab Introductionfree 13:13
- 2 How Testing Benefits Youfree 27:00
- 3 What is Testing?free 10:24
- 4 Unit vs. Integration Testsfree 17:44
- 5 Setup the Testing Environmentpro 12:21
- 6 PHPUnit & a Virtual Containerpro 08:37
- 7 Create the Composer.json Filepro 14:36
- 8 Configure PHPUnit for Both Test Suitespro 10:56
- 9 Setup Test Shortcuts in Composerpro 09:58
- 10 Setup Local's Web Serverfree 10:05
- 11 Unit Tests - Bootstrappro 14:34
- 12 Test Basicspro 12:24
- 13 Test Assertionspro 18:42
- 14 Unit Tests - Write Real Testspro 23:32
- 15 Integration Bootstrap - Overviewfree 09:01
- 16 Integration Bootstrap - Find the WordPress Test Suite's Directorypro 12:10
- 17 Integration Bootstrap - Defining Constantspro 04:06
- 18 Integration Bootstrap - Register Theme & Loadpro 07:41
- 19 Meet WP_UnitTestCasepro 12:05
- 20 Integration Tests - Write Real Testspro 15:18
- 21 Wrap it Upfree 02:22