Interface Test Basics and tools
2016-09-12
Interface testing is a way of integrating test implementations into:
- Message Interface Testing
- Code interface test Two types of
This chapter is mainly for the message interface -based.
1 Interface Test Basics
1.1 What is interface testing
Interface refers to the system module and module or system to interact with the system, generally now we use more than the HTTP protocol-based interface (including the WebService Protocol or Tuxedo Protocol), in addition to the RPC interface, but regardless of which interface, The essence is to send a request message to the server, and then the server responds with a response message returned.
We analyze the response message to determine if the return is the same as the request that we send to the server, thus verifying that the business is implemented correctly, which is the interface test.
1.2 Why do interface testing
As systems become more and more complex and more sophisticated, in order to ensure the independence of the system and to make the business more independent, the interaction between systems is increasingly using interfaces (cohesion-poly-low coupling). At this time for traditional testers to wait until the system integration to test, not only difficult to ensure that the test coverage (interface coverage), inefficient, in order to solve these two problems, interface testing has emerged.
1.3 Application scope and coverage of interface test
So any interface should be tested, that is, where there is interaction, we are going to test the interface:
- The first step is to reach 100% of the interface coverage,
- In the case of conditions to achieve further 100% of the requirements of the interface mapping and 100% of the interface to the code's logical coverage.
1.4 Use cases for interface testing
The use cases of the interface test case and the unit or the system are not very different, the main explanation is that the data that is passed by the interface and the content that should be returned (other attributes are added according to the specific situation).
1.5 purpose and method of interface testing
1) Core: Ensure the function of the system interface is normal
2) mode: continuous integration
3) Objective: To improve the test efficiency and ensure the accuracy of the data
4) Documentation: interface testing requirements for Interface definition documents are high, all interface data types and business branches resulting from the message return structure needs to be defined beforehand, so to form the habit of the document, to facilitate access to minimize the communication between team and team costs.
2 Interface Test Tools
Common Tools Introduction
Contract tool
- Typical Business Tools: LoadRunner, SOAPUI
- Typical open source tools: Urllib2,urllib Library in JMeter, Jsoup, httpclient, Python
Grab Bag Tool
- HTTP Grab packets: http Analyzer, HttpWatch, Fiddler, Firebug
- Universal Data capture: Minisniffer, Sniffer, Omnipeek
- Process-level clutch: Wsexplorer
3 references
"Interface Test Best Practices"
Interface Test Basics and tools