Episode 28 is all about unit tests!
Unit tests are a tool that developers use to help ensure that code is performing properly. During this episode we discuss how to get unit tests set up, how they are valuable, and some common challenges that developers encounter while writing tests.
We began discussions on unit tests in Episode 8, now it’s time to go further.
This episode was sponsored by WP Ninjas, the creators of Ninja Demo and the highly popular Ninja Forms plugin.
Show Notes:
WP CLI – Plugin Unit Tests
Unit Tests for WordPress Plugins
Curtis McHale and Unit Tests
WordPress.tv – Getting Started with Unit Tests
Getting Started with Unit Tests (written series)
Travis-CI
Scrutinizer-CI
Review us on iTunes
Transcript
INTRO: Welcome to Apply Filters, the podcast all about WordPress development. Now here’s your hosts, Pippin Williamson and Brad Touesnard.
BRAD: Welcome to Episode 28. Today we’re going to be talking about unit testing. But first, Pippin, what have you been up to, man?
PIPPIN: The last week or so was mostly involved with getting Affiliate WP version 1.3 out, which was a big release that Andrew and I have been working on for a couple of months. I think we pushed out 1.2 around July. Maybe it was August, so we’ve had a couple of months to work on getting some new features out. We finally got it all finished, and we’re pretty pleased with it.
BRAD: Cool.
PIPPIN: It was a pretty large release that had some highly requested features in it like people really wanted pretty affiliate URLs, so instead of something like yoursite.com?ref=3, it would just be yoursite.com/ref/BradTouesnard.
BRAD: Right.
PIPPIN: And that would be an affiliate link, so we got those put in. We got some — we added affiliate coupon tracking to iThemes Exchange, so instead of requiring an affiliate URL, you can now, if you redeem a coupon that’s connected to an affiliate, that affiliate will automatically get a commission on that sale even though no affiliate URL was used.
We added a new integration for Gravity Forms, so if you’re using Gravity Forms to sell stuff, you can now send someone through an affiliate link to your purchase form, then it’ll track that, and it will create a referral based on that if it’s valid. We’ve had Gravity Forms integration since version 1.0, but I was kind of a workaround. It wasn’t a really good integration because there were some missing hooks in the Gravity Forms plugin. Alex and the other developers over at Rocket Genius got those put in for us, so we were able to finally get that release pushed out, which was nice.
Beyond that, we got EDD 2.16 pushed out. That actually happened this morning. That fixed a couple of minor, but important bugs. That’s been pretty much my last week, and now moving onto the next things.
BRAD: Cool.
PIPPIN: How about you?
BRAD: We’ve been cracking away at the next release of Migrate DB Pro. It’s crazy. This release has quadrupled the number of issues in GitHub than the previous release.
PIPPIN: Is that just because you’re adding a bunch of new features or because you keep finding things that you need to work on or improve elsewhere in the code base?
BRAD: That’s the funny thing. When we do a release with a bunch of new features, it’s smaller, way smaller. Usually it’s four or five lines in the change log, right? But when we do one of these releases where we’re cleaning things up and we’re fixing bugs, we had Scrutinizer-CI. We cleaned up all the issues with that and the report that we get from Scrutinizer-CI with all the little problems that it identifies.
There are just so many things, and they’re not all little things either. Some of them are big compatibility issues that we had an issue with WP Engine that we’ve solved. Yeah, there are just a lot of different things, little things, so it’s not ev