The art of testing: code inspection, inspection, and review

Source: Internet
Author: User
Tags integer division

Software developers generally do not consider a form of testing-manual testing.

Most people think that because the program is written for machine execution, the machine should also test the program. This idea is problematic. The manual testing method is very effective in exposing errors. In fact, most software projects should use the following manual testing method:

1. Check the Code with the error list

2. Check the Group Code

3. Desktop check

4. Peer Review

 

Code check:

Code checks read code in groups. They are a collection of procedures and error check techniques.

A code check team usually consists of four people:

  1. Coordinator: competent programmers
  2. Encoding staff of the program
  3. The program designer
  4. Test expert

Error List for code check:

  • Data Reference Error
    • Whether referenced variables are not assigned a value or initialized
    • Whether the value of the lower mark is within the range
    • Whether non-integer subscript exists
    • Indicates whether a virtual call exists.
    • Whether the attribute is correct when an alias is used
    • Matching record and structure attributes
    • Whether to calculate the Bit String address and whether to pass the bit string parameter
    • Whether the basic storage attributes are correct
    • Whether the cross-process structure definition matches
    • Is there a "only one difference" error in index or subscript operations?
    • Whether the inheritance requirements are met
  • Data declaration Error
    • Are all variables declared?
    • Are the default attributes correctly understood?
    • Is array and string initialization correct?
    • Whether the variable has the correct length, type, and storage class
    • Is the initialization consistent with the storage class?
    • Are there similar variable names?
  • Operation Error
    • Is there an operation between non-arithmetic variables?
    • Is there a hybrid touch operation?
    • Is there an operation for different long-character variable queries?
    • Is the target variable smaller than the value?
    • Is the intermediate result overflow or underflow?
    • Is it stored by Division 0?
    • Is there any binary inaccuracy?
    • Does the variable value exceed the valid range?
    • Is the priority of operators correctly understood?
    • Is integer division correct?
  • Comparison Error
    • Is there a comparison between different types of variables?
    • Is there a mixed-mode comparison operation?
    • Is the comparison operator correct?
    • Is the Boolean expression correct?
    • Is the comparison operation mixed with a Boolean expression?
    • Is there a comparison of binary decimal places?
    • Is the priority of operators correctly understood?
    • Does the compiler correctly understand the calculation method of Boolean expression?
  • Control Process Error
    • Are multiple branch paths exceeded?
    • Is each loop terminated?
    • Is each program terminated?
    • Does the loop body be skipped because the entry conditions are not met?
    • Is it correct that kenenable's cycle crosses the border?
    • Is there an iteration error of "only one difference?
    • Do/end statements match?
    • Are there endless judgments?
    • Is there any text or syntax error in the output information?
  • Interface Error
    • Is the number of parameters equal to the number of real parameters?
    • Does the dimension of the Parameter Match the dimension of the real parameter?
    • Is the number of real parameters passed to the called module equal to the number of actual parameters?
    • Does the real parameter attribute passed to the called module match the actual parameter attribute?
    • Does the real parameter dimension passed to the called module match the dimension of the actual parameter?
    • Is the number, attribute, and order of real parameters that call internal functions correct?
    • Does the parameter have nothing to do with the current entry point?
    • Has a parameter originally set to an input value?
    • Are the definitions of global variables consistent between modules?
    • Has a constant been passed in the form of a real parameter?
  • Input/Output Error
    • Is the file property correct?
    • Is the open statement correct?
    • Whether the I/O statements comply with the format specifications
    • Does the buffer size match the record size?
    • Is the file opened before use?
    • Is the file closed after use?
    • Is the file end condition correctly handled?
    • Have I/O errors been processed?
  • Other checks
    • Is there any variable that has not been referenced in the cross-reference list?
    • Is the attribute list consistent with the Expected One?
    • Is there a "warning" or "prompt" message?
    • Is the input validity checked?
    • Is a function missing?

 

Code lookup:

Code walk-through is different from reading only programs or using the error check list. Participants in code walk-through "use computers ". The person designated as the tester will attend the meeting with some written test cases. During the meeting, every test case was deduced in the minds of people, that is, the test data was passed through the logic structure of the program. The state of the program (such as the value of the variable) is recorded on the paper or whiteboard for monitoring.

These test cases must be simple in structure and have a small number. Because the human brain executes programs more slowly than computers execute programs. Therefore, these test cases do not play a key role. Their role is to enable code lookup and question the programmer's logic and ideas. In most code queries, many problems are found in the Process of asking programmers, rather than directly discovering the test cases themselves.

 

Desktop check:

Code check or code walk-through performed by a single person.

 

Peer Rating:

Peer Rating is a technology that evaluates anonymous programs based on the overall quality of the program, maintainability, scalability, ease of use, and clarity.

  • Easy to understand
  • Whether high-level design is visible and reasonable
  • Whether low-level design is visible and reasonable
  • Modifying this procedure is easy for reviewers
  • Will the reviewer be proud to write the program?

 

The art of testing: code inspection, inspection, and review

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.