B
B
beem72021-04-21 06:44:09
Unit testing
beem7, 2021-04-21 06:44:09

What other benefits do unit tests have besides being great for regression testing?

Well, and one more unspoken advantage: they are "sort of-part of the product." And their presence from the point of view of many customers is "like a plus." Everyone was brainwashed :)
At the same time, even a very green June can write them. No need to introduce him to the course of the project, just tell him to learn how to write tests, help him understand your test environment minimally (as far as it even exists as such) and he will write them. Like a man at work.
And customers are happy, yes.
Until bugs pop up. And they will crumble. And about this - further.

Actually, do unit tests have any other advantages besides those described?

Disadvantages:
- writing unit tests is more laborious and time consuming than testing manually.
- efficiency of search of bugs? again no. They are low. In this, they are often bypassed by manual functional testing. And a thorough reading of the code (the same code review, but super-thorough) generally beats them with a dry score.
- the study of the project by a new member of the team (first he writes tests, then commits to the project) this also contributes less than the same bunch of "functional testing + reading".
- and there are other nuances, up to the fact that they will weigh in the "unpacked library" on npmjs.com

IMHO, unit tests, and UI tests, do not need to cover everything.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2021-04-21
@beem7

June can write tests, it's true. It can be difficult for an experienced person to understand what and how to test .
The shortcomings described are very controversial. The stare method finds bugs only in the first 10 minutes, while the head is fresh.
But yes, I personally completely agree with the fact that not everything needs to be covered with autotests. In addition, high-level functional or end-to-end tests are often easier to write and more useful to the project. Here you need to find a balance for yourself. And add manual testing to this equation. There is no general formula, of course.
And what is your question? So far it looks like “you persuade me to write tests here, and I will explain to you why I won’t do this.” If you don't want to, don't write. If your project and your team don't benefit from tests, then don't write them.
Judging by your past questions, you think that you know everything better than others, so the question is needed to amuse the CSF? Well, or did you run into some kind of cargo-cult-sect-one hundred percent-caveage? In that case, I sympathize.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question