[86] What is static testing?

Source: Internet
Author: User
Static testing includes Code Check, static structure analysis, and code quality measurement. It can be carried out manually, give full play to the logical thinking advantages of people, or use software tools to automate.

Code check
Code check includes code check, desktop check, and code review. It mainly checks code and design consistency, code compliance and readability, and code logic expression correctness, the rationality of the code structure.ProgramCompile the standard, insecure, ambiguous, and vague parts of the program, and find out the problems that cannot be transplanted in the program and violate the programming style, includes variable check, name and type review, Program Logic review, program syntax check, and program structure check.

In actual use, code check is more efficient than dynamic testing, and defects can be quickly found and found in 30% ~ 70% of logical design and coding defects; the Code check shows the problem itself rather than the symptoms. However, code check is time-consuming and requires accumulation of knowledge and experience. Code check should be carried out before compilation and dynamic testing. Prior to the check, the Requirement Description documents, program design documents, and programSource codeList, code coding standard, and code defect checklist.

Static Structure Analysis
Static structure analysis shows the internal structure of a program in a graphical manner, such as the function call relationship diagram and the function internal control flow diagram. The function call relationship diagram intuitively describes the call and called relationship of each function in an application. The control flow diagram shows the logical structure of a function, which consists of multiple nodes, A node represents a statement or several statements. The connected node is called an edge, and the edge indicates the control flow between nodes.

Check items:
* Code style and rule Review
* Program design and structure review
* Business logic Review
 

When using static testing technology for testing, you do not need to really run the software, but test the software by means of manual (Review) or automated (static analysis.

Review is a method for testing the relevant outputs of the software (including requirements, design, code, test plan, test cases, test scripts, user guides, or web pages, it can be performed before the dynamic test. There are mainly the following types:

1. Informal review

2. Walk-through (walkthrough): started by the author. The participants are mainly R & D colleagues who aim to learn, understand, and discover defects.

3. technical Review: defines the process and documented defects. Participants include peers and technical experts who primarily aim to discover defects, discuss and solve technical problems, check whether the specifications are met

4. inspection

Static analysis checks software code and models with tools. For example, during a unit test, developers use static analysis tools to check the Code through pre-defined rules. During software modeling, designers can use static analysis tools to analyze the software model.

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.