JMeter: Basic introduction to interface testing

1. What is an interface?

Interface is a very abstract concept. Let’s first look at how China’s largest comprehensive dictionary “Cihai” defines interface:

The interface between two different systems or two parts of a system with different characteristics. Generally divided into two types: hardware interface and software interface. The former is a connecting line and related logic control circuit specially designed to connect various parts of the computer, between computers, and between computers and external systems; the latter is a program specially designed to connect two program layers or blocks. or data format.

Judging from the definition of interfaces in "Cihai", it focuses on the abstract description of interfaces in information technology. In fact, interfaces have a more abstract definition. Let’s take a look at the definition of interfaces in Wikipedia:

Interface (English: interface) generally refers to an abstraction (which can be another entity) that an entity provides to the outside world. It is used to separate external communication methods from internal operations so that it can be modified internally without affecting other external entities. The way to interact with it.

After seeing this explanation, everyone may be confused because it is too abstract and difficult to understand.

To understand its meaning, you need to first understand the two concepts contained in the definition: entity and abstraction. An entity is something that can be recognized and distinguished by humans and exists independently. It can be either physical or conceptual. Abstraction refers to the process of generalizing a concept or a phenomenon by reducing its information content, mainly to preserve only information related to a specific purpose.

Simply put, an interface is a set of conventions or specifications that things provide for other things to use. To give a specific example, if a customer goes shopping in a supermarket, the transaction is completed between the customer and the supermarket through the shopping interface. Supermarkets require customers to complete the entire shopping process as long as they follow the shopping process of selecting products and paying. Customers do not need to know details such as how to purchase products, how to price them, how to put them on the shelves, etc. Changes in purchasing channels, price adjustments, etc. will not affect users' shopping.

2. What is interface testing?

1. Specifically refers to the presentation of the breakaway page, whether the call to the breakaway page is correct, and a test type that directly tests the interface function. The focus of the test is to check the exchange of data and the correctness of the transmission. It usually includes testing the parameters of the interface, whether the parameters passed in the interface and the interface return value are correct, and whether the logical calls between the interfaces can realize the application layer functions.

2. Interface testing is a test that tests the interfaces between system components. Interface testing is mainly used to detect interaction points between external systems and systems and between internal subsystems. The focus of testing is to check the data exchange, transmission and control management processes, as well as the mutual logical dependencies between systems, etc.

3. Interface refers to the interaction between system modules and modules or systems and systems. Generally, the interfaces we use most are HTTP protocol interfaces, Web Service protocol interfaces, and RPC (Remote Procedure Call Protocol) remote procedure call protocol interfaces. . No matter what kind of interface it is, its essence is to send a request, and then the server responds and returns a response. Then we analyze the response. This is the interface test.

现在我也找了很多测试的朋友,做了一个分享技术的交流群,共享了很多我们收集的技术文档和视频教程。
如果你不想再体验自学时找不到资源,没人解答问题,坚持几天便放弃的感受
可以加入我们一起交流。而且还有很多在自动化,性能,安全,测试开发等等方面有一定建树的技术大牛
分享他们的经验,还会分享很多直播讲座和技术沙龙
可以免费学习!划重点!开源的!!!
qq群号:110685036

3. The significance of interface testing

1. Detect problems earlier

With the popularity of agile testing, we all know that testing work must be involved in the project development cycle as early as possible, because the earlier bugs are discovered, the lower the cost of repairing them.

However, functional testing generally has to wait until the system provides a testable UI interface before it can be carried out. Unit testing requires higher professionalism and labor costs, so interface testing is chosen to intervene in testing earlier.

Interface testing can test the system's interface before the functional interface is developed, so that problems can be discovered earlier and fixed at a lower cost.

2. Shorten product cycle

Earlier intervention in interface testing can detect and solve bugs earlier, thus reducing the number of bugs left to the later functional testing stage, ultimately shortening the launch time of the entire project, and helping to achieve agile testing.

3. Discover underlying problems

It will be difficult for some bugs in the system to pass UI layer functional testing, or the construction of test data and test conditions is very complicated. However, through interface testing, the underlying code logic can be covered more simply and comprehensively, thereby discovering some hidden bugs.

Especially some abnormal and extreme situations can be easily verified using interface testing.

4. Industry-proven solutions

Interface testing is relatively simple to implement. There are many mature interface automation frameworks in the industry, and most of them support continuous integration.

4. Essential skills for interface testing

1. Master the basic knowledge of network and important network protocols, such as TCP/UDP protocol, HTTP/HTTPS protocol, and understand RPC, Web Service and REST

2. Master the basic knowledge of web development and understand Session, Cookie and Token

3. Master common interface testing tools such as curl command, Postman, JMeter, LR, SoapUI, etc.

4. Master basic protocol analysis tools such as Chrome Devtools, Fiddler, Charles, Wireshark, tcpdumps, etc.

5. Master a programming language Python or Java

6. Understand server middleware such as Nginx, Apache, Tomcat, etc.

7. Master the basic query commands of relational databases and some NoSQL (such as Redis) operations to check the response results

8. Master basic Linux log query and filtering commands

Finally, I would like to thank everyone who has read my article carefully. Looking at the increase in fans and attention, there is always some courtesy. Although it is not a very valuable thing, if you can use it, you can take it directly!

Software Testing Interview Document

We must study to find a high-paying job. The following interview questions are from the latest interview materials from first-tier Internet companies such as Alibaba, Tencent, Byte, etc., and some Byte bosses have given authoritative answers. After finishing this set I believe everyone can find a satisfactory job based on the interview information.
 

Insert image description here

Guess you like

Origin blog.csdn.net/m0_58026506/article/details/132981107