Some of the individual for TDD

xiaoxiao2021-03-06  99

For the first time, I wrote some views in Blog, because I always feel that personal opinion is shallow and messy.

Recent second time I read Test-Driven Development A Practical Guide, which is written down, and the right to learn, because many of them are in the form of problems, self-answering, but they are not satisfied.

The maximum application environment for test-driven development is a light-load software, especially for XP (extreme programming). TDD emphasizes several important aspects, first, pay attention to refactoring Refactoring, regardless of the test code or test code, both requires the refactoring of SMALL-STEP. Second, focus on the Programming By Intertion, integrating the clear consciousness in the code, through reasonable naming rules and program structure (easy to read), in fact, I think the basic idea of ​​software engineering is always guiding us, The current software process focuses on a certain aspect of traditional software engineering theory, and to expand some areas of personality. Third, each test failed, generated new code, no test failed, no new code.

About the above, my personal opinion is that the reconstruction is necessary, but the intended design in the software can avoid a large number of reconstruction work, sensory phase, instant refactoring is an obstacle to work efficiency is an obstacle. Conscious programming is worth promoting, this is an excellent programmer must do. Undoubtedly, by writing code descriptions, code remarks to add program readability, I think this happens, first to reflect on individual programming Whether the intention is clear, whether the process design of the small segment process is reasonable. TDD, as the name suggests, test driver development, driving, our driver for some behavior can be understood as direct or indirect, according to the theory of book, TDD Driven is straight, no test code, it is impossible to generate work code. In realistic work, use Java, .NET or any object-oriented language to write a class, for an ordinary programmer, it is a relaxed thing, is there any failure to pass once, complete the framework of this class? Similarly, I also believe that this is an obstacle to improving productivity.

About Logical Layer and GUI test, the current test tool supports the level of GUI / BUSSINESS LAYER, which process of the software that is suitable for development will continue.

转载请注明原文地址:https://www.9cbs.com/read-102129.html

New Post(0)