Junit
1. What is Junit?
It is an open-source Java testing framework for compiling and running repeated tests. Is an example of the unit test framework system XUnit. Junit is used in Java. (In addition, Cunit and so on)
Erich Gamma (one of GoF) and Kent Beck (one of the pioneers of XP and refactor)
2. What are the features of Junit?
A. Assertion)
B. test tools used to share shared Test Data
C. Test suites for convenient organization and operation testing
D. Test runner for graphics and text
3. What is Junit used?
A. unit test, A white box test
B. It is a highly recommended tool in XP programming and Refactor, because it can greatly improve the development efficiency when automatic unit testing is implemented.
C. JUnit testing is the correctness and consistency of local logic.
D. testing is a process that will not be interrupted. The test code should be run every day, so that the right side ensures the reliability and correctness of the obtained code.
4. Relationship between JUnit and XP
(We will discuss the issues of [Unified Process] and XP [eXtreme Programming] in the future in a special document. Currently, you only need to know That XP is mainly used in small and medium-sized projects)
In XP programming, the basic process is:
Concept => write Test code => write code => Test (TDD: Test Drived Developing)
Writing tests and writing code are incremental. You can write a test to improve the development stability.
5. Relationship between JUnit and Reconstruction
What is refactoring? Refactoring is actually re-constructing the existing Code so that it can have better performance. The goal of refactoring is to achieve some design patterns.
For refactoring, the benefits of JUnit are similar to those of XP. Refactoring requires a test to reduce the time consumption for regression errors.
JUnit Usage Details
1. JUnit Installation
Http://www.junit.org/index.htm
You can download the latest JUnit toolkit with detailed installation instructions)
Trackback: http://tb.blog.csdn.net/TrackBack.aspx? PostId = 1539741