1

Topic: UT

It seemed to nobody that UT ( modular tests) on which  many, (majority) actually  brake system development, thus, that are not capable to reveal what or the errors which are distinct from elementary and primitive, which and without tests are visible to any for whom is available though an experience drop. The dude here wrote a subsystem,  one thousand tests (functions UT). Transited half a year, it was required to change  subsystems,  to change. 80 % of all tests, naturally, after modification, do not transit, it is necessary to rewrite UT according to new realities, expending time twice more than on modification of the subsystem. In three months it was required to change/add again a functional of the unit-again fuss with alteration of tests etc... So what for they generally then there rested? The functional is checked by the functional tests, difficult errors perfectly come to light manual testing, search of errors and bugs-lines and . UT are represented by result any terribly  the reason which has become by a mode. What think about it?

2

Re: UT

Hello, smeeld, you wrote: S> That think about it? It agree!

3

Re: UT

Hello, smeeld, you wrote: S> That think about it? It is simple code duplication. Concern it more easy - if the customer wants to pay twice more for the same operation, let pays. It influences reliability of a software feeblly: 60 % of errors are the unwritten code (which it is physically impossible to cover with tests in view of its absence) and half more errors is doubled in tests.

4

Re: UT

Hello, smeeld, you wrote: S> That think about it? All so. The worker  - Write tests. Not too many. Mostly integration.

5

Re: UT

Modular tests are an excellent tool for many tasks. For example we used it for constant automatic check of operation of the difficult algorithm existing in application. To algorithm on an input the trivial data (some tens variants) moved certain not and the output was checked. In my opinion without UT to develop similar systems very much it is not convenient. Unique problem UT that some "fans" start to push them not only for similar tasks, but also generally anywhere. Probably it went from dynamic languages where UT besides the above described task, are applied also for in any sense of changeover of static typification. And such basically too it is possible to understand (though if it would be desirable such checks probably better simply to select other language). But here when in statically-typed languages  to apply UT to any nonsense it is already valid a certain disease from "fan" area...)))

6

Re: UT

S> That think about it? I think seditious thought: the majority of the errors revealed by units-tests, is errors in units-tests that transforms them into time waste. There are, of course, cases when  are really necessary. It when you write any artful , any  a bicycle.

7

Re: UT

Hello, smeeld, you wrote: S> the dude Here wrote a subsystem,  one thousand tests (functions UT). Transited half a year, it was required to change  subsystems,  to change. 80 % of all tests, naturally, after modification, do not transit, it is necessary to rewrite UT according to new realities, expending time twice more than on modification of the subsystem. Not that I would be such the fan of a universal covering of the code tests, but... I assume that the subsystem big enough (differently there is no problem), and that someone uses it (differently, besides, there is no problem). Also that in a command more than one developer. Here he that, sat to itself(himself) silently in a corner half a year, and then silently rolled out a new variant of this subsystem, and remaining half a year sat and waited, while the new subsystem appears? In real life of change try to do , saving, how much it is possible, compatibility with old interfaces, at least is temporarily, on transitive the period. It allows to start to use the new code at once in process of its appearance. As a result, by then, when the subsystem is rewritten, its most part not only is tested, but also checked up in fight and is recognized by suitable. This process flows rather without serious consequences. And if to arrange revolution, it turns out that at first it is necessary to wait for the dude, which does nothing, except as the code from zero rewrites, and then all command will stand on ears, its new version to integrate, and then still half a year will work nothing, because rolled out a heap of the code which anybody never in real life checked, and from it  a heap of bugs. So, in general, normally do not do.

8

Re: UT

Hello, smeeld, you wrote: S> it seemed to Nobody, what UT ( modular tests) You about testing  and ? Well it is senseless, and unit tests very useful piece, especially when you write the code under different platforms - problems specific to a specific platform come to light quickly.

9

Re: UT

> To algorithm on an input the trivial data (some tens variants) moved certain not and the output was checked. In my opinion without UT to develop similar systems very much it is not convenient. Completely I support, but it would be desirable to explain about terminology: here these some tens variants, especially, the nontrivial data, it precisely "unit" - tests?

10

Re: UT

Hello, smeeld, you wrote: S> it seemed to Nobody that UT ( modular tests) on which  many, (majority) actually  brake system development..... So what for they generally then there rested? "Hourly payment"

11

Re: UT

Hello, smeeld, you wrote: S> 80 % of all tests, naturally, after modification, do not transit If after modification of 5 % of the code of 80 % of tests do not transit, someone too loves .

12

Re: UT

Hello, smeeld, you wrote: S> it seemed to Nobody that UT ( modular tests) on which  many, (majority) actually  brake system development, thus, that are not capable to reveal what or the errors which are distinct from elementary and primitive, which and without tests are visible to any for whom is available though an experience drop. The dude here wrote a subsystem,  one thousand tests (functions UT). Transited half a year, it was required to change  subsystems,  to change. 80 % of all tests, naturally, after modification, do not transit, it is necessary to rewrite UT according to new realities, expending time twice more than on modification of the subsystem. In three months it was required to change/add again a functional of the unit-again fuss with alteration of tests etc... So what for they generally then there rested? The functional is checked by the functional tests, difficult errors perfectly come to light manual testing, search of errors and bugs-lines and . UT are represented by result any terribly  the reason which has become by a mode. What think about it? I am equal for this reason from them and refused. When you develop system alone, to write  has no understand. Twice more time it will be spent, and then after refactoring it is necessary to throw out half. I would apply this practice there where over the project permanently works more than 1 person. And still it is good to give to beginners the task to write  - for one and with code base get acquainted. However, I here wrote the same judgement about 2 years ago.

13

Re: UT

Hello, smeeld, you wrote: Projects and the code happens very different. In certain cases UT () is that the doctor registered. For example, any application-oriented algorithmic libraries. Or if dynamic . In other cases  are useless hardly less, than completely. An example - integration projects, that is the projects, which complexity it is concentrated not in algorithms, and in a difficult and unpredictable surrounding. In this case the functional integration tests are necessary.

14

Re: UT

Hello, smeeld, you wrote: S> Transited half a year, it was required to change  subsystems,  to change. 80 % of all tests, naturally, after modification, do not transit, it is necessary to rewrite... It is necessary to rewrite remaining system which with this system is integrated. That tests also showed to you. One it can already spare pair of mythical cheloveko-years occasionally.

15

Re: UT

16

Re: UT

S> That think about it? Depends on the task. If you write next  - yes - on any change logic business it is necessary to correct tests, and their sense becomes not so clear. And if you develop artful  with artful mathematics in this case tests are very useful.

17

Re: UT

Hello, smeeld, you wrote: s> So what for they generally then there rested? The functional is checked by the functional tests, difficult errors perfectly come to light manual testing, search of errors and bugs-lines and . UT are represented by result any terribly  the reason which has become by a mode. What think about it? * sometimes preparation of release for functional and integration testing occupies strongly more time (and resources) running of units-tests => absence ut == dead time and money. * check of all branches of operation by functional/manual testing it is normally strong longer checks ut since there there can be additional overhead charge (for example, expenditures on setting of network connection). * Integration and functional testing cannot normally check up some classes of boundary conditions (shortage of storage,  a network etc.) Which are quite not bad emulated mock => ut it also culture of development which leaves traces on architecture of a developed software (and there it is not necessary to rewrite 80 % of tests because each unit is tested as much as possible irrespective of others).  on Yandex. A disk

18

Re: UT

19

Re: UT

I  judgement antropolog'. In my opinion, tests in the code are necessary. But, depending on system, they can have slightly different character. There, where difficult algorithms are used - it is necessary to test algorithm. In the same place, where algorithms are simple, but there is a difficult interaction between system components, tests should have more high-level character. Integration tests. That the test checked correspondence of system to requirements, instead of any casual nonsense.

20

Re: UT

Hello, smeeld, you wrote: S> it seemed to Nobody that UT ( modular tests) on which  many, (majority) actually  brake system development I Can agree only with that that curve tests only hinder and that it is necessary to be able to write good tests. The test should be short and clear, lines 10. Such test simply to understand and change. The most important thing in the test its this title. For example testSave well useless enough title and here shouldNotSaveLockedAccount is a good example.  love tests, be able to prepare them and they love you. And if at someone every quarter  80 % of tests it is necessary leads and the architect  a rag to drive.