software testing methods

Black box test case design method

Black box test case design methods, mainly including equivalence class division method, boundary value analysis method, wrong speculation method, cause and effect diagram method, orthogonal test analysis method, state transition diagram method, process analysis method

1. Equivalence class division method

Equivalence class partitioning is to divide the input domain of the program into several parts, and then select a few representative data from each part as test cases. The representative data for each class is used in the test to be equivalent to the other values ​​in that class.

2. Boundary value analysis method

Boundary value analysis method is a black-box testing method to test the boundary value of input or output. It is a supplement to the equivalence class division method. When using boundary value analysis method to design test cases, the boundary conditions should be determined first, usually input and The boundary of the output equivalence class is the boundary case that should be tested, and the value that is exactly equal to, just greater than, or just less than the boundary should be selected as the test data.

Typically, software testing includes several types of boundary checks: numbers, characters, position, weight, size, speed, orientation, dimension, space, etc.

3, wrong inference method

Based on experience and intuition to speculate on all possible errors in the program, so as to design the method of test cases in a targeted manner

4. Cause and effect diagram method

A method for designing test cases by graphically analyzing various combinations of inputs

5. Decision table-driven method

①  Condition pile : lists all the conditions of the problem . It is usually considered that the order of the listed conditions does not matter

②  Action pile : Lists the possible actions that the problem stipulates . The order of these actions is not restricted

③Condition  item : List the values ​​for its left column condition . True and false values ​​in all possible cases .

④Action  item : List the actions that should be taken under various values ​​of the condition item .

Steps to create a judgment table :

①  Determine the number of rules . There are n conditions added . Each condition has two values ​​(0, 1), so there are 2n kinds of rules .

②List  all condition piles and action piles

③  Fill in the condition items

④Fill  in the action item

⑤  Simplify merging similar rules

6. Orthogonal experiment method

According to the galois theory, a scientific experimental design method is to select an appropriate amount of representative points (examples) from a large amount of (experimental) data (test columns) to reasonably arrange the experiments (tests).

6. Functional diagram method

7. The function diagram is composed of state transition diagram and Boolean function. Transition state diagrams are described with states and transitions. A state indicates the location or time of data input, while a transition indicates a change of state, while relying on decision tables or cause-and-effect diagrams to represent logical functions

8. Scene method

The scene when the event is triggered forms the scene, and the different trigger sequences and processing results at the same time form the event flow.

 

 

 

 

 

 

 

Black box testing:

Features : Without considering the internal structure and characteristics of the program, test through some related exposed interfaces, and only check the function

Pay attention to input and output

Mainly focus on user needs

event driven

Advantages :

Easy to implement, no need to worry about internal implementation

Closer to the user's use angle

Disadvantages :

Low test coverage, generally covering less than 40% of the code

For automated testing of black boxes, the reuse rate is low, the maintenance cost is high, and it basically only focuses on functions

Main focus :

Are there any incorrect or missing features

On the interface, whether the input can be correctly accepted and whether the correct result can be output

Is there a data structure error or external information access error

Whether the performance can meet the requirements

 

White box testing: for program logic structure

advantage:

Forcing testers to think carefully about the implementation of the software and understand the principles

Can detect every branch and path in the code

Reveal bugs hidden in code

Test the code more thoroughly

shortcoming:

expensive

Unable to detect missing paths in code data sensitivity errors

It is not possible to directly verify the correctness of the requirements

Main test methods:

Code inspection method : The code inspection method mainly checks the consistency of code and program design, the rationality of code structure, the standardization and readability of code writing, and the correctness of code logic expression. Inspection methods include desktop inspection, code walkthrough, and code review.

Static Structural Analysis : It mainly expresses the internal structure of the program in a graphical way.

Quality Metrics : Based on the ISO/IEC 9126 quality model, we can construct quality metric models for evaluating various aspects of software.

Logic coverage method : Statement coverage is to design several test cases and run the program under test so that each executable statement is executed at least once. This kind of coverage, also known as point coverage, makes every executable statement in the program executed, but it is the weakest logical coverage standard, with limited effect and must be used interactively with other methods.

Basic path testing method : The basic path testing method is a method of designing test cases by analyzing the loop complexity of the control structure and deriving a set of basic executable paths based on the program control flow graph . Test cases are designed to ensure that each executable statement of the program under test is executed at least once. (most extensive)

Grey box testing: something in between, checking both functionality and code logic

Divided by state: static test and dynamic test

Static test definition : Retreat to execute the program under test, measure the static complexity of the program through the reviewed documents or code, and check whether the software complies with programming standards

Features : Do not run the program, just look at the test method of the document

Method : mutual review, walk-through, meeting

Dynamic test definition : By running the program under test, check the difference between the running result and the expected result, and analyze the running efficiency, correctness, etc.

According to the test execution method, it is divided into manual testing and automated testing

Manual testing: The behavior of having specialized testers verify whether the software meets the design requirements from the user's point of view.

Automated testing: use separate testing tool software to control automated execution of tests and automated checking of expectations and results

 

Performance test : load test, stress test, stability test can be extended

Performance indicators: the number of concurrent users VU , the number of transactions per second TPS , system response time, device performance

Static performance evaluation : When developing web applications, static analysis is performed on the pages of the web application based on the best time for performance optimization of a series of web application pages.

And give the performance analysis method of the evaluation results

Tools, Standards: yslow , pagespeed

Application Performance Management ( APM ): Provide real-time monitoring of the system to achieve performance management, fault management solutions

 

Guess you like

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