Should I use TDD to develop my clients as well as my libraries?

Assuming you are creating a library to perform some calculations, you use TDD to create it without any problems, right? Now you must implement the code that actually uses this library. For example, the client may be a Java servlet or CLI program.

Should this client code be built using the TDD concept? Do you write tests for these clients? Is TDD solely about library design, or do I need to worry about client code?

+2
source share
6 answers

I will answer your question more directly below, after I talk about TDD.

, TDD - , Red-Green-Refactor. , Red-Green-Refactor , . , .

TDD , . . , . TDD , , , , . , TDD - - .

, . TDD - , , TDD , , , , TDD. , , , (. Presenter First ). , , -, Model-View-Controller/Model-View-Presenter/Model-View-ViewModel, TDD //ViewModel, , ( ) .

+2

TDD (, ) - . .

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

. . , , . , , ; , , .

- , . , . , , .

+3

. TDD . , - TDD

+2

, . TDD, , , . , - .

TDD - , , . . , , , , , , ().

, TDD , ? .

+1

TDD?

. .

?

. , ?

TDD ,

.

?

, TDD all code all . . TDD, .

+1

-? , , . , . , TDD .

Suppose you encounter some difficulties if you use frameworks that are not suitable for testing. But even then there are ways to break them down into a non-TDDed-unfriendly layer, which triggers the TDDed-presentation layer.

+1
source

All Articles