Hello, gandjustas, you wrote: G> Hello, another_coder, you wrote: _>> Hello, gandjustas, you wrote: G>>> Hello, another_coder, you wrote: _>>>> Though and in the theory but if all is written normally... At green units-tests, but red integration, on 100 % it should be clear where and that fell. G>>> and what for then units-tests if in a reality check becomes only the integration are necessary? _>> not only, and set. I.e. for example, you know that method Save at you is not covered tests. The case when all units green, but integration are not present says, generally, that the logic is correct, and here the moment with record does not work. And after all can be so that integration green, and 5 of 20 unit of tests red (even 1). _>> If you consider that the integration should be red always, when at least one unit the test red you are mistaken. The sheaf of two systems can work for you normally. G> You left from the answer to a question. What for generally units-tests, what their value if UT can be green, and integration - red are necessary. G> other question depends on the answer to this question also - whether it is necessary to isolate generally the application code from details of operation with storage? After all we perfectly understands that in a reality the application working with basis, does not start to work with a web service after simple changeover of a repository. Therefore we can try to find other reason of appearance of such abstraction. I answered it. Sense that units-tests show correctness of the used algorithms. If they also are correctly written, you can be assured that in known scenarios at you all is normal. But always there is a share of the unknown person and here there's nothing to be done. Integration tests check not algorithms, and a sheaf between systems. I.e. It is possible not to be engaged in start preparation of everything, and, for example, to initialize the data before saving and to check up that it fulfilled. These are two types of tests not dependent from each other and showing an overall picture in aggregate. Tests end-to-end, which confuse many with integration, are necessary in very restricted kol-ve, sufficient for system sanity check as a whole.