Each of our sessions are digitally broadcast live and feature world-class speakers. Each presentation typically has 30-40 minutes set aside for instruction followed by another 15 minutes or so for Questions & Answers at the end.
About This Session
Test early, test often, test always. You’ve probably heard similar adages many times before, but you’re still not writing tests for your code. Why is that?
Most likely, the reason you’re not testing your code is one of three common scenarios:
- You don’t know how to test.
You don’t realize how much faster you can operate thanks to tests.
You don’t believe scripted testing is actually valuable to you.
In this presentation, I would like to tackle all of those issues and get you up and running with – and excited about – testing today.
It has never been easier to build tests for your WordPress projects than it is right now. Tools like WP-CLI can generate your complete testing infrastructure with just a couple of commands. Testing frameworks like Codeception allow you to quickly test complex, browser-based features than ever before. Integration tools like Travis CI (and many, many others) afford you the ability to push new code into a project and trust it doesn’t break already-tested functionality. In this presentation we’ll see how to use all of these to our advantage to rapidly prepare our software for testing.
With the hard parts out of the way, and in record time, we can spend the balance of our time together on the why, what, and how of testing. In fact, I’ll give you the why for free right now: automated testing will save you dozens of hours and potentially hundreds or thousands of dollars on every single project – and make you a more effective developer in the process!
Here’s the deal: you’re already testing your code to verify it works before passing it along for client review. The problem is that you’re running your tests manually. Manual tests are messy and leave plenty of room for error and every time you need to test again, guess what? You’re testing the same things manually… again.
When you script your tests what you’re actually doing is codifying the intended behavior of your software – you’re documenting how the system should behave for all to see. Moreover, you’re defining your test once and confirming the desired behavior forever. From now until the end of time you can be sure that your software behaves as desired just by running the tests again.
As for the what and how of testing, well, you’ll need to watch the presentation for those. I promise, though, writing tests will allow you to to complete projects faster and with less effort than going without. I know it sounds counterintuitive, but that’s the magic of testing!
About Brian Richards
Brian Richards is the creator of WPSessions and has been developing with WordPress since 2007. Brian has had the opportunity to lead and work with many amazing development teams these last several years. This has allowed him to help develop sites for Microsoft, Disney, TIME, YMCA, and numerous others.
Brian has an affinity for self-directed learning and helping others to develop skills and workflows to better solve important and complicated problems. He can’t resist helping good people do great things!