V Tue, 24 Jul 2018 10:41:04 +0000 Arvin Schnell <aschnell@suse.com> napsáno:
Hi,
I read the article [1] and some of the references about testing and found it interesting and also disillusioning.
ciao Arvin
[1] https://blog.usejournal.com/lean-testing-or-why-unit-tests-are-worse-than-yo...
Thanks for interesting article. I found it very interesting and as usually for good article I agree and disagree with some parts :) What would be nice if author adds some real measurement for some of his statements. Also I would like more clear definition of unit and integration how he see it. His definition of integration testing as "do not mock so much" is a bit weak. If I take it for YaST does unit test mean test for class and integration test for whole yast module? So mocking only external dependencies like other modules or underlaying tools? End to end testing is quite clear and I worry for YaST incredible expensive with our wide scope regarding architectures and various hardware setups. What I agree is that testing UI as unit tests is often pain and ideally should be just smoke test that it can display something and for verify manual testing is usually better and more confident. On other hand I disagree with statement about code quality and design with example about component A,B and C. If component is something that is externally visible, then for me it makes sense to have unit tests for its API and what's more - when changing component B to A and C, the cost for tests is still smaller then changing all the code that really use component B. So unit tests checking API stability and helps to understand that change of some behavior affects also all users. Of course if it is just internal component that is not visible outside, then it is a bit different situation. So thanks for sharing some food for brain. Josef -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org