Steps for Software Testing

Source: Internet
Author: User

Similar to the development process, the test process must be performed step by step, and the next step is logically the continuation of the previous step. From the end of code to delivery to user use, the software must undergo four steps: unit test, assembly test, acceptance test, and system test.

I. Unit Testing

Unit testing is the first step in software testing. It tests the correctness of the program module, the smallest unit of software design. Usually, unit testing and coding belong to the same stage of software engineering. After compiling the source code and checking the syntax of the compiled program, you can perform a unit test to detect various internal errors in the module. Multiple modules can perform unit tests in parallel.

1) unit test content

(1) Module Interface Test

I. Are the module parameters consistent with the number, type, and order of parameters sent by the driver module;

Ii. Are the parameters transmitted by module I TO THE called module consistent with the number, type, and order of the parameters of the loaded module;

Iii. Whether the number and type order of variables transmitted by the module to the library function are correct;

Iv. Definitions and usage of global variables are consistent in each module;

V. Whether the attributes of the used external file are correct, whether the statement for opening the file is correct, whether the buffer size matches the record length, and whether the processing is consistent after the file ends.

(2) Local Data Structure Test

Whether the internal data of the module is complete, and whether the content, form, and relationship are wrong is often the main source of software errors.

I. Incorrect or incompatible data description or use of uninitialized variables;

Ii. Incorrect initial values or incorrect default values;

Iii. Incompatible error variable names or data types;

Iv. Overflow (overflow or underflow) or address exception;

V. Impact of global data on Module I Testing.

(3) important path testing

Since exhaustive testing is usually not available, during unit testing, the most representative and most likely to discover errors should be selected for testing. The critical path test plan should focus on Testing errors caused by incorrect calculation, incorrect comparison, or inappropriate control flow. Common Errors are as follows:

I. Incorrect operation order (misuse of operator priority );

II. The types of mixed computing objects are incompatible with each other;

III. The initial value of the variable is incorrect;

Iv. When there is not enough precision, or the two quantities cannot be equal due to the accuracy problem, the equal conditions are expected in the program;

V. Modify the loop variable incorrectly. The loop termination conditions are incorrect or impossible;

VI, "1 difference" error (multiple cycles 1 or less cycles 1)

VII. When a divergent loop iteration occurs, the cycle cannot be stopped.

(4) error handling test

Good module design should be able to anticipate error conditions and set appropriate savings. In this way, once an error occurs, the program will be processed according to the predefined method to ensure logical correctness. Such error handling should be part of the module function and one of the test content. When testing error handling, the following issues should be considered:

I. Is the description of possible errors hard to understand;

II. The error description is insufficient to locate the error or determine the cause of the error;

III. The displayed error is inconsistent with the actual error;

Iv. incorrect handling of incorrect conditions;

V. Before the error is handled, the error condition has caused system intervention.

(5) Border Test

Boundary testing is the last and most important task in unit testing. Programs often encounter errors on the boundary.

Example: If a program contains N cycles, an error may occur when the nth cycle is reached. Therefore, pay special attention to the possibility of errors when data streams and control flows are exactly equal to, greater than, or lower than a specified comparison value. Carefully design test cases to test these areas.

2) unit test steps

When the code of each module is compiled, and no syntax errors are confirmed after review and verification, the unit test can be conducted. Unit test steps:

(1) configure the test environment

A module is a separate compilation unit in the software, rather than a separate execution unit. Therefore, two types of additional modules-driver module and pile module should be designed for the module during testing. Create a test environment.

(2) compile test data

It mainly uses white-box test cases, uses path coverage as the best test criterion, and assists with black-box test cases so that they can identify and respond to any reasonable input or unreasonable input.

(3) conduct parallel tests on multiple modules

Ii. Integration Testing

The main purpose of integration testing is to discover interface-related problems. For example:

Data on the traversal Module Interface may be lost;

One module may have adverse effects on another module;

The combination of various features does not implement the main functions;

Global data may be faulty ......

The integration test includes two testing methods: non-incremental testing and incremental testing.

1. Non-incremental Testing

Non-incremental testing assembles all tested modules at one time and then performs the overall test. For large projects, this is very difficult, so it is rarely used.

2. Non-incremental Testing

1) Top-Down Integration

This integration mode starts from the master control module and is assembled from top to bottom along the control hierarchy. The specific steps can be divided:

I. Test the main control module

Ii. replace a pile module with an actual module each time based on the selected adding policy, and replace the corresponding pile module with the direct subordinate module of the actual module, build a new system with tested modules or subsystems. Test new modules

Iii. regression testing.

Iv. Repeat the above I and II to know that all modules are assembled into the system.

The disadvantage of the top-down integration mode is that the pile module needs to be created and there is a logic order problem.

2) Bottom-up integration

Iii. Acceptance Test

The integration test eliminates software interface errors and the system has become a complete software package. The acceptance test is mainly carried out by users. It is the final key link to ensure the software quality to test the compliance of the technical standards stated in the software specification. Acceptance testing mainly includes effectiveness testing and software configuration review.

The validity test runs the black box test in the development environment to verify whether the software meets the requirements listed in the Requirement Specification class. Tests software portability, compatibility, automatic error response, and maintainability. If the function and performance are consistent with the user's requirements, the issue will be passed. If there is a gap, a problem report will be submitted.

The software configuration review ensures that all components of the software configuration are complete, all aspects of the quality are in line with the requirements, the content of the document is completely consistent with the program, and has the necessary details in the software maintenance phase, all the documents are in the numbered directory. In addition, Alpha or beta testing is required.

Iv. System Testing

System testing refers to the software used for acceptance testing as an element of a computer system, integrated Testing with computer hardware, peripherals, some supporting software, data and personnel, and other system elements. It includes three aspects: recovery test, security test, and intensity test.

 

Related Article

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.