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:

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; Bypassing the drawing of causality diagram, all combinations are listed directly 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 with the user’s usage habits and test procedures in the common problems mainly.

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;

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), the need for back-end control, in this case, the need 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. Conduct interface test verification according to interface test documents provided by back-end development

As shown in figure:

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; It is to test whether the system can meet the needs of the actual operation, or how the current system restricts the performance of the system, or what system factors cause

The system can’t keep up with the business? 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.

Such as:

① The response time of the login request to the successful login page cannot 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 lightweight.

The JMeter performance test is designed to provide high concurrency access to the server through the interface, so the script is written much like the interface test, entering urls, parameters, etc

Four, software testing automation testing

1. UI automation test

A. Web UI automation test. Generally, Python + Selenium is used to locate page elements and simulate human page operations through browser driver to achieve web UI automation test

B. Mobile terminal UI automatic test, generally using Python + APpium, obtains APP page elements by calling Android JDK, simulating human operation of APP, and realizes mobile terminal UI automatic test

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:

The resources

If you have to work but often feel a lot of difficult, feel that their testing aspects of learning is not enough fine want to continue to learn, want to transition afraid of learning not, can pay attention to me [programmer yifan], the public number can receive the latest software testing factory interview information and I along the way a full set of learning resources.

  • ✔️ If this article is useful to you, please like 👍🏻 and follow me
  • ✔️ we’ll see you next time! 👋 👋 👋

🌻 Recommended reading:

  • Write an interface test tool, let the student sister see my ability
  • “Performance testing Technical Notes Series 1” performance indicators industry reference | collector’s edition
  • ✨ combat series ✨ 1️ micro channel small program automated test practice (attached Python source code) ❤️
  • “I have been doing test development for more than a year, and my monthly salary has changed from 5K to 24K.