Timeline for Testing : Why is it necessary?
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 31, 2021 at 19:34 | comment | added | Doc Brown | ... so in all situations, there are tests involved, just on different levels and by different people. | |
| Dec 31, 2021 at 19:32 | comment | added | Doc Brown | @QuentinORDENER: there are two types of errors in your code: the ones where you have understood the purpose of a function correctly (but the function still does not do what it should), and the ones where you did not understand the purpose correctly. The first ones are the ones you can catch directly by writing a unit test for the function. The latter ones can be caught when you test the function in a larger context (maybe an integration test), or when someone else (who knows the requirements better than you) tests the function or the system where the function is used. | |
| Dec 31, 2021 at 16:07 | comment | added | Kilian Foth | Tests test one issue at a time, at a time when your mind is not preoccupied with three other aspects of the code base or details of the implementation you're about to write. It is much, much more likely that you get one thing at a time right than multiple things; in fact more than twice as likely. That is why "doubling" your work (by writing both tests and implementations) is worth doing. | |
| Dec 31, 2021 at 15:30 | comment | added | Quentin O | Even if I understand your point (tests are made for larger scale projects) the problem remain the same : I am human, I will make errors even when writting tests, I had misunderstood the purpose of a function and will do it again as you stated rightfully and so I will code my first tests wrongfully the same way, even if I finally grasp the basics of testing I will make errors in the future (false positive test, gaps in the spec, etc.) How would it be a net if I'm the one coding it in the first place and I'm not good at abstraction ? | |
| Dec 31, 2021 at 15:00 | history | answered | Kilian Foth | CC BY-SA 4.0 |