3 ms·
There should be both. Unit tests written by devs are not testing that the system does what it is supposed to do. They're testing that the code does what the pr
by marcus_holmes 6y ago
There should be both.
Unit tests written by devs are not testing that the system does what it is supposed to do. They're testing that the code does what the programmer intended it to do. They have to be written by the programmer because they're coupled with the code.
There's a separate testing process needed (as you say) that tests if the system does the thing it's supposed to do. The programmer cannot do this, precisely because it's basically testing their understanding of the requirements.
I have my co-founders Q&A everything before rolling out to production. It's a pain, but it's saved us a few headaches where I was just following the golden path and missed some obvious problems.
- 01100011 6y agoDepends. If the 'unit' is big enough to have an interface spec then a different dev should write the test. If you're doing function level unit testing, a dev should write it. There's a grey area between those two extremes. My original post was intended to focus on system and api level testing but I wasn't clear on that.
- marcus_holmes 6y agoI agree, there's a ton of grey areas in this whole field, especially around the borders between layers.