Найти в Дзене
CLLAX

Advantages and disadvantages of unit-test application

Developers looking into implementing unit-testing within their environment are often worried about whether unit-testing will add to their bottom line or take away from it. It’s a fair question and it’s best answered by taking a look at the advantages and disadvantages of doing so and then seeing where the balance falls. The disadvantages of unit-testing From a busy development team’s point of view, the biggest disadvantage of taking on unit-testing is the initial time required to develop them. It’s been estimated that it takes approximately 30% more time at project start up to begin putting unit-tests into place. That’s a significant commitment of resources and in many teams with tight deadlines to meet – it’s a big deterrent to implementing unit-testing. There is also a smaller time commitment required to give your developers the skills to develop unit-tests. This is true of almost any new process that you add within a business and really shouldn’t be significant enough to discourage

Developers looking into implementing unit-testing within their environment are often worried about whether unit-testing will add to their bottom line or take away from it. It’s a fair question and it’s best answered by taking a look at the advantages and disadvantages of doing so and then seeing where the balance falls.

The disadvantages of unit-testing

From a busy development team’s point of view, the biggest disadvantage of taking on unit-testing is the initial time required to develop them. It’s been estimated that it takes approximately 30% more time at project start up to begin putting unit-tests into place. That’s a significant commitment of resources and in many teams with tight deadlines to meet – it’s a big deterrent to implementing unit-testing.

There is also a smaller time commitment required to give your developers the skills to develop unit-tests. This is true of almost any new process that you add within a business and really shouldn’t be significant enough to discourage the use of unit-tests.

The advantages of unit-testing

So the question remains: do the positives outweigh the negatives? We believe they do – here’s why:

  • A major reduction in flaws at the final QA step. The biggest trade off for all the time you put in at the start is the reduction in issues at the end. Academic studies show that there are up to 90% fewer bugs found by QA teams – a major pay off. It’s easier to find and fix problems identified in unit-testing than it is at the end of a development cycle. The code is fresher in a developer’s mind and there’s no hunting around to identify where the problem is as the unit-test will specify exactly where it lies in the code.
  • Repeatability. That 30% investment at the start of a project drops off significantly in following development cycles. If you don’t change the code – the unit-test can be reused forever, meaning testing future releases becomes easier and easier. There’s a significant ROI from this because you’re still getting up to a 90% reduction in final product errors but without a major increase in development time.

There are other advantages to automated unit-testing but these two alone outweigh the time invested in implementing unit-testing within a development team. The ROI on unit-testing is good for a single development cycle, and for multiple-cycles it keeps on rising.