1

We want to implement TDD with the transformation to microservice architecture and use other technologies like cloud.

But now we are wonder how TDD will affect our development time.

It's important for the pm office. Is there a use case, paper, etc. that you can suggest like this paper?

5
  • Any report will talk about others' experiences in others' contexts. If you want to know "how TDD will affect our development time", the only path is PDCA. Commented Dec 5, 2019 at 11:31
  • @JoãoFarias I disagree, empiric data have important value in making initial decisions, others have already checked and acted so why not learn from their experience ? Those papers might have description of the context (unfortunately I haven't read most of them) which might be relevant to you both positively and negatively
    – Rsf
    Commented Dec 5, 2019 at 12:35
  • I haven't said to discard empirical data so that I suggested doing PDCA. As you said, the papers will describe the author's understanding of the context. Using this as empirical data for a particular project is problematic because 1 - The context description is limited to the author's explicit knowledge, leaving aside tacit knowledge and 2 - any particular project necessarily will have a different context: Change one team member, you have a different context; add a new competitor on the market, you will have a different context, so on and so forth. Software development is a social "science". Commented Dec 5, 2019 at 13:03
  • And the question was very objective: "we are wondering how TDD will affect our development time". TDD may cause all developers to quit and the development time will skyrocket. I don't know, you don't know, no paper can predict or give a statistical chance of this to happen. Commented Dec 5, 2019 at 13:09
  • So is the coffee in the office kitchen, some might quit because of its quality and some might stay just because of it, but we all agree that you must have coffee in the kitchen first and then PDCA.
    – Rsf
    Commented Dec 5, 2019 at 13:34

2 Answers 2

1

Hi i don't have links to papers that you asked but want to add something to this :

The effectiveness of TDD depends on what product you are working on,

Through out my experience i found it highly effective in testing API services that work with a well defined contract.

If the contract is well documented , the workflow we followed was like:

  1. There will be a development user story with all requirements and acceptance criteria
  2. Create a related Test user story from the development user story with high level user acceptance criteria
  3. Start writing the test cases with dummy json responses (which we could get from well documented contract )
  4. Once development is done run the tests on it, fail or pass the build according to the results.

Advantages:

  1. You gets build feedback on the same day when you finish development
  2. You can save system test time by not wasting effort in testing non qualified builds
  3. You can use saved time through fast feedback to plan more rigorous steps
  4. You can completely replace manual tests with partial or fully automated tests (In case of API testing)

Limitations with UI and other complex solutions:

  1. UI behavior changes as development progress , you cannot predict how the html DOM will be like. Hence, it will be highly complex effort to write tests without knowing the locators

  2. Its not recommended to write tests scripts without actually testing whether it works and then wasting time fixing it once product get released. (Tho sometimes you need lesser time fixing it then actually developing from scratch. This highly unlikely as we know it takes more time debugging than writing something from scratch)

Workaround for the limitations:

  1. Write manual tests cases in a TDD fashion

  2. You can use BDD feature file to write manual test cases

  3. Then automate the BDD features files by defining step definition once development is finished

1
  • Thanks for your answer. Yes you are right,there are many factors. Just, sometimes we need an evidence and/or study case to convince.
    – MhmtMelek
    Commented Dec 5, 2019 at 18:35
-1

Use google scholar to search for "test driven development":

Effects of Test-Driven Development: A Comparative Analysis of Empirical Studies

The Impact of Test-Driven Development on Software Development Productivity — An Empirical Study

Evaluating the effectiveness of test driven development: Advantages and pitfalls

But do remember that one size does not fit all, and things like company culture are difficult to measure, TDD might fail or succeed for you simply because of a team with exceptionally good or bad spirit

1
  • Thanks for your quick answer. It helped to form an idea in our meeting.
    – MhmtMelek
    Commented Dec 5, 2019 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.