Interface Test -1

Recent talk about a shared experience relevant interface test, think about the interface testing process can probably already carried out at an angle from:

Objective 1, the interface testing

2, interface test objectives to be achieved

3, interface testing needs what measure?

4, how to interface testing?

5, the interface can be more efficient than testing whether the test page?

For the above, part of the explanation may be carried out in turn can be refined:

The purpose 1-1 Interface test: verify the correctness of the interface.

Interface test the correctness of conduct from the operational level: A single interface can perform normal, normal communication between multiple interfaces have the association.

2-1 test interfaces to achieve the goal: accurate positioning unusual problems interfaces, interface analysis of individual issues or problems when multiple callback interfaces, interfaces to ensure the normal line, is operating normally.

3-1 Interface test what tests need:

3-1-1 interface is divided according to functional areas: get, post, patch, delete and other types

Usually the interface corresponding to the type of the select get request, parameters need to pass, according to the background data query parameter returns the correct result. So get type of interface verification test results to return.

Generally corresponding to the interface type is post insert request, parameters need to pass, the background operation of the insertion of data according to a parameter, a successful return is inserted, the insertion else return 0. Therefore, post type interface test parameters for incoming character of regular verification.

Generally corresponding to the interface type patch update request is required to pass parameters, the background data related to the operation according to the parameter modification, modification or modification failure success, so the same type of interface post test parameters for incoming character regular validation.

Generally corresponding to the interface type is delete delete request, parameters need to pass background delete operation according to the parameters necessary to determine the presence or absence of the record, if any, may be deleted; if not, can not be deleted. Because only the correct data can be passed to the next step, the state is only valid parameters and parameter invalid parameter types.

3-1-2 interface buttons business function is divided into independent and dependent interface Interface

If the independence of the interface can be tested by function type 3-1-1, but in practice most of the interface is the need to rely on other interfaces to form a transaction to complete a function. At this point interfaces need to analyze test clear business relationship between them, and then test scenarios.

Through the above test after analysis of business needs, clear goals, objectives and test range testing, according to their own conditions and in conjunction with the project, select the one that best suits their own but also the most efficient way to test: 4-1 how to interface testing . It is an interface test method scheme for reference only:

4-1-1 arrange test strategy: arrange testing strategy is actually carried out according to project requirements, the project is currently the biggest problem is the interface testing requirements description is unclear, old and new interfaces such as a renovation project, describing the demand that the old and new the same interface input parameter and returns consistent interface requirements. But change does old and new framework of reality, and will inevitably lead to changes in the database table structure, so that the return value of the old and new interface is difficult unanimously. So, this time you need according to their own project experience, flexibility practical problems.

4-1-2 Test Tool selection: test tools, and there is no good and bad points, only the most suitable. For example, you are very familiar with postman, then the postman can, you are very familiar with jmeter, then you can jmeter. If some places not easy to use, scalable stronger than these two tools, you can write about your own point code extension function. The key is to make good use of.

How 5-1-1 interface test more than a page to test the efficiency of it? If the interface test script to write a good, words can be semi-automated testing, system testing after the perfect good scripts, regression testing and release, can be quickly implemented.

 

Guess you like

Origin www.cnblogs.com/testyyy/p/10990910.html