Software testing-detailed explanation of functions, interfaces, performance and automation

愿你我相遇,皆有所获! 欢迎关注微信公众号:【伤心的辣条】 免费领取一份216页软件测试工程师面试宝典文档资料。以及相对应的视频学习教程免费分享!

1. Software testing function test

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 cases are the guidance for testing work and are necessary for software testing Guidelines to follow.

Common test case writing methods for black box testing

1. Equivalence

Select a small number of representative data, this type of data is equivalent to other values ​​of this type; find the smallest subset, you can find the most errors; characteristics: use cases that must be designed; cover most cases;

2. Boundary value

The so-called boundary conditions refer to the states of the input and output equivalence classes that are just at the boundary, exceed the boundary, or below the boundary; feature: select one or more elements so that each boundary of the equivalence class has been tested; Unlike just focusing on input conditions, you also need to consider the result space (output equivalence class) to design test cases;

3. Cause and effect diagram

Enter a combination of conditions for analysis. Use a systematic method to select an efficient set of test cases;

analysis of idea:

a. Analyze the specification description, determine the cause and result, and assign an identifier;

b. Analyze the semantics of the specification, find out the relationship between cause and cause, and between cause and effect, and draw a cause and effect diagram;

c. Between some reasons and reasons, and the combination of reasons and results will not appear, use signs to indicate constraints or restrictive conditions;

d. The cause and effect diagram is converted into a judgment table;

e. Design test cases based on each column of the judgment table;

4. Decision table driven method

A tool to analyze and express the situation of different operations performed under multiple logic conditions; skip the drawing of the cause and effect diagram and directly list all combinations for filtering;

5. Orthogonal experiment method

When using causality diagrams to design test cases, the causal relationship between input causes and output results is sometimes difficult to obtain from the software requirements specification; often the causality is so huge that the number of test cases is huge, in order to be effective and reasonable To reduce the test man-hours and costs, orthogonal experimental design methods can be used to design test cases.

6. Function map method

The functions of a program include static and dynamic descriptions. The dynamic description describes the sequence of input data or the sequence of transfer, and closely corresponds to the business process. The static description describes the correspondence between input and output conditions. For market-oriented products, the logic is complex and the combination is huge, and dynamic descriptions must be used to supplement functional descriptions.

Function diagram design method: The function diagram method uses the function diagram to visually represent the function description of the program, and mechanically generates the test cases of the function diagram. The "state transition diagram", "flow chart", and "menu tree" that we see in different documents are, to a certain extent, different manifestations of the function diagram, and different testers may use specific methods slightly differently.

7. Scene experiment method

Almost all current software uses event triggering to control the process. The scene when the event is triggered forms a scene, and different trigger sequences and processing results of the same event form an event flow. This method can more vividly depict the situation when the event is triggered, which is beneficial for the test designer to design test cases, and makes the test cases easier to understand and execute.

8. Error inference method

Based on experience and intuition, we can speculate on all possible errors in the program, so as to design the method of test cases in a targeted manner; it is more based on the user's habits and common problems in the test program.

9. Demand transformation

According to the requirements, perform requirements analysis and write test cases.

10. Design documents

By referring to the design document, you can understand the internal design process and processing mechanism of the software system, compare the written test cases, and add new functions and modules;

11. Exploratory testing

Infinitely creative test points, endless exploration and testing; we must use our insight, technology and contingency measures at the forefront of testing to find product defects;

2. Software test interface test

1. What is an interface test?

Interface testing is a test for testing the interface between system components. Interface testing is mainly used to detect the interaction points between external systems and systems and between internal subsystems. The focus of the test is to check the data exchange, transfer and control management process, as well as the mutual logical dependence between the systems.

2. Why do interface tests?

a) Today's system complexity continues to rise, the cost of traditional test methods has increased sharply and the test efficiency has dropped significantly. Interface testing can provide a solution in this situation.

b) Interface testing is relatively easy to achieve automated continuous integration, and is relatively stable relative to UI automation, which can reduce the labor cost and time of manual regression testing, shorten the test cycle, and support the rapid release requirements of the back-end. Continuous integration of interfaces is the root of why low-cost and high-yield.

c) Now many systems are separated from the front and back ends. From a security perspective:

1) Relying only on the front-end for restriction can no longer meet the security requirements of the system (it is too easy to bypass the front), and the back-end needs to be controlled as well. In this case, verification from the interface level is required.

2) Whether the front-end and back-end transmission, log printing and other information are encrypted and transmitted also needs to be verified, especially when it comes to the user's private information, such as ID cards, bank cards, etc.

3. How to do interface test

a. Perform interface test verification according to the interface test document provided by the back-end development

As shown:

Then enter the url and parameters according to the interface document to see if the response is correct

b. When there is no interface document, use a packet capture tool to capture interface data, packet capture tool: fiddler

Three, software test performance test

1. Analysis of performance test field

Based on the understanding of the project background and business, determine the problems to be solved in this performance test; whether the test system can meet the needs of actual operation, or whether the current system restricts the performance of the system performance, or which system factors resulting in

The system cannot keep up with business development? Determine the test area, and then analyze the specific problems in detail.

2. User scenario analysis and business modeling

According to the analysis of system business, user active time, access frequency, scene interaction and other aspects, organize a business scenario table. Of course, it is best to describe the user operation scenarios and steps in detail to provide a basis for test script development.

3. Determine performance goals

The application field of this performance test has been determined before, and the next step is to determine the performance target (indicator) for the specific field focus;

such as:

① The response time from the login request to the successful login page cannot exceed 2 seconds;

②The response time of the page submitted for report review cannot exceed 5 seconds;

③The response time of the file upload and download page should not exceed 8 seconds;

4. Writing 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 to perform high concurrent access to the server through the interface, so the script writing is similar to the interface test, input url, parameters, etc.

Fourth, software testing automation testing

1. ui automated testing

a. Web-side UI automated testing, generally using python+selenium, locate the page elements and then drive them through the browser to simulate human page operations to achieve web-side UI automated testing

b. Mobile UI automation testing, generally using python+appium, by calling Android jdk, obtaining app page elements, simulating people to perform app operations, and realizing mobile UI automation testing

2. Interface automation test

Interface automation testing generally uses python+requests, or httpx. The requests used by the blogger here are relatively simple. A simple example, as shown in the figure:

I recommend a software testing exchange group, QQ: 313782132. The group will share software testing resources, test interview questions, and industry information from time to time. You can actively communicate technical issues in the group.

In the technology industry, you must improve your technical skills and enrich your practical experience in automation projects. This will be very helpful for your career planning in the next few years and the depth of your testing technology.

In the interview season of the Golden 9th and the Silver 10th, the job-hopping season, organizing interview questions has become my habit for many years! The following is my collection and sorting in recent years, the whole is organized around [software testing], the main content includes: python automation test exclusive video, Python automation details, a full set of interview questions and other knowledge content.

Guess you like

Origin blog.csdn.net/weixin_50829653/article/details/112850281