CN110177006A - Node test method and device based on interface prediction model - Google Patents
Node test method and device based on interface prediction model Download PDFInfo
- Publication number
- CN110177006A CN110177006A CN201910303832.3A CN201910303832A CN110177006A CN 110177006 A CN110177006 A CN 110177006A CN 201910303832 A CN201910303832 A CN 201910303832A CN 110177006 A CN110177006 A CN 110177006A
- Authority
- CN
- China
- Prior art keywords
- interface
- node
- test
- input data
- prediction model
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
- H04L41/145—Network analysis or design involving simulating, designing, planning or modelling of a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
- Debugging And Monitoring (AREA)
Abstract
This disclosure relates to artificial intelligence field, specifically disclose a kind of node test method and device based on interface prediction model, it include: the test case for obtaining input, the test case includes node identification corresponding to node to be tested and the input data in the node to be tested;The input data and the node identification are input in interface prediction model, the interface for needing to call for the execution test case at the test node is determined by interface prediction model prediction;The interface determined by calling, to return to the target data for corresponding to the input data by the interface;The test result of the test case is obtained according to the target data and for the anticipatory data of test case setting.Improve the efficiency of node test.
Description
Technical field
This disclosure relates to artificial intelligence field, in particular to a kind of node test method and device.
Background technique
Before formal operation flow is online, need to test each node in process.But for each
Data at node move towards complicated operation flow, for tester, need to be very familiar in operation flow and respectively save
The data trend of point, i.e., the interface called required for each node on stream, to be surveyed when carrying out the test of operation flow
Examination personnel need according to the processing logic being deployed at node, i.e. the interface tune according to corresponding to each interface being deployed at node
The test of each node in the operation flow is completed in the selection that institute's calling interface is carried out with condition.
So cannot automated if tester is unfamiliar with the processing logic at each node of operation flow
The test of operation flow is carried out on test platform, therefore node test method in the prior art has the requirement to tester
Higher and low testing efficiency problem.
Summary of the invention
In order to solve the problems, such as present in the relevant technologies, present disclose provides a kind of node test method and devices.
In a first aspect, a kind of node test method based on interface prediction model, comprising:
The test case of input is obtained, the test case includes node identification corresponding to node to be tested and described
Input data in node to be tested;
The input data and the node identification are input in interface prediction model, the interface prediction model is passed through
Prediction determines the interface for needing to call to execute the test case at the test node;
The interface determined by calling, to return to the target data for corresponding to the input data by the interface;
The test of the test case is obtained according to the target data and for the anticipatory data of test case setting
As a result.
Second aspect, a kind of node test device based on interface prediction model, comprising:
Module is obtained, is configured as: obtaining the test case of input, the test case includes corresponding to node to be tested
Node identification and the input data in the node to be tested;
Interface determining module, is configured as: the input data and the node identification are input to interface prediction model
In, determine that the test case is executed at the test node to be needed to call by interface prediction model prediction
Interface;
Interface calling module, is configured as: the interface determined by calling, and corresponds to institute to return by the interface
State the target data of input data;
Test result obtains module, is configured as: according to the target data and being the expection of test case setting
Data obtain the test result of the test case.
In one embodiment, interface determining module includes:
First determination unit, is configured as: in the interface prediction model, being determined according to the node identification described
For several interfaces of calling at test node;
Construction unit is configured as: constructing the feature vector of the input data;
Classification predicting unit, is configured as: carrying out classification prediction according to described eigenvector, obtain described eigenvector pair
It should be in the probability of each several interfaces;
Second determination unit, is configured as: the probability of each several interfaces of traversal connects so that maximum probability value is corresponding
Mouth is determined as at the test node interface for needing to call to execute the test case.
In one embodiment, the node test device based on interface prediction model further include:
Sample acquisition module is configured as: obtain several test sample use-cases and for each test sample use-case into
Interface label determined by line flag;
Extraction module is configured as: being extracted from each test sample use-case to be measured in the test sample use-case
Try the corresponding node identification of node and the sample input data in the node to be tested;
Training module is configured as: by the node identification of node to be tested corresponding to each test sample use-case,
Corresponding sample input data and corresponding interface label carry out the training of the interface prediction model, until the interface is predicted
The precision of prediction of model reaches the precision of setting.
In one embodiment, the node test device based on interface prediction model further include:
Node is configured to file acquisition module, is configured as: institute is retrieved as from configuration file according to the node identification
The node profile that node to be tested is configured is stated, the configuration file is according to the data at node each in operation flow
Move towards what configuration obtained;
Second interface determining module, is configured as: according to the interface in the input data and the node profile
Condition determines the interface for needing to call to execute the test case at the test node.
In one embodiment, second interface determining module includes:
Keyword extraction unit, is configured as: several keywords and each key are extracted from the input data
The value of word;
Searching unit is configured as: several keywords and each keyword are searched in the node profile
The interface condition that is met of value;
Second interface determination unit, is configured as: being determined as with interface corresponding to found interface condition described
The interface for needing to call to execute the test case at node to be tested.
In one embodiment, interface calling module includes:
Assignment unit, is configured as: being the parameter assignment in the interface according to the input data;
Request initiating cell is configured as: the interface by the way that assignment is completed initiates request of data;
Receiving unit is configured as: receiving the target data returned by the interface corresponding to the input data.
In one embodiment, the node test device based on interface prediction model further include:
Test record generation module, is configured as: according to input data corresponding to the test case, node to be tested
Node identification, identified interface, the target data and corresponding test result generate the test of the test case
Record;
Test report generation module is configured as: being stored by the test record of the test case and is formed test report.
The third aspect, a kind of node test device based on interface prediction model, comprising:
Processor;And
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is by the processing
Device realizes method as described above when executing.
A kind of fourth aspect, computer readable storage medium, is stored thereon with computer program, which is characterized in that described
Method as described above is realized when computer program is executed by processor.
In the technical solution of the disclosure, determined based on constructed interface prediction model at each node to be tested
The interface that calls is needed according to input data, independent of tester according to the processing disposed at each node grasped
Logic carries out judgement determination, even the tester being unfamiliar at node to be tested can also carry out the test of node, greatly
Width improves the efficiency of node test, reduces the workload of tester.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited
It is open.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention
Example, and in specification together principle for explaining the present invention.
Fig. 1 is the schematic diagram of the implementation environment according to involved in the disclosure;
Fig. 2 is a kind of block diagram of server shown according to an exemplary embodiment;
Fig. 3 is a kind of process of node test method based on interface prediction model shown according to an exemplary embodiment
Figure;
Fig. 4 is the flow chart of the step S130 of Fig. 3 corresponding embodiment in one embodiment;
Fig. 5 be Fig. 3 corresponding embodiment step S130 before the flow chart of step in one embodiment;
Fig. 6 is a kind of flow chart of the node test method shown according to another exemplary embodiment;
Fig. 7 is the flow chart of the step S330 of Fig. 6 corresponding embodiment in one embodiment;
Fig. 8 is the flow chart of the step S150 of Fig. 3 corresponding embodiment in one embodiment;
Fig. 9 be Fig. 3 corresponding embodiment step S170 after the flow chart of step in one embodiment;
Figure 10 is a kind of frame of node test device based on interface prediction model shown according to an exemplary embodiment
Figure;
Figure 11 is a kind of node test device based on interface prediction model shown according to another exemplary embodiment
Block diagram.
Through the above attached drawings, it has been shown that the specific embodiment of the present invention will be hereinafter described in more detail, these attached drawings
It is not intended to limit the scope of the inventive concept in any manner with verbal description, but is by referring to specific embodiments
Those skilled in the art illustrate idea of the invention.
Specific embodiment
Here will the description is performed on the exemplary embodiment in detail, the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended
The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Fig. 1 is the schematic diagram of the implementation environment according to involved in the disclosure.The implementation environment includes: terminal 100 and test
Server 300.
Wherein terminal 100 can be smart phone, tablet computer, laptop, desktop computer etc. and can take with test
Business device 300 establishes the communication equipment of communication connection.Testing service device 300 can be independent server, be also possible to server
Cluster, Cloud Server etc., herein without specifically limiting.
Based on the communication connection that terminal 100 and testing service device 300 are established, tester can input in terminal 100
Test case, and testing service device 300 receives the test case transmitted of terminal 100, and according to the technical solution of the disclosure into
Row node test.Interrelational form between terminal 100 and testing service device 300, network associate mode and/or association including hardware
View, and the data correlation mode come and gone therebetween.
It should be noted that node test method of the disclosure based on interface prediction model, be not limited in testing service device
Corresponding processing logic is disposed in 300, is also possible to the processing logic being deployed in other machines.For example, being calculated having
The processing logic etc. to node test is disposed in the terminal device of ability.
Fig. 2 is a kind of block diagram of server 200 shown according to an exemplary embodiment.Device with this hardware configuration
Can be deployed in implementation environment shown in FIG. 1, as testing service device 300 with execute the disclosure based on interface prediction model
Node test method.
It should be noted that the server is the example for adapting to the disclosure, it must not believe that there is provided to this
Any restrictions of open use scope.The server can not be construed to need to rely on or must have shown in Figure 2
One or more component in illustrative server 200.
The hardware configuration of the server can generate biggish difference due to the difference of configuration or performance, as shown in Fig. 2, clothes
Business device 200 includes: power supply 210, interface 230, at least a memory 250 and at least central processing unit (CPU, a Central
Processing Units)270。
Wherein, power supply 210 is used to provide operating voltage for each hardware device on server 200.
Interface 230 includes an at least wired or wireless network interface 231, at least a string and translation interface 233, at least one defeated
Enter output interface 235 and at least USB interface 237 etc., is used for and external device communication.
The carrier that memory 250 is stored as resource, can be read-only memory, random access memory, disk or CD
Deng the resource stored thereon includes operating system 251, application program 253 and data 255 etc., and storage mode can be of short duration
It stores or permanently stores.Wherein, operating system 251 is for managing and each hardware device in control server 200 and answering
It can be Windows with program 253 to realize calculating and processing of the central processing unit 270 to mass data 255
ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..Application program 253 be based on operating system 251 it
The upper computer program for completing at least one particular job, may include an at least module (being not shown in Fig. 2), each module
The series of computation machine readable instruction to server 200 can be separately included.Data 255 can be stored in disk
Program code etc..
Central processing unit 270 may include the processor of one or more or more, and be set as through bus and memory
250 communications, for the mass data 255 in operation and processing memory 250.
As described in detail above, the server 200 for being applicable in the disclosure will read memory by central processing unit 270
The form of the series of computation machine readable instruction stored in 250 completes node test method.
In the exemplary embodiment, server 200 can be by one or more application specific integrated circuit
At (Application Specific Integrated Circuit, abbreviation ASIC), digital signal processor, digital signal
Manage equipment, programmable logic device, field programmable gate array, controller, microcontroller, microprocessor or other electronic components
It realizes, for executing following methods.Therefore, realize that the present invention is not limited to any specific hardware circuit, software and the two
Combination.
Fig. 3 is a kind of process of node test method based on interface prediction model shown according to an exemplary embodiment
Figure.The node test method based on interface prediction model can be executed by testing service device 300, may comprise steps of:
Step S110, obtains the test case of input, and the test case includes node mark corresponding to node to be tested
Knowledge and the input data in the node to be tested.
Operation flow is to be formed by several according to the combination of nodes that the sequence of setting is arranged.To, the processing of business, i.e.,
It is to execute the processing logic for being deployed in node in each node according to sequence set in operation flow.Such as the stream in loan
Cheng Zhong, including sequentially arrange reservation, insure, tie up card and video and interview four nodes, such as the stream in a certain parts machining
Cheng Zhong, including raw material detection, vehicle, the heat treatment, five mill, finished product detection nodes sequentially arranged.
And before operation flow is formally online, it needs to test entire operation flow, the test carried out is to be based on
Each node tested and is carried out on the basis of (node test referred in the disclosure), so that verifying is at node
Whether processing logic is consistent with expected processing logic.
At each of operation flow node, the processing logic for being deployed in node provides several at the node
For the interface of calling, in other words, different data trends is provided at node.It is corresponding, it is deployed in the place at node
It is defined in reason logic and calls each interface requirements to be met, the i.e. corresponding interface condition of the interface.Wherein connect to be each
Interface condition set by mouthful is set to be limited to the input data of the interface.
For example, it is mentioned above to tie up this node of card, correspondence provides 4 interfaces for calling: A system
Interface A provided by uniting, interface B provided by B system, interface D provided by interface C and d system provided by C system,
In, the interface condition of calling interface A is A1 at the node, and the interface condition of calling interface B is B1, the interface of calling interface C
Condition is C1, and the interface condition of calling interface D is D1.To if a certain input data at the node meets jiont strip
Part C1, then according to the input data inputted, the calling interface C at the node.
At each node, it is deployed in the processing logic of node and defines the type of the input data at the node.Its
The type of middle input data can be distinguished according to keyword.And it is mentioned above to interface condition be according to keyword and
The value of keyword is defined.Such as tie up this node of card mentioned above, it is desirable that input address name, identification card number with
And address, if the input data of a user are as follows: address name Li Dong, identification card number 511234********1024, firmly
Location is Sichuan Province, ×× area, Chengdu ×× street.Then in the input data of the user, address name, identification card number, address are equal
For keyword, " Li Dong " is the value of this keyword of address name, and " 511234********1024 " is this pass of identification card number
The value of key word, " Sichuan Province, ×× area, Chengdu ×× street " are the value of this keyword of address.
Interface, that is, interface function is the function that some module is supplied to other modules.Such as Bohai Sea silver mentioned above
Interface A provided by capable system then can get a certain user by calling interface A from database corresponding to A system
Data, such as credit record data.
Test case (Test Case) is the one group of data worked out for some special objective, wherein each test case
In include test input, test object and anticipatory data, to test whether test object meets the requirements.In the skill of the disclosure
In art scheme, test object is the interface for calling being deployed at node to be tested, and test input is to be measured at this
Try the input data at node, it is contemplated that data are the theoretical processing logic at the node to be tested, at the test node
Determine the corresponding interface for calling of the input data, and calling interface, the number returned by interface according to input data
According to.
It is to carry out target data and anticipatory data when whether the test result for judging a test case is that test passes through
Compare, on the contrary if the two is consistent, the test result of the testing case is that test passes through, then do not pass through to test.
It is to be tested based on the node in operation flow, then every in operation flow in the technical solution of the disclosure
It is test object that one node, which is provided for the interface of calling, and before carrying out node test, each node is to be measured
Try node.
Test case is worked out according to node to be tested.And it is right by use-case to be tested in test case
The node identification answered identifies node to be tested.Wherein node identification is used for unique identification node, can be and is configured by node
Nodename, be also possible to the node serial number that the system where operation flow is configured by each node, herein without tool
Body limits.
The input data and the node identification are input in interface prediction model by step S130, are connect by described
Mouth prediction model prediction determines the interface for needing to call to execute the test case at the test node.
Interface prediction model is widely mutual by several neurons to carry out interface prediction to be called at each node
Connection is formed by complicated neural network model.Wherein interface prediction model can be Recognition with Recurrent Neural Network model, convolution mind
Through network model etc., other pass through can be used for the pre- colour examining neural network model of interface after training, herein without specifically limiting
It is fixed.
In one embodiment, as shown in figure 4, step S130 includes:
Step S131 can at the test node according to node identification determination in the interface prediction model
For several interfaces of calling.
In the technical solution of the disclosure, interface provided in operation flow is divided according to node, that is, is limited
The interface at each node for calling is determined.Therefore, in order to reduce interface prediction model during carrying out classification prediction
Operand, determine that operation flow provides several interfaces for calling at the node previously according to node identification.To,
Classification prediction is carried out in identified several interfaces in step S133.
Step S132 constructs the feature vector of the input data.
The feature vector of input data is the vector obtained according to constructed by the feature of input data.In the technology of the disclosure
In scheme, the feature of input data is embodied by the value of keyword and each keyword in input data.
Step S133 carries out classification prediction according to described eigenvector, obtains described eigenvector corresponding to each described
The probability of several interfaces.
Step S134 is traversed the probability of each several interfaces, is determined as with the corresponding interface of maximum probability value in institute
State the interface for needing to call to execute the test case at test node.
I.e. prediction obtain feature vector correspond to determine in several interfaces after the probability of each interface, most with probability
It is worth corresponding interface greatly and is determined as the interface for needing to call for implementation of test cases at the test node.
Step S150, calls the identified interface, corresponds to the input data to return by the interface
Target data.
Identical interface, it is corresponding to pass through the data for calling the interface to be returned not necessarily phase for different input datas
It together, in other words, is depending on the input data in test case by the target data for calling the interface to be returned.I.e. true
After the interface for needing to call calmly, needs to carry out interface calling according to the input data in the test case, obtain corresponding to defeated
Enter the target data of data.
In one embodiment, as shown in figure 8, step S150 includes:
Step S151 is the parameter assignment in the interface according to the input data.
Step S152, the interface by the way that assignment is completed initiate request of data.
Step S153 receives the target data returned by the interface corresponding to the input data.
As described above, interface is interface function.In a specific interface, the needs when calling the interface are defined
Carry out the parameter of assignment.Wherein the parameter in interface is corresponding with the keyword in input data, i.e., the ginseng in interface
Number corresponds to the keyword in input data.It is the parameter assignment in interface conducted in it, i.e., is mentioned from input data
The value for taking keyword corresponding to each parameter, the value by keyword are corresponding parameter assignment.For example, in a certain section
In an interface provided by point, defined parameter includes identification card number, name, gender, educational background, income, and a user is in the section
Input data at point includes: that identification card number is 511234********1024, and name Li Dong, gender is male, and educational background is this
Section takes in as 20w/, and occupation is engineer, then when according to the input data of the user being the parameter assignment in the node,
The identification card number that the user is extracted from input data is this parameter assignment of identification card number, is similarly carried out as name, gender,
It goes through, take in these parameter assignments.
To after the assignment for completing each parameter in interface, that is, call the interface, i.e. initiation request of data, pass through institute
The interface of the calling target data ready to receive to corresponding to input data.
Step S170 according to the target data and obtains the test for the anticipatory data of test case setting and uses
The test result of example.
The test result of test case includes the result that test passes through and the unsanctioned result of test.Wherein, work as number of targets
According to it is identical as anticipatory data when, then the test result of the test case is that test passes through, whereas if different, then the test is used
The test result of example test is that test does not pass through.
Conventionally, as the processing logic for needing tester to be familiar with being disposed at node just can be carried out node
Test, i.e., it is known at each node provided by interface condition corresponding to interface and each interface for calling, from
And determine the interface for needing to call according to the input data of the test case at the node, it is just able to achieve the test of the node,
It carries out interface to the judgement of interface dependent on tester to determine, the heavy workload of one side tester, and test process
Requirement to tester is high, that is, the tester for being unfamiliar with the processing logic disposed at node has no idea to carry out node
Test;On the other hand, the determination of interface is carried out based on tester, speed is slow, slow so as to cause the rate of interface testing.
And in the technical solution of the disclosure, it is determined based on constructed interface prediction model in each node to be tested
The interface for needing to call according to input data at place, is not based on tester and carries out judgement determination, even being unfamiliar with to be tested
Tester at node can also carry out the test of node, moreover, the efficiency of node test greatly improved, reduce test
The workload of personnel.
In one embodiment, as shown in figure 5, before step S130, the method also includes:
Step S210 obtains several test sample use-cases and is marked for each test sample use-case identified
Interface label.
It is corresponding to extract node to be tested in the test sample use-case from each test sample use-case by step S230
Node identification and the sample input data in the node to be tested.
Step S250 passes through node identification, the corresponding sample of node to be tested corresponding to each test sample use-case
This input data and corresponding interface label carry out the training of the interface prediction model, until the interface prediction model is pre-
Survey the precision that precision reaches setting.
In order to guarantee that interface prediction model predicts the accuracy of determining interface, in interface prediction model in step S130
Before the prediction of progress interface determines, interface prediction model is trained, the precision until reaching setting.
For being actually used in the test case of progress node prediction, for carrying out the training institute of interface prediction model
It include the sample input data at node, node identification corresponding to node in test sample use-case, without including corresponding to
In the target data of sample input data.
Identified interface label is marked for test sample use-case, this is deployed according to the combination of sample input data
Interface condition set by node corresponding to test sample use-case carries out interface determined by artificial judgement.
The training of the interface prediction model carried out is i.e. are as follows: by the sample input data in test sample use-case, node mark
Knowledge is input in interface prediction model, carries out feature vector building by interface prediction model, and predict to obtain in node identification
The interface of the sample input data is directed at indicated node, if the interface predicted is carried out with to the test case
Interface label determined by marking is inconsistent, then adjusts the parameter of interface prediction model, until interface prediction model measures in advance
The interface arrived is consistent with corresponding interface label.Above step is repeated, using next test sample use-case and is the test case institute
The interface label that label obtains continues the training of interface prediction model.
After training a period of time, the precision of prediction of interface prediction model is tested, if reaching the pre- of setting
Precision is surveyed, then terminates the training of interface prediction model;If the precision of prediction of not up to setting, continues interface prediction model
Training.
The accuracy test of the interface prediction model carried out, i.e., using several test sample test cases and according to each survey
The interface label of the marked acquisition of this test case of sample is tested, and the sample in each test sample test case is inputted
Data and node identification are input in the interface prediction model after training, and interface prediction model is predicted to obtain test sample test
The interface of use-case.After obtaining the interface of test sample test case based on interface prediction model, according to for each test sample
Test case marks acquisition interface that the precision of prediction of interface prediction model is calculated, if the precision of prediction being calculated
Reach the precision of prediction of setting, then terminates the training of interface prediction model;If not up to, continuing interface prediction model
Training, until reaching the precision of prediction of setting.
In one embodiment, as shown in fig. 6, after step S110, the method also includes:
Step S310 is retrieved as the node that the node to be tested is configured according to the node identification from configuration file
Configuration file, the configuration file are to move towards configuration according to the data at node each in operation flow to obtain.
Step S330 is determined according to the interface condition in the input data and the node profile in the test
The interface for needing to call to execute the test case at node.
In this embodiment, another method that interface is determined according to the input data in test case is provided.It is i.e. pre-
Configuration is first generated according to the data trend at node each in operation flow (depending on the interface condition configured at node)
File.In configuration file, by the node identification of each node and corresponding node profile associated storage.So as to root
Node profile corresponding to the node is got according to the node identification correspondence of node to be tested.
The interface condition that each interface is called at node is configured in node profile, thus, it is getting
After input data in test case, input data is matched in node profile, to determine the input data institute
The interface condition of satisfaction, thus, the corresponding interface of identified interface condition is determined as at the test node to execute and being somebody's turn to do
Test case and the interface for needing to call.
To obtain configuration file by moving towards configuration previously according to the data at node each in operation flow, saved
When point test, tester is not needed according to the corresponding interface of processing logic judgment input data at node to be tested, is being saved
In point test process, determines that input data is corresponding according to node profile corresponding to configuration file interior joint and need to adjust
Interface reduces the workload of tester, improves testing efficiency.
In one embodiment, as shown in fig. 7, step S330 includes:
Step S331 extracts the value of several keywords and each keyword from the input data.
Step S332, the value that several keywords and each keyword are searched in the node profile are met
Interface condition.
Step S333 is determined as at the node to be tested to execute with interface corresponding to found interface condition
The test case and the interface for needing to call.
In step S332, i.e., according to the value of the keyword and each extracted keyword that are extracted from input data come really
Surely meet which of node profile interface condition, thus, interface corresponding to identified interface condition is determined
To be implementation of test cases at node to be tested and the interface for needing to call.
In one embodiment, as shown in figure 9, after step S170, further includes:
Step S410, according to input data corresponding to the test case, node to be tested node identification, determine
Interface, the target data and corresponding test result generate the test record of the test case.
Step S430 is stored by the test record of the test case and is formed test report.
It include test record corresponding to several test cases in test report.By being directed to each test in test report
Use-case test record generated is available to the test case acquired data during the test, consequently facilitating test
Personnel consult and audit.And each section in test process and operation flow is carried out according to test record convenient for tester
The interface capability progress analysis and assessment of point, node.
In a particular embodiment, it is sent to test report is corresponding at tester, thus, allow tester according to survey
The test result in the progress and test process of test is recognized in examination report.
Following is embodiment of the present disclosure, can be used for executing the above-mentioned testing service device 300 of the disclosure executes based on
The node test embodiment of the method for interface prediction model.For those undisclosed details in the apparatus embodiments, this is please referred to
Open node test embodiment of the method.
Figure 10 is a kind of frame of node test device based on interface prediction model shown according to an exemplary embodiment
Figure, the node test device can be used in the testing service device 300 of implementation environment shown in Fig. 1, and it is real to execute any of the above method
Apply all or part of step of node test method shown in example.As shown in Figure 10, which includes but unlimited
In: module 510 is obtained, interface determining module 530, interface calling module 550 and test result obtain module 570, in which:
Module 510 is obtained, is configured as: obtaining the test case of input, the test case includes node institute to be tested
Corresponding node identification and the input data in the node to be tested.
Interface determining module 530, is configured as: the input data and the node identification are input to interface prediction mould
In type, is determined by interface prediction model prediction and need to call to execute the test case at the test node
Interface;
Interface calling module 550, is configured as: the interface determined by calling is corresponded to being returned by the interface
In the target data of the input data;
Test result obtains module 570, is configured as: according to the target data and being the pre- of test case setting
Issue evidence obtains the test result of the test case.
In one embodiment, interface determining module 530 includes:
First determination unit, is configured as: in the interface prediction model, being determined according to the node identification described
For several interfaces of calling at test node;
Construction unit is configured as: constructing the feature vector of the input data;
Classification predicting unit, is configured as: carrying out classification prediction according to described eigenvector, obtain described eigenvector pair
It should be in the probability of each several interfaces;
Second determination unit, is configured as: the probability of each several interfaces of traversal connects so that maximum probability value is corresponding
Mouth is determined as at the test node interface for needing to call to execute the test case.
In one embodiment, the node test device based on interface prediction model further include:
Sample acquisition module is configured as: obtain several test sample use-cases and for each test sample use-case into
Interface label determined by line flag;
Extraction module is configured as: being extracted from each test sample use-case to be measured in the test sample use-case
Try the corresponding node identification of node and the sample input data in the node to be tested;
Training module is configured as: by the node identification of node to be tested corresponding to each test sample use-case,
Corresponding sample input data and corresponding interface label carry out the training of the interface prediction model, until the interface is predicted
The precision of prediction of model reaches the precision of setting.
In one embodiment, the node test device based on interface prediction model further include:
Node is configured to file acquisition module, is configured as: institute is retrieved as from configuration file according to the node identification
The node profile that node to be tested is configured is stated, the configuration file is according to the data at node each in operation flow
Move towards what configuration obtained;
Second interface determining module, is configured as: according to the interface in the input data and the node profile
Condition determines the interface for needing to call to execute the test case at the test node.
In one embodiment, second interface determining module includes:
Keyword extraction unit, is configured as: several keywords and each key are extracted from the input data
The value of word;
Searching unit is configured as: several keywords and each keyword are searched in the node profile
The interface condition that is met of value;
Second interface determination unit, is configured as: being determined as with interface corresponding to found interface condition described
The interface for needing to call to execute the test case at node to be tested.
In one embodiment, interface calling module 550 includes:
Assignment unit, is configured as: being the parameter assignment in the interface according to the input data;
Request initiating cell is configured as: the interface by the way that assignment is completed initiates request of data;
Receiving unit is configured as: receiving the target data returned by the interface corresponding to the input data.
In one embodiment, the node test device based on interface prediction model further include:
Test record generation module, is configured as: according to input data corresponding to the test case, node to be tested
Node identification, identified interface, the target data and corresponding test result generate the test of the test case
Record;
Test report generation module is configured as: being stored by the test record of the test case and is formed test report.
The function of modules and the realization process of effect are specifically detailed in right in above-mentioned node test method in above-mentioned apparatus
The realization process of step is answered, details are not described herein.
It is appreciated that these modules can by hardware, software, or a combination of both realize.When realizing in hardware
When, these modules may be embodied as one or more hardware modules, such as one or more specific integrated circuits.When with software side
When formula is realized, these modules may be embodied as the one or more computer programs executed on the one or more processors, example
The program being stored in as performed by the central processing unit 270 of Fig. 2 in memory 250.
Optionally, the disclosure also provides a kind of node test device based on interface prediction model, which can dispose
In testing service device 300 shown in FIG. 1, execute above method embodiment in it is any shown in node test method whole or
Person's part steps.As shown in figure 11, node test device 1000 includes:
Processor 1001;And
Memory 1002 is stored with computer-readable instruction on memory 1002, and computer-readable instruction is by processor
1001 methods that any one of above method implementation is realized when executing.
Wherein, the method in any of the above embodiment is realized when executable instruction is executed by processor 1001.It can wherein hold
Row instruction is such as computer-readable instruction, and when processor 1001 executes, processor between memory by being connect
Communication line/bus 1003 reads the computer-readable instruction being stored in memory.
The processor of device in the embodiment executes the concrete mode of operation in the related node test method
It is described in detail in embodiment, no detailed explanation will be given here.
In the exemplary embodiment, a kind of computer readable storage medium is additionally provided, computer program is stored thereon with,
The method in either method embodiment as above is realized when computer program is executed by processor.Wherein computer readable storage medium
Memory 250 for example including computer program, above-metioned instruction can be executed by the central processing unit 270 of server 200 to realize
Above-mentioned method.
Processor in the embodiment executes the concrete mode of operation in relation to being somebody's turn to do the section based on interface prediction model
Detailed description is performed in the embodiment of point test method, no detailed explanation will be given here.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and change can executed without departing from the scope.The scope of the present invention is limited only by the attached claims.
Claims (10)
1. a kind of node test method based on interface prediction model characterized by comprising
The test case of input is obtained, the test case includes node identification corresponding to node to be tested and described to be measured
Try the input data in node;
The input data and the node identification are input in interface prediction model, predicted by the interface prediction model
Determine the interface for needing to call to execute the test case at the test node;
The interface determined by calling, to return to the target data for corresponding to the input data by the interface;
The test result of the test case is obtained according to the target data and for the anticipatory data of test case setting.
2. the method according to claim 1, wherein described input the input data and the node identification
Into interface prediction model, is determined by interface prediction model prediction and used at the test node to execute the test
Example and need the interface that calls, comprising:
In the interface prediction model, if being determined at the test node according to the node identification for the stem grafting of calling
Mouthful;
Construct the feature vector of the input data;
Classification prediction is carried out according to described eigenvector, obtains described eigenvector corresponding to the general of each several interfaces
Rate;
The probability for traversing each several interfaces, be determined as at the test node with the corresponding interface of maximum probability value be
The interface for executing the test case and needing to call.
3. the method according to claim 1, wherein described input the input data and the node identification
Into interface prediction model, is determined by interface prediction model prediction and used at the test node to execute the test
Example and before needing the interface that calls, the method also includes:
It obtains several test sample use-cases and identified interface label is marked for each test sample use-case;
Extracted from each test sample use-case the corresponding node identification of node to be tested in the test sample use-case and
Sample input data in the node to be tested;
Pass through the node identification of node to be tested, corresponding sample input data and institute corresponding to each test sample use-case
Corresponding interface label carries out the training of the interface prediction model, until the precision of prediction of the interface prediction model reaches setting
Precision.
4. the method according to claim 1, wherein the test case for obtaining input, the test case
Including node identification corresponding to node to be tested and after the input data in the node to be tested, the method is also wrapped
It includes:
The node profile that the node to be tested is configured is retrieved as from configuration file according to the node identification, it is described
Configuration file is to move towards configuration according to the data at node each in operation flow to obtain;
It is determined at the test node according to the interface condition in the input data and the node profile as execution
The test case and the interface for needing to call.
5. according to the method described in claim 4, it is characterized in that, described configure text according to the input data and the node
Interface condition in part determines the interface for needing to call to execute the test case at the test node, comprising:
The value of several keywords and each keyword is extracted from the input data;
The interface condition that the value of several keywords and each keyword is met is searched in the node profile;
It is determined as at the node to be tested with interface corresponding to found interface condition to execute the test case
And the interface for needing to call.
6. the method according to claim 1, wherein the interface determined by the calling, described to pass through
Interface returns to the target data for corresponding to the input data, comprising:
According to the parameter assignment that the input data is in the interface;
The interface by the way that assignment is completed initiates request of data;
Receive the target data returned by the interface corresponding to the input data.
7. the method according to claim 1, wherein it is described according to the target data and be the test case
The anticipatory data of setting obtains after the test result of the test case, further includes:
According to input data corresponding to the test case, the node identification of node to be tested, identified interface, the mesh
Mark data and corresponding test result generate the test record of the test case;
It is stored by the test record of the test case and forms test report.
8. a kind of node test device based on interface prediction model characterized by comprising
Module is obtained, is configured as: obtaining the test case of input, the test case includes section corresponding to node to be tested
Point identification and the input data in the node to be tested;
Interface determining module, is configured as: the input data and the node identification being input in interface prediction model, led to
It crosses the interface prediction model prediction and determines the interface for needing to call to execute the test case at the test node;
Interface calling module, is configured as: the interface determined by calling, to be returned by the interface corresponding to described defeated
Enter the target data of data;
Test result obtains module, is configured as: according to the target data and being the anticipatory data of test case setting
Obtain the test result of the test case.
9. a kind of node test device based on interface prediction model characterized by comprising
Processor;And
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is held by the processor
The method as described in any one of claims 1 to 7 is realized when row.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The method as described in any one of claims 1 to 7 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910303832.3A CN110177006B (en) | 2019-04-16 | 2019-04-16 | Node testing method and device based on interface prediction model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910303832.3A CN110177006B (en) | 2019-04-16 | 2019-04-16 | Node testing method and device based on interface prediction model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110177006A true CN110177006A (en) | 2019-08-27 |
CN110177006B CN110177006B (en) | 2022-12-30 |
Family
ID=67689607
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910303832.3A Active CN110177006B (en) | 2019-04-16 | 2019-04-16 | Node testing method and device based on interface prediction model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110177006B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112631930A (en) * | 2020-12-30 | 2021-04-09 | 平安证券股份有限公司 | Dynamic system testing method and related device |
CN113535582A (en) * | 2021-07-30 | 2021-10-22 | 平安普惠企业管理有限公司 | Interface testing method, device, equipment and computer readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101330329A (en) * | 2008-07-29 | 2008-12-24 | 中兴通讯股份有限公司 | Self-adapting testing method and system |
CN104077218A (en) * | 2013-03-29 | 2014-10-01 | 百度在线网络技术(北京)有限公司 | Test method and device of MapReduce distributed system |
US20180046926A1 (en) * | 2014-05-23 | 2018-02-15 | DataRobot, Inc. | Systems for time-series predictive data analytics, and related methods and apparatus |
CN109491922A (en) * | 2018-12-13 | 2019-03-19 | 北京轩宇信息技术有限公司 | One kind being based on model-driven test method and apparatus |
-
2019
- 2019-04-16 CN CN201910303832.3A patent/CN110177006B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101330329A (en) * | 2008-07-29 | 2008-12-24 | 中兴通讯股份有限公司 | Self-adapting testing method and system |
CN104077218A (en) * | 2013-03-29 | 2014-10-01 | 百度在线网络技术(北京)有限公司 | Test method and device of MapReduce distributed system |
US20180046926A1 (en) * | 2014-05-23 | 2018-02-15 | DataRobot, Inc. | Systems for time-series predictive data analytics, and related methods and apparatus |
CN109491922A (en) * | 2018-12-13 | 2019-03-19 | 北京轩宇信息技术有限公司 | One kind being based on model-driven test method and apparatus |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112631930A (en) * | 2020-12-30 | 2021-04-09 | 平安证券股份有限公司 | Dynamic system testing method and related device |
CN112631930B (en) * | 2020-12-30 | 2024-06-21 | 平安证券股份有限公司 | Dynamic system testing method and related device |
CN113535582A (en) * | 2021-07-30 | 2021-10-22 | 平安普惠企业管理有限公司 | Interface testing method, device, equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110177006B (en) | 2022-12-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109376615B (en) | Method, device and storage medium for improving prediction performance of deep learning network | |
CN104346372B (en) | Method and apparatus for assessment prediction model | |
CN112884092B (en) | AI model generation method, electronic device, and storage medium | |
CN110046706B (en) | Model generation method and device and server | |
CN110297701A (en) | Data processing operation dispatching method, device, computer equipment and storage medium | |
CN107679683B (en) | Software development progress early warning method and device | |
TW201734841A (en) | Reference test method and device for supervised learning algorithm in distributed environment | |
CN105930257B (en) | A kind of method and device of determining target detection use-case | |
CN110287332B (en) | Method and device for selecting simulation model in cloud environment | |
CN112632179B (en) | Model construction method, device, storage medium and equipment | |
CN110493812A (en) | Processing method, device, system, processor and the main control device of distribution test | |
CN112416778A (en) | Test case recommendation method and device and electronic equipment | |
CN109978261A (en) | Determine method, apparatus, readable medium and the electronic equipment of load forecasting model | |
CN113407327A (en) | Modeling task and data analysis method, device, electronic equipment and system | |
CN112906375A (en) | Text data labeling method, device, equipment and storage medium | |
CN115204536A (en) | Building equipment fault prediction method, device, equipment and storage medium | |
CN110177006A (en) | Node test method and device based on interface prediction model | |
CN116089870A (en) | Industrial equipment fault prediction method and device based on meta-learning under small sample condition | |
CN111124898B (en) | Question-answering system testing method and device, computer equipment and storage medium | |
CN112420125A (en) | Molecular attribute prediction method and device, intelligent equipment and terminal | |
CN116501979A (en) | Information recommendation method, information recommendation device, computer equipment and computer readable storage medium | |
CN111445006A (en) | Method and system for predicting number of submission times of developer codes in open source community | |
CN110083540A (en) | Interface test method and device | |
CN113628077B (en) | Method, terminal and readable storage medium for generating non-repeated questions | |
CN114356781A (en) | Software function testing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 201, room 518000, building A, No. 1, front Bay Road, Qianhai Shenzhen Guangdong Shenzhen Hong Kong cooperation zone (Qianhai business secretary) Applicant after: PING AN PUHUI ENTERPRISE MANAGEMENT Co.,Ltd. Address before: 518000 Guangdong city of Shenzhen province Qianhai Shenzhen Hong Kong cooperation zone before Bay Road No. 1 building 201 room A Applicant before: PING AN PUHUI ENTERPRISE MANAGEMENT Co.,Ltd. |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |