019 A QA Professional Questions Micro Tests and TDD

Note: this IT radio drama starts with episode 14, Why Devs don’t TDD. Start listening there. 

Connect

Visit Agile Thoughts and register to receive free development, analysis, or leadership and management materials and learn to excel at developing software. I’ll also send information on my low cost email courses you can take via the internet.

​019 A QA Professional Questions Micro Tests and TDD

Jose: I heard from the other team members plenty about your TDD. Now I’m all about quality but come on! These tests are just testing the code. And I’m already testing the features. So what good is that?
 
Vanilla: Well, what you do is a lot of manual work. Instead these are automated, and —
 
Jose: And they are written by developers? How does it make sense for you to write your own tests for code you wrote? Won’t your tests just pass because you want them to?
 
Vanilla: It’s like this, Unit tests–
 
Jose: Unit tests? More like Fantasy Unicorn tests. Do you really think you guys will actually make any? And that they will be any good?
 
Vanilla: Now come on, Unit tests are fast and test the developer’s intent.
 
Jose: I don’t need any stinking unit tests to tell me developers intent. Every developer’s intent is to do as little testing as possible so they can write features and fix them later. And everyone comes to me complaining that I didn’t catch them all when, after all, my testing schedule is cut in half!
 
Vanilla: Now see here Jose, in the last 4 days I’ve written twenty unit tests, and you know what, they test every line of code I wrote.
 
Jose: Every line of code YOU wrote. I bet they are all happy path. Come on! Be honest!
Vanilla: Now see here Jose–
 
Jose: The cat’s already out of the bag Pop. I heard the PO talking about how these unit tests don’t even test features. Now how does that make any sense?
 
Vanilla: They don’t *directly* test the features. Directly, I say! However, they test the code that makes the features work.
 
Jose: Listen to yourself talk man. You’re raving.
Vanilla: Come on!
Jose: Micro or not, developers write tests? Those two things just don’t go together. A skunk don’t change its stripes.
Vanilla: Now you just hold on there! Do you think that developers are incapable of writing tests?
 
Jose: It’s the genetics or something. Because… Hold on. Something is coming.
Vanilla: what are you talking about?
Jose: Wait for it. I’m having a, … a, Blazing Saddles epiphany. Here now. It’s coming. Ah! (quote)
 
Vanilla: you sir, are killing me. You are … just a dear. Now I want you to take a look at these micro tests. (keyboard sound) See those test names? They …
 
Jose: (shocked) practically tell you what the code they are testing is supposed to do. And, I’ll be damned, you did more than just the happy path. Impressive. You would make a good tester. You are some kind of XMan. I just don’t see how you’LLC get the others to write any of these. They think they’re faster if they throw it over the wall to me. It’s great that you were willing to write those twenty tests and all but there just isn’t anything in it for you developers. Anyways, can you do me a solid? If one of your micro tests fails, could you let me know? My boss keeps track of how many bugs I find, and well, if these micro thingys actually do anything useful, let me know so I can file bug reports.
 
Narrator:
The fact that Micro tests are written by developers has been a controversy among companies with old school outlooks on the job of QA. Because QA has been a function of preparing for a release, QA managers and team members find it confusing to make testing as part of the development phase rather than a post development phase. In fact, with TDD, testing is done a tiny bit before development. Since micro tests run so fast, developers like Vanilla Pop execute these tests multiple times every hour of every day. This allows developers to use micro tests as a quick “check” against code they are writing, to discover if they’ve caused a regression. This allows bugs to be found even before code is checked in. Finding bugs in this manner is far in advance of traditional QA or even macro testing. In this case, TDD actually shortens the development cycle, enabling developers to write more features per day and without regression.
 
Since Testers by training are going to doubt anything a developer tells them, Vanilla Pop just needs the Tester to support him and help hold the developers accountable for regressions that slip in, especially if they aren’t bothering to write automated micro tests. Jose will continue writing automated Acceptance Tests for features (macro tests) and rather than focus on big counts to his manager, write automated macro tests early in the sprint cycle with ATDD and report how well the code is “covered” by automated tests.

FIND ALL THE EPISODES FOR THIS SERIES AT THE SERIES PAGE.

Agile Thoughts
Agile Thoughts
019 A QA Professional Questions Micro Tests and TDD
Loading
/

Comments are closed.