Some knowledge about software testing

Source: Internet
Author: User
* The testing process follows four steps: unit testing, integration testing, validation testing, and system testing and release testing.
* Unit tests are started and used in a centralized manner. Source code Every implementation Program Unit tests to check whether the specified functions are correctly implemented by each program module.

* Integration testing assembles tested modules to test the structure of the software architecture related to the design.
* The validation test is to check whether the implemented software meets the various requirements identified in the Requirement Specification Description and whether the software configuration is complete and correct.
* In system testing, confirmed software is included in the actual operating environment and combined with other system components for testing.
Unit Testing)
* Unit testing, also known as module testing, is a test of the correctness of the smallest unit-program module in the software design. The purpose is to discover various internal errors of each module.
* For unit tests, you must design test cases based on the internal structure of the program. Multiple modules can perform unit tests in parallel.
1. Unit Test content
* In unit testing, the tester needs to understand the I/o conditions of the module and the logic structure of the module based on the detailed design instruction and the source program list, mainly using white-box testing test cases, in addition, a test case that uses a black box test can be used to identify and respond to any reasonable input or inappropriate input.

(1) Module Interface Test
* At the beginning of the unit test, data streams passing through the tested module should be tested. Test items include:
-Whether the input parameters for calling this module are correct;
-Whether the parameters entered to the submodule are correct when this module calls the submodule;
-Whether the global volume is consistent in each module;

* Consider the following when performing internal and external storage exchanges:

-The file attributes are correct;
-Whether the Open and Close statements are correct;
-Whether the buffer capacity matches the record length;
-Whether the file is opened before the read/write operation is performed;
-Whether the file is closed when file processing is completed;
-Incorrect body writing/input,
-Check and handle I/O errors.

(2) Local Data Structure Test
* Description of incorrect or inconsistent data types
* Use a variable that has not been assigned a value or has not been initialized
* Incorrect initial value or default value
* Misspelled or written variable names
* Inconsistent data types
* Impact of global data on modules
(3) path Test
* Select an appropriate test case to test the important execution path in the module.
* Test cases should be designed to find errors caused by incorrect calculation, incorrect comparison, or abnormal control flow.
* You can test the basic execution path and cycle to find a large number of path errors.
(4) error handling test
* Whether the error description is hard to understand
* Whether the error description can be used to locate the error
* Whether the displayed error matches the actual error
* Correct handling of error conditions
* Before handling an error, check whether the error condition has caused system intervention.
(5) Border Test
* Pay attention to the possibility of errors when data streams and control flows are equal to, greater than, or less than the specified comparison values. Carefully select test cases and carefully test these cases.
* If you have requirements on the module running time, you must perform a dedicated Key Path test to determine the factors that affect the module running time in the worst case and average sense.

2. unit test steps
* The module is not an independent program. When considering the test module, consider its external connection and use some auxiliary modules to simulate other modules associated with the tested module.
-Driver)
-Pile module (stub)-stub Module

* If a module requires multiple functions, it can be considered as composed of several small programs. You must first perform unit tests on each of these applets and perform performance tests on key modules.
* For programs that support certain standard procedures, interconnection tests should be started. Some people call this case Module Testing to differentiate unit testing.
Integrated Testing)
* Integration testing (integration testing and Joint Testing)
* Generally, on the basis of unit testing, all modules need to be assembled into a system according to the design requirements. The following issues need to be considered:
-Whether data transmitted through the Module Interface is lost when each module is connected;
-Whether the functions of one module will adversely affect the functions of the other module;

-The combination of sub-functions can meet the expected requirements of the parent function;
-Check whether the global data structure is faulty;
-Whether the error of a single module is accumulated and amplified to an unacceptable degree.
Integration testing can be conducted at the same time as unit testing,
This vulnerability may occur during module connection.
And finally constitute the required software system.

* The integration test of a subsystem is called a component test. It is used to identify the inconsistency between the integrated subsystem and the System Requirement Specification.
* Generally, there are two ways to integrate modules into a system:
-One-time integration
-Proliferation Integration Method

1. One-time integration (big bang)
* It is a non-proliferation assembly method. It is also called integral assembly.
* In this way, each module is tested separately, and then all modules are assembled for testing to obtain the required software system.

2. Proliferation Integration
* This integration method is also called incremental integration.
* Perform module tests on each module, and then assemble these modules into a large system.
* Connection and edge testing during the integration process to discover problems arising during the connection process
* A software system is gradually assembled through proliferation.

(1) Top-Down proliferation Mode
* In this integration mode, modules are assembled from top to bottom along the control hierarchy according to the system program structure.
* The top-down proliferation method early verifies the main control and judgment points during the test.
* A complete software function can be implemented and verified first by means of assembly in depth.

(2) Bottom-up proliferation
* This integration method starts integration and testing from the underlying module of the program module structure.
* Because the module is assembled from the bottom up, its submodules (including all subordinate modules of the submodules) at a given level have been assembled and tested, therefore, the pile module is no longer needed. You can directly run the sub-module to obtain information from the sub-module during the module test.

* The top-down and bottom-up methods have their own advantages and disadvantages.
* In general, the advantage of one method is the disadvantage of another method.
(3) hybrid proliferation Testing
* Growth test from top to bottom
-First introduce the input/output modules andAlgorithmModule for testing;
-Then, it is assembled from the bottom up into a complete and relatively independent sub-system;
-The main module starts the top-down proliferation test.

* Bottom-up-top-down proliferation test
-First, the sub-systems with read operations are assembled and tested from the bottom up to the root node module;
-Perform top-down assembly and Test on subsystems with write operations.
* Regression testing
-In this way, the modified module and Its submodules are tested in the top-down mode;
-This part is considered as a subsystem, and then tested from the bottom up.
Key module Problems
* During assembly testing, key modules should be determined and tested early on.
* Features of key modules:
① Meet certain software requirements;
② The program module structure is at a high level (high-level control module );
③ Complicated and prone to errors;
④ There are clearly defined performance requirements.

Validation Test)
* A validation test is also called a validity test. The task is to verify that the software's functions, performance, and other features are consistent with the user's requirements.
* The functional and performance requirements of the software have been clearly defined in the Software Requirement Specification. The information it contains is the basis for software validation testing.

1. Perform a validity test (black box test)
* The validity test uses the black box test method in a simulated environment (probably the development environment) to verify whether the tested software meets the requirements listed in the requirement specification.
* First, develop a test plan, specifying the types of tests to be performed. You also need to develop a set of test steps to describe specific test cases.

* Confirm by implementing the predefined test plan and test steps
-Whether the software features are consistent with the requirements;
-All documents are correct and easy to use;
-Other software requirements, such as portability, compatibility, automatic error recovery, and maintainability, must also be tested.

* After all software test cases are run, all test results can be divided into two types:
-The test results are consistent with the expected results. This shows that this part of the functionality or performance characteristics of the software are in line with the requirement specification, and thus this part of the program is accepted.
-The test results are inconsistent with the expected results. This indicates that this part of the functionality or performance characteristics of the software are inconsistent with the requirement specification description, so a problem report should be submitted for it.

2. Software Configuration Review
N The purpose of software configuration review is to ensure
All components of U software configuration are complete;
All aspects of quality are in line with the requirements;
U has the details necessary for the maintenance phase;
U.
N the user manual and operation manual should be strictly followed to check the integrity and correctness of the documents.
Acceptance Test (Acceptance Testing)
* After the system effectiveness test and software configuration review are passed, the system acceptance test should be started.
* The acceptance test is a user-oriented test. Software developers and QA (Quality Assurance) personnel should also participate.
* Users participate in the design test cases and use actual production data for testing.

* In addition to the functions and performance of the software, the portability, compatibility, maintainability, and wrong recovery functions of the software should also be checked during the testing process.
* Documents to be delivered during validation testing include:
-Confirm the Test Analysis Report
-End User Manual and Operation Manual
-Project Development Summary Report.

System Test)
* System testing is the software that passes validation testing as an element of the entire computer-based system, combined with computer hardware, peripherals, some supporting software, data and personnel and other system elements, a series of Assembly tests and validation tests on computer systems in the actual operating environment.
* The purpose of a system test is to compare it with the system requirement definition to find out the inconsistency or conflict between the software and the system definition.

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.