I. Software testing function testing
Test case writing is the basic skill of software testing; There are also many people who believe that test cases are the core of software testing; The most important thing in software testing is to design and generate effective test cases. Test case is the guidance of test work and the criterion that software test must abide by.
Black box testing common test case writing methods
1. Equivalence classes
Select a few representative data, which are equivalent to other values of this class; Find the smallest subset to find the most errors; Features: Use cases that must be designed; Covers most cases;
2. Boundary value
The so-called boundary conditions refer to those states in the input and output equivalence classes that are just at the boundary, beyond the boundary, or below the boundary. Characteristics: Select one or more elements so that each boundary of the equivalence class is tested; Instead of focusing only on input conditions, test cases need to be designed with the result space (output equivalence classes) in mind;
3. Causal diagram
The combination of input conditions is analyzed. Use a systematic method to select an efficient set of test cases; Analysis ideas: a. Analyze the specification description, determine the cause and result, and assign identifiers; B. Analyze the specification semantics, find out the relationship between causes and causes, between causes and results, and draw the causal diagram; C, some reasons and causes, the combination between the cause and the result will not appear, with signs to indicate constraints or restrictions; D. Conversion of causality diagram into decision table; E. Design test cases based on each column of the judgment table;
4, determine the table drive method
Tools for analyzing and expressing different operations under multiple logic conditions; By drawing the causal diagram, all combinations are directly listed for screening.
5. Orthogonal experiment method
When designing test cases using cause-and-effect diagrams, the cause-and-effect relationship between input causes and output results is sometimes difficult to obtain from software requirements specifications. Often the causal relationship is so large that the number of test cases is huge. In order to effectively and reasonably reduce the testing time and cost, the orthogonal experimental design method can be used to design test cases.
6. Function diagram method
The functionality of a program includes both static and dynamic descriptions. A dynamic description describes the order in which data is entered or transferred, closely corresponding to a business process. Static descriptions describe the mappings between input and output criteria. For market-oriented products with complex logic and large portfolios, dynamic specifications must complement functional specifications. Function diagram design method: The function diagram method uses function diagrams to visually represent the function description of the program and mechanically generate test cases of the function diagram. The “state transition diagrams,” “flow charts,” and “menu trees” we see in different documents are to some extent different representations of functional diagrams, and different testers may use the specific methods slightly differently.
7. Scene experiment method
Nowadays, almost all software uses event triggering to control the flow. The scene when the event is triggered forms the scene, and the event flow is formed by the different triggering sequence and processing results of the same event. This method can vividly describe the situation when the event is triggered, which is beneficial to test designers to design test cases and make test cases easier to understand and execute.
8. False inference
The method of designing test cases based on experience and intuition to predict all possible errors in the program; More to the user’s usage habits and test procedures in the common problems.
9. Demand transformation
Perform requirements analysis and write test cases according to requirements.
10. Design documents
By referring to the design documents, you can understand the internal design process and processing mechanism of the software system. By comparing the written test cases, you can add corresponding functions and modules.
11. Exploratory testing
Infinite creative test point, endless exploration test; We will use insight, technology and contingency measures at the forefront of testing to identify product defects; Click to get free software testing materials 100+ famous enterprise testing resources to share
Two, software testing interface testing
1. What is interface testing?
Interface test is a test to test the indirect interface of a system component. Interface testing is mainly used to detect the interaction points between external systems and internal subsystems. The focus of the test is to check the data exchange, transfer and control management process, as well as the logical interdependence between systems.
2. Why do interface tests?
A) Nowadays, with the increasing system complexity, the cost of traditional testing methods increases sharply and the test efficiency drops sharply. Interface testing can provide a solution to this situation. B) Interface test is relatively easy to realize automatic continuous integration, and relatively stable compared with UI automation, which can reduce the labor cost and time of manual regression test, shorten the test cycle, and support the demand of back-end rapid release. Continuous interface integration is the source of low cost and high benefit. C) Now many systems are separated from the front and back ends. From the perspective of security: 1) Only relying on the front end to limit has completely failed to meet the security requirements of the system (it is too easy to bypass the front end), and the back end also needs to control, in this case, it needs to verify from the interface level. 2) Whether the information transmitted at the front and back end, log printing and other information is encrypted transmission also needs to be verified, especially related to the user’s privacy information, such as ID card, bank card, etc.
3. How to do interface testing
A. Perform interface test verification according to interface test documents provided by back-end development as shown in the figure below:
Then enter the URL and parameters according to the interface document to check whether the response is correct
B. In the absence of interface documents, use the packet capture tool: Fiddler to capture interface data
Three, software testing performance testing
1. Performance test field analysis
According to the understanding of the project background and business, determine the problem points to be solved by the performance test; Is it testing whether the system can meet the needs of the actual operation, or in what ways does the current system restrict the performance of the system, or what system factors cause the system to fail to keep up with business development? Identify test areas and then look at them on a case-by-case basis.
2. User scenario analysis and business modeling
According to the analysis of system services, user active time, access frequency, scene interaction and other aspects, a business scenario table is organized. Of course, it is better to describe user operation scenarios and steps in detail to provide a basis for test script development.
3. Identify performance goals
The application field of this performance test has been determined. The next step is to determine performance objectives (indicators) for specific domain concerns. For example: ① The response time of the login request to the successful login page should not exceed 2 seconds; ② The response time of the page submitted by the report audit should not exceed 5 seconds; ③ The response time of the file upload and download page shall not exceed 8 seconds;
4. Wrote performance test scripts
Performance testing tools: LoadRunner, jmeter Jmeter is used here because the loadRunner installation package is too large and not portable enough. Jmeter performance test is designed to perform high concurrent access to the server through the interface, so the script is written much like the interface test, input URL, parameters, etc.
Four, software testing automation testing
1. UI automation test
A. Web UI automation test, generally using Python + Selenium, locating page elements and simulating page operation through browser driver, realizing Web UI automation test. B. Mobile UI automation test, generally using Python + APpium. By calling the JDK of Android, the app page elements can be obtained, and the app operation can be simulated to achieve automatic testing of mobile terminal UI
2, interface automation test
Interface automation tests typically use Python + Requests, or HTTPX. Here the blogger uses requests because it’s simpler. A simple example, as shown below:
Click to get free software testing materials 100+ famous enterprise testing resources to share
Finally: [tutorials that may help you]
This some information, to do [software testing] friends should be more complete, this kind of learning materials also accompany me through the most difficult journey, I hope to help you! Everything should be done as soon as possible, especially in the technology industry, we must improve our technical skills.