CN110347590A - The interface testing control method and device of operation system - Google Patents
The interface testing control method and device of operation system Download PDFInfo
- Publication number
- CN110347590A CN110347590A CN201910527419.5A CN201910527419A CN110347590A CN 110347590 A CN110347590 A CN 110347590A CN 201910527419 A CN201910527419 A CN 201910527419A CN 110347590 A CN110347590 A CN 110347590A
- Authority
- CN
- China
- Prior art keywords
- test
- node
- interface
- script
- operation system
- 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
-
- 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
Abstract
This application discloses a kind of interface testing control method and device of operation system, are related to software testing technology field.The described method includes: obtaining the Interface Flowchart of operation system by recording to the whole interface to be tested in operation system;Interface Flowchart is divided into several test nodes, and all interfaces to be tested for corresponding to same test node in Interface Flowchart are integrated into same test node, obtains test script;In the interface testing for executing the operation system according to test script, the corresponding test data of each test node and test result are obtained;If the test result for getting test node is test crash, the test command then generated according to triggering, using the test node of test crash as start node, and test script is re-executed according to the corresponding test data of start node, until completing the test of the last one test node in test script.The interface testing process of operation system is effectively simplified using method provided by the present application.
Description
Technical field
This application involves software testing technology field, in particular to the interface testing control method and dress of a kind of operation system
It sets, electronic equipment, computer readable storage medium.
Background technique
Currently, software test personnel when carrying out the interface testing of operation system, generally use automated test tool
Recording function configures the Interface Flowchart of operation system in the test script of automated test tool in order.When test foot
When this execution failure, the interface testing control that the test script executes operation system need to be reused.
And in actual operation flow, the interface testing control of operation system generally comprises the tune of hundreds and thousands of a interfaces
With according to current test method, meeting repeatedly be called certain normal interfaces, lead to the process of entire interface testing
It is very many and diverse and time-consuming and laborious.
The interface testing process for how simplifying operation system as a result, is that still have technical problem to be solved in the prior art.
It should be noted that information is only used for reinforcing the reason to background of the invention disclosed in above-mentioned background technology part
Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
Based on above-mentioned technical problem, this application provides a kind of interface testing control method and device of operation system, electricity
Sub- equipment, computer readable storage medium.
Techniques disclosed in this application scheme includes:
A kind of interface testing control method of operation system, comprising: by the whole interface to be tested in operation system
It is recorded, obtains the Interface Flowchart of the operation system;The Interface Flowchart is divided into several test nodes, and will be described
All interfaces to be tested in Interface Flowchart corresponding to same test node are integrated into the same test node, are tested
Script;In the interface testing for executing the operation system according to the test script, the corresponding test of each test node is obtained
Data and test result;If the test result for getting the test node is test crash, the survey generated according to triggering
Examination order, using the test node of test crash as start node, and according to the corresponding test data weight of the start node
The test script is newly executed, until completing the test of the last one test node in the test script.
In one exemplary embodiment, described that the Interface Flowchart is divided into several test nodes, and connect described
All interfaces to be tested for being under the jurisdiction of same test node in mouth process are integrated into the same test node, obtain test foot
This, comprising: according to the sequence of interface to be tested in the Interface Flowchart, each interface to be tested is successively initiated to call,
Generate initial testing script;It is right by increasing control logic for the interface to be tested specific in the initial testing script
The initial testing script is updated;According to the quantity of institute's partition testing node in the Interface Flowchart, obtained in update
The controller of identical quantity, and the whole interface tune that the same test node will be corresponded to are generated in the initial testing script
It is moved under controller generated with logic, obtains the test script.
In one exemplary embodiment, described in the interface testing for executing the operation system according to the test script
In, obtain the corresponding test data of each test node and test result, comprising: open defined in the test script by obtaining
Beginning node variable and end node variable obtain the test node range that interface testing is carried out to the operation system;It is executing
During target detection node corresponding to the test node range, by the test number of each target detection node execution
Specified file is written according to test result.
In one exemplary embodiment, described in the mistake for executing target detection node corresponding to the test node range
Specified file is written, comprising: in the mesh in test data and test result that each target detection node executes by Cheng Zhong
In the execution for marking test node, extracts the corresponding test data of each destination node and saved into temporary variable;It is complete
After execution at each target detection node, the assignment of global variable in the test script is carried out according to implementing result;
Content corresponding to the temporary variable and global variable difference is obtained, and specified file is written into acquired content.
It is in one exemplary embodiment, described that obtain the temporary variable and the global variable corresponding interior respectively
Hold, and specified file is written into acquired content, comprising: in the first beanshell component defined in the test script,
By calling creatfile () method to generate the specified file;Second defined in the teardown logic controller
In beanshell component, by calling write () method that described specify is written in the temporary variable and the global variable
File.
In one exemplary embodiment, described using the test node of test crash as start node, and according to institute
It states the corresponding test data of start node and re-executes the test script, comprising: from the corresponding test of acquired test node
Critical data is extracted in data, and business shape corresponding to the critical data is inquired from the database of the operation system
State;The test script is passed to using the critical data as preset parameter;During re-executing the test script,
Each test node first judges whether service condition corresponding to the critical data is corresponding with the test node, if
Be it is no, then jump to next test node and carry out the judgement;If it has, then using the test node as start node,
Execute the interface testing of the operation system.
A kind of interface testing control device of operation system, comprising: Interface Flowchart obtains module, for by business system
Whole interface to be tested in system is recorded, and the Interface Flowchart of the operation system is obtained;Test script obtains module, is used for
The Interface Flowchart is divided into several test nodes, and being needed for same test node will be corresponded in the Interface Flowchart
Test interface is integrated into the same test node, obtains test script;Data obtaining module is tested, for according to
Test script executes in the interface testing of the operation system, obtains the corresponding test data of each test node and test result;
Retest module is used to be generated in the case where getting the test result of the test node is test crash according to triggering
Test command, using the test node of test crash as start node, and according to the corresponding test number of the start node
According to the test script is re-executed, until completing the test of the last one test node in the test script.
A kind of electronic equipment, the electronic equipment include:
Processor;
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is by the processing
When device executes, the interface testing control method of the operation system as described in preceding any one is realized.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
When row, the interface testing control method of the operation system as described in preceding any one is realized.
Technical solution provided by the embodiments of the present application can include the following benefits:
In the above-mentioned technical solutions, by recording to the whole interface to be tested in operation system, it can get business
The Interface Flowchart of system;Then Interface Flowchart is divided into several test nodes, and same test will be corresponded in Interface Flowchart
All interfaces to be tested of node are integrated into same test node, obtain test script;Business is being executed according to test script
In the interface testing of system, the corresponding test data of each test node and test interface are accordingly obtained;When a certain test node pair
When the execution failure of interface testing, then the test command generated according to triggering, using the test node of test crash as start node,
And test script is re-executed according to the corresponding test data of start node, until completing the test of the last one test node.
Therefore, the Interface Flowchart of operation system is by being carried out the division of test node by the application, and in operation system
When interface testing fails, it is only necessary to the test node of test crash be to originate to re-start the interface testing of operation system, save
The retest process of normal interface, to effectively simplify the interface testing process of operation system.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited
Application.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the application
Example, and in specification it is used to explain the principle of the application together.
Fig. 1 is a kind of process of the interface testing control method of operation system according to shown by an exemplary embodiment
Figure;
Fig. 2 is the flow chart that step 120 is described for implementing to exemplify according to corresponding to Fig. 1;
Fig. 3 is the flow chart that step 130 is described for implementing to exemplify according to corresponding to Fig. 1;
Fig. 4 is the flow chart that step 132 is described for implementing to exemplify according to corresponding to Fig. 3;
Fig. 5 is the flow chart that step 140 is described for implementing to exemplify according to corresponding to Fig. 1;
Fig. 6 is a kind of block diagram of the interface testing control device of operation system according to shown by an exemplary embodiment;
Fig. 7 is the hardware block diagram of a kind of electronic equipment according to shown by an exemplary embodiment.
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 consistent with the application.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the application.
Firstly the need of explanation, the interface testing control method and device of operation system provided herein are to be applied to
In automated test tool, software test personnel are executing interface testing to operation system using corresponding automated test tool
During, automated test tool executes corresponding interface testing according to method provided herein automatically.
It should be appreciated that operation system is that the information system of specific aim support is carried out to business procession, it can be a certain
The completion of item or multinomial business provides strong tool support.Operation system can be a kind of APP (Application, application
Program) product or a kind of web page product, this place be not limited.In addition, executing the automation of method provided herein
Testing tool can be the common tools such as Jemter, Loadrunner, Winrunner, this place is also not limited.
Fig. 1 is a kind of process of the interface testing control method of operation system according to shown by an exemplary embodiment
Figure.As shown in Figure 1, this method at least includes the following steps:
Step 110, by recording to the whole interface to be tested in operation system, the interface stream of operation system is obtained
Journey.
Wherein, it the whole interface to be tested in operation system is recorded, is provided according to automated test tool
What function was realized.
It should be appreciated that all the recording process of interface to be tested needs the participation of software test personnel in operation system,
Automated test tool need to be recorded according in user interface by the command adapted thereto that software test personnel are triggered.
Also, to recording process all to be tested in operation system, it will be appreciated that be simulated in automated test tool
The process of the whole of operation system interface to be tested.Illustratively, due to automated test tool be generally provided with it is detailed
Interface operation instructions, software test personnel can be according to the related descriptions of selected automated test tool, in automatic test
The whole of analog service system interface to be tested in tool.
Illustratively, in the included script recording function of Jemter testing tool to http (hyper text transfer
Protocol, hypertext transfer protocol) interface carry out recording in, need software test personnel to add test in test plan
Then scene setting component adds http so that Thread Count (being traditionally arranged to be 1 in interface testing) and cycle-index is accordingly arranged
Cookie manager component and http request default value component carry out page configuration, and fill in the domain name of tested operation system
With port, the realization packet version of http request and specific protocol type, and connect http request setting page typing is tested
Details (including request path, corresponding requesting method and the parameter list sent with request) of mouth etc. are manually
Operation records the whole interface to be tested in operation system to realize, obtains the Interface Flowchart of operation system.
It should be noted that the script recording function of the above Jemter testing tool is only a kind of example that the present embodiment provides,
Can not indicate to be limited the protection scope of the application.To different types of automated test tool, and to not
The interface to be tested of same type, all the recording process of interfaces to be tested is different in carried out operation system.
Also, the process recorded to the whole interface to be tested in operation system is existing realization, this step is not
Any improvement is carried out to it.
It should also be noted that by being recorded to the whole interface to be tested in operation system, obtained operation system
Interface Flowchart includes the interface sequence that several interfaces to be tested are arranged according to the function realization sequence of operation system.
Step 120, Interface Flowchart is divided into several test nodes, and same test node will be corresponded in Interface Flowchart
All interfaces to be tested be integrated into same test node, obtain test script.
Wherein, the operation flow that the division of Interface Flowchart is required progress in the function of realizing according to operation system is realized
, such as to a loan system, Interface Flowchart can be in turn divided into registration and stepped on according to the operation flow carried out needed for loan
Examination & approval, application make loans, calculate refund 9 after record, real-name authentication, addition contact person, recognition of face, preregistration, signing are submitted, borrowed
A test node.As it can be seen that being made of complete loan process this 9 test nodes.
After Interface Flowchart is divided into several test nodes, by the way that the institute of same test node will be corresponded in Interface Flowchart
Need test interface to be integrated into same test node, to obtain test script.
It should be noted that should also be as needing the manual participation of software test personnel to the division of test node in operation system,
For example, after software test personnel are by carrying out corresponding page configuration in automated test tool, by automated test tool
Automatically all interfaces to be tested for corresponding to same test node in Interface Flowchart are integrated into same test node.
Step 130, in the interface testing for executing operation system according to test script, the corresponding survey of each test node is obtained
Try data and test result.
Wherein, after obtaining test script, software test personnel execute test script by triggering automated test tool,
It can carry out the interface testing of operation system.
It should be noted that this implementation executes the process of test script, it is substantially the mistake for executing each test node in test script
Journey.Automated test tool can obtain the corresponding test data of each test node in the interface testing for executing operation system
And test result.
For each test node, corresponding test data refers to that automated test tool is executing the test node
When, used test parameter.In an exemplary embodiment, the corresponding test data of test node is automatic test
Tool makes what several codes were simulated according to certain.
In addition, the corresponding test result of test node passes through including test and test crash, when test result is that test is logical
It is out-of-date, the interface testing of each interface to be tested in next test node can be carried out;And when any to be tested in test node
When the interface testing failure of interface, then assert that the test result of corresponding test node is test crash, operation system entirely connects
Mouth testing process can then terminate.
Step 140, it if the test result for getting test node is test crash, is ordered according to the test that triggering generates
It enables, using the test node of test crash as start node, and test foot is re-executed according to the corresponding test data of start node
This, until completing the test of the last one test node in test script.
Wherein, as previously mentioned, if automated test tool gets the test result of a certain test node and loses for test
It loses, then it represents that there are problems for operation system institute's development function, and at this moment the entire testing process of operation system accordingly terminates, and needs phase
The modification that developer carries out respective code in operation system is closed, to repair corresponding system problem.
Software test personnel are when the operation system obtained to reparation re-starts test, it is still necessary to operation automation test
The respective interface of tool generates test command to trigger to automated test tool.Automated test tool is then according to the test
Order, re-executes the interface testing to operation system.
During re-executing interface testing to operation system, then using the test of test crash as start node, and
Test script is re-executed according to the corresponding test data of start node.
During re-executing test script, lost if still getting the test result of a certain test node for test
It loses, is then again starting with the test node of test crash after getting the test command that triggering generates according to foregoing teachings
Node accordingly executes test script;If the test result for getting each test node is to be successfully tested, to test foot
The interface testing to operation system can be completed to the last one test node in this execution.
Therefore, the Interface Flowchart of operation system is by being carried out the division of test node by the present embodiment, and in operation system
Interface testing failure when, it is only necessary to the test node of test crash be that starting re-starts the interface testing of operation system, province
The process for carrying out retest to normal interface has been gone, the interface testing process of operation system is effectively simplified.
Fig. 2 is the flow chart that step 120 is described for implementing to exemplify according to corresponding to Fig. 1.As shown in Fig. 2, should
Step 120 at least includes the following steps:
Step 121, according to the sequence of interface to be tested in Interface Flowchart, each interface to be tested is successively initiated to call,
Generate initial testing script.
Wherein, as previously mentioned, the Interface Flowchart of operation system to be carried out to the division of test node, specifically by software test
Personnel carry out what corresponding operating obtained on the interface of automated test tool, for example, interface requests, database behaviour can be carried out
The configuration of the test functions such as work, various logic control, realizes the whole of operation system interface to be tested carrying out test node
It divides.
After the Interface Flowchart that automated test tool obtains operation system, to be measured tried by each in Interface Flowchart
Mouth is successively initiated interface and is called, to realize the whole interface call flow of operation system, to generate initial testing script.
Step 122, by increasing control logic for interface to be tested specific in initial testing script, to initial testing foot
Originally it is updated.
Wherein, specific interface to be tested refers to the interface to be tested for having certain special circumstances, these interfaces to be tested
In normal interface testing, interface testing can be caused to fail due to self-characteristic.Therefore, it is necessary to targetedly wait for these
Test interface is handled, the whole interface test process carried out to avoid influence to operation system.
It illustratively, can be by increasing a loop control for the interface to be tested of unstable (easy malloc failure malloc)
Device realizes the multiple calling to the interface to be tested;The interface to be tested taken a long time is called for interface, it is to be measured that this can be extended
It tries set time-out time in the calling logic of mouth.
As a result, by increasing corresponding control logic for interface to be tested specific in initial testing script, with realization pair
The update of initial testing script.
Step 123, according to the quantity of institute's partition testing node in Interface Flowchart, in updating obtained initial testing script
The controller of identical quantity is generated, and the whole interface calling logics for corresponding to same test node are moved into control generated
Under device, test script is obtained.
Wherein, the substantially controller for dividing each test node, can be according to institute's partition testing in Interface Flowchart
The quantity of node is updating the controller of the identical quantity of generation in obtained initial testing script, and will correspond to same survey
The total interface calling logic of examination node is moved under corresponding controller, can get carry out interface survey to operation system as a result,
The test script of examination.
It should be appreciated that being in software test personnel according to business system to the quantity of institute's partition testing node in Interface Flowchart
The operation flow of required progress in the function of realizing of uniting, and obtained after carrying out corresponding page configuration in automated test tool
's.
As a result, in the present embodiment, the page configuration that automated test tool is carried out by responding software test personnel,
The division that test node is carried out to the Interface Flowchart of operation system is realized, to obtain the survey for carrying out interface testing to operation system
Training sheet, also, test script obtained includes several test nodes divided.
Fig. 3 is the flow chart that step 130 is described for implementing to exemplify according to corresponding to Fig. 1.As shown in figure 3, should
Step 130 at least includes the following steps:
Step 131, it by obtaining start node variable and end node variable defined in test script, obtains to business
The test node range of system progress interface testing.
Wherein, test script connects operation system to control by defining start node variable and end node variable
The test node range of mouth test, only to be wrapped to test node range during carrying out interface testing to operation system
Interface to be tested containing operation system carries out interface testing.
For example, indicating from test node 3 when start node variable is greater than 2 (in the Interface Flowchart of aforementioned loan system
In, test node 3 is " addition contact person ") start to execute the interface testing of operation system;When end node variable is less than 6,
Then indicate the interface testing of operation system go to test node 5 (in the Interface Flowchart of aforementioned loan system, test node 5
For " preregistration ").
Therefore, it by obtaining start node variable and end node variable defined in test script, can obtain pair
The test node range of operation system progress interface testing.
Step 132, during executing target detection node corresponding to test node range, by each target detection section
Specified file is written in the test data and test result that point executes.
Wherein, target detection node refers to the interface to be tested of the included operation system of test node range, executes test
The process of target detection node corresponding to range of nodes, the as interface to be tested to the included operation system of test node range
Carry out the process of interface testing.
Specified file is automated test tool file generated, be can be reserved for specified by the automated test tool local
Path under, also can be reserved under the path specified by server, the test number executed for each target detection node to be written
According to and test result.
It should be noted that test data performed by each test node is setting, such as in the test of " registration logs in "
In node, corresponding test data may include application odd numbers, register account number, ID card No. and and phone number.
As a result, in the present embodiment, it is possible to carry out interface testing to operation system according to test node range, can support
The interface testing of any test node range, and accordingly obtain the test that each target detection node executes in test node range
Data and test result.
And it is to be understood that in the interface testing according to the carried out operation system of the present embodiment, if to test node
The last one test node in range runs succeeded, that is, indicates to complete the interface testing to test node.
Fig. 4 is the flow chart that step 132 is described for implementing to exemplify according to corresponding to Fig. 3.As shown in figure 4, should
Step 132 at least includes the following steps:
Step 1321, in the execution of target detection node, the corresponding test data of each destination node is extracted to interim
It is saved in variable.
Wherein, to the automated test tool of each type, can be reserved for corresponding temporary variable for save test number
According to.
Illustratively, in Jemter testing tool, var.put () method can be used to save a temporary variable;?
Regular expression extractor can be used to extract certain field in the return value of a request and save a temporary variable;May be used also
A temporary variable is saved to use per.put () method, this place is not limited.
Step 1322, it after the execution for completing each target detection node, is carried out according to implementing result global in test script
The assignment of variable.
Wherein, a global variable, for example, flag are saved in test script.Illustratively, to operation system into
Before line interface test, the value of flag can be assigned a value of " true ", when some test node executes failure, flag is assigned a value of
"flase";When some test node runs succeeded, then the current assignment of flag is not changed.
Step 1323, content corresponding to temporary variable and global variable difference is obtained, and the write-in of acquired content is referred to
Determine file.
Wherein, creafile () can be used to generate one first in the first beanshell component defined in test script
Empty file, empty file generated are aforementioned specified file.It should be noted that the first beanshell component need to tested entirely
The foremost of script defines, that is, before test script starts execution, has just generated specified file.
Then, in the teardown logic controller of automated test tool, pass through defined 2nd beanshell
Component writes the variable saved in test script implementation procedure in specified file.Wherein, the 2nd beanshell component passes through
Specified text can be written in the temporary variable and global variable that save in test script implementation procedure by the write () method of calling
Part.
It should be noted that teardown logic controller is provided by Jemter testing tool.
The present embodiment is by executing test data and survey for each target detection node corresponding to test node range as a result,
Specified file is written in test result, in the execution to obtain the interface testing of operation system, the corresponding test data of each test node
And test result.
Fig. 5 be the implementation according to corresponding to Fig. 1 exemplify in step 140, be starting section with the test section of test crash
Point, and the flow chart that the process of test script is described is re-executed according to the corresponding test data of start node.Such as Fig. 5 institute
Show, the above process at least includes the following steps:
Step 141, critical data is extracted from the corresponding test data of acquired test node, and from the number of operation system
According to service condition corresponding to inquiry critical data in library.
Wherein, critical data is the data that almost all of database table can all save in the database of operation system, right
It is preset data for test script, such as in aforementioned loan system, critical data can be application odd numbers.Therefore, automatically
Corresponding critical data can be obtained according to the preset data in test script from specified file by changing testing tool.
In the execution of test script, critical data is different in the state of different test nodes, according to critical data
The state recording of current carried out interface testing can be inquired from the database of operation system.It should be appreciated that operation system is current
The process of carried out interface testing that is to say therefore the process for carrying out a business handling is simulated to operation system can accordingly obtain
Obtain the corresponding service condition of critical data.
Step 142, test script is passed to using critical data as preset parameter.
Step 143, during re-executing test script, each test node first judges corresponding to critical data
Whether service condition is corresponding with the test node.
Wherein, after critical data is passed to test script as preset parameter, test script can be re-executed, with weight
Interface testing newly is carried out to operation system, thus after verifying the modification that related development personnel carry out respective code to operation system,
Whether corresponding system problem is successfully repaired.
Illustratively, service condition corresponding to critical data is identified by number, to be protected according to represented number
Demonstrate,prove different service conditions.For example, if operation system currently corresponding service condition is " registration logs in " state, available digital
3001 are identified;If currently corresponding service condition is " calculate and refund " state to operation system, available digital 7003 is carried out
Mark.
Also, each test node is identified itself also by number, for example, the test node institute of " registration " is right
Answering number is 3001, and number corresponding to the test node of " calculate and refund " is 7003.
During re-executing test script, each debugging node can first judge that critical data is corresponding before execution
The service condition test node it is corresponding, that is, it is identical both to judge whether number corresponds to.If it is judged that be it is no, jump and hold
Row step 144;If it is judged that be it is yes, then jump execute step 145.
Step 144, next test node is jumped to accordingly to be judged.
Wherein, when the service condition corresponding to the critical data is corresponding different from test node, indicate that the test node is not
Last time execute failure test node, it is therefore desirable to jump to next test node, and judge next test node whether with
The corresponding service condition of critical data is identical.
Step 145, using the test node as start node, the interface testing of operation system is executed.
Wherein, when the service condition corresponding to the critical data is corresponding identical as test node, then it represents that the test node is
Therefore the test node that last time executes failure using the test node as start node, executes the interface testing of operation system.
Therefore, the present embodiment can carry out cut-point measure to operation system, eliminate and carry out retest to normal interface
Process, effectively simplify the interface testing process of operation system.
Fig. 6 is a kind of block diagram of the interface testing control device of operation system according to shown by an exemplary embodiment.
As shown in fig. 6, the device includes, Interface Flowchart obtains module 210, test script obtains module 220, test data obtaining module
230 and retest module 240.
Interface Flowchart obtains module 210 and is used to obtain by recording the whole interface to be tested in operation system
The Interface Flowchart of operation system.
Test script obtains module 220 and is used to Interface Flowchart being divided into several test nodes, and will be right in Interface Flowchart
It should be integrated into same test node in all interfaces to be tested of same test node, obtain test script.
It tests data obtaining module 230 to be used in the interface testing for executing operation system according to test script, obtain each
The corresponding test data of test node and test result.
Retest module 240 is used in the case where getting the test result of test node is test crash, according to
The test command generated is triggered, using the test node of test crash as start node, and according to the corresponding test number of start node
According to test script is re-executed, until completing the test of the last one test node in test script.
In another exemplary embodiment, it includes interface call unit, control logic that test script, which obtains module 220,
Adding unit and calling logic mobile unit.
Interface call unit is used for the sequence according to interface to be tested in Interface Flowchart, successively sends out each interface to be tested
It rises and calls, generate initial testing script.
Control logic adding unit is used for by increasing control logic for interface to be tested specific in initial testing script,
Initial testing script is updated.
Calling logic mobile unit is used for the quantity according to institute's partition testing node in Interface Flowchart, obtains in update first
The controller of identical quantity, and the whole interface calling logics that the same test node will be corresponded to are generated in beginning test script
It moves under controller generated, obtains test script.
In another exemplary embodiment, test data obtaining module 230 includes test node range acquiring unit
With test information writing unit.
Test node range acquiring unit is used for by obtaining start node variable defined in test script and terminating section
Point variable obtains the test node range that interface testing is carried out to operation system.
Information writing unit is tested to be used for during executing target detection node corresponding to test node range, it will be every
Specified file is written in the test data and test result that one target detection node executes.
In another exemplary embodiment, test information writing unit includes test data saving subunit, executes
As a result saving subunit and variable data obtain subelement.
Test data saving subunit is used in the execution of target detection node, extracts the corresponding survey of each destination node
Examination data are saved into temporary variable.
Implementing result saving subunit is used for after the execution for completing each target detection node, is carried out according to implementing result
The assignment of global variable in test script.
Variable data obtains subelement and is used to obtain content corresponding to temporary variable and global variable difference, and will be obtained
Take content that specified file is written.
In another exemplary embodiment, retest module 240 includes key message acquiring unit, preset parameter
Incoming unit and key message judging unit.
Key message acquiring unit for extracting critical data from the corresponding test data of acquired test node, and from
Service condition corresponding to critical data is inquired in the database of operation system.
Preset parameter is passed to unit and is used to be passed to test script for critical data as preset parameter.
Key message judging unit is used for during re-executing test script, is controlled each test node and is first judged
Whether service condition corresponding to critical data corresponding with the test node, if it has not, then jump to next test node into
The corresponding judgement of row;If it has, then executing the interface testing of operation system using the test node as start node.
It should be noted that method provided by device provided by above-described embodiment and above-described embodiment belongs to same structure
Think, the concrete mode that wherein modules execute operation is described in detail in embodiment of the method, no longer superfluous herein
It states.
In one exemplary embodiment, the application also provides a kind of electronic equipment, which includes:
Processor;
Memory is stored with computer-readable instruction on the memory, when which is executed by processor,
Realize the interface testing control method of operation system as previously described.
Fig. 7 is the block diagram of a kind of electronic equipment according to shown by an exemplary embodiment.It should be noted that the electronics
Equipment is the example for adapting to the application, must not believe that there is provided any restrictions of the use scope to the application.
The electronic equipment can not be construed to need to rely on or must have in illustrative electronic equipment shown in Fig. 7 one
A or multiple components.
The hardware configuration of the electronic equipment can generate biggish difference due to the difference of configuration or performance, as shown in fig. 7,
Electronic equipment includes: power supply 610, interface 630, at least a memory 650 and at least central processing unit (CPU, a Central
Processing Units)670。
Wherein, power supply 610 is used to provide operating voltage for each hardware device on electronic equipment.
Interface 630 includes an at least wired or wireless network interface 631, at least a string and translation interface 633, at least one defeated
Enter output interface 635 and at least USB interface 637 etc., is used for and external device communication.
The carrier that memory 650 is stored as resource, can be read-only memory, random access memory, disk or CD
Deng the resource stored thereon includes operating system 651, application program 653 or data 655 etc., and storage mode can be short
Temporary storage permanently stores.Wherein, operating system 651 is for managing and each hardware device in controlling electronic devices and answering
It can be Windows with program 653 to realize calculating and processing of the central processing unit 670 to mass data 655
ServerTM, Mac OS XTM, UnixTM, LinuxTM etc..Application program 653 is to be based on completing at least on operating system 651
The computer program of one particular job, may include an at least module (being not shown in Fig. 7), and each module can be distinguished
It include the series of computation machine readable instruction to electronic equipment.Data 655 can be stored in the metadata of interface in disk
Deng.
Central processing unit 670 may include the processor of one or more or more, and be set as through bus and memory
650 communications, for the mass data 655 in operation and processing memory 650.
As described in detail above, the electronic equipment for being applicable in the application will read memory by central processing unit 670
The form of the series of computation machine readable instruction stored in 650 completes the interface testing controlling party of foregoing operation system
Method.
In addition, also can equally realize the application by hardware circuit or hardware circuit combination software instruction, therefore, realize
The application is not limited to the combination of any specific hardware circuit, software and the two.
In one exemplary embodiment, the application also provides a kind of computer readable storage medium, is stored thereon with calculating
Machine program when the computer program is executed by processor, realizes the interface testing control method of operation system as previously described.
It should be understood that the application is not limited to the precise structure that has been described above and shown in the drawings, and
And various modifications and change can executed without departing from the scope.Scope of the present application is only limited by the accompanying claims.
Claims (10)
1. a kind of interface testing control method of operation system, which is characterized in that the described method includes:
By recording to the whole interface to be tested in operation system, the Interface Flowchart of the operation system is obtained;
The Interface Flowchart is divided into several test nodes, and the institute that will correspond to same test node in the Interface Flowchart
Need test interface to be integrated into the same test node, obtains test script;
In the interface testing for executing the operation system according to the test script, the corresponding test number of each test node is obtained
According to and test result;
If the test result for getting the test node is test crash, according to the test command that triggering generates, to survey
The test node of examination failure is start node, and re-executes the survey according to the corresponding test data of the start node
Training sheet, until completing the test of the last one test node in the test script.
2. the method according to claim 1, wherein described be divided into several tests sections for the Interface Flowchart
Point, and all interfaces to be tested for being under the jurisdiction of same test node in the Interface Flowchart are integrated into the same test node
In, obtain test script, comprising:
According to the sequence of interface to be tested in the Interface Flowchart, each interface to be tested is successively initiated to call, be generated
Initial testing script;
By increasing control logic for the interface to be tested specific in the initial testing script, to the initial testing foot
Originally it is updated;
According to the quantity of institute's partition testing node in the Interface Flowchart, generated in updating the obtained initial testing script
The controller of identical quantity, and the whole interface calling logics for corresponding to the same test node are moved into control generated
Under device, the test script is obtained.
3. the method according to claim 1, wherein described executing the business system according to the test script
In the interface testing of system, the corresponding test data of each test node and test result are obtained, comprising:
By obtaining start node variable and end node variable defined in the test script, obtain to the operation system
Carry out the test node range of interface testing;
During executing target detection node corresponding to the test node range, each target detection node is held
Specified file is written in capable test data and test result.
4. according to the method described in claim 3, it is characterized in that, described executing target corresponding to the test node range
During test node, specified file is written into test data and test result that each target detection node executes,
Include:
In the execution of the target detection node, the corresponding test data of each destination node is extracted into temporary variable
It is saved;
After the execution for completing each target detection node, global variable in the test script is carried out according to implementing result
Assignment;
Content corresponding to the temporary variable and global variable difference is obtained, and specified text is written into acquired content
Part.
5. according to the method described in claim 4, it is characterized in that, the acquisition temporary variable and the global variable point
Not corresponding content, and specified file is written into acquired content, comprising:
In the first beanshell component defined in the test script, by calling described in the generation of creatfile () method
Specified file;
In the 2nd beanshell component defined in teardown logic controller, by calling write () method described
The specified file is written in temporary variable and the global variable.
6. the method according to claim 1, wherein the test node with test crash is starting section
Point, and the test script is re-executed according to the corresponding test data of the start node, comprising:
Critical data is extracted from the corresponding test data of acquired test node, and is looked into from the database of the operation system
Ask service condition corresponding to the critical data;
The test script is passed to using the critical data as preset parameter;
During re-executing the test script, each test node first judges corresponding to the critical data
Whether service condition is corresponding with the test node, if it has not, then jumping to next test node carries out the judgement;
If it has, then executing the interface testing of the operation system using the test node as start node.
7. a kind of interface testing control device of operation system, which is characterized in that described device includes:
Interface Flowchart obtains module, for obtaining the industry by recording to the whole interface to be tested in operation system
The Interface Flowchart of business system;
Test script obtains module, for the Interface Flowchart to be divided into several test nodes, and will be in the Interface Flowchart
All interfaces to be tested corresponding to same test node are integrated into the same test node, obtain test script;
Data obtaining module is tested, for obtaining in the interface testing for executing the operation system according to the test script
The corresponding test data of each test node and test result;
Retest module is used in the case where getting the test result of the test node is test crash, according to triggering
The test command of generation, using the test node of test crash as start node, and according to the corresponding survey of the start node
Examination data re-execute the test script, until completing the test of the last one test node in the test script.
8. device according to claim 7, which is characterized in that the test script obtains module and includes:
Interface call unit, for the sequence according to interface to be tested in the Interface Flowchart, to each interface to be tested
It successively initiates to call, generates initial testing script;
Control logic adding unit, for by increasing control for the interface to be tested specific in the initial testing script
Logic is updated the initial testing script;
Calling logic mobile unit is obtained for the quantity according to institute's partition testing node in the Interface Flowchart in update
The controller of identical quantity, and the whole interface tune that the same test node will be corresponded to are generated in the initial testing script
It is moved under controller generated with logic, obtains the test script.
9. a kind of electronic equipment, which is characterized in that the equipment includes:
Processor;
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is held by the processor
When row, the interface testing control method of the operation system as described in any one of claim 1 to 6 is realized.
10. a kind of computer readable storage medium, which is characterized in that be stored thereon with computer program, the computer program
When being executed by processor, the interface testing control method of the operation system as described in any one of claim 1 to 6 is realized.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910527419.5A CN110347590A (en) | 2019-06-18 | 2019-06-18 | The interface testing control method and device of operation system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910527419.5A CN110347590A (en) | 2019-06-18 | 2019-06-18 | The interface testing control method and device of operation system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110347590A true CN110347590A (en) | 2019-10-18 |
Family
ID=68182183
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910527419.5A Pending CN110347590A (en) | 2019-06-18 | 2019-06-18 | The interface testing control method and device of operation system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110347590A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111159027A (en) * | 2019-12-23 | 2020-05-15 | 武汉联影医疗科技有限公司 | Automatic testing method and device, computer equipment and readable storage medium |
CN111181800A (en) * | 2019-11-27 | 2020-05-19 | 腾讯科技(深圳)有限公司 | Test data processing method and device, electronic equipment and storage medium |
CN111352846A (en) * | 2020-03-06 | 2020-06-30 | 深圳前海微众银行股份有限公司 | Test system number making method, device, equipment and storage medium |
CN112487056A (en) * | 2020-11-30 | 2021-03-12 | 上海寻梦信息技术有限公司 | Service node control method, system, device and storage medium |
CN113127335A (en) * | 2020-01-16 | 2021-07-16 | 北京京东振世信息技术有限公司 | System testing method and device |
CN113282499A (en) * | 2021-05-31 | 2021-08-20 | 长沙市到家悠享家政服务有限公司 | Method, system, device and medium for creating test data |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104572466A (en) * | 2015-01-13 | 2015-04-29 | 北京京东尚科信息技术有限公司 | Automatic testing method and device |
CN108694118A (en) * | 2017-04-11 | 2018-10-23 | 北京京东尚科信息技术有限公司 | A kind of application testing method and device |
CN109582563A (en) * | 2018-10-26 | 2019-04-05 | 平安科技(深圳)有限公司 | Test method, device, computer equipment and the storage medium of test cases |
CN109857667A (en) * | 2019-02-03 | 2019-06-07 | 苏州市龙测智能科技有限公司 | Automatic interface testing method, test device, test equipment and storage medium |
-
2019
- 2019-06-18 CN CN201910527419.5A patent/CN110347590A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104572466A (en) * | 2015-01-13 | 2015-04-29 | 北京京东尚科信息技术有限公司 | Automatic testing method and device |
CN108694118A (en) * | 2017-04-11 | 2018-10-23 | 北京京东尚科信息技术有限公司 | A kind of application testing method and device |
CN109582563A (en) * | 2018-10-26 | 2019-04-05 | 平安科技(深圳)有限公司 | Test method, device, computer equipment and the storage medium of test cases |
CN109857667A (en) * | 2019-02-03 | 2019-06-07 | 苏州市龙测智能科技有限公司 | Automatic interface testing method, test device, test equipment and storage medium |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111181800A (en) * | 2019-11-27 | 2020-05-19 | 腾讯科技(深圳)有限公司 | Test data processing method and device, electronic equipment and storage medium |
CN111181800B (en) * | 2019-11-27 | 2023-09-19 | 腾讯科技(深圳)有限公司 | Test data processing method and device, electronic equipment and storage medium |
CN111159027A (en) * | 2019-12-23 | 2020-05-15 | 武汉联影医疗科技有限公司 | Automatic testing method and device, computer equipment and readable storage medium |
CN113127335A (en) * | 2020-01-16 | 2021-07-16 | 北京京东振世信息技术有限公司 | System testing method and device |
CN111352846A (en) * | 2020-03-06 | 2020-06-30 | 深圳前海微众银行股份有限公司 | Test system number making method, device, equipment and storage medium |
CN111352846B (en) * | 2020-03-06 | 2024-03-19 | 深圳前海微众银行股份有限公司 | Method, device, equipment and storage medium for manufacturing number of test system |
CN112487056A (en) * | 2020-11-30 | 2021-03-12 | 上海寻梦信息技术有限公司 | Service node control method, system, device and storage medium |
CN113282499A (en) * | 2021-05-31 | 2021-08-20 | 长沙市到家悠享家政服务有限公司 | Method, system, device and medium for creating test data |
CN113282499B (en) * | 2021-05-31 | 2024-02-09 | 长沙市到家悠享家政服务有限公司 | Method, system, equipment and medium for creating test data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110347590A (en) | The interface testing control method and device of operation system | |
CN106940428B (en) | Chip verification method, device and system | |
CN109032611A (en) | Script dispositions method, device, computer equipment and storage medium | |
CN109408357A (en) | A kind of automatic interface testing method and device | |
CN105389256A (en) | Unit testing method and system | |
US20140208169A1 (en) | Domain scripting language framework for service and system integration | |
CN113448862B (en) | Software version testing method and device and computer equipment | |
CN112433944A (en) | Service testing method, device, computer equipment and storage medium | |
CN105677394A (en) | Method and apparatus for upgrading application on terminal device | |
CN105589928A (en) | Simulation testing method for distributed data processing system | |
CN109753415B (en) | Processor verification system and processor verification method based on same | |
CN109445800A (en) | A kind of version automatic deployment method and system based on distributed system | |
CN110990289B (en) | Method and device for automatically submitting bug, electronic equipment and storage medium | |
CN117290255A (en) | Batch interface performance test method based on Python and Locut frameworks | |
CN113191114A (en) | Method and apparatus for authenticating a system | |
CN112561690A (en) | Method, system, equipment and storage medium for testing credit card staging service interface | |
CN110471828B (en) | Operating system testing method, device and equipment thereof | |
CN116974874A (en) | Database testing method and device, electronic equipment and readable storage medium | |
CN109359093A (en) | A kind of rule file update method and system | |
CN113672260B (en) | Method for initializing CPU of processor | |
CN107229650B (en) | Test method and device | |
CN111679924B (en) | Reliability simulation method and device for componentized software system and electronic equipment | |
CN112346994A (en) | Test information correlation method and device, computer equipment and storage medium | |
CN110515852A (en) | A kind of application update test method and relevant apparatus based on agile development | |
US9477800B1 (en) | System, method, and computer program product for automatically selecting a constraint solver algorithm in a design verification environment |
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: Pingan Pu Hui 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: Pingan Pu Hui Enterprise Management Co., Ltd. |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |