CN110032511A - A kind of interface test method and interface testing equipment - Google Patents

A kind of interface test method and interface testing equipment Download PDF

Info

Publication number
CN110032511A
CN110032511A CN201910207831.9A CN201910207831A CN110032511A CN 110032511 A CN110032511 A CN 110032511A CN 201910207831 A CN201910207831 A CN 201910207831A CN 110032511 A CN110032511 A CN 110032511A
Authority
CN
China
Prior art keywords
interface
test
http request
target api
testing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910207831.9A
Other languages
Chinese (zh)
Inventor
张球龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maimaiti Mdt Infotech Ltd Shenzhen
Original Assignee
Maimaiti Mdt Infotech Ltd Shenzhen
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maimaiti Mdt Infotech Ltd Shenzhen filed Critical Maimaiti Mdt Infotech Ltd Shenzhen
Priority to CN201910207831.9A priority Critical patent/CN110032511A/en
Publication of CN110032511A publication Critical patent/CN110032511A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention is suitable for field of computer technology, provides a kind of interface test method and interface testing equipment, and interface test method includes: the testing requirement information for obtaining user and being configured by the interactive interface of visual testing tool;The interface message of the application programming interface API of all background service applications to be tested is integrated in visual testing tool in advance;HTTP request is generated based on testing requirement information, and sends HTTP request to server;HTTP request is used for interface parameters of the server based on testing requirement acquisition of information target API, and calls the target API to be tested based on interface parameters;Receive the test result that server is returned based on HTTP request.Above scheme can test different API by the same visual testing tool, to save the human cost and system resource of the API of test background service, shorten test period, improve testing efficiency.

Description

A kind of interface test method and interface testing equipment
Technical field
The invention belongs to field of computer technology more particularly to a kind of interface test methods and interface testing equipment.
Background technique
Interface testing refers to a kind of test of test system components interface, mainly for detection of external system and system it Between and internal subsystems between interaction point.The emphasis of test is the exchange, transmitting and control management process of inspection data, with And mutual logic dependencies between system etc..
Interface testing is generally used for the test of interaction exploitation or the application system development of multiple subsystems between multisystem. Interface testing is suitable for providing the rearward end frame system and center service system of service for other systems, mainly tests these systems To the interface that outside provides, its correctness and stability are verified.
However, when system introduces the technologies such as front and rear end separation, Distributed Architecture, since back-end services system does not have Business Stream often individually can not be tested or are strongly dependent upon to user interface, therefore, the interface testing of back-end services system by the page The test of journey and other front end pages and test.So that needing the interface list to be tested for each background service system Solely exploitation test interface or test script, the interface testing of back-end services system will cause the very big wasting of resources, the survey of version It is very long to try the period, and is not easy to the coordination and management of project.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of interface test method and refund management equipment, it is existing to solve Because back-end services system does not have user interface in technology, need individually to develop survey for the interface to be tested of each background service system Examination interface or test script, the interface testing of back-end services system will cause the very big wasting of resources, and the test period of version is very The problem of growing, and being not easy to the coordination and management of project.
The first aspect of the embodiment of the present invention provides a kind of interface test method, comprising:
Obtain the testing requirement information that user is configured by the interactive interface of visual testing tool;Wherein, described visual Change and is integrated with the interface letter of the application programming interface API of all background service applications to be tested in testing tool in advance Breath;The testing requirement information includes the interface message and test parameter of the target API of background service application to be tested;
HTTP request is generated based on the testing requirement information, and sends the HTTP to server Request;The HTTP request is used for interface parameters of the server based on target API described in the testing requirement acquisition of information, and base The target API is called to be tested in the interface parameters;
Receive the test result that the server is returned based on the HTTP request.
The second aspect of the embodiment of the present invention provides a kind of interface test method, comprising:
Obtain the HTTP request that terminal is sent;Wherein, the HTTP request is needed by the terminal based on the test got Information is asked to generate, the testing requirement information is configured by the interactive interface of visual testing tool, and the visualization is surveyed The interface message of the API of all background service applications to be tested, the testing requirement packet are integrated in trial work tool in advance The interface message and test parameter of the target API of background service application to be tested are included, the HTTP request is surveyed for requesting The target API is tried, the HTTP request includes the interface message and test parameter of the target API;
The interface parameters of the target API is determined based on the interface message of the target API in the HTTP request;
The test parameter is converted into agency service parameter based on the interface parameters, and is joined based on the agency service Number invocation target API is tested;
The test result of the HTTP request is returned to the terminal.
The third aspect of the embodiment of the present invention provides a kind of interface testing equipment, comprising:
Acquiring unit, the testing requirement information configured for obtaining user by the interactive interface of visual testing tool; Wherein, the application programming interface of all background service applications to be tested is integrated in the visual testing tool in advance The interface message of API;The testing requirement information include the target API of background service application to be tested interface message and Test parameter;
Requesting processing is used for based on testing requirement information generation HTTP request, and to Server sends the HTTP request;The HTTP request is based on target described in the testing requirement acquisition of information for server The interface parameters of API, and call the target API to be tested based on the interface parameters;
Receiving unit, the test result returned for receiving the server based on the HTTP request.
The fourth aspect of the embodiment of the present invention provides a kind of interface testing equipment, comprising:
Acquiring unit, for obtaining the HTTP request of terminal transmission;Wherein, the HTTP request is based on obtaining by the terminal The testing requirement information got generates, and the testing requirement information is configured by the interactive interface of visual testing tool, The interface message of the API of all background service applications to be tested, the survey are integrated in the visual testing tool in advance Examination demand information includes the interface message and test parameter of the target API of background service application to be tested, and the HTTP is asked It asks for target API described in request for test, the HTTP request includes the interface message and test parameter of the target API;
Determination unit, for determining the target API based on the interface message of the target API in the HTTP request Interface parameters;
Interface testing unit, for the test parameter to be converted to agency service parameter based on the interface parameters, and It is tested based on the agency service parameter invocation target API;
Return unit, for returning to the test result of the HTTP request to the terminal.
5th aspect of the embodiment of the present invention provides a kind of interface testing equipment: including memory, processor and depositing The computer program that can be run in the memory and on the processor is stored up, the processor executes the computer journey It is performed the steps of when sequence
Obtain the testing requirement information that user is configured by the interactive interface of visual testing tool;Wherein, described visual Change and is integrated with the interface letter of the application programming interface API of all background service applications to be tested in testing tool in advance Breath;The testing requirement information includes the interface message and test parameter of the target API of background service application to be tested;
HTTP request is generated based on the testing requirement information, and sends the HTTP to server Request;The HTTP request is used for interface parameters of the server based on target API described in the testing requirement acquisition of information, and base The target API is called to be tested in the interface parameters;
Receive the test result that the server is returned based on the HTTP request.
6th aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, and the computer program performs the steps of when being executed by processor
Obtain the testing requirement information that user is configured by the interactive interface of visual testing tool;Wherein, described visual Change and is integrated with the interface letter of the application programming interface API of all background service applications to be tested in testing tool in advance Breath;The testing requirement information includes the interface message and test parameter of the target API of background service application to be tested;
HTTP request is generated based on the testing requirement information, and sends the HTTP to server Request;The HTTP request is used for interface parameters of the server based on target API described in the testing requirement acquisition of information, and base The target API is called to be tested in the interface parameters;
Receive the test result that the server is returned based on the HTTP request.
7th aspect of the embodiment of the present invention provides a kind of interface testing equipment: including memory, processor and depositing The computer program that can be run in the memory and on the processor is stored up, the processor executes the computer journey It is performed the steps of when sequence
Obtain the HTTP request that terminal is sent;Wherein, the HTTP request is needed by the terminal based on the test got Information is asked to generate, the testing requirement information is configured by the interactive interface of visual testing tool, and the visualization is surveyed The interface message of the API of all background service applications to be tested, the testing requirement packet are integrated in trial work tool in advance The interface message and test parameter of the target API of background service application to be tested are included, the HTTP request is surveyed for requesting The target API is tried, the HTTP request includes the interface message and test parameter of the target API;
The interface parameters of the target API is determined based on the interface message of the target API in the HTTP request;
The test parameter is converted into agency service parameter based on the interface parameters, and is joined based on the agency service Number invocation target API is tested;
The test result of the HTTP request is returned to the terminal.
The eighth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, and the computer program performs the steps of when being executed by processor
Obtain the HTTP request that terminal is sent;Wherein, the HTTP request is needed by the terminal based on the test got Information is asked to generate, the testing requirement information is configured by the interactive interface of visual testing tool, and the visualization is surveyed The interface message of the API of all background service applications to be tested, the testing requirement packet are integrated in trial work tool in advance The interface message and test parameter of the target API of background service application to be tested are included, the HTTP request is surveyed for requesting The target API is tried, the HTTP request includes the interface message and test parameter of the target API;
The interface parameters of the target API is determined based on the interface message of the target API in the HTTP request;
The test parameter is converted into agency service parameter based on the interface parameters, and is joined based on the agency service Number invocation target API is tested;
The test result of the HTTP request is returned to the terminal.
Existing beneficial effect is the embodiment of the present invention compared with prior art:
The testing requirement information that terminal is configured by obtaining user by the interactive interface of visual testing tool, and be based on Testing requirement information generates HTTP request, and sends the HTTP request to server, and server is based on The interface parameters of testing requirement acquisition of information target API in HTTP request, will be in testing requirement information based on interface parameters Test parameter is converted to agency service parameter, and is tested based on agency service parameter invocation target API.Since visualization is surveyed The interface message of the API of all background service applications to be tested is integrated in trial work tool in advance, therefore does not need to be individually for every The API of a background service to be tested develops test page or test script respectively, can pass through the same visual testing work Tool tests different API, to save the human cost and system resource of the API of test background service, shortens test week Phase improves testing efficiency.Since either HTTP GET request or HTTP POST request, server will be in requests Test parameter is converted into agency service parameter and is tested, and does not need additionally to write test script progress for HTTP POST request Test can reduce the workload of interface testing, improve testing efficiency.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the implementation process schematic diagram for the interface test method that one embodiment of the invention provides;
Fig. 2 be another embodiment of the present invention provides interface test method implementation process schematic diagram;
Fig. 3 is the schematic diagram for the interface testing equipment that one embodiment of the invention provides;
Fig. 4 be another embodiment of the present invention provides interface testing equipment schematic diagram;
Fig. 5 is the schematic diagram for the interface testing equipment that yet another embodiment of the invention provides.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Referring to Figure 1, Fig. 1 is the implementation process schematic diagram for the interface test method that one embodiment of the invention provides, this reality The executing subject for applying the interface test method of example is terminal, and terminal includes but is not limited to smart phone, computer etc..As shown in the figure Interface test method can include:
S101: the testing requirement information that user is configured by the interactive interface of visual testing tool is obtained;Wherein, described The interface of the application programming interface API of all background service applications to be tested is integrated in visual testing tool in advance Information;The testing requirement information includes the interface message and test parameter of the target API of background service application to be tested.
As the application programming interface (Application that tester needs test background to be served by Programming Interface, API) when, it can input or select in the interactive interface of visual testing tool and is to be tested API relevant information, and trigger testing requirement information.
Terminal obtains the testing requirement information that user is configured by the interactive interface of visual testing tool.Testing requirement letter Breath includes the interface message and test parameter for the target API that background service to be tested is applied.
Further, the interface message of target API may include the application mark of background application belonging to target api interface Know, the interface service of target api interface identifies and the description information of the achievable function of target API.Test parameter includes mesh Mark the input parameter and output parameter of API.Input parameter and output parameter are used to verify the correctness of the function of target API And integrality.
Wherein, visual testing tool is based on Distributed Architecture (for example, dubbo Distributed Architecture) encapsulation with http For entrance API visual testing tool.Visual testing tool can be an application program (for example, visual testing application), It is also possible to the test suite etc. of specific interactive interface, herein with no restrictions.
The API of all background service applications to be tested is integrated in visual testing tool.Wherein, backstage to be tested The API being served by can be to be developed by interface service application.
For example, the API that developer can be applied by interface service application and development background service, and by the API of exploitation It is registered to third party's component, and by the API of exploitation.Third party's component is for example, zookeeper service interface registration center.It connects Mouth is served by be built based on open source distributed service framework dependence.Specifically, can introduce open source distributed service framework according to Jar (dubbo2.8.4, zookeeper3.46, spring4.1.6) is relied to be built.
Further, S101 may include S1011~S1013, specific as follows:
S1011: it obtains belonging to target API to be tested of the user by the interactive interface selection of visual testing tool Title, the interface message of the target API of background service application;.
Since the application programming of all background service applications to be tested is integrated in visual testing tool in advance The interface message of interface API, therefore, tester can select mesh to be tested from the interactive interface of visual testing tool Mark the information of API.
For example, tester can be selected by the interactive interface of visual testing tool belonging to target API to be tested Background service application title and target API interface message.Terminal obtains interaction circle for passing through visual testing tool Title, the interface message of the target API of background service application belonging to the target API to be tested of face selection.
S1012: the survey of the corresponding preset data form input of interface message of the user based on the target API is obtained Try parameter;Wherein, the test parameter includes input parameter and output parameter.
When terminal detects the relevant information for the target API that user selects in the interactive interface of visual testing tool, Based on the default corresponding relationship between interface message and data format, the corresponding preset data of interface message of target API is obtained Format, and the preset data form got is shown in the predeterminable area for inputting parameter, so that user is based on the present count According to the test parameter of format input target API.Wherein, test parameter includes input parameter and output parameter.
Terminal obtains the test ginseng of the corresponding preset data form input of interface message of the user based on the target API Number.
S1013: based on background service belonging to the target API application title, the interface message of the target API with And the test parameter, obtain the testing requirement information.
The interface message and test ginseng of title, target API that terminal is applied based on background service belonging to target API Number generates the testing requirement information of target API.
S102: HTTP request is generated based on the testing requirement information, and sends institute to server State HTTP request;The HTTP request is joined for server based on the interface of target API described in the testing requirement acquisition of information Number, and call the target API to be tested based on the interface parameters.
Terminal can will be obtained when detecting the test request that user is triggered by the interactive interface of visual testing tool The testing requirement information got generates hypertext transfer protocol (HyperText Transfer by preset data format Protocol, HTTP) request, and the HTTP request is sent to server, so that the server is when receiving HTTP request, base The interface parameters of testing requirement acquisition of information target API in the HTTP request, and will be surveyed based on the interface parameters got Parameter Switch is tried into agency service parameter, is tested based on agency service parameter invocation target API, and when testing completion, Test result is returned into terminal.
S103: the test result that the server is returned based on the HTTP request is received.
Terminal receives the test result that server is returned based on the HTTP request.
It is understood that terminal receive server return test result when, can be based in test parameter Input parameter and output parameter are compared with the data in test result, so that it is determined that whether the function of target API is normal.
Terminal can show the test result got in the interactive interface of visual testing tool, so as to tester It checks.
Above scheme, the testing requirement information configured by obtaining user by the interactive interface of visual testing tool, And HTTP request is generated based on testing requirement information, and send the HTTP request to server, so that clothes Business interface parameters of the device based on the testing requirement acquisition of information target API in HTTP request, and based on described in interface parameters calling Target API is tested.Since the API of all background services applications to be tested is integrated in visual testing tool in advance Interface message, therefore the API for not needing to be individually for each background service to be tested develops test page or test script respectively, Different API can be tested by the same visual testing tool, thus save the manpower of the API of test background service at Sheet and system resource, shorten test period, improve testing efficiency.
Refer to Fig. 2, Fig. 2 be another embodiment of the present invention provides interface test method implementation process schematic diagram, this The executing subject of the interface test method of embodiment is server, interface test method as shown in the figure can include:
S201: the HTTP request that terminal is sent is obtained;Wherein, the HTTP request is by the terminal based on the survey got It tries demand information to generate, the testing requirement information is configured by the interactive interface of visual testing tool, described visual Change and is integrated with the interface message of the API of all background service applications to be tested, the testing requirement letter in testing tool in advance Breath includes the interface message and test parameter for the target API that background service to be tested is applied, and the HTTP request is for asking The test target API is sought, the HTTP request includes the interface message and test parameter of the target API.
Terminal is when obtaining the testing requirement information that user is configured by the interactive interface of visual testing tool, based on survey It tries demand information and generates HTTP request, and send HTTP request to server.Wherein, visual testing work The interface message of the application programming interface API of all background service applications to be tested is integrated in tool in advance.Visualization The interface message of the application programming interface API of all background service applications to be tested is integrated in testing tool in advance.
Server obtains the HTTP request that terminal is sent, and HTTP request is used for the target of request for test background service application API, HTTP request include testing requirement information, and testing requirement information includes the target API of background service application to be tested Interface message and test parameter.
Further, the interface message of target API may include the interface service mark and target of target api interface The description information of the achievable function of API.Test parameter includes the input parameter and output parameter of target API.Input parameter And output parameter is used to verify the correctness and integrality of the function of target API.
It is understood that HTTP request can be HTTP GET request, it is also possible to HTTP POST request.
S202: determine that the interface of the target API is joined based on the interface message of the target API in the HTTP request Number.
Interface message of the server based on the target API in HTTP request look for target API offer from database The interface parameters of the target proxy service of service.
Further, when the description information that interface message includes interface service mark and the achievable function of target API When, S202 can be specifically included: based on the interface service mark in the HTTP request, being obtained and provided the interface service Identify the target proxy service object of corresponding service;Obtain the interface parameters of the target proxy service object.
For example, server is identified according to the interface service in HTTP request from dubbo frame ReferenceConfig tool It is retrieved as target API in class, the target proxy service object of service is provided, and is obtained from database according to interface service mark The interface parameters of target proxy service object.
S203: the test parameter is converted to by agency service parameter based on the interface parameters, and is based on the agency Service parameter invocation target API is tested.
Server is based on the interface parameters for HTTP request in the interface parameters of the target proxy service object got In test parameter be converted to agency service parameter, corresponding agency service class is obtained based on agency service parameter, is passed through Agency service class calls the target API to be tested of background service application, tests target API.
S204: Xiang Suoshu terminal returns to the test result of the HTTP request.
Server sends test result when getting platform and being served by the test result about target API of feedback To the terminal for sending HTTP request.
Further, S204 can be specifically included: the test of the HTTP request is encapsulated by preset data interaction format As a result, and the test result after the encapsulation is sent to the terminal.
For example, server is when getting platform and being served by the test result about target API of feedback, by preset number The test result of the HTTP request is encapsulated according to exchange format, and the test result after encapsulation is sent to and sends the HTTP request Terminal, so that terminal shows test result in the interactive interface of visual testing tool, so that tester checks.It is understood that , preset data interaction format includes but is not limited to json format.
Above scheme, by obtain terminal send HTTP request, due to HTTP request by terminal based on the survey got Demand information is tried to generate, and testing requirement information include the target API of background service application to be tested interface message and Test parameter, therefore, HTTP request also include the interface message and test parameter of target API, and such server can base The interface parameters of target API is searched in interface message, and test parameter is converted by agency service parameter based on interface parameters, and It is tested based on agency service parameter invocation target API;Due to either HTTP GET request or HTTP POST request, Test parameter in request is converted into agency service parameter and tested by server, is not needed as HTTP POST request volume It writes test script outside to be tested, the workload of interface testing can be reduced, improve testing efficiency.In addition, since test needs It asks information to be configured by the interactive interface of visual testing tool, is integrated in advance in visual testing tool all to be measured The interface message of the API of the background service application of examination, therefore do not need the API difference for being individually for each background service to be tested Test page or test script are developed, different API can be tested by the same visual testing tool, to save survey The human cost and system resource for trying the API of background service, shorten test period, improve testing efficiency.
Referring to Fig. 3, Fig. 3 is a kind of interface testing equipment provided in an embodiment of the present invention, interface testing equipment can be Terminal, including each unit be used to execute each step in the corresponding embodiment of Fig. 1.Referring specifically to the corresponding embodiment of Fig. 1 In associated description.For ease of description, only the parts related to this embodiment are shown.Referring to Fig. 3, interface testing equipment 3 Include:
Acquiring unit 310, the testing requirement letter configured for obtaining user by the interactive interface of visual testing tool Breath;Wherein, the application programming of all background service applications to be tested is integrated in the visual testing tool in advance The interface message of interface API;The testing requirement information includes the interface message of the target API of background service application to be tested And test parameter;
Requesting processing 320, for generating HTTP request based on the testing requirement information, and The HTTP request is sent to server;The HTTP request is based on mesh described in the testing requirement acquisition of information for server The interface parameters of API is marked, and calls the target API to be tested based on the interface parameters;
Receiving unit 330, the test result returned for receiving the server based on the HTTP request.
Further, acquiring unit 310 is specifically used for:
Backstage belonging to the target API to be tested that user is selected by the interactive interface of visual testing tool is obtained to take Title, the interface message of the target API of business application;
Obtain the test ginseng of the corresponding preset data form input of interface message of the user based on the target API Number;Wherein, the test parameter includes input parameter and output parameter;
Title, the interface message of the target API and described based on the application of background service belonging to the target API Test parameter obtains the testing requirement information.
Further, the interface message includes that interface service mark and the achievable function of target API are retouched State information.
Referring to Fig. 4, Fig. 4 be another embodiment of the present invention provides a kind of interface testing equipment, interface testing equipment can Think server, including each unit be used to execute each step in the corresponding embodiment of Fig. 2.It is corresponding referring specifically to Fig. 2 Associated description in embodiment.For ease of description, only the parts related to this embodiment are shown.Referring to fig. 4, interface testing Equipment 4 includes:
Acquiring unit 410, for obtaining the HTTP request of terminal transmission;Wherein, the HTTP request is by the terminal base It is generated in the testing requirement information got, the testing requirement information is matched by the interactive interface of visual testing tool It sets, is integrated with the interface message of the API of all background service applications to be tested in the visual testing tool in advance, it is described Testing requirement information includes the interface message and test parameter of the target API of background service application to be tested, the HTTP For target API described in request for test, the HTTP request includes the interface message and test ginseng of the target API for request Number;
Determination unit 420, for determining the target based on the interface message of the target API in the HTTP request The interface parameters of API;
Interface testing unit 430, for the test parameter to be converted to agency service parameter based on the interface parameters, And it is tested based on the agency service parameter invocation target API;
Return unit 440, for returning to the test result of the HTTP request to the terminal.
Further, the interface message includes that interface service mark and the achievable function of target API are retouched State information;Determination unit 420 is specifically used for: based on the interface service mark in the HTTP request, obtaining described in providing Interface service identifies the target proxy service object of corresponding service;Obtain the interface parameters of the target proxy service object.
Further, return unit 440 is specifically used for encapsulating the survey of the HTTP request by preset data interaction format Test result, and the test result after the encapsulation is sent to the terminal.
Fig. 5 is the schematic diagram of interface testing equipment provided in an embodiment of the present invention.As shown in figure 4, the interface of the embodiment Test equipment 5 includes: processor 50, memory 51 and is stored in the memory 51 and can transport on the processor 50 Capable computer program 52, such as interface testing program.The processor 50 is realized above-mentioned when executing the computer program 52 Step in each interface test method embodiment.Wherein, when interface testing equipment is terminal, the processor 50 executes institute The step in the corresponding interface test method embodiment of above-mentioned Fig. 1, such as step shown in FIG. 1 are realized when stating computer program 52 101 to 103.Alternatively, the processor 50 is realized when executing the computer program 52 in the corresponding Installation practice of above-mentioned Fig. 1 The function of each unit, such as the function of module 310 to 330 shown in Fig. 3.When interface testing equipment is server, the processing Device 50 realizes the step in the corresponding interface test method embodiment of above-mentioned Fig. 1, such as Fig. 2 when executing the computer program 52 Shown step 201 is to 204.Alternatively, the processor 50 realizes that the corresponding device of Fig. 4 is real when executing the computer program 52 The function of each unit in example is applied, such as the function of module 410 to 440 shown in Fig. 4.
Illustratively, the computer program 52 can be divided into one or more module/units, it is one or Multiple units are stored in the memory 51, and are executed by the processor 50, to complete the present invention.It is one or more A module/unit can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing institute State implementation procedure of the computer program 52 in the interface testing equipment 5.For example, the computer program 52 can be divided At acquiring unit, requesting processing and receiving unit, alternatively, the computer program 52 can be divided into acquisition list Member, determination unit, interface testing unit and return unit, each unit concrete function are as described above.
The interface testing equipment 5 may include, but be not limited only to, processor 50, memory 51.Those skilled in the art can To understand, Fig. 5 is only the example of interface testing equipment 5, does not constitute the restriction to interface testing equipment 5, may include than figure Show more or fewer components, perhaps combine certain components or different components, such as interface testing equipment 5 can also wrap Include input-output equipment, network access equipment, bus etc..
Alleged processor 50 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 51 can be the internal storage unit of the interface testing equipment 5, such as interface testing equipment 5 Hard disk or memory.The memory 51 is also possible to the external storage refund management equipment of the interface testing equipment 5, such as connects The plug-in type hard disk being equipped in mouth test equipment 5, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, the memory 51 can also both include The internal storage unit of interface testing equipment 5 also includes external storage refund management equipment.The memory 51 is for storing institute Other programs and data needed for stating computer program and the interface testing equipment 5.The memory 51 can be also used for Temporarily store the data that has exported or will export.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed refund management equipment and method, Ke Yitong Other modes are crossed to realize.For example, refund management equipment embodiment described above is only schematical, for example, described The division of module or unit, only a kind of logical function partition, there may be another division manner in actual implementation, such as more A unit or assembly can be combined or can be integrated into another system, or some features can be ignored or not executed.It is another Point, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device or The INDIRECT COUPLING or communication connection of unit can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code Dish, CD, computer storage, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the meter The content that calculation machine readable medium includes can carry out increase and decrease appropriate according to the requirement made laws in jurisdiction with patent practice, It such as does not include electric carrier signal and telecommunications according to legislation and patent practice, computer-readable medium in certain jurisdictions Signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of interface test method characterized by comprising
Obtain the testing requirement information that user is configured by the interactive interface of visual testing tool;Wherein, the visualization is surveyed The interface message of the application programming interface API of all background service applications to be tested is integrated in trial work tool in advance;Institute State the interface message and test parameter that testing requirement information includes the target API of background service application to be tested;
HTTP request is generated based on the testing requirement information, and sends the HTTP to server and asks It asks;The HTTP request is used for interface parameters of the server based on target API described in the testing requirement acquisition of information, and is based on The interface parameters calls the target API to be tested;
Receive the test result that the server is returned based on the HTTP request.
2. interface test method according to claim 1, which is characterized in that the acquisition user passes through visual testing work The testing requirement information of the interactive interface configuration of tool, comprising:
Background service belonging to the target API to be tested that user is selected by the interactive interface of visual testing tool is obtained to answer The interface message of title, the target API;;
Obtain the test parameter of the corresponding preset data form input of interface message of the user based on the target API;Its In, the test parameter includes input parameter and output parameter;
Title, the interface message and the test of the target API based on the application of background service belonging to the target API Parameter obtains the testing requirement information.
3. interface test method according to claim 1 or 2, which is characterized in that the interface message includes interface service The description information of mark and the achievable function of target API.
4. a kind of interface test method characterized by comprising
Obtain the HTTP request that terminal is sent;Wherein, the HTTP request is believed by the terminal based on the testing requirement got Breath generates, and the testing requirement information is configured by the interactive interface of visual testing tool, the visual testing work Be integrated with the interface message of the API of all background services applications to be tested in tool in advance, the testing requirement information include to The interface message and test parameter of the target API of the background service application of test, the HTTP request are used for request for test institute Target API is stated, the HTTP request includes the interface message and test parameter of the target API;
The interface parameters of the target API is determined based on the interface message of the target API in the HTTP request;
The test parameter is converted into agency service parameter based on the interface parameters, and is based on the agency service parameter tune It is tested with target API;
The test result of the HTTP request is returned to the terminal.
5. interface test method as claimed in claim 4, which is characterized in that the interface message include interface service mark with And the description information of the achievable function of target API;
The interface message based on the target API in the HTTP request determines the interface parameters of the target API, packet It includes:
Based on the interface service mark in the HTTP request, the offer interface service is provided and identifies corresponding service Target proxy service object;
Obtain the interface parameters of the target proxy service object.
6. interface test method as described in claim 4 or 5, which is characterized in that described to return to the HTTP to the terminal The test result of request includes:
The test result of the HTTP request is encapsulated by preset data interaction format, and the test result after the encapsulation is sent out It send to the terminal.
7. a kind of interface testing equipment, the interface testing equipment includes memory, processor and is stored in the memory In and the computer program that can run on the processor, which is characterized in that the processor executes the computer program The step of any one of Shi Shixian such as claims 1 to 3 the method.
8. a kind of interface testing equipment, the interface testing equipment includes memory, processor and is stored in the memory In and the computer program that can run on the processor, which is characterized in that the processor executes the computer program The step of any one of Shi Shixian such as claim 4 to 6 the method.
9. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claims 1 to 3 of realization the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claim 4 to 6 of realization the method.
CN201910207831.9A 2019-03-19 2019-03-19 A kind of interface test method and interface testing equipment Pending CN110032511A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910207831.9A CN110032511A (en) 2019-03-19 2019-03-19 A kind of interface test method and interface testing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910207831.9A CN110032511A (en) 2019-03-19 2019-03-19 A kind of interface test method and interface testing equipment

Publications (1)

Publication Number Publication Date
CN110032511A true CN110032511A (en) 2019-07-19

Family

ID=67236314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910207831.9A Pending CN110032511A (en) 2019-03-19 2019-03-19 A kind of interface test method and interface testing equipment

Country Status (1)

Country Link
CN (1) CN110032511A (en)

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427324A (en) * 2019-07-30 2019-11-08 中国工商银行股份有限公司 Joint debugging system, joint debugging method, computer equipment and storage medium
CN110430096A (en) * 2019-08-06 2019-11-08 深圳市同维通信技术有限公司 A kind of gateway test method and equipment
CN110704422A (en) * 2019-08-14 2020-01-17 招联消费金融有限公司 Data query method, device, system, computer equipment and storage medium
CN110865943A (en) * 2019-11-26 2020-03-06 太平金融科技服务(上海)有限公司 Interface testing method and device, computer equipment and storage medium
CN110990171A (en) * 2019-12-02 2020-04-10 北京三快在线科技有限公司 Information prompting method, device, equipment and storage medium
CN111159025A (en) * 2019-12-23 2020-05-15 武汉联影医疗科技有限公司 Application program interface testing method and device, computer equipment and storage medium
CN111352836A (en) * 2020-02-25 2020-06-30 香港乐蜜有限公司 Pressure testing method and related device
CN111597020A (en) * 2020-04-24 2020-08-28 五八有限公司 Application Programming Interface (API) debugging method and debugging terminal
CN111858304A (en) * 2020-06-10 2020-10-30 南京领行科技股份有限公司 Interface performance test method and device
CN112131020A (en) * 2020-09-22 2020-12-25 杭州城市大数据运营有限公司 API interface generating method, calling method, device, equipment and medium
CN112306862A (en) * 2020-10-14 2021-02-02 北京健康之家科技有限公司 Front-end automatic test system and method, storage medium and computing equipment
CN112597051A (en) * 2020-12-30 2021-04-02 北京华胜天成科技股份有限公司 Method and device for obtaining test result, electronic equipment and storage medium
CN112887390A (en) * 2021-01-20 2021-06-01 上海易校信息科技有限公司 Network request method
CN112882948A (en) * 2021-03-15 2021-06-01 数字广东网络建设有限公司 Stability testing method, device and system for application and storage medium
CN113032244A (en) * 2021-02-23 2021-06-25 中国工商银行股份有限公司 Interface testing method, device, computer system and computer readable storage medium
CN113179317A (en) * 2021-04-27 2021-07-27 杭州迪普科技股份有限公司 Test system and method for content rewriting device
CN113360390A (en) * 2021-06-24 2021-09-07 平安普惠企业管理有限公司 Automatic testing method, device, equipment and storage medium of interface
CN113672441A (en) * 2021-08-05 2021-11-19 展讯半导体(成都)有限公司 Method and device for testing intelligent equipment
CN113778869A (en) * 2021-09-06 2021-12-10 中国银行股份有限公司 SDK test method and device
CN113886216A (en) * 2020-07-03 2022-01-04 腾讯科技(深圳)有限公司 Interface test and tool configuration method, device, electronic equipment and storage medium
CN114124748A (en) * 2021-10-15 2022-03-01 青岛海尔科技有限公司 Hypertext transfer protocol interface debugging tool and method based on IDEA platform
CN114356774A (en) * 2022-01-07 2022-04-15 中国联合网络通信集团有限公司 Target service test method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136095A (en) * 2011-11-28 2013-06-05 阿里巴巴集团控股有限公司 Method, device and system of test application program interface
CN105099811A (en) * 2015-06-03 2015-11-25 北京金山安全软件有限公司 Interface testing method and device
CN105516322A (en) * 2015-12-16 2016-04-20 方正宽带网络服务有限公司 Interface test method and device based on http protocol
CN106021112A (en) * 2016-05-31 2016-10-12 腾讯科技(深圳)有限公司 Program testing system, method and device
WO2018120722A1 (en) * 2016-12-30 2018-07-05 上海壹账通金融科技有限公司 Asynchronous interface testing method, terminal, device, system, and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136095A (en) * 2011-11-28 2013-06-05 阿里巴巴集团控股有限公司 Method, device and system of test application program interface
CN105099811A (en) * 2015-06-03 2015-11-25 北京金山安全软件有限公司 Interface testing method and device
CN105516322A (en) * 2015-12-16 2016-04-20 方正宽带网络服务有限公司 Interface test method and device based on http protocol
CN106021112A (en) * 2016-05-31 2016-10-12 腾讯科技(深圳)有限公司 Program testing system, method and device
WO2018120722A1 (en) * 2016-12-30 2018-07-05 上海壹账通金融科技有限公司 Asynchronous interface testing method, terminal, device, system, and storage medium

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427324B (en) * 2019-07-30 2023-09-08 中国工商银行股份有限公司 Joint debugging system, joint debugging method, computer equipment and storage medium
CN110427324A (en) * 2019-07-30 2019-11-08 中国工商银行股份有限公司 Joint debugging system, joint debugging method, computer equipment and storage medium
CN110430096A (en) * 2019-08-06 2019-11-08 深圳市同维通信技术有限公司 A kind of gateway test method and equipment
CN110704422A (en) * 2019-08-14 2020-01-17 招联消费金融有限公司 Data query method, device, system, computer equipment and storage medium
CN110704422B (en) * 2019-08-14 2023-08-15 招联消费金融有限公司 Data query method, device, system, computer equipment and storage medium
CN110865943A (en) * 2019-11-26 2020-03-06 太平金融科技服务(上海)有限公司 Interface testing method and device, computer equipment and storage medium
CN110990171A (en) * 2019-12-02 2020-04-10 北京三快在线科技有限公司 Information prompting method, device, equipment and storage medium
CN111159025A (en) * 2019-12-23 2020-05-15 武汉联影医疗科技有限公司 Application program interface testing method and device, computer equipment and storage medium
CN111352836A (en) * 2020-02-25 2020-06-30 香港乐蜜有限公司 Pressure testing method and related device
CN111597020B (en) * 2020-04-24 2024-03-22 五八有限公司 Application programming interface API debugging method and debugging terminal
CN111597020A (en) * 2020-04-24 2020-08-28 五八有限公司 Application Programming Interface (API) debugging method and debugging terminal
CN111858304A (en) * 2020-06-10 2020-10-30 南京领行科技股份有限公司 Interface performance test method and device
CN111858304B (en) * 2020-06-10 2022-06-07 南京领行科技股份有限公司 Interface performance test method and device
CN113886216A (en) * 2020-07-03 2022-01-04 腾讯科技(深圳)有限公司 Interface test and tool configuration method, device, electronic equipment and storage medium
CN112131020A (en) * 2020-09-22 2020-12-25 杭州城市大数据运营有限公司 API interface generating method, calling method, device, equipment and medium
CN112306862A (en) * 2020-10-14 2021-02-02 北京健康之家科技有限公司 Front-end automatic test system and method, storage medium and computing equipment
CN112597051A (en) * 2020-12-30 2021-04-02 北京华胜天成科技股份有限公司 Method and device for obtaining test result, electronic equipment and storage medium
CN112887390A (en) * 2021-01-20 2021-06-01 上海易校信息科技有限公司 Network request method
CN113032244A (en) * 2021-02-23 2021-06-25 中国工商银行股份有限公司 Interface testing method, device, computer system and computer readable storage medium
CN113032244B (en) * 2021-02-23 2024-02-02 中国工商银行股份有限公司 Interface test method, device, computer system and computer readable storage medium
CN112882948A (en) * 2021-03-15 2021-06-01 数字广东网络建设有限公司 Stability testing method, device and system for application and storage medium
CN113179317A (en) * 2021-04-27 2021-07-27 杭州迪普科技股份有限公司 Test system and method for content rewriting device
CN113360390A (en) * 2021-06-24 2021-09-07 平安普惠企业管理有限公司 Automatic testing method, device, equipment and storage medium of interface
CN113672441A (en) * 2021-08-05 2021-11-19 展讯半导体(成都)有限公司 Method and device for testing intelligent equipment
CN113672441B (en) * 2021-08-05 2023-06-06 展讯半导体(成都)有限公司 Method and device for testing intelligent equipment
CN113778869A (en) * 2021-09-06 2021-12-10 中国银行股份有限公司 SDK test method and device
CN114124748A (en) * 2021-10-15 2022-03-01 青岛海尔科技有限公司 Hypertext transfer protocol interface debugging tool and method based on IDEA platform
CN114124748B (en) * 2021-10-15 2024-04-19 青岛海尔科技有限公司 Device and method for debugging hypertext transfer protocol interface based on IDEA platform
CN114356774A (en) * 2022-01-07 2022-04-15 中国联合网络通信集团有限公司 Target service test method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110032511A (en) A kind of interface test method and interface testing equipment
CN104252339B (en) The method and apparatus that interface layer exploitation, interface layer realize data interaction
CN109308266A (en) Construction method, test method, device, equipment and the medium of test case
CN110297632A (en) Code generating method and device
CN112187558B (en) Data verification method and device and electronic equipment
CN103246606B (en) The performance test methods of ESB platform and system
CN105099801B (en) The test system of information management system and test environment analogy method
CN109714332A (en) The method for converting protocol and device parsed based on Thrift and syntax tree
CN111638983A (en) Interface calling method, interface calling device and terminal equipment
CN114416075A (en) Service processing method and device
CN114217887A (en) Micro-service arranging method, micro-service executing method, micro-service arranging device and micro-service executing server
CN116414370A (en) Platform construction method and device based on low codes, medium and electronic equipment
CN107273250A (en) The method of testing and device of electronic declaration form automatic cover system
CN111782524A (en) Application testing method and device, storage medium and electronic device
CN106407061A (en) Northbound interface testing device and northbound interface testing method
CN114610598A (en) Test method, test device, electronic equipment and computer readable storage medium
CN113760736A (en) Test method, device and system
CN113709177B (en) Method for processing message and external call gateway
CN110275701A (en) Data processing method, device, medium and calculating equipment
CN110362294A (en) Development task executes method, apparatus, electronic equipment and storage medium
CN110147294A (en) Acquisition methods, device, terminal and the computer readable storage medium of Debugging message
CN115454878A (en) Interface calling test method applied to micro service and related device
CN108400901A (en) Test method, terminal device and the computer readable storage medium of application
CN111273970B (en) Calling method, device, system, medium and electronic equipment of intelligent contract
CN114428723A (en) Test system, system test method, related device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Room 201, Building A, No. 1 Qianwan Road, Qianhai Shenzhen-Hong Kong Cooperation Zone, Shenzhen, Guangdong 518000:No. 1701, 1702B, A, New Hao one town, No. 7018 Cai Tian Road, Futian, Shenzhen 518000 Room 201, No. 1 A (Qianhai business secretary, Shenzhen, Shenzhen City, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen City, Guangdong)

Applicant after: Shenzhen Rongyimai Information Technology Co.,Ltd.

Address before: Room 201, Building A, No. 1 Qianwan Road, Qianhai Shenzhen-Hong Kong Cooperation Zone, Shenzhen, Guangdong 518000:No. 1701, 1702B, A, New Hao one town, No. 7018 Cai Tian Road, Futian, Shenzhen 518000 Room 201, No. 1 A (Qianhai business secretary, Shenzhen, Shenzhen City, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen City, Guangdong)

Applicant before: SHENZHEN MAIMAITI INFORMATION TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190719

WD01 Invention patent application deemed withdrawn after publication