S
S
svilkov872019-03-05 12:56:27
Test Driven Development
svilkov87, 2019-03-05 12:56:27

What is TDD and what is it used for?

TDD is when you first write the test and only then the code, and not vice versa?
That is, first the text (spec) is written, then the code that will pass this test. If you need to expand the functionality, then again, first the test is expanded and the code is corrected for it? Am I understanding everything correctly or is there something else?
Or do I not understand everything correctly?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Fedorov, 2019-03-05
@Maksclub

TDD is when you first write the test and only then the code, and not vice versa?

As if yes, but rather than just writing the test itself, but writing the client code (after all, what are you writing the test for? for the code that will be coming soon), that is, you are already designing your program at this stage - what will work and how, and tests show how this code should behave in different situations,
then you will implement the already designed code

S
sim3x, 2019-03-05
@sim3x

twp2_0404.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question