Project Evaluation with TDD

Are there any recommendations when quoting project / task evaluations related to TDD?

For example, if compared to the usual development of a task that takes 1 day to complete, how much more should the TDD task be performed? 50% more time or 70% more time? Are there any statistics if the developer is well versed in the language and test structure?

+4
source share
5 answers

The difference is high at first, decreases with experience, but is probably always a factor.

The difference in implementation time between conventional coding and TDD will decrease as the developer gets better at TDD. TDD bosses and even intermediaries are likely to catch a decision about which tests to write and / or more tests to write, which will eventually be thrown after refactoring. With experience, TDD'er will become more efficient as they become better and faster at choosing which tests to write.

I'm not sure what the absolute lower limit of the conditional to TDD relationship is. I would suggest that 1: 1.5, but I can’t believe that most developers can ever test the code as fast as they can write code, much less write code, and then write tests.

And, as others have said, a significant profit for the extra time spent on TDD is that debugging time is significantly reduced for test code.

+2
source

In my experience, writing tests takes as much time as sometimes more time than development (i.e. adding from 100% to 150% more time), but significantly reducing the time it takes to fix errors. Here are some Test Development Studies . Also see this article .

+4
source

Encoding time should be approximately the same as without testing. Debug time should be reduced by approximately 99%.

+1
source

Another benefit when creating code with TDD is that written tests become a set of regression. Then the tests make these actions safer:

  • Refactoring after the fact.
  • Further development of the same code.
  • Error correction.

(NB wrt bug fixing, I remember a couple of times when either I forgot to implement a couple of cases, or there were late additions to the specification, additional development was a trap with on-site checks.)

0
source

If you want to get a mathematical answer, my time was spent on testing: production is 2: 1 (conservative - most of the time spent in the test is THINK). However, you cannot apply the 3X factor to your current (non-TDD) ratings, because TDD helps you make steady progress .. you don’t waste time

  • coding things you don't need.
  • works in break and fix circles. OR violation of existing functions.
  • separate phase of error search and correction at the end
  • Next to zero, attach a debugger and follow the steps through the sessions.

On top of my head, I would go for 2X according to existing estimates.

0
source

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


All Articles