4 ms·
I don't think this is a good way of framing things. In fact int can be counter-productive. Automated testing is the process of writing code to understand your
by michaelfeathers 10y ago
I don't think this is a good way of framing things. In fact int can be counter-productive.
Automated testing is the process of writing code to understand your code. We already have to understand our code. Testing is being deliberate about that understanding and writing it down. The same design/testing thoughts that lead us to edge cases can lead us their elimination without testing at all. It's an integrated process, not something separate.
- sharemywin 10y agoQA is a separate set of eyes. No one writes a news article without an editor. QA brings a different interpretation of specifications. Developers writing there own unit tests is a single point of failure. The developers understanding of the specification.
- michaelfeathers 10y agoFor higher level tests that's fine. At the unit level it's problematic. It delays feedback.
- jschwartzi 10y agoThe problem with having a separate test group is that developers who don't test don't write anything to be testable. They don't add features that allow fault injection, and they don't modularize code to be independently tested. As a result, testing any of their code is highly tedious. Developers should also write their own tests. QA should have tests too. It shouldn't be a matter of throwing software over the fence to a separate group.
- alkonaut 10y agoHopefully no company has a QA department or QA person ("Tester") that writes unit test for code already written by a developer. Unit tests can't be separated from the code, and has to be written in conjuction with the code. That said, it's often possible to write higher level tests in advance as a specification, or afterwards as a regression/integration suite. Testing code can be used for many things such as UI regression testing, performance testing etc. That kind of test is black box and not tied to a specific piece of code. So I think it's hard to debate "who tests" or "who writes tests" without discussing exactly what kind of test.
- BaronSamedi 10y agoThis is a problem that a good project manager and the company's development culture can solve. Ops also frequently has things they need from developers but rarely get.
- jacquesm 10y ago> Developers writing there [sic] own unit tests is a single point of failure. For unit tests that's pretty much the norm, and you could easily split those up between two developers. One writes the tests for the code of the other and vv. Integration tests tend to be written by a test engineer, sometimes doubling as QA. Team size is a big factor in these decisions, one solution does not fit everybody.
- mikestew 10y agoDevelopers writing there own unit tests is a single point of failure. I think that's a misunderstanding of the use of unit tests. Devs should be writing unit tests so that I can write more interesting tests that assess quality (which is not what unit tests are for). And then there's the real world, where my agenda today consists of...writing unit tests for code I didn't write.
- ASinclair 10y ago> Automated testing is the process of writing code to understand your code. We already have to understand our code. Testing is being deliberate about that understanding and writing it down. Tests are documentation of code behavior. Who better to document that behavior than the person that wrote it in the first place. > It's an integrated process, not something separate. I agree. Though I'm biased since I've mostly been in SET roles.