Junit course (2)

Source: Internet
Author: User
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

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.