V model and Test level [1]
2015-06-24
Directory
2.1.1 V model
2.2.1 Unit Test
2.2.2 Integration Testing
2.2.3 System Testing
2.2.4 Acceptance Test
2.1.1 V model
Return
- Unit testing: Verifies that the software unit is properly executed according to the unit specification (detailed design instructions), which ensures that each of the smallest units is functioning properly. Unit testing is generally performed by the developer, first setting the minimum test unit, and then by designing the corresponding test cases to verify the correctness of each unit function;
- Integration testing: Check whether multiple units work together in a way that is described in the system outline design. The main focus of integration testing is that the system can compile successfully, realize the main business functions, the data between the various modules can communicate normally;
- System testing: Verify that the entire system meets the requirements specification;
- Acceptance testing: From the user's point of view to check whether the system meets the requirements defined in the contract or user needs;
Characteristics of the V-model
- V model embodies the main idea is the development and testing is equally important, the left side represents the development activities, and the right side represents the test activity;
- V model for each development phase, there is a Test level to correspond with it;
- Testing is still a phase in the development life cycle, and unlike waterfall models, there are multiple levels of testing corresponding to the development phase;
- The V model is suitable for situations where demand is clear and demand changes are infrequent;
2.2.1 Unit Test
Return
Basic meaning
- Unit Test objects: can be modules, classes, functions and objects, etc., different software language to decide;
- The main purpose of unit testing is to verify whether the unit satisfies the detailed design specification and discovers the errors in the requirements and design.
- The main input of unit test design (test basis): Is detailed design specification, software design and data model, etc.;
- Test technology of Unit test: Mainly use white box test technology, black box test technology as the auxiliary of Unit test;
- Unit testing should cover functional requirements and non-functional requirements;
- Unit tests often use test-driven methods (test-driven development);
Test environment
- Unit tests process objects directly from the developer, usually by the developer to carry out unit tests;
- Unit tests may not be able to form a completed system, so support for drive modules and pile modules is required:
- Pile module: Used to simulate the modules that are called during the working process of the test module, they usually only perform very little data processing, such as printing the entrance and return;
- Driver module: Used to simulate the module of the higher-level module, it accepts the test data, the relevant data transmitted to the test module, start the test module, and print the corresponding results;
- Drive modules and pile modules are software used for testing, not part of software products, but it requires a certain amount of development costs;
Unit TestFocus Point
- Element module interface parameters;
- Whether the number of actual parameters and formal parameters is the same;
- Whether the properties of actual parameters and formal parameters match;
- The parameter order, number and property of the calling function match;
- Unit module local data structure;
- Inappropriate or incompatible type description;
- The variable is not initialized;
- Incorrect variable name;
- Independent path test of the unit module;
- Misunderstanding or using the wrong operator priority;
- Mixed type operation;
- Tests related to the control flow;
- The loop variable was modified incorrectly;
- The cyclic abort condition cannot appear;
- Tests related to exception handling;
- The error message of the output is difficult to understand;
- The wrong information is inconsistent with the actual error;
2.2.2 Integration Testing
Return
Basic meaning
- Integration testing, also known as assembly testing, joint testing, etc.;
- Integration testing is the interface between the components of testing, and other parts of the system interaction;
- The simplest form is to combine two tested units into a single component to test the interface and data exchange between them;
- Integration testing of the main work: the unit test through the integration of the various modules to test whether the data can be correctly transferred and called, and the individual modules can work together correctly;
- Integration testing can be applied at different levels of testing, such as unit integration testing, system integration testing, etc.
of integration TestingFocus Point
- Whether the unit module transmits the wrong data, or does not transmit the data;
- The unit receiving the data cannot operate or crash, such as unit function defect, incompatible interface format, incompatible protocol, etc.
- The communication between the units is normal, but using different methods to parse the received data, such as specification contradiction, understanding error, etc.
- The data can be transmitted normally, but the transmission time is wrong, such as timing problem, or the time interval of transmission is too short, such as throughput, load, capacity and so on.
2.2.3 System Testing
Return
Basic meaning
- System test is to integrate the software system, as a part of computer system, with the hardware, some supporting software, data and personnel and other system elements, in the actual operating environment of the computer system to carry out a series of rigorous and effective testing;
- System testing is concerned with the behavior of the entire system or product defined in the project or product scope;
- In system testing, the test environment should be as consistent as possible with the end-use target or the environment used by the product, thereby reducing the environment-related failures;
Test target
- The goal of the system testing is to confirm whether the whole system satisfies the functional and non-functional requirements in the specification and the degree of satisfaction;
- System testing should identify failures due to incorrect requirements, incomplete or inconsistent implementations and requirements, and recognize requirements that are not documented or forgotten;
- Common system tests include stress testing, capacity testing, performance testing, safety testing, fault tolerance testing, etc.
Why system Testing
- At lower test levels, testing is primarily for technical specifications, which are considered from the perspective of the software developer's technical perspective. The system tests the entire system from the perspective of the customer or user. The tester confirms that the system meets the requirements completely and correctly.
- Many features and system properties are obtained from the process of calling each other's components from one system to another, so that they can only be seen at the entire system level, and can only be observed and tested at this time.
2.2.4 Acceptance Test
Return
Basic meaning
- Acceptance testing is usually carried out by users of the system, while other stakeholders of the system may participate;
- The purpose of acceptance testing is to test the system function, the specific part of the system or the specific system non-functional characteristics through the acceptance test.
- The detection of defects is not the main goal of acceptance testing, and acceptance testing can also be used to assess whether the system can be deployed in the market, the user's readiness to use the system, etc.
Acceptance Test Type
- Contract Acceptance Test
- Standard acceptance Test
- Alpha and beta testing
- User Acceptance Testing
- Run (acceptance) test
Reference
[1] Testing in the software life cycle [DOWNLOAD]
2.2 Test level