CN110347604A - Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing - Google Patents
Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN110347604A CN110347604A CN201910628102.0A CN201910628102A CN110347604A CN 110347604 A CN110347604 A CN 110347604A CN 201910628102 A CN201910628102 A CN 201910628102A CN 110347604 A CN110347604 A CN 110347604A
- Authority
- CN
- China
- Prior art keywords
- test
- tested
- programming interface
- application programming
- program interfaces
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test 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
Present disclose provides a kind of application programming interface test equipments, comprising: test command generating device, for according to the test parameter of Program Interfaces to be tested and test cases template generation corresponding with Program Interfaces to be tested test instruction;Application programming interface managing device, for determining whether Program Interfaces to be tested meet test condition according to test instruction;And test instruction processing unit, for being instructed according to test and generating test report in the case where determining that Program Interfaces to be tested meet test condition.The disclosure additionally provides a kind of application programming interface test method, a kind of electronic equipment and a kind of computer readable storage medium.
Description
Technical field
This disclosure relates to field of computer technology, more particularly, to a kind of application programming interface test equipment, one
Kind application programming interface test method, a kind of electronic equipment and a kind of computer readable storage medium.
Background technique
With the continuous development of Internet technology, application Internet-based is more more and more universal.For example, more and more mutual
Networking enterprise is by the software ecosystem (Software Ecosystem System, abbreviation SES system) of itself with interface resource
The form of (Interface Resource, abbreviation IR) is open to be called to third party or partner.It is looked forward to by open the Internet
The application programming interfaces (Application Programming Interface, abbreviation api interface) of industry, not only increase soft
Part customizes degree, and due to the addition of a large amount of third party developers, promotes the prosperity of the SES system of Internet enterprises.
In the related art, it in order to promote api interface service regulation, improves api interface and calls efficiency, generally lead at present
It crosses api interface management platform (API Platform, abbreviation APIP) and the api interface of the different software ecosystem is subjected to unified pipe
Reason.But for the test of newly-increased api interface, whole process test is generallyd use in industry at present, i.e., often increases an API newly and connects
Mouthful, require api interface called side (API Interface Cells), api interface service side (APIInterface
Server it) cooperates with api interface management platform tripartite and carries out joint debugging test, for example, taxi-hailing software " drop drop " is carrying out interface survey
When examination, need that api interface service side " Baidu map " is requested to provide the interface service of map application as api interface called side.
Inventor has found in implementing the present disclosure, due to api interface called side (API Interface
Cells), api interface service side (API Interface Server) and api interface management platform are belonging respectively to different bodies
System relies on api interface called side, api interface service side and api interface management platform tripartite collaboration and combines to api interface
Test, not only link up it is at high cost, but also call api interface service side when, the resource of api interface service side can be consumed, influence API
The stability of interface service side's own system.
Summary of the invention
In view of this, present disclose provides a kind of application programming interface test equipment, a kind of application programmings to connect
Mouth test method, a kind of electronic equipment and a kind of computer readable storage medium.
An aspect of this disclosure provides a kind of application programming interface test equipment, including test instruction generates dress
It sets, for according to the test parameters of Program Interfaces to be tested and test case corresponding with above-mentioned Program Interfaces to be tested
Example template generation test instruction;Application programming interface managing device, for above-mentioned to be measured according to above-mentioned test instruction determination
Whether examination Program Interfaces meet test condition;And test instruction processing unit, for determining above-mentioned program to be tested
In the case that programming interface meets test condition, is instructed according to above-mentioned test and generate test report.
In accordance with an embodiment of the present disclosure, above-mentioned test command generating device includes: template matching module, for according to above-mentioned
The interface message of Program Interfaces to be tested matches and above-mentioned Program Interfaces pair to be tested from multiple test templates
The test cases template answered;And database, for storing the test parameter of above-mentioned Program Interfaces to be tested.
In accordance with an embodiment of the present disclosure, above-mentioned test command generating device further include: test cases generation module is used for root
Instruction is tested according to above-mentioned test parameter and with above-mentioned test cases template generation;It transmits messages communication module, for according to above-mentioned
Test instruction generates request message, and sends above-mentioned request message to above-mentioned application programming interface managing device, so that
Above-mentioned application programming interface managing device determines whether above-mentioned Program Interfaces to be tested are full according to above-mentioned request message
Sufficient test condition.
In accordance with an embodiment of the present disclosure, above-mentioned application programming interface managing device includes: gateway module, is used for basis
The above-mentioned request message for transmitting messages communication module transmission determines whether above-mentioned Program Interfaces to be tested meet test condition.
In accordance with an embodiment of the present disclosure, above-mentioned gateway module determines above-mentioned programming to be tested according to above-mentioned request message
It includes at least one of that whether interface, which meets test condition: according to above-mentioned request message to above-mentioned Program Interfaces to be tested
Called side identity verified;It is carried out according to called side permission of the above-mentioned request message to above-mentioned Program Interfaces to be tested
Verifying;Determine whether above-mentioned Program Interfaces to be tested meet interface Current limited Control condition according to above-mentioned request message.
In accordance with an embodiment of the present disclosure, above-mentioned application programming interface managing device further includes application programming interface
Registration module, for carrying out registration to above-mentioned Program Interfaces to be tested according to above-mentioned interface message and/or to above-mentioned application
Program Interfaces service side registers.
In accordance with an embodiment of the present disclosure, above-mentioned application programming interface managing device further includes data memory module, is used
In recording at least one of following information: application programming interface called side information, application programming interface service side
Related information, test cases, survey between information, application programming interface called side and application programming interface service side
Trial record information.
In accordance with an embodiment of the present disclosure, above-mentioned test instruction processing unit includes: receiving communication module, in determination
It states in the case that Program Interfaces to be tested meet test condition, receives the service message generated based on above-mentioned request message,
And above-mentioned service message is parsed to obtain business parameters data;Parameter verification module, for being carried out to above-mentioned service parameter
Verification, verifies the legitimacy of above-mentioned service parameter;Interface logic processing module, for verifying the legal feelings of above-mentioned service parameter
Under condition, above-mentioned request message is responded according to service logic;And reporting modules are generated, for being verified according to above-mentioned parameter
The output result of module and above-mentioned interface logic processing module generates test report.
Another aspect of the disclosure provides a kind of application programming interface test method, comprising: test instruction life
At device according to the test parameter of Program Interfaces to be tested and test case corresponding with above-mentioned Program Interfaces to be tested
Example template generation test instruction;Application programming interface managing device determines above-mentioned program to be tested according to above-mentioned test instruction
Whether programming interface meets test condition;And test instruction processing unit is determining above-mentioned Program Interfaces satisfaction to be tested
In the case where test condition, is instructed according to above-mentioned test and generate test report.
Another aspect of the disclosure provides a kind of electronic equipment, comprising: one or more processors;Memory is used
In the one or more instructions of storage, wherein when said one or multiple instruction are executed by one or more of processors, make
It obtains one or more of processors and realizes method as described above.
Another aspect of the disclosure provides a kind of computer readable storage medium, is stored thereon with executable instruction,
The instruction makes processor realize method as described above when being executed by processor.
Another aspect of the present disclosure provides a kind of computer program, and the computer program, which includes that computer is executable, to be referred to
It enables, described instruction is when executed for realizing method as described above.
In accordance with an embodiment of the present disclosure, api interface called side is simulated by test command generating device, is compiled to application program
Journey interface management apparatus is sent for requesting the test of api interface service to instruct, and uses independent test instruction processing unit mould
Quasi- api interface service side, provides api interface service, without relying on api interface called side, api interface service side and api interface
It manages platform tripartite collaboration and joint test is carried out to api interface, so at least partially overcoming interface testing in the related technology
It links up at high cost, the resource of api interface service side can be consumed, influence the technology of the stability of api interface service side's own system
Problem, and then reached raising testing efficiency, improve the technical effect of the own system stability of api interface service side.
Detailed description of the invention
By referring to the drawings to the description of the embodiment of the present disclosure, the above-mentioned and other purposes of the disclosure, feature and
Advantage will be apparent from, in the accompanying drawings:
Fig. 1 diagrammatically illustrates the diagram of the application programming interface test equipment according to the embodiment of the present disclosure;
Fig. 2 diagrammatically illustrates the block diagram of the application programming interface test equipment according to the embodiment of the present disclosure;
Fig. 3 diagrammatically illustrates the block diagram of the application programming interface test equipment according to another embodiment of the disclosure;
Fig. 4 diagrammatically illustrates the flow chart of the application programming interface test method according to the embodiment of the present disclosure;
Fig. 5 diagrammatically illustrates the process of the application programming interface test method according to another embodiment of the disclosure
Figure;
Fig. 6 diagrammatically illustrates the flow chart of the application programming interface test method according to the embodiment of the present disclosure;With
And
Fig. 7 is diagrammatically illustrated according to the computer system for being adapted for carrying out method as described above of the embodiment of the present disclosure
Block diagram.
Specific embodiment
Hereinafter, will be described with reference to the accompanying drawings embodiment of the disclosure.However, it should be understood that these descriptions are only exemplary
, and it is not intended to limit the scope of the present disclosure.In the following detailed description, to elaborate many specific thin convenient for explaining
Section is to provide the comprehensive understanding to the embodiment of the present disclosure.It may be evident, however, that one or more embodiments are not having these specific thin
It can also be carried out in the case where section.In addition, in the following description, descriptions of well-known structures and technologies are omitted, to avoid
Unnecessarily obscure the concept of the disclosure.
Term as used herein is not intended to limit the disclosure just for the sake of description specific embodiment.It uses herein
The terms "include", "comprise" etc. show the presence of the feature, step, operation and/or component, but it is not excluded that in the presence of
Or add other one or more features, step, operation or component.
There are all terms (including technical and scientific term) as used herein those skilled in the art to be generally understood
Meaning, unless otherwise defined.It should be noted that term used herein should be interpreted that with consistent with the context of this specification
Meaning, without that should be explained with idealization or excessively mechanical mode.
It, in general should be according to this using statement as " at least one in A, B and C etc. " is similar to
Field technical staff is generally understood the meaning of the statement to make an explanation (for example, " system at least one in A, B and C "
Should include but is not limited to individually with A, individually with B, individually with C, with A and B, with A and C, have B and C, and/or
System etc. with A, B, C).Using statement as " at least one in A, B or C etc. " is similar to, generally come
Saying be generally understood the meaning of the statement according to those skilled in the art to make an explanation (for example, " having in A, B or C at least
One system " should include but is not limited to individually with A, individually with B, individually with C, with A and B, have A and C, have
B and C, and/or the system with A, B, C etc.).
Embodiment of the disclosure provides a kind of application programming interface test equipment, including test instruction generates dress
It sets, for the test parameter and test cases mould corresponding with Program Interfaces to be tested according to Program Interfaces to be tested
Plate generates test instruction;Application programming interface managing device, for determining that programming to be tested connects according to test instruction
Whether mouth meets test condition;And test instruction processing unit, for determining Program Interfaces satisfaction test to be tested
In the case where condition, is instructed according to test and generate test report.
Fig. 1 diagrammatically illustrates the diagram of the application programming interface test equipment according to the embodiment of the present disclosure.It needs
It is noted that being only the example that can apply the application programming interface test equipment of the embodiment of the present disclosure shown in Fig. 1, with side
The technology contents those skilled in the art understand that disclosure are helped, but are not meant to that the embodiment of the present disclosure can not be to set for other
It is standby.
As shown in Figure 1, application programming interface test equipment 100 may include terminal device according to this embodiment
101,102,103.Network 104 between terminal device 101,102,103 to provide the medium of communication link.Network 104 can
To include various connection types, such as wired and or wireless communications link etc..
In accordance with an embodiment of the present disclosure, test command generating device can be set in terminal device 101;Application program is compiled
Journey interface management apparatus can be set in terminal device 102;Test instruction processing unit can be set in terminal device 103
In.
In accordance with an embodiment of the present disclosure, it should be noted that test command generating device provided by the embodiment of the present disclosure,
Application programming interface managing device also can be set with any two tested in instruction processing unit or three same
In a terminal device.
For example, test command generating device and application programming interface managing device can be set in terminal device 101
In, test instruction processing unit can be set in terminal device 102.Alternatively, test command generating device can be set in end
In end equipment 101, application programming interface managing device and test instruction processing unit be can be set in terminal device 102
In.For another example test command generating device, application programming interface managing device and test instruction processing unit are set to end
End equipment 101, in any one in 102,103.
Application programming interface test method provided by the embodiment of the present disclosure can be by terminal device 101,102,103
In one or more execute.Can also by be different from terminal device 101,102,103 and can with terminal device 101,102,
The other equipment of 103 communications execute.
It should be understood that the number of terminal device and network in Fig. 1 is only schematical.It, can be with according to needs are realized
Number with any number of terminal device and network.
Fig. 2 diagrammatically illustrates the block diagram of the application programming interface test equipment according to the embodiment of the present disclosure.
As shown in Fig. 2, application programming interface test equipment 200 may include test command generating device 210, application
Program Interfaces managing device 220 and test instruction processing unit 230.
Test command generating device 210 be used for according to the test parameters of Program Interfaces to be tested and with program to be tested
The corresponding test cases template generation test instruction of programming interface.
In accordance with an embodiment of the present disclosure, Program Interfaces to be tested can also be referred to as api interface to be tested.According to this
Disclosed embodiment, test parameter are related to api interface to be tested.For example, api interface to be tested is payment class application interface,
Test parameter may include the parameters such as account, password and payment amount.
In accordance with an embodiment of the present disclosure, testing in command generating device 210 may include template library, deposit in advance in template library
Multiple test cases templates are contained, the template to match with api interface to be tested can be matched from template library.
It in accordance with an embodiment of the present disclosure, can be according to information such as the interface class of api interface to be tested in simulation test
Query template library automatically generates test cases template.
In accordance with an embodiment of the present disclosure, it can be prompted to import Parameter File according to template, for example, importing includes account, close
The test parameters such as code, payment amount, automatically generate test instruction, can individually test a case, can also be more with batch testing
A case.Without waiting for third party, such as api interface called side and api interface service side.Test instruction can directly simulate hair
Call request is sent, parameter is passed to, reduces and links up cost, improves testing efficiency.
Application programming interface managing device 220 is used to whether determine Program Interfaces to be tested according to test instruction
Meet test condition.
In accordance with an embodiment of the present disclosure, application programming interface managing device 220 is all api interface called side hairs
The destination for sending API request message is the downstream of all api interface called sides.Meanwhile and all api interface service sides
Request message transmission upstream.
In accordance with an embodiment of the present disclosure, application programming interface managing device is to provide in api interface services set outward
Exposed service platform, internal branch or partner (including individual developer) can be called by service platform and be registered
Api interface on platform realizes the speed-to-market of api interface service easily using the api interface service provided.
In accordance with an embodiment of the present disclosure, api interface called side, Xiang Ying can be simulated by test command generating device 210
It is sent with Program Interfaces managing device 220 for requesting the test of api interface service to instruct, is instructed using independent test
Processing unit 230 simulates api interface service side, provides api interface service.
Instruction processing unit 230 is tested to be used in the case where determining that Program Interfaces to be tested meet test condition,
It is instructed according to test and generates test report.
In accordance with an embodiment of the present disclosure, test instruction processing unit 230 is before calling really serviceization interface, Ke Yixian
Carry out parameter legitimacy verifies.It is returned the result if it find that parameter is illegal, serviceization interface will not be recalled, can be dropped
The low consumption to software systems resource, improves testing efficiency at the problem of capable of also helping third party's quick assignment test failure.
In accordance with an embodiment of the present disclosure, api interface called side, Xiang Yingyong journey are simulated by test command generating device 210
Sequence programming interface managing device 220 is sent for requesting the test of api interface service to instruct, and is handled using independent test instruction
Device 230 simulates api interface service side, api interface service is provided, without relying on api interface called side, api interface service side
Joint test is carried out to api interface with api interface management platform tripartite collaboration, so at least partially overcoming in the related technology
Interface testing communication is at high cost, can consume the resource of api interface service side, influence the stabilization of api interface service side's own system
Property the technical issues of, and then reached raising testing efficiency, improved the technology effect of the own system stability of api interface service side
Fruit.
In accordance with an embodiment of the present disclosure, which is suitable for lacking API Calls side or lacks the checkout area of API service side
Scape can effectively shorten api interface test period, save api interface testing cost, quickly provide API access environment.
Below with reference to Fig. 3, application programming interface test equipment shown in Fig. 2 is done further in conjunction with specific embodiments
Explanation.
Fig. 3 diagrammatically illustrates the block diagram of the application programming interface test equipment according to another embodiment of the disclosure.
As shown in figure 3, test command generating device 210 includes template matching module 211 and database 212.
Template matching module 211 is used for the interface message according to Program Interfaces to be tested, from multiple test templates
Match test cases template corresponding with Program Interfaces to be tested.
In accordance with an embodiment of the present disclosure, the interface message of Program Interfaces to be tested can be the information such as interface class,
Test template library is inquired according to information such as interface class, is matched from multiple test templates and Program Interfaces pair to be tested
The test cases template answered.
Database 212 is used to store the test parameter of Program Interfaces to be tested.
In accordance with an embodiment of the present disclosure, database 212 can store the Parameter File of multiple test templates, determine to
After the corresponding test cases template of test program programming interface, programming to be tested can be imported from database 212 and is connect
The Parameter File of the corresponding test cases template of mouth, Parameter File includes test parameter, it may for example comprise account, password, amount paid
The test parameters such as degree.
In accordance with an embodiment of the present disclosure, test command generating device 210 further includes test cases generation module 213 and transmits messages
Communication module 214.
Test cases generation module 213 is used to test instruction according to test parameter and with test cases template generation.
Communication module of transmitting messages 214, which is used to be instructed according to test, generates request message, and to application programming interface management
Device 220 sends request message, so that application programming interface managing device 220 determines journey to be tested according to request message
Whether sequence programming interface meets test condition.
Fig. 4 diagrammatically illustrates the flow chart of the application programming interface test method according to the embodiment of the present disclosure.
As shown in figure 4, this method includes operation S401~S407.
In operation S401, imports api interface to be tested and illustrate document.Platform administrator can say api interface to be tested
Api interface information in plaintext shelves imports in application programming interface managing device 220.Specifically, for example, by api interface
Information imports registration module and completes interface registration.
In accordance with an embodiment of the present disclosure, api interface can be illustrated that document automatically generates API with design parameter parsing module
Interface testing case reduces the workload that test cases is write.
In operation S402, pass through 211 matching test case template of template matching module.By the way that api interface to be tested is believed
Breath imports the test cases template library in test command generating device 210, and survey appropriate is matched in test cases template library
Try case template.
In operation S403, testing parameter data appropriate is obtained in the database, finally by test cases template and test
Supplemental characteristic input test case generation module 213.
In operation S404, test cases generation module 213 according to the test cases template and test parameter information being matched to,
Automatically it is combined into test instruction.
In operation S405, API request message is sent to application programming interface management by transmitting messages communication module 214
Gateway module 221 in device 220.
In accordance with an embodiment of the present disclosure, application programming interface managing device 220 includes gateway module 221.Gateway mould
Block 221 is used to determine whether Program Interfaces to be tested meet test according to the request message for the transmission of communication module 214 of transmitting messages
Condition.
In accordance with an embodiment of the present disclosure, gateway module 221 can be to provide the concentration safety management of sign test, encryption, current limliting
Platform.In accordance with an embodiment of the present disclosure, determine whether Program Interfaces to be tested meet test condition and can actually think
It is to determine whether the request for calling Program Interfaces to be tested meets test condition, for example, it may be determining that calling is to be tested
Whether the request of Program Interfaces meets lawful condition etc..
In operation S406, gateway module 221 can be by rivest, shamir, adelman, or can also be with id password algorithm etc.
Deng, sign test and check in data memory module 222 whether have corresponding api interface called side to the calling of api interface service side
Permission, and whether meet the Current limited Control of api interface.
In accordance with an embodiment of the present disclosure, whether gateway module 221 determines Program Interfaces to be tested according to request message
Meeting test condition includes treating the called side identity of test program programming interface according to request message to be verified;Alternatively, root
It is verified according to the called side permission that request message treats test program programming interface;Alternatively, being determined according to request message to be measured
Whether examination Program Interfaces meet interface Current limited Control condition.
In accordance with an embodiment of the present disclosure, gateway module 221 also determines that Program Interfaces to be tested are according to request message
It is no to meet above-mentioned multiple conditions.
Test instruction processing unit is sent by API service message to be tested if judgement meets condition in operation S407
230.If judgement is unsatisfactory for condition, error information is returned.Wherein, API service message to be tested can be asked according to API to be tested
Message is asked to generate, the content in API service message to be tested can be the part in API request message to be tested.
In accordance with an embodiment of the present disclosure, application programming interface managing device 220 further includes 222 He of data memory module
Application programming interface registration module 223.
Data memory module 222 is for recording at least one of following information: application programming interface called side letter
Breath, application programming interface service side information, application programming interface called side and application programming interface service side
Between related information, test cases, test record information.
Application programming interface registration module 223 is infused for treating test program programming interface according to interface message
Volume and/or application programming interface service side is registered.
In accordance with an embodiment of the present disclosure, test instruction processing unit 230 includes receiving communication module 231, parameter verification mould
Block 232, interface logic processing module 233 and generation reporting modules 234.
Communication module 231 of receiving telegraph is used in the case where determining that Program Interfaces to be tested meet test condition, is received
Based on the service message that request message generates, and service message is parsed to obtain business parameters data.
Parameter verification module 232 verifies the legitimacy of service parameter for verifying to service parameter.
Interface logic processing module 233 is used in the case where verifying service parameter is legal, according to service logic to request
Message is responded.
Reporting modules 234 are generated to be used to generate survey according to the output result of parameter verification module and interface logic processing module
Examination report.
Fig. 5 diagrammatically illustrates the process of the application programming interface test method according to another embodiment of the disclosure
Figure.
As shown in figure 5, this method includes operation S501~S505.
In operation S501, receiving communication module 231 receives service message.Meanwhile it can parse the business in outgoing packet
Parameter information is simultaneously sent to parameter verification module 232.
In operation S502, parameter verification module 232 can judge automatically the legal of service parameter after receiving service parameter
Property.If not detecting by parameter legitimacy, by returning response message, it is illegal to return to certain parameter in interface testing;If passing through ginseng
Number legitimacy detection, then be sent to interface logic processing module 233 for service message.
Operation S503, interface logic processing module 233 obtain service message after, can according to processing logic at
Reason, output interface response message send test result information.
In operation S504, what parameter verification module 232 exported does not pass through at parameter legitimacy testing result and interface logic
The output of module 233 is managed as a result, being generated the acquisition of reporting modules 234, automatically generates test report.
In operation S505, generates reporting modules 234 and test report is sent in test result database.
In accordance with an embodiment of the present disclosure, application programming interface test equipment 200 can also include display module, example
Such as, setting, for showing test report, has achieved the effect that visualize in test command generating device 210.Generate report
Test report can also be transmitted directly to display module and shown by announcement module 234.
In accordance with an embodiment of the present disclosure, it is operated by simulation api interface called side and api interface service side, it can be with
Testing efficiency is improved, the testing time is shortened, it can be the case where api interface called side and api interface service side mismatch test
Under start to test;Simultaneously, it is possible to reduce human input and resource input simulate api interface tune using test command generating device
The message that request API service is sent with side simulates api interface service side using independent test instruction processing unit, provides API
Interface service can link up the investment that cost reduces resource by phase reduction manpower before testing.Pass through embodiment of the disclosure, application
Program Interfaces test equipment can be applicable in all api interfaces registered on application programming interface registration module and survey
Examination.
It is module according to an embodiment of the present disclosure, submodule, unit, any number of or in which any more in subelement
A at least partly function can be realized in a module.It is single according to the module of the embodiment of the present disclosure, submodule, unit, son
Any one or more in member can be split into multiple modules to realize.According to the module of the embodiment of the present disclosure, submodule,
Any one or more in unit, subelement can at least be implemented partly as hardware circuit, such as field programmable gate
Array (FPGA), programmable logic array (PLA), system on chip, the system on substrate, the system in encapsulation, dedicated integrated electricity
Road (ASIC), or can be by the hardware or firmware for any other rational method for integrate or encapsulate to circuit come real
Show, or with any one in three kinds of software, hardware and firmware implementations or with wherein any several appropriately combined next reality
It is existing.Alternatively, can be at least by part according to one or more of the module of the embodiment of the present disclosure, submodule, unit, subelement
Ground is embodied as computer program module, when the computer program module is run, can execute corresponding function.
For example, any number of in template matching module 211, test cases generation module 213, communication module of transmitting messages 214
It may be incorporated in a module/unit/subelement and realize or any one module/unit/subelement therein can be by
Split into multiple module/unit/subelements.Alternatively, one or more module/units in these module/unit/subelements/
At least partly function of subelement can be combined with other modules/unit/subelement at least partly function, and in a mould
It is realized in block/unit/subelement.In accordance with an embodiment of the present disclosure, template matching module 211, test cases generation module 213,
At least one of communication module of transmitting messages 214 can at least be implemented partly as hardware circuit, such as field-programmable gate array
Arrange (FPGA), programmable logic array (PLA), system on chip, the system on substrate, the system in encapsulation, specific integrated circuit
(ASIC), it or can be realized by carrying out the hardware such as any other rational method that is integrated or encapsulating or firmware to circuit,
Or it several appropriately combined is realized with any one in three kinds of software, hardware and firmware implementations or with wherein any.
Alternatively, at least one of template matching module 211, test cases generation module 213, communication module of transmitting messages 214 can be at least
It is implemented partly as computer program module, when the computer program module is run, corresponding function can be executed.
Fig. 6 diagrammatically illustrates the flow chart of the application programming interface test method according to the embodiment of the present disclosure.
As shown in fig. 6, this method includes operation S601~S603.
In operation S601, test command generating device according to the test parameters of Program Interfaces to be tested and with it is to be tested
The corresponding test cases template generation test instruction of Program Interfaces.
In operation S602, application programming interface managing device determines Program Interfaces to be tested according to test instruction
Whether test condition is met.
In operation S603, test instruction processing unit is determining the case where Program Interfaces to be tested meet test condition
Under, it is instructed according to test and generates test report.
In accordance with an embodiment of the present disclosure, api interface called side is simulated by test command generating device, is compiled to application program
Journey interface management apparatus is sent for requesting the test of api interface service to instruct, and uses independent test instruction processing unit mould
Quasi- api interface service side, provides api interface service, without relying on api interface called side, api interface service side and api interface
It manages platform tripartite collaboration and joint test is carried out to api interface, so at least partially overcoming interface testing in the related technology
It links up at high cost, the resource of api interface service side can be consumed, influence the technology of the stability of api interface service side's own system
Problem, and then reached raising testing efficiency, improve the technical effect of the own system stability of api interface service side.
In accordance with an embodiment of the present disclosure, it should be noted that application programming interface test side provided by the disclosure
Method is not limited to content described in above-mentioned Fig. 6.It is appreciated that Test Methods section described in FIG. 1 to FIG. 5 can also be with
As application programming interface test method provided by the disclosure, the further of content described in Fig. 6 can be used as
It explains.
In accordance with an embodiment of the present disclosure, a kind of electronic equipment has been additionally provided, comprising: one or more processors;Storage
Device, for storing one or more instructions, wherein when one or more of instructions are executed by one or more of processors
When, so that one or more of processors realize test method as described above.
In accordance with an embodiment of the present disclosure, by taking electronic equipment is computer system as an example.
Fig. 7 is diagrammatically illustrated according to the computer system for being adapted for carrying out method as described above of the embodiment of the present disclosure
Block diagram.Computer system shown in Fig. 7 is only an example, should not function to the embodiment of the present disclosure and use scope bring
Any restrictions.
As shown in fig. 7, include processor 701 according to the computer system 700 of the embodiment of the present disclosure, it can be according to storage
It is loaded into random access storage device (RAM) 703 in the program in read-only memory (ROM) 702 or from storage section 708
Program and execute various movements appropriate and processing.Processor 701 for example may include general purpose microprocessor (such as CPU), refer to
Enable set processor and/or related chip group and/or special microprocessor (for example, specific integrated circuit (ASIC)), etc..Processing
Device 701 can also include the onboard storage device for caching purposes.Processor 701 may include for executing according to disclosure reality
Apply single treatment unit either multiple processing units of the different movements of the method flow of example.
In RAM 703, it is stored with system 700 and operates required various programs and data.Processor 701, ROM 702 with
And RAM 703 is connected with each other by bus 704.Processor 701 is held by executing the program in ROM 702 and/or RAM 703
The various operations gone according to the method flow of the embodiment of the present disclosure.It is noted that described program also can store except ROM 702
In one or more memories other than RAM 703.Processor 701 can also be stored in one or more of by execution
Program in memory executes the various operations of the method flow according to the embodiment of the present disclosure.
In accordance with an embodiment of the present disclosure, system 700 can also include input/output (I/O) interface 705, input/output
(I/O) interface 705 is also connected to bus 704.System 700 can also include be connected to I/O interface 705 with one in lower component
Item is multinomial: the importation 706 including keyboard, mouse etc.;Including such as cathode-ray tube (CRT), liquid crystal display (LCD)
Deng and loudspeaker etc. output par, c 707;Storage section 708 including hard disk etc.;And including such as LAN card, modulatedemodulate
Adjust the communications portion 709 of the network interface card of device etc..Communications portion 709 executes communication process via the network of such as internet.
Driver 710 is also connected to I/O interface 705 as needed.Detachable media 711, such as disk, CD, magneto-optic disk, semiconductor
Memory etc. is mounted on as needed on driver 710, in order to be pacified as needed from the computer program read thereon
It is packed into storage section 708.
In accordance with an embodiment of the present disclosure, computer software journey may be implemented as according to the method flow of the embodiment of the present disclosure
Sequence.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer readable storage medium
Computer program, which includes the program code for method shown in execution flow chart.In such implementation
In example, which can be downloaded and installed from network by communications portion 709, and/or from detachable media 711
It is mounted.When the computer program is executed by processor 701, the above-mentioned function limited in the system of the embodiment of the present disclosure is executed
Energy.In accordance with an embodiment of the present disclosure, system as described above, unit, module, unit etc. can pass through computer program
Module is realized.
The disclosure additionally provides a kind of computer readable storage medium, which can be above-mentioned reality
It applies included in equipment/device/system described in example;Be also possible to individualism, and without be incorporated the equipment/device/
In system.Above-mentioned computer readable storage medium carries one or more program, when said one or multiple program quilts
When execution, the method according to the embodiment of the present disclosure is realized.
In accordance with an embodiment of the present disclosure, computer readable storage medium can be non-volatile computer-readable storage medium
Matter.Such as it can include but is not limited to: portable computer diskette, hard disk, random access storage device (RAM), read-only memory
(ROM), erasable programmable read only memory (EPROM or flash memory), portable compact disc read-only memory (CD-ROM), light
Memory device, magnetic memory device or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can
With to be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or
Person is in connection.
For example, in accordance with an embodiment of the present disclosure, computer readable storage medium may include above-described ROM 702
And/or one or more memories other than RAM 703 and/or ROM 702 and RAM 703.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule
The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction
It closes to realize.It will be understood by those skilled in the art that the feature recorded in each embodiment and/or claim of the disclosure can
To carry out multiple combinations and/or combination, even if such combination or combination are not expressly recited in the disclosure.Particularly, exist
In the case where not departing from disclosure spirit or teaching, the feature recorded in each embodiment and/or claim of the disclosure can
To carry out multiple combinations and/or combination.All these combinations and/or combination each fall within the scope of the present disclosure.
Embodiment of the disclosure is described above.But the purpose that these embodiments are merely to illustrate that, and
It is not intended to limit the scope of the present disclosure.Although respectively describing each embodiment above, but it is not intended that each reality
Use cannot be advantageously combined by applying the measure in example.The scope of the present disclosure is defined by the appended claims and the equivalents thereof.It does not take off
From the scope of the present disclosure, those skilled in the art can make a variety of alternatives and modifications, these alternatives and modifications should all fall in this
Within scope of disclosure.
Claims (11)
1. a kind of application programming interface test equipment, comprising:
Command generating device is tested, is compiled for the test parameter according to Program Interfaces to be tested and with the program to be tested
The corresponding test cases template generation test instruction of journey interface;
Application programming interface managing device, for determining that the Program Interfaces to be tested are according to test instruction
It is no to meet test condition;And
Test instruction processing unit, in the case where determining that the Program Interfaces to be tested meet test condition, root
It is instructed according to the test and generates test report.
2. equipment according to claim 1, wherein the test command generating device includes:
Template matching module, for the interface message according to the Program Interfaces to be tested, from multiple test templates
Allot test cases template corresponding with the Program Interfaces to be tested;And
Database, for storing the test parameter of the Program Interfaces to be tested.
3. equipment according to claim 1 or 2, wherein the test command generating device further include:
Test cases generation module, for testing instruction according to the test parameter and with the test cases template generation;With
And
It transmits messages communication module, for according to test instruction generation request message, and to the application programming interface pipe
It manages device and sends the request message, so that the application programming interface managing device is determined according to the request message
Whether the Program Interfaces to be tested meet test condition.
4. equipment according to claim 3, wherein the application programming interface managing device includes:
Gateway module, the request message for communication module transmission of transmitting messages according to determine the Program Interfaces to be tested
Whether test condition is met.
5. equipment according to claim 4, wherein the gateway module determines described to be tested according to the request message
It includes at least one of that whether Program Interfaces, which meet test condition:
It is verified according to called side identity of the request message to the Program Interfaces to be tested;
It is verified according to called side permission of the request message to the Program Interfaces to be tested;
Determine whether the Program Interfaces to be tested meet interface Current limited Control condition according to the request message.
6. equipment according to claim 4, wherein the application programming interface managing device further include:
Application programming interface registration module, for being carried out according to the interface message to the Program Interfaces to be tested
It registers and/or the application programming interface service side is registered.
7. equipment according to claim 4, wherein the application programming interface managing device further include:
Data memory module, for recording at least one of following information: application programming interface called side information, application
Pass between Program Interfaces service side information, application programming interface called side and application programming interface service side
Join information, test cases, test record information.
8. equipment according to claim 3, wherein the test instruction processing unit includes:
Receiving communication module, for receiving base in the case where determining that the Program Interfaces to be tested meet test condition
In the service message that the request message generates, and the service message is parsed to obtain business parameters data;
Parameter verification module verifies the legitimacy of the service parameter for verifying to the service parameter;
Interface logic processing module, for being asked to described according to service logic in the case where the verifying service parameter is legal
Message is asked to be responded;And
Reporting modules are generated, for generating according to the output result of the parameter verification module and the interface logic processing module
Test report.
9. a kind of application programming interface test method, comprising:
Test command generating device connects according to the test parameter of Program Interfaces to be tested and with the programming to be tested
The corresponding test cases template generation test instruction of mouth;
Application programming interface managing device determines whether the Program Interfaces to be tested are full according to test instruction
Sufficient test condition;And
Instruction processing unit is tested in the case where determining that the Program Interfaces to be tested meet test condition, according to described
Test instruction generates test report.
10. a kind of electronic equipment, comprising:
One or more processors;
Memory, for storing one or more instructions,
Wherein, when one or more of instructions are executed by one or more of processors, so that one or more of
Processor realizes method as claimed in claim 9.
11. a kind of computer readable storage medium, is stored thereon with executable instruction, which makes to handle when being executed by processor
Device realizes method as claimed in claim 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910628102.0A CN110347604A (en) | 2019-07-11 | 2019-07-11 | Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910628102.0A CN110347604A (en) | 2019-07-11 | 2019-07-11 | Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110347604A true CN110347604A (en) | 2019-10-18 |
Family
ID=68175039
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910628102.0A Pending CN110347604A (en) | 2019-07-11 | 2019-07-11 | Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110347604A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111221739A (en) * | 2020-01-10 | 2020-06-02 | 中国建设银行股份有限公司 | Service testing method, device and system |
CN111597020A (en) * | 2020-04-24 | 2020-08-28 | 五八有限公司 | Application Programming Interface (API) debugging method and debugging terminal |
CN111625459A (en) * | 2020-05-27 | 2020-09-04 | 平安普惠企业管理有限公司 | Application program testing method and device, computer equipment and storage medium |
CN112000579A (en) * | 2020-08-26 | 2020-11-27 | 上海移远通信技术股份有限公司 | Software interface testing method, system, equipment and medium |
CN112699017A (en) * | 2019-10-23 | 2021-04-23 | 拉扎斯网络科技(上海)有限公司 | Sound testing method and device, electronic equipment and computer readable storage medium |
CN113567797A (en) * | 2021-09-27 | 2021-10-29 | 北京全路通信信号研究设计院集团有限公司 | Design method and system suitable for track circuit product performance test case |
CN115695092A (en) * | 2022-10-31 | 2023-02-03 | 重庆长安汽车股份有限公司 | Internet vehicle data processing method and device and electronic equipment |
CN116089199A (en) * | 2023-03-30 | 2023-05-09 | 湖南华自信息技术有限公司 | IO port testing method and server |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9411569B1 (en) * | 2015-05-12 | 2016-08-09 | The United States Of America As Represented By The Administrator Of The National Aeronautics And Space Administration | System and method for providing a climate data analytic services application programming interface distribution package |
CN108446221A (en) * | 2018-03-05 | 2018-08-24 | 平安普惠企业管理有限公司 | System detection method, device, computer equipment and storage medium |
CN109240924A (en) * | 2018-09-03 | 2019-01-18 | 中国平安人寿保险股份有限公司 | A kind of test method and equipment of application program |
CN109446071A (en) * | 2018-09-26 | 2019-03-08 | 深圳壹账通智能科技有限公司 | Interface test method, interface test device, electronic equipment and storage medium |
CN109522218A (en) * | 2018-10-19 | 2019-03-26 | 平安科技(深圳)有限公司 | Interface test method, device, computer equipment and storage medium |
CN109582560A (en) * | 2018-10-09 | 2019-04-05 | 中国平安人寿保险股份有限公司 | Test file edit methods, device, equipment and computer readable storage medium |
CN109828924A (en) * | 2019-01-25 | 2019-05-31 | 网联清算有限公司 | Test method, device and calculating equipment and medium |
-
2019
- 2019-07-11 CN CN201910628102.0A patent/CN110347604A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9411569B1 (en) * | 2015-05-12 | 2016-08-09 | The United States Of America As Represented By The Administrator Of The National Aeronautics And Space Administration | System and method for providing a climate data analytic services application programming interface distribution package |
CN108446221A (en) * | 2018-03-05 | 2018-08-24 | 平安普惠企业管理有限公司 | System detection method, device, computer equipment and storage medium |
CN109240924A (en) * | 2018-09-03 | 2019-01-18 | 中国平安人寿保险股份有限公司 | A kind of test method and equipment of application program |
CN109446071A (en) * | 2018-09-26 | 2019-03-08 | 深圳壹账通智能科技有限公司 | Interface test method, interface test device, electronic equipment and storage medium |
CN109582560A (en) * | 2018-10-09 | 2019-04-05 | 中国平安人寿保险股份有限公司 | Test file edit methods, device, equipment and computer readable storage medium |
CN109522218A (en) * | 2018-10-19 | 2019-03-26 | 平安科技(深圳)有限公司 | Interface test method, device, computer equipment and storage medium |
CN109828924A (en) * | 2019-01-25 | 2019-05-31 | 网联清算有限公司 | Test method, device and calculating equipment and medium |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112699017B (en) * | 2019-10-23 | 2024-08-23 | 拉扎斯网络科技(上海)有限公司 | Sound testing method, device, electronic equipment and computer readable storage medium |
CN112699017A (en) * | 2019-10-23 | 2021-04-23 | 拉扎斯网络科技(上海)有限公司 | Sound testing method and device, electronic equipment and computer readable storage medium |
CN111221739A (en) * | 2020-01-10 | 2020-06-02 | 中国建设银行股份有限公司 | Service testing method, device and system |
CN111597020A (en) * | 2020-04-24 | 2020-08-28 | 五八有限公司 | Application Programming Interface (API) debugging method and debugging terminal |
CN111597020B (en) * | 2020-04-24 | 2024-03-22 | 五八有限公司 | Application programming interface API debugging method and debugging terminal |
CN111625459A (en) * | 2020-05-27 | 2020-09-04 | 平安普惠企业管理有限公司 | Application program testing method and device, computer equipment and storage medium |
CN112000579B (en) * | 2020-08-26 | 2024-03-19 | 上海移远通信技术股份有限公司 | Software interface testing method, system, equipment and medium |
CN112000579A (en) * | 2020-08-26 | 2020-11-27 | 上海移远通信技术股份有限公司 | Software interface testing method, system, equipment and medium |
CN113567797B (en) * | 2021-09-27 | 2022-02-22 | 北京全路通信信号研究设计院集团有限公司 | Design method and system suitable for track circuit product performance test case |
CN113567797A (en) * | 2021-09-27 | 2021-10-29 | 北京全路通信信号研究设计院集团有限公司 | Design method and system suitable for track circuit product performance test case |
CN115695092A (en) * | 2022-10-31 | 2023-02-03 | 重庆长安汽车股份有限公司 | Internet vehicle data processing method and device and electronic equipment |
CN115695092B (en) * | 2022-10-31 | 2024-05-03 | 重庆长安汽车股份有限公司 | Internet-of-things data processing method and device and electronic equipment |
CN116089199A (en) * | 2023-03-30 | 2023-05-09 | 湖南华自信息技术有限公司 | IO port testing method and server |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110347604A (en) | Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing | |
US20210037097A1 (en) | Cloud data storage location monitoring | |
US20220255916A1 (en) | Methods and apparatus to attest objects in edge computing environments | |
US11888858B2 (en) | Calculus for trust in edge computing and named function networks | |
CN109446071A (en) | Interface test method, interface test device, electronic equipment and storage medium | |
TW202307686A (en) | The internet of things | |
US8868786B1 (en) | Apparatus, systems and methods for transformation services | |
CN110442608A (en) | Information processing method, device, electronic equipment, medium and system | |
CN109460223A (en) | A kind of API gateway management system and its method | |
CN112634047B (en) | Foreign exchange transaction simulation test method and device, computer equipment and storage medium | |
CN110430100A (en) | Network connectivty detection method and device | |
CN103078759B (en) | The management method and device of calculate node, system | |
CN109218368A (en) | Realize method, apparatus, electronic equipment and the readable medium of Http reverse proxy | |
CN113268336B (en) | Service acquisition method, device, equipment and readable medium | |
CN113505520A (en) | Method, device and system for supporting heterogeneous federated learning | |
CN110430257A (en) | Information processing method, device, system and readable storage medium storing program for executing | |
CN110149363A (en) | A kind of information push method, device and storage medium | |
CN109815105A (en) | Applied program testing method and device based on Btrace | |
US20220358240A1 (en) | Adaptive data privacy platform | |
CN110188159A (en) | Collage-credit data cut-in method, device, equipment and computer readable storage medium | |
CN113726890A (en) | Block chain data service-oriented federal prediction method and system | |
CN116056126A (en) | Simulation test method, simulation test device, computer equipment and computer readable storage medium | |
CN109831355A (en) | Test method, test device and medium | |
CN103152216B (en) | The method of testing of system and device in a kind of the Internet | |
US20240046147A1 (en) | Systems and methods for administrating a federated learning network |
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 |