unit test
Concept : Unit testing refers to the inspection and verification of the smallest testable unit in the software ( the testing work of a module, a function, or a class for correctness verification ).
Testable unit in Java—>java class
The meaning of unit testing
(1) The simplest and most effective guarantee of software quality ;
(2) It is the clearest and most effective document of the target code ;
(3) The design of the target code can be optimized ;
(4) It is the guarantee of code reconstruction ;
(5) It is the cornerstone of regression testing and continuous integration .
The Xinjiang Maven project implements unit testing:
Introduce dependencies in pom
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
Then test under the test package (the test package should have the same directory as the tested content)
Other related junit test content can refer to the following:
[1] Unit test