The main test function point of Unit test

Source: Internet
Author: User

As a unit test, its importance is self-evident: it guarantees us to do the code refactoring after the correctness, can let us unscrupulous to modify our semi-finished products.

But as a developer or a new contact with unit test developers, how to test, to determine which aspects should be more confusing. What time is the usual work

Often need to use unit test to verify the function points, as a record, to facilitate their later writing unit test can be recalled:

Module Interface Test

Tested by the data flow of the module being measured. Whether the input parameters are matched to the number, attributes, and order of the module's formal parameters when the measured module is invoked.

Local Data structure test

The local data structure is to ensure that the data stored in the module is complete, correct and the local data structure of the module is often the source of the error in the program execution.

Path test

Test the important execution path in the module.

 

More Perfect module design requirements can meet the conditions of error, and set the appropriate error handling, so that once the program error, the error program can be rescheduled to ensure that its logical correctness.

 

Software often fails on convenience, boundary condition testing is a basic test, and it is also the focus of functional testing in later system testing.

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.