How do you handle TDD with continuous integration?

Imagine that you are implementing a user story containing various new features and adding complexity to the code base. The existing code is pretty well lit, and you just solved the interfaces. You begin to implement functions, starting with tests.

Now you have quite complex test cases based on requirements, but the implementation is nowhere near the point where you can commit fully working SCM code, and many tests fail (as it should be).

There is an assumption that with continuous integration, all assemblies should be green, if possible, and therefore you should not commit because you are breaking the assembly. But you also should not "Go dark" and save this code for yourself ...

What is the proposed procedure in this situation?

+3
source share
2 answers

Do not take into account all interfaces in advance. Develop gradually in the typical rhythm of TDD: write a test; make a test pass; refactoring. This should keep everything in good shape, the panel will always be green, and you can check the code without worrying that you will break the assembly.

This requires a different coding style, but you will eventually get used to the rhythm.

+5

, , , , ?

, ! " ", ! (-:

" !"

" ", .

,

Rob

+1

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


All Articles