Interface mock method and interface test method
A technology of interface testing and interface, which is applied in the field of data computer software, can solve the problems that SOAPUI does not support interface Mock, cannot support testing, etc., and achieves the effects of easy maintenance and use, decoupling dependencies, and fast and convenient maintenance
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0047] For the Saf interface, the user configures the interface name on the test platform, selects the corresponding interface type, method name, primary parameter name, input and output data, and stores these information in the database of the interface test platform. This is mainly for MOCK data and input Match the parameters to achieve the logic of the data.
[0048] The client implements the com.alibaba.dubbo.rpc.Filter interface, and the filter interface includes the Filter class, which is used to intercept the request sent by the client to implement the Invoke method. For example, Saf 1.0.8 provides a function. All Saf clients will call the invoke method of the Filter class before executing the method of remote calling the server. When the client needs to call the server interface, it will use the invoke method according to the interface name. Version number, Group (group), go to the platform to find the interface of the specified publisher.
[0049]There is also a Mock...
Embodiment 2
[0052] For the HTTP interface and Webservice interface, configure the interface name on the interface test platform, select the corresponding interface type, method name, primary parameter name, input and output data, the default Mock interface is closed, click to call the real interface.
[0053] If the interface type is selected as HTTP type, the background calls the real interface according to the request method of the HTTP interface, then modify the returned json string to the field of the corresponding parameter, and save it into the database. After saving, generate a unique interface address such as:
[0054] http: / / test.webserivce.jd.com / com_test_webserivice, replace the interface in the environment configuration file with this URL to realize the mock of the HTTP interface.
[0055] If the interface is selected as the Webservice type published by the CXF framework, the background will request the real interface method in the form of Webservice, parse the returned xml in...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com