Server-side testing---interface test case design

Server-side testing is mainly divided into three categories: server-side interface testing of web or app; testing of more back-end databases, cache systems, middleware, etc.; exception testing, stability testing, performance testing, etc.

Common app business interfaces include: data storage, data query, and data status operation
interface testing. More can be understood as whether the front-end and back-end data interaction is carried out according to the agreed protocol, including fields and the accuracy of fields.
Test case design reference documents: product requirements document, interface protocol document, database table structure design, etc.

Interface test case design methods are:
for input: because the input is submitted by the client, whether the client submits parameters according to the protocol is uncontrollable on the interface side. At this time, the input test case needs to be considered: design according to the parameter type, illegal Robustness and stability of parameter transmission;
for interface processing logic: use case design based on product business definition For
interface output: analysis and design for output results (data operations and interface return response).

Use case design for input: The interface document generally indicates the parameter type and length, whether it is required, etc.

Is it necessary to do so much abnormal parameter verification?

For example, in a shopping mall, the interface between the client and the backend needs to be fully tested for exceptions. The protocol is usually encrypted, but because the mall is profitable, there are always some people who attack it. Once the attack is successful, you can bypass the client and directly access the background interface. If there are loopholes in the background logic, it will be profitable.
In addition, some interfaces provided for external use also need to be tested for exceptions, because you do not know how the caller will use them, so as a reliable provider, it is very necessary to ensure its stability and robustness. In other cases, these exceptions may not be triggered externally. In this case, the exception problem will not have such a high priority to be solved.
In testing, it is usually necessary to weigh the cost of testing and product quality to find a balance.

Use Case Design - Interface Logic

Constraints Analysis
Operands Analysis
State Transition Analysis
Timing Analysis

Operation object analysis: The test point is designed to operate on legal or illegal objects,
such as: log in to account A, view the data of account B, risk: personal data privacy or security.
State transition analysis: The business state stipulates that the flow must be A>B>C, and the test point should pay attention to whether A>C, or C>A, etc. can occur, so as to avoid the loss of profits caused by process loopholes. (Mall orders are more common)
Time sequence analysis (more can be understood as business flow process): mainly for a business involving multiple interfaces, non-sequential execution leads to abnormal data or normal data cannot be written

 Use Case Design - Output

The accuracy of the fields returned by the response of the
successful interface of the output result ; whether the client process is normal; the accuracy of the data update operation (database, cache, etc. ) ; : 1001 = Service Exception 1001 = w4ParseResult is null







The interface processing time
timeout is not returned
and the timeout processing is not performed, causing the entire process to block; the
timeout error returns
the server processing timeout, but the processing is successful;

Use case design also needs to consider other things, such as:

Interface compatibility (compatible with old and new versions of apps) Whether the
interface fields are redundant or not, whether
the data is duplicated, and the
overlap of redundant interface functions

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325244787&siteId=291194637