In 1997, Erich Gamma (Gang of Four) and Kent Beck (XP) created JUnit for Java.
If ProgramIf a function of is not automatically tested, the function basically does not exist.
The current JUnit version 3.8.1. Uncompress junit.zip to C:/junit3.8.1
Run test ruuner on the text interface
Java-CP JUnit. jar;. JUnit. textui. tetrunner JUnit. samples. alltests
Run test ruuner of the graphic interface
Java-CP JUnit. jar;. JUnit. swingui. tetrunner JUnit. samples. alltests
Keep the bar green to keep the code clean.
Public class testxxx extends JUnit. Framework. testcase
{
...
Assertequals (string message, object expected, object actual );
}
Class that inherits the testcase base class. You can use assertequals to perform automatic tests through JUnit.
Test Case
Test Suite
Test the runner basetestrunner
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.