Test drive development essay ------ test driver or test assistance
This article is not in the plan, causing a small argument from the cold wind.
We start from the starting point of the debate. The test code is outside the class or within.
This is a very simple question, it seems to be ignorant. So, I didn't take it when I started. However, it reflects a fundamental issue of TDD.
Test a first or code? ? ! !
A very important point of testing drive development is the test first, and if the test code appears inside the class, it is clear that the code is first. You think so some dogmas, but this is the real test driver development! ! !
Test driver development is the methodology of software development! Is EXTREME PROGRAM Software Development Methodology? Yes it is. The TDD is an important part of it, which directly leads to the generation of the code. These techniques and TDDs constitute XP's overall PAIR WORK, CONTINUE Integration, Work Fles Then TDD is imaginative, it produces our source code directly.
Test driver development is not written in the source code and then writes the test code. Instead, write test code, then in order to make the test pass back source code, everything is generated by the test, is this not the methodology of software development?
If you use the test driver as a plugin, then you misunderstand the original meaning of test driver development, where the driver is not helpful, but it is completely on it. Of course, you can use the test code as a means of helping you develop, which may have happened in our programming experience. However, remember that only this is not a test drive development! I got a name, this should be called test assistance.
Some people may doubt the ability to test the drive, which is also in the next essay, I will try my best to explain it.
How does the test driver driver development, even how to generate a pattern under the guidance of the test (or the concept of the mode in your heart), these are the problems that I have held on TDD, I hope we can Deepen the understanding of test drive development.