Working Code
009: Testing
There are very few people in the programming world who will argue against the idea of testing software. But, when it comes to the mechanisms though which code is tested, the conversation starts to get interesting. There are those who feel that TDD - Test Driven Development - is "the way"; and, that any divergence from TDD is not only laziness but is, in fact, borderline malfeasance. At the other end of the spectrum are the people who perform all their testing manually; often, relying on QA (Quality Assurance) teams and smoke tests to find regressions before each deployment.
Most people sit somewhere in the middle of these extremes. This week, the crew talks about their own views and experience with testing; and, how they currently implement testing at work. Ben swings heavily towards the manual testing end of the spectrum; Adam and Carol swing heavily towards the automated end of the spectrum; and Tim, who often feels very hypocritical, sits somewhere in the middle.
Triumphs & Fails
- Adam's Triumph: He's been working hard to get his company's application migrated over to a new open-source software stack. And, as of this recording, he's successfully moved 9 of his 13 production servers over to the new setup; and, everything seems to be running smoothly! He's feeling very strong on hitting his goals of migrating the rest of the servers by the end of January.
- Ben's Failure: This week has been kicking his butt! He hasn't been sleeping well, he can't get comfortable in his chair, and everything seems to hurt. He's carrying a boat-load of tension in his neck and shoulders and he just can't seem to get past it. The only saving grace is that he can use his "standing desk" controls to select the perfect height for sitting.
- Carol's Failure: She's also having a tough time getting comfortable! Her body hurts from her tail-bone up to her head; and, the heating pad she's using just ain't doing it. She's currently on the hunt for a new chair that might help offer some relief. But, being the Amazonian warrior that she is makes things a bit more challenging. As she says: "I can't help it - I have six feet of legs and they have to go somewhere!" And, as the icing on the cake, she accidentally deleted the configuration settings for all seven of her home networks. She had automatic backups configured; but, she accidentally turned them off 3-months ago.
- Tim's Triumph: It's been a while since he was able to get into a groove; but, this week, he finally achieved flow state: that moment when the world disappears, time loses meaning, and all you can see is the code in front of you as it appears to pour out of your hands without effort or thought. He summed this feeling up quite nicely: "I feel less like I'm pushing a stone uphill and more like there's a river just flowing through me." I mean, come on, he even wrote a Regular Expression!
Notes & Links
- Pure Function - a function that produced no side-effects; and, whose outputs are determined entirely by its inputs.
- CFML - ColdFusion Markup Language, a language specification for one of the most powerful web application runtimes.
- Jest - a popular JavaScript testing framework.
- Unit testing - a low-level test of an individual unit of code.
- Integration testing - a mid-level test of a group of software units running together.
- End-to-End / Functional testing - a high-level test of an entire software system, typically looking at happy paths through an application.
- Manual testing - using human to run tests on a piece of software.
- Automated testing - using computers to run tests on a piece of software.
- Static testing - evaluation of code without having to execute it (think linters and strongly typed languages).
- Testing budget - a concept in which the tests that can block a deployment have to run within a certain time window.
- Rich Hickey: YouTube - please, just go watch all of his videos.
- Software regression - a bug that appears, and often breaks, a previously-working piece of code.
- Guillermo Rauch - CEO of Vercel.
- REST Assured - a testing framework for application APIs.
- Gatling - load testing software.
- Feature flags - tooling that allows you to turn parts of an application on or off without having to redeploy it.
- Strangler pattern
- Ben Nadel: My Personal Best Practices For Using LaunchDarkly Feature Flags - a tome that Ben wrote on how he uses feature flags.
- Kent C Dodds: Testing JavaScript - a popular online course about about testing JavaScript.
- EggHead.io - a popular subscription service that provides tutorials on web application development.
- MockBox - a module within TestBox that allows the internal execution of a software module to be observed.
Follow the show! Our website is workingcode.dev and we're @WorkingCodePod on Twitter and Instagram. New episodes weekly on Wednesday.
And, if you're feeling the love, support us on Patreon.