Charm of JUnit
Http://blog.blogchina.com/Article_25255.99548.html
Gzeric issued on September 06, 2004
Really touching JUnit, that is, 3 months ago, gave a new title me - the test work in the host team, the first goal is to improve the Unit Testing system. JUnit is almost a unique choice for the Unit Testing in Java, whether it is charged JBuilder, or Share's Intellij Idea, or even Free Eclipse has chosen JUnit. What is this thing to make JUnit emit such a big charm?
Unit Testing is like Cells in the entire Testing project, all tests should be Base On Unit Testing, Java's Unit Testing is primarily for each Java Class test.
JUnit defines a TestCase for each unit, which is theoretically for a certain class. The user should define a series of fixtures, and then write Test Method according to the actual situation, then make Test Result. Corresponding assertion. This is a relatively complete JUnit Testcase.
Unit Testing has an intravitable equation, Objective Test Replicable Test = Simple Test Programme, you can see the most concerned about Objective and Replicable is the most concerned of Unit Testing. Objective means that every TestCase should be a purpose, not a cloud of the cloud, "Every class should be unit Testing"; Replicable means that TestCase should be reusable. As a UNIT TESTING Framework, JUnit is very good to respect these two principles. It is largely used to write TestCase people to control the Objective feature, and the replicable method and API have also largely improved the developer's writing. The efficiency of TestCase. As long as the developer truly realizes the necessity of Unit Testing, he will definitely like the benefits of JUnit, not simple to learn and use. To know that Junit is able to truly improve development efficiency and code quality.