in Education by
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago. What do I lose by adopting test driven design? List only negatives; do not list benefits written in a negative form. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
If you want to do "real" TDD (read: test first with the red, green, refactor steps) then you also have to start using mocks/stubs, when you want to test integration points. When you start using mocks, after a while, you will want to start using Dependency Injection (DI) and a Inversion of Control (IoC) container. To do that you need to use interfaces for everything (which have a lot of pitfalls themselves). At the end of the day, you have to write a lot more code, than if you just do it the "plain old way". Instead of just a customer class, you also need to write an interface, a mock class, some IoC configuration and a few tests. And remember that the test code should also be maintained and cared for. Tests should be as readable as everything else and it takes time to write good code. Many developers don't quite understand how to do all these "the right way". But because everybody tells them that TDD is the only true way to develop software, they just try the best they can. It is much harder than one might think. Often projects done with TDD end up with a lot of code that nobody really understands. The unit tests often test the wrong thing, the wrong way. And nobody agrees how a good test should look like, not even the so called gurus. All those tests make it a lot harder to "change" (opposite to refactoring) the behavior of your system and simple changes just becomes too hard and time consuming. If you read the TDD literature, there are always some very good examples, but often in real life applications, you must have a user interface and a database. This is where TDD gets really hard, and most sources don't offer good answers. And if they do, it always involves more abstractions: mock objects, programming to an interface, MVC/MVP patterns etc., which again require a lot of knowledge, and... you have to write even more code. So be careful... if you don't have an enthusiastic team and at least one experienced developer who knows how to write good tests and also knows a few things about good architecture, you really have to think twice before going down the TDD road.

Related questions

0 votes
    As it currently stands, this question is not a good fit for our Q&A format. We expect answers to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
0 votes
    Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 18, 2022 in Education by JackTerrance
0 votes
    Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 20, 2022 in Education by JackTerrance
0 votes
    What is mean by Test Driven Development (TDD)?...
asked Jul 20, 2021 in Technology by JackTerrance
0 votes
    What is Test Driven Development (TDD)?...
asked Nov 26, 2020 in Technology by Editorial Staff
0 votes
    How Behavioral Driven Development works?...
asked Jul 20, 2021 by JackTerrance
0 votes
    Give an example of a behavior is driven test in plain text Cucumber?...
asked Nov 16, 2020 in Technology by JackTerrance
0 votes
    Can anyone tell me what is the best Web Development Responsive test tool? Select the correct answer from above options...
asked Jan 18, 2022 in Education by JackTerrance
0 votes
    Write a menu driven program to do the task according to user’s choice: S = 2 – 4 + 8 – 16 + 32 – 64 + …. Up to 15 terms Select the correct answer from above options...
asked Dec 10, 2021 in Education by JackTerrance
0 votes
    Write a menu driven program to do the task according to user’s choice: S = 2 – 4 + 8 – 16 + 32 – 64 + …. Up to 15 terms. Select the correct answer from above options...
asked Dec 1, 2021 in Education by JackTerrance
0 votes
    Each operation in a demand-driven pipeline can be implemented as an ____ that provides the following ... Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    Tuples are generated ___________ in producer-driven pipelining, they are generated ________ on demand, in demand ... in division Query Processing Techniques of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    The number of maps is usually driven by the total size of? 1. outputs 2. tasks 3. inputs 4. None of the mentioned...
asked Aug 7, 2021 in Technology by JackTerrance
0 votes
    What do you mean by Domain driven design?...
asked Jul 24, 2021 in Technology by JackTerrance
...