Timeline for Is it sufficient to use acceptance and integration tests instead of unit test?
Current License: CC BY-SA 3.0
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 20, 2014 at 7:35 | comment | added | BЈовић | @Yggdrasil You keep on asking the same questions over and over. They do catch of bugs, but that doesn't mean they will catch all. Another point is improved design - something that can not be done with acceptance or integration tests. | |
| Jan 18, 2014 at 18:07 | comment | added | twilker | The question was, what value do I have from unit test, when they do not break? Why bother writing them, when I always need to adjust them to new requirements? The only value from them I see is for algorithms and other classes with a high permutation. But these are less than the component and acceptance tests. | |
| Jan 18, 2014 at 17:56 | comment | added | BЈовић | @Yggdrasil Sounds good. In that case, you expect too much from unit tests They do not catch all kind of errors. That is why it is needed to test at every possible level. | |
| Jan 18, 2014 at 10:10 | comment | added | twilker | When I do TDD the following scenario happens: Before I make a change in a class I change my tests for this change and/or write new one. They are red than. I implement the change and they are green again. But that does not mean, that I have not introduced a new bug. Although unless I have broken something inside the class I changed no unit test will tell me my mistake, will they? This mistakes are shown only by my component tests. The case that I broke something inside the class where I made the change is rare. I hope this example could show you my problem. | |
| Jan 17, 2014 at 16:36 | comment | added | BЈовић | @Yggdrasil Since your unit tests never break, and have no value, then it is obvious that you did something wrong. If you think they provide no value, then just delete them and forget about unit testing. | |
| Jan 17, 2014 at 14:44 | comment | added | twilker | Just because they are faster does not mean, that they should be used just because of this or because it is common to write those. Like I said my unit tests do not break - so they do not have any value for me. | |
| Jan 17, 2014 at 8:15 | history | edited | BЈовић | CC BY-SA 3.0 |
added 106 characters in body
|
| Jan 17, 2014 at 8:14 | comment | added | BЈовић | @Yggdrasil As I said, unit tests are not all mighty, but they are usually the first layer of testing, since they are the fastest. Other tests are also useful, and should be combined. | |
| Jan 17, 2014 at 8:12 | comment | added | twilker | As for the execution time. With a growing application I have mostly a growing number of isolated components. If not I have done something wrong. When I implement a new feature it is mostly only in a limited number of components. I write one or more acceptance tests in scope of the whole application - which could be slow. Additionally I write the same tests from the components point of view - this tests are fast, because the components are usually fast. I can execute the component tests all the time, because they are fast enough. | |
| Jan 17, 2014 at 8:07 | comment | added | twilker | Have you looked at my example? This happened all the time. The point is, when I implement a new feature I change/add the unit test so that they test the new feature - therefore no unit test will be broken. In most cases I have side effects of the changes which are not detected by unit tests - because the environment is mocked. In my experience because of this no unit test ever told me that I have broken a existing feature. It was always the integration and acceptance tests which showed me my mistakes. | |
| Jan 16, 2014 at 8:37 | history | edited | BЈовић | CC BY-SA 3.0 |
added 65 characters in body
|
| Jan 16, 2014 at 7:57 | history | edited | gnat | CC BY-SA 3.0 |
minor typo correction
|
| Jan 16, 2014 at 7:50 | history | answered | BЈовић | CC BY-SA 3.0 |