TDD in a big project: where do you start?

Simple question. Put on our engineer / project manager hat for a second:

You have a big project and you will have several different developers working in different parts. You have a strong functional specification and you are ready to start figuring out your implementation. You want to practice Driven Development testing. Suppose you are given reasonable, but not infinite, time and money.

How do you start preparing modules for implementation by other developers? Are you starting to write interfaces or are you starting to write tests? Do you mix n 'match?

How would you change your answer if you had a team of veteran coders? A team of less experienced people? Will your coding environment change your decisions?

+3
source share
5 answers

Strictly speaking - if you are doing TDD (and not just Unit Testing), first start with the tests before writing the function that the tests actually check. All the functionality you write should have tests written to verify the code you are about to write.

The developers themselves will be the ones who write unit tests - functional / acceptance tests are a separate issue and can be (partially) recorded before starting work.

If the team does not have experience testing modules, they should begin to implement functions, and then write Unit tests as soon as each small class / small functionality ends.

( TDD ) - - , , . TDD .

+5

, ... .

, , , .

... .

+1

, , , .

-, , "" ? , 4 5 " ". " " 30 40 . - , , " ". , , 5-10 .

, TDD, , . . , , , TDD- ( , ) , unit test, .

TDD, , . , , .., . , , , , ..

TDD . ( ), , , , , , , , . Scrum, "" /.

- EMMA Cobertura ( Cobertura), , . , . 20% - , , , . , , 90% - , , .

, : , / , , .

+1

TDD - , . TDD , , Test Driven Development.

, , , , - . , , :

  • . 100% - , .

  • , / / , 100% . .

  • , , . , , , .

  • , . , .

  • , , . , / .

, 100% - , , . , - "" . web2project: http://caseysoftware.com/blog/unit-testing-strategy-web2project.

+1

In the traditional development (without TDD), there are many projects between having a functional specification and writing the first line of code. You still have to go through this process, and it definitely depends on the skill level of the team. The only thing that will differ in TDD is to write test cases just before writing the code. You obviously cannot write tests without knowing which classes / interfaces are involved.

0
source

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


All Articles