What skills are needed to do interface testing? How to learn Python interface automated testing

1. What is interface testing?

Definition: A test that tests the interfaces between system components. It is mainly used to detect the interaction points between external systems and between internal subsystems, focusing on checking the exchange of data, transmission and control management processes, as well as the mutual logical dependencies between systems, etc.;

Purpose: Test the correctness and stability of the interface;

Principle: Simulate the client sending a request message to the server, the server receives the request message, processes the corresponding message and returns a response to the client, and the client receives the response;

Key points: Check the exchange, transfer and control management process of data, including the number of times of processing;

Core: Continuous integration is the core of interface testing;

Advantages: It brings efficient defect monitoring and quality supervision capabilities to high-complexity platforms. The more complex the platform, the larger the system, and the more obvious the effect of interface testing (improving testing efficiency, improving user experience, and reducing R&D costs);

Focus of use case design: Usually, the two outermost interfaces are mainly tested: data entering the system interface (calling parameters of the external system for use by this system) and data flowing out of the system interface (verifying whether the data processed by the system is normal);

PS: When designing use cases, you also need to pay attention to what functions the external interfaces provide to external users who use these interfaces, and what functions external users really need;

2. What skills are needed for interface testing?

① Understand the business logic interaction between the system and various internal components;

② Understand the I/O of the interface (input/output: input and output);

③Understand the basic content of the protocol, including: communication principles, three-way handshake, commonly used protocol types, message composition, data transmission methods, common status codes, URL composition, etc.;

④Commonly used interface testing tools, such as: jmeter, loadrunner, postman, soapUI, etc.;

⑤Basic database operation commands (checking data into the database, extracting test data, etc.);

⑥Common character types, such as: char, varchar, text, int, float, datatime, string, etc.;

3. How to learn these skills?

①Business interaction logic between systems: through many channels and methods such as requirements documents, flow charts, mind maps, and communication;

②Protocol: I recommend the book "Illustrated HTTP", which has vivid content and is relatively an entry-level book. Others include "Illustrated TCP, IP", etc.;

③Interface testing tools: Baidu these tools, and then you will find a lot of teaching blogs, related problem solutions, and some tool-based books. Of course, it is important to choose the right book;

④Database operation commands: learning websites, teaching blogs, and some database-related books. Entry-level recommendations: "MySQL Must Know and Must Know", "Oracle PL/SQL Must Know and Must Know", etc.

⑤Character type: Still Baidu, there is a saying: If you are not sure about internal affairs, ask Baidu, and if you are not sure about foreign affairs, ask Google. .

4. How to obtain interface-related information?

In general enterprises, the development or corresponding technical personnel will write interface documents, which will indicate the address, parameter type, method, input, output and other information related to the interface. If not, find a way to obtain it.

Eight elements of interface documentation:

Cover: The cover should preferably be the cover specified by the company, with logo, content title, version number, company name, and document production date;

Revision history: The tabular form is better, including: version, revision description, revision date, revision person, review time reviewer, etc.;

Interface information: interface calling method, commonly used GET/POST method, interface address;

Function description: describe the interface function concisely and clearly, for example: what information does not be obtained by the interface;

Interface parameter description: Each parameter must be the same as the actual call, including upper and lower case; the meaning of the parameter should be briefly and comprehensively explained, and the format should be string, int, long, etc.;

The description section explains where the parameter values ​​need to be provided, and details how the parameters are generated, such as timestamp, which time period, whether the parameters are required, some parameters are required, and some are optional parameters, etc.;

Return value description:

①It is best to have a template return value and explain the meaning of each return parameter;

② Provide a real calling interface and real return value;

Call restrictions, security aspects:

Encryption method, or a special encryption process of your own company, as long as both parties use the same encryption algorithm, the interface can be called, ensuring the security of the interface call, such as the common md5;

Document maintenance: When the document is being maintained, if there is any modification, the modification date and the person who made the modification must be written, and the version number must be changed for major modifications;

5. How to conduct interface testing?

After experiencing the above scenarios, I believe most people should be able to do interface testing. As for what tools to use and the problems encountered in executing the test, please Baidu! ! !

There are many blogs, libraries, group files of major test groups, and tutorial books. As long as you use your hands and brains a little, ordinary problems can be solved. . .

MIT motto:Mens et Manus (Mind and Hand)————Use your hands, use your brain! ! !

6. Automated interface testing

As mentioned before, the core of interface testing is continuous integration, and automated testing can improve work efficiency and reduce costs. The automation of interface testing is very necessary.

As for the framework of interface automation, it can be said that there are many kinds. It is more flexible depending on the tools used, the programming language that the individual is good at, the needs of the working environment, etc.

The framework I am personally familiar with: jmeter+maven+Jenkins+mysql+dubbo.

7. Others

Engineers refer to people who have the ability to operate, design, manage, and evaluate engineering systems. The title engineer is usually reserved for those who hold a professional degree or equivalent work experience in one of the fields of engineering. ----Baidu Encyclopedia

The IT industry is a knowledge-intensive industry, and software testing engineers should also have corresponding knowledge and skills, namely: core competitiveness.

Continuous learning is essential, don’t make yourself easily replaceable!

Thank you to everyone who reads my article carefully. There is always a courtesy. Although it is not a very valuable thing, if you can use it, you can take it directly:

 

These materials should be the most comprehensive and complete preparation warehouse for [software testing] friends, and this warehouse also accompanies Thousands of test engineers have gone through the most difficult journey, and I hope it can help you!Friends in need can click on the small card below to receive it 

 

Guess you like

Origin blog.csdn.net/okcross0/article/details/134973223