Notes on Introduction to Software Engineering (5)

Basic Concepts of Software Testing

Test case design for white box testing

base path override

Test case design for black box testing

Software Testing Strategies

Manual testing

debugging

software testing: the process of executing a program in order to find bugs

User perspective: use software with fewer bugs and defects

The angle of development method: in order to facilitate the acceptance of customers

In the development work, testing generally accounts for 30%~40% or even more than 50%

Software test object: the description documents of each stage of requirements analysis, outline design, detailed design, program coding, etc., including requirements specification, outline design specification, detailed design specification, source code, etc. are the objects of software testing

Confirmation: is a series of activities and processes, the purpose is to confirm the correctness of software logic in a given external environment, including static confirmation and dynamic confirmation, static manual analysis, dynamic running program

Verification: Prove the correctness of coordination between various phases of the software life cycle

Test information flow: Test -> Result Analysis -> Troubleshooting/Reliability Analysis

Test: software configuration: object to be tested, test configuration: test plan, how to test, test tools: tools used to assist testing

Retesting after troubleshooting is an until mode

In the results analysis phase, the test results are compared with the expected results

A bottom-up, step-by-step integration phase during testing

Testing can only be started after programming is complete

Black-box testing: testing according to the requirements specification without knowing the internal logical relationships

White-box testing: It is a detailed inspection of the process details of the software (also known as structural testing or logic-driven testing)

Logic Coverage:

(1) Statement coverage, all statements are executed once

(2) Judgment coverage: each judgment branch is executed once

(3) Condition coverage: each condition of each judgment is executed according to different values

(4) Decision-condition coverage: requires both each branch and each condition

(5) Path coverage: all possible paths

Basic path coverage: On the basis of the program control flow graph, by analyzing the loop complexity of the control structure, the basic executable path economic sum is derived, so as to design the test case method

Test cases: guarantee that each executable statement in the test is executed at least once

Draw a control flow graph, calculate the loop complexity V(G), determine the linearly independent basic path set, generate test cases, and determine that each path in the path set is executed

The complexity of the loop: through EN + 2 or P + 1 E: the number of edges of the control flow graph N is the number of vertices of the control flow graph P is the number of decision nodes

Test case design for black box testing:

Equivalence class division: divide equivalence classes, select test cases

Divide equivalence classes: An equivalence class is a subset sum that contains an input domain, and can be substituted for each input in the set. Including valid equivalence classes, invalid equivalence classes. Effective equivalence class: reasonable input, according to the specification, to test whether all functions are implemented. Invalid equivalence class: unreasonable input, used to test whether invalid and unreasonable input can be detected

Boundary value analysis : Boundary value analysis is a complement to the heap equivalence class partitioning method, including slightly above and slightly below boundary values ​​and boundary values ​​for testing

Test steps: unit testing, assembly testing, validation testing, and system testing

Unit test the detection module and then assemble the module according to the design information for integration testing. The third step is to carry out the confirmation test according to the software requirements. Finally, the system test is carried out according to other elements of the system, and finally the software that can be delivered is obtained.

Unit testing: white box testing, module testing. Steps: drive module and installation module, drive module - the main program of the module under test is used to transmit data and transmit results. Stub Modules - Submodules that can be called in place of modules to perform a small amount of data manipulation. When testing each module, you need to draw its driver module and its stub module, if any. The main module has no driver module, and some modules do not have a stub module.

Assembly testing: integration testing, joint testing. There are two kinds of assembly methods: value-added assembly method and one-time assembly method. The value-added assembly method is the top-down depth-first method/the value-added method on Lilac is to replace the drive module with the actual module breadth-first/hybrid proliferation In the case of one-time assembly, the unit test of each module is completed and then the one-time assembly is completed.

The steps of the assembly test: (1) What system assembly method is used for the assembly test (2) The link sequence in the assembly test process (3) Whether the source code is consistent with the sequence of the integration test (3) Whether the test requires special hardware equipment

Confirmation test: The validity test is a black-box test, in order to verify whether the software has met the user's needs for the software, and the required tests have been uninstalled in the software specification.

System test: After the software test, a unified test is carried out on the confirmed software and calculation, that is, the hardware and other equipment of the system.



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325391034&siteId=291194637