Why should I write tests?

Duplicate:

Type of projects where unit testing is useless
When do I need to test unit-test vs manual test Is unit
testing worth the effort?

I wonder why I should write tests for those things that I have already tested myself. I am not writing rspec tests or anything like that. To check, I will write something, and then go to the browser and make sure that the changes do what I want. I heard that this methodology is described as "error-prone development."

The applications that I write now are usually small in volume and size. I am the only developer (usually), so I don’t have to worry about including other people's code in my own tests.

I see the need to test large-scale applications in hundreds of forms. But for small applications that I develop myself, writing tests takes much more time than just filling out the information itself. I heard that many developers favored development based on tests, and I have not yet "seen the light." This seems like a great idea, but I just can't justify the amount of work required to write the tests.

+3
source share
5 answers

One word: regression. After making sure that you don’t break something that was used for work, it’s worth writing tests.

+8
source

, , . , , . A, B, C D , E, . , , - , .

+2

, - sql-, , . , -, , . , , .

+1

-, , . , , . 3 , - , , , X . 3 , , - .

, , X. , , , , , 3 , , , . , , , .

+1

, , ? / ?

0

Source: https://habr.com/ru/post/1705590/


All Articles