CN110134582A - The processing of test case and data processing method and device - Google Patents

The processing of test case and data processing method and device Download PDF

Info

Publication number
CN110134582A
CN110134582A CN201910266530.3A CN201910266530A CN110134582A CN 110134582 A CN110134582 A CN 110134582A CN 201910266530 A CN201910266530 A CN 201910266530A CN 110134582 A CN110134582 A CN 110134582A
Authority
CN
China
Prior art keywords
test case
function
data
information
function call
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910266530.3A
Other languages
Chinese (zh)
Inventor
何青松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Koubei Shanghai Information Technology Co Ltd
Original Assignee
Koubei Shanghai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Koubei Shanghai Information Technology Co Ltd filed Critical Koubei Shanghai Information Technology Co Ltd
Priority to CN201910266530.3A priority Critical patent/CN110134582A/en
Publication of CN110134582A publication Critical patent/CN110134582A/en
Pending legal-status Critical Current

Links

Classifications

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

Abstract

This application discloses a kind of processing methods of test case, comprising: obtains test case data;According to the test case data, the corresponding test case of the test case data is run;Obtaining the test case, this runs corresponding function call data;According to the function call data, the test case is adjusted.Using the method, solve the test leakage of integration testing and uncertain problem in the case where introducing new increasing function and change function in tested software system.

Description

The processing of test case and data processing method and device
Technical field
This application involves software testing technology fields, and in particular to a kind of processing method and processing device of test case.This Shen Please it is related to a kind of data processing method simultaneously and device, the application further relates to another data processing method.
Background technique
Integration testing is the important link in software development process, and also referred to as joint debugging is tested.So-called integration testing is to survey The software test activity that test ring border simulation of real scenes verifies tested software system, for example, verifying tested software system It whether is able to satisfy demand, and examines whether processing of the tested software system under abnormal scene that may be present is able to satisfy expection It is required that.If integration testing does not pass through, tested software system cannot be introduced into the production and operation;In addition, tested software system passes through After integration testing, generally comprehensive and deep test will not be carried out in test environment again, therefore, if integration testing is omitted Bug (defect not being found present in software systems), then other test activities after integration testing (such as are tested Acceptance Tests and gray scale test), these defects are often also difficult to find, software defect is eventually led to and omits onto line, influence user Usage experience.The importance of integration testing make the test case as integration testing basis be treated as influence software matter An important factor for amount.
Currently, general document according to demand refines the possible usage scenario of software in software development process, and design accordingly Test case, such as using the scene after refining as test case.During testing example design, test is not accounted for Relationship between use-case and the code of software systems, so that function increase newly in tested software system, change may be without such as Pre- interim be equally tested is covered, and there are the risks of test leakage.In addition, there is also according to demand and intuitive judgment in integration testing The judge rule whether construction use-case passes through, this relies on the subjective experience of Test Engineer, if Test Engineer is for system Code is unfamiliar with the case where often will appear test leakage, or since whether Test Engineer is unable to judge accurately out test case New increasing function and change function are covered, so that there are very big uncertainties for integration testing.
Therefore, it is necessary to solve the problems, such as be for when introducing new increasing function and change function in tested software system how Reduce the test leakage risk and uncertainty of integration testing.
Summary of the invention
The application provides a kind of processing method of test case, with solve to introduce in tested software system new increasing function and The test leakage of integration testing and uncertain problem in the case where change function.
The application provides a kind of processing method of test case, comprising:
Obtain test case data;
According to the test case data, the corresponding test case of the test case data is run;
Obtaining the test case, this runs corresponding function call data;
According to the function call data, the test case is adjusted.
Optionally, described that the corresponding test case of the test case data is run according to the test case data, packet It includes:
The input information of this operation of the test case is obtained from the test case data;
The target letter that the expectation function of the test case is realized in tested software system is called according to the input information Number;
Return to the call result for being directed to the objective function.
Optionally, described that the expection function that the test case is realized in tested software system is called according to the input information The objective function of energy, comprising:
The interface layer functions of tested software system are called according to the input information;
By in the next stage function of objective function described in the interface layer function call and the objective function at least One function;
It is described to obtain this corresponding function call data of operation of the test case, comprising:
The calling data of function call chain road are obtained, the function call link includes the objective function and the mesh At least one function and the interface layer functions in the next stage function of scalar functions.
It is optionally, described to obtain this corresponding function call data of operation of the test case, comprising:
The function of this operation calling of the test case is intercepted using plug-in unit;
Obtain the function call data.
Optionally, described according to the function call data, adjust the test case, comprising:
Obtain the expected calling function information of this operation of the test case;
The practical calling function information that this runs according to test case described in the function call data acquisition;
According to the expected calling function information and the practical calling function information, the test case is adjusted.
Optionally, described according to the expected calling function information and the practical calling function information, adjust the survey Example on probation, comprising:
If it is determined that the practical calling function information includes the expected calling function information, it is determined that the test is used Example presets the test case for judging rule to meet;Otherwise, then the test case is adjusted.
Optionally, described according to the function call data, adjust the test case, comprising:
According to the function call data, the input information of the test case data is adjusted;And/or it increases newly and is different from The test case data of the test case.
Optionally, the method also includes:
For identifying, the test case of the test case identifies record and this operation of the test case is corresponding Function call data;
Export the test case mark and the function call data.
Optionally, the output test case mark and the function call data, comprising: will include the survey The record information of example mark on probation and the function call data is exported to search engine;
The practical calling function information of this operation of the test case according to the function call data acquisition, packet It includes: obtaining test case mark to be checked;
According to the test case mark to be checked, had using described search engine search record comprising test case mark The record information of knowledge and function call data obtains the practical calling function information.
Optionally, the method also includes: obtain tested software system banner to be checked;
It is described to be identified according to the test case to be checked, had using described search engine search record and is used comprising test The record information of example mark and function call data obtains the practical calling function information, comprising: according to described to be checked Test case mark and the tested software system banner to be checked, have using described search engine search record and include The record information of test case mark and function call data obtains the practical calling function information.
Optionally, the expected calling function information, comprising: the function information of change and/or newly-increased function information.
The application also provides a kind of data processing method, comprising:
Obtain the call request comprising test case mark;
Obtain the corresponding function call data of the call request;
Record the test case mark and the function call data.
Optionally, the method also includes: export test case mark and the function call data.
Optionally, the output test case mark and the function call data, comprising: use the test Example mark and the function call data are exported to search engine.
Optionally, described to obtain the corresponding function call data of the call request, comprising: to intercept institute using probe card The function call of call request corresponding function call chain road is stated, function call data are obtained;Wherein, the function call chain Road include interface layer functions, realize the test case expectation function objective function and the objective function next stage letter At least one function in number.
The application also provides a kind of data processing method, comprising:
Obtain the record information comprising test case mark and function call data;
Obtain test case mark to be checked;
According to the test case mark to be checked, inquiry is used with the test to be checked from the record information The corresponding practical calling function information of example mark.
Optionally, the function call data are function call link information;
It is described that corresponding practical calling function information is inquired from the record information according to the use-case mark to be checked, It include: that corresponding function call link information is obtained according to use-case mark inquiry from the record information to be checked;From The practical calling function information is obtained in the function call link information.
Optionally, the method also includes notes according to acquisition comprising test case mark and function call data Information is recorded, the function call data are updated.
Optionally, the method also includes: obtain tested software system banner to be checked;
It is described that corresponding practical calling function information is inquired from the record information according to the use-case mark to be checked, It include: according to the test case mark to be checked and tested software system banner to be checked, from the record information It is middle to inquire corresponding practical calling function information.
Optionally, practical function is called to believe the method also includes: output is corresponding with the test case to be checked Breath.
The application also provides a kind of processing unit of test case, comprising:
Use-case obtaining unit, for obtaining test case data;
Use-case running unit, for running the corresponding test of the test case data according to the test case data Use-case;
Function call data acquiring unit, for obtaining the test case, this runs corresponding function call data;
Use-case adjustment unit, for adjusting the test case according to the function call data.
The application also provides a kind of data processing equipment, comprising:
Call request obtaining unit, for obtaining the call request comprising test case mark;
Function call data acquiring unit, for obtaining the corresponding function call data of the call request;
Recording unit, for recording the test case mark and the function call data.
The application also provides a kind of data processing equipment, comprising:
Obtaining unit is recorded, for obtaining the record information comprising test case mark and function call data;
Use-case identifies obtaining unit, for obtaining test case mark to be checked;
Query unit, for being identified according to the test case to be checked, inquired from the record information with it is described The corresponding practical calling function information of test case mark to be checked.
Compared with prior art, the application has the following advantages:
The processing method and processing device of a kind of test case provided by the present application, by obtaining this operation correspondence of test case Function call data adjust the test case according to the function call data, it is thus possible to so that test adjusted Function call information and expected function call information degree of conformity when use-case is run is higher, to solve tested software system It is middle to introduce the test leakage of integration testing and uncertain problem in the case where new increasing function and change function.
A kind of data processing method provided by the present application and device pass through record test case mark and function call number According to provide data basis according to function call data point reuse test case, auxiliary solves to introduce in tested software system newly-increased The test leakage of integration testing and uncertain problem in the case where function and change function.
A kind of data processing method provided by the present application and device, by being identified according to test case to be checked, from packet Inquiry is corresponding with the test case mark to be checked in record information containing test case mark and function call data Practical calling function information, to call function information to adjust test case to provide the mode of data of obtaining, auxiliary according to practical Solve the test leakage and uncertainty of integration testing in the case where introducing new increasing function in tested software system and changing function Problem.
Detailed description of the invention
Fig. 1 is the process flow diagram of the processing method for the test case that the application first embodiment provides;
Fig. 2 is the test case and tested software system function correspondence diagram that the application first embodiment provides;
Fig. 3 is a kind of configuration diagram for embodiment that the application first embodiment provides;
Fig. 4 is a kind of test case debugging step schematic diagram for embodiment that the application first embodiment provides;
Fig. 5 is the process flow diagram for the data processing method that the application second embodiment provides;
Fig. 6 is the process flow diagram for the data processing method that the application 3rd embodiment provides;
Fig. 7 is the processing unit schematic diagram for the test case that the application fourth embodiment provides;
Fig. 8 is the data processing equipment schematic diagram that the 5th embodiment of the application provides;
Fig. 9 is the data processing equipment schematic diagram that the application sixth embodiment provides;
Figure 10 is electronic equipment schematic diagram provided by the present application.
Specific embodiment
Many details are explained in the following description in order to fully understand the application.But the application can be with Much it is different from other way described herein to implement, those skilled in the art can be without prejudice to the application intension the case where Under do similar popularization, therefore the application is not limited by following public specific implementation.
The application provides processing method, device and the electronic equipment of a kind of test case.The application is related to a kind of number simultaneously According to processing method, device and electronic equipment.The application further relates to another data processing method, device and electronic equipment.Under It is described in detail one by one in the embodiment in face.
The application first embodiment provides a kind of processing method of test case, for integrating in software development process The test case that uses is tested to be debugged so that function call data when test case operation after debugging with it is expected Function call data symbols are right higher, thus can be covered in integration testing the new increasing function that is introduced in tested software system with And change function, avoid test leakage and the uncertain problem of integration testing node.
For ease of understanding, the background of several concepts relevant to integration testing and the method is introduced first.
So-called integration testing is to test the software test that environment simulation of real scenes verifies tested software system Activity.Mainly include following node in software development process: demand evaluation, subdivision evaluation, survey a point evaluation, code development, Test case exploitation, unit testing, integration testing, Acceptance Test, gray scale test, issue it is online etc..Integration testing grinds for software Important link during hair is the important factor in order of tested software mass of system.
The test case of phase of integration testing is integration testing use-case, is referred to as test case in the application.So-called test Use-case is one group of test input, execution condition and the expected results designed for the test target of integration testing.Currently, test is used The main document according to demand of the design of example, refines the possible usage scenario of software, and as use-case.In Test Sample Design In the process, there is no the relationship for considering use-case and code itself, this will lead to new increasing function and change in tested software system More function, which may not have equally to be tested in as expected, to be covered, so as to cause test leakage.With former fund transfer system A and improved new For fund transfer system B, it is assumed that A supports 0 to 1000 yuan of function of transferring accounts, wherein 500 yuan or less do not need verifying user password, 500 or more need to verify user password;And A only supports to be divided into transferring accounts for unit, then reports an error if there is decimal point.And B is in A On the basis of increase newly 2 significant digits supported to transfer accounts, such as: 0.5 point of transfers accounts.In general, being used for B design test Can be designed according to what's new demand when example, such as: transfer accounts 0.5 point, transfer accounts 0.01, transfer accounts 0.951 etc..In view of 500 The threshold of member is unrelated with B newly increased requirement, therefore Test Engineer will not design 500 yuan or more of test case.If in code 500 yuan or more and 500 yuan of processing functions below be it is mutually independent, then in this case, only design test use according to demand Regular meeting causes test to be omitted, such as: 500 yuan or more transfer accounts handles function and is not tested.Therefore, the embodiment of the present application provides Test case processing method, provide and test case be adjusted based on function call data, to improve integration testing To the coverage of new increasing function and change function, test leakage risk is reduced, improves tested software mass of system.
It is illustrated below in conjunction with processing method of the Fig. 1 to Fig. 4 to a kind of test case that first embodiment provides.
The processing method of test case shown in FIG. 1, comprising: step S101 to step S104.
Step S101 obtains test case data.
The acquisition test case data refers to the test case data for obtaining integration testing.Specifically, acquisition is following extremely A kind of few data: test case title, test case mark, test case content, so as to further according to any of the above-described data, Obtain the input information of tested software system.For example, from test case library read test case data.For another example, by testing tool Or test software obtains test case data from the entity for being stored with test case data.
Step S102 runs the corresponding test case of the test case data according to the test case data.
It is described according to the test case data in the present embodiment, it runs the corresponding test of the test case data and uses Example, comprising:
The input information of this operation of the test case is obtained from the test case data;
The target letter that the expectation function of the test case is realized in tested software system is called according to the input information Number;
Return to the call result for being directed to the objective function.
Wherein, described that the expectation function that the test case is realized in tested software system is called according to the input information Objective function, comprising:
The interface layer functions of tested software system are called according to the input information;
By in the next stage function of objective function described in the interface layer function call and the objective function at least One function.
Referring to FIG. 2, interface layer 201 receives corresponding call request when test case executes, specifically by interface layer in figure Each interface layer functions in 201 receive the input information carried in call request, and the mesh of operation layer 202 is called according to input information The next stage function of scalar functions and the objective function, i.e., function 1, function 5, function 8 in figure etc..
In one embodiment of the present embodiment, further includes: obtain the test case from the test case data Execution conditional information, correspondingly, it is described according to it is described input information call tested software system interface layer functions, comprising: According to the input information and the interface layer functions for executing conditional information and calling tested software system.
In one embodiment of the present embodiment, the interface layer that tested software system is called according to the input information Function, comprising: the execution conditional information that the test case is determined according to the input information, further, according to the execution The interface layer functions of conditional information calling tested software system.
Step S103, obtaining the test case, this runs corresponding function call data.
The function call data refer to that operation test case realizes tested software system during corresponding expectation function The internal calling data for successively carrying out function call generation.For example, function name information.Layer-by-layer in tested software internal system Function call forms function call link, correspondingly, the function call data refer to the function call link information.
In the present embodiment, during running test case, tested software system is according to the input information of the test case Calling interface layer functions, by the next stage function of objective function described in the interface layer function call and the objective function At least one function, then the test case this run corresponding function call data, comprising: function call chain road Data are called, the function call link includes at least one in the next stage function of the objective function and the objective function A function and the interface layer functions.Correspondingly, described obtain this corresponding function call number of operation of the test case According to, comprising: obtain the calling data of function call chain road.Further, by obtaining the corresponding expection of the test case Function information is called, calls function information to be compared with the calling data of function call chain road for expected, Ke Yifu Test Engineer is helped to confirm whether the test case meets expected test target.In practical application, it is contemplated that function information is called, The stress test function that the test case operation needs to cover, the stress test letter are usually determined when design test case Number includes the function and newly-increased function that tested software system research and development is changed relative to former software systems in the process, In, tested software system is the software systems changed on the basis of former software systems.
Referring to FIG. 2, the arrow in figure in operation layer 202 represents function calling relationship, wherein function 2, function 5, letter Number 9 is in the presence of the function changed, such as modification or newly-increased;Function 1, function 3, function 4, function 6, function 7 are former software systems In the function that does not change.In figure, use-case 1 is a test case, in the test case operational process, in tested software system Function calling relationship be: interface 1, function 1, function 5, function 3.There it can be seen that passing through use-case and tested software system Internal function calling relationship, in available each test case operational process the case where covered function;In figure, use-case 2 be a test case, the coverage function 5 in the test case operational process;In figure, use-case 3 is a test case, at this Function 5 and function 9 are covered in test case operational process.Therefrom it can be concluded that, there is test and omit in function 2, not any Use-case is covered.
In the present embodiment, obtaining the test case using probe card, this runs corresponding function call data, packet Include following processing steps:
The function of this operation calling of the test case is intercepted using plug-in unit;
Obtain the function call data.
In one embodiment of the present embodiment, further, the test case for identifying the test case is recorded Mark and the test case this run corresponding function call data;Export test case mark and described Function call data.Specifically, the record information comprising test case mark and the function call data is exported To search engine.Further, search engine: mode one can be constructed using following two ways, using database and Webservice builds Website server, and use-case mark and tested software system banner to be checked, website are received by the page Server inquiry database simultaneously returns to the record information comprising test case and corresponding function call data inquired;Mode Two, search engine is constructed using general search engine framework elastic search and Kibana.
Referring to FIG. 3, showing the realization framework of a system of the processing method for deploying test case in figure.Figure In, tested software system 301, which runs test case and generates respective function, calls data.Data acquisition 302 intercepts tested software The function call of internal system, records test case information and corresponding function call link information, and output includes test case The record information of information and corresponding function call link information;Preferably, data acquisition 302 exists the record information preservation In memory.Search engine 303 obtains the record information comprising test case information and corresponding function call link information, root According to the corresponding function call link information of test case identification search;Preferably, search engine saves the record information.Into one Step, if tested software system is based on java language, data acquisition 302 is specifically based on the portion open source software java-sandbox The plug-in unit is affixed one's name to, search engine 303 is realized using open source softwares such as elastic search+kibana.
Step S104 adjusts the test case according to the function call data.
It is described according to the function call data in the present embodiment, adjust the test case, comprising: obtain the survey The expected of this operation of example on probation calls function information;According to this operation of test case described in the function call data acquisition Practical calling function information;According to the expected calling function information and the practical calling function information, the survey is adjusted Example on probation.Wherein, the expected calling function information, comprising: the function information of change and/or newly-increased function information.Specifically , the test case is adjusted by following processing: if it is determined that the practical calling function information includes the expected calling Function information, it is determined that the test case is to meet the default test case for judging rule;Otherwise, then the test is adjusted to use Example.It is, if the practical expected tune of whole for calling function information to be related to comprising the expected calling function information With function, then test case meets judge rule;Otherwise, it needs to be adjusted test case.For example, from the expected calling The mark of the expected function called is taken out in function information as first identifier, is taken out from the practical calling function information real The mark for the function that border is called is inquired in second identifier, if not as second identifier using first identifier as index First identifier is inquired, then illustrates to need to be adjusted test case.
In one embodiment of the present embodiment, the test case is adjusted by following manner: according to the function tune With data, the input information of the test case data is adjusted;And/or the newly-increased test case different from the test case Data.For example, generally will include the interface layer functions and input information of calling for the test case that interface layer is tested (such as input parameter), then the case where increasing test case includes two kinds: (1) increasing test case, to call distinct interface layer letter Number;(2) increase test case, the same interface layer functions are increased with different input information.
In one embodiment of the present embodiment, the practical tune of this operation of the test case is obtained by following processing With function information, comprising: obtain test case mark to be checked;According to the test case mark to be checked, institute is used Stating search engine search record has the record information comprising test case mark and function call data, obtains the practical tune Use function information.
In one embodiment of the present embodiment, further comprise: obtaining tested software system banner to be checked;According to The test case mark to be checked and the tested software system banner to be checked, use described search engine search Record has the record information comprising test case mark and function call data, obtains the practical calling function information.
Test case is carried out using the processing method of test case provided in this embodiment referring to FIG. 4, Fig. 4 is shown The processing step of debugging, comprising:
S401, integrated design test case, the expected calling function that confirmation needs to cover;For example, determining tested software system System is compared with as the original system of the development baseline of tested software system, and there are the functions of change, newly-increased function;
S402 starts plug-in unit;
S403 runs test case, acquires function call data by plug-in unit;Collected function call data can protect It deposits in memory;
S404 exports test case information and function call data to search engine;Search engine data are handled Such as newly-increased or replacement, and preserve, wherein so-called replacement refers to that the same use-case, may be due to more in debugging process There is variation in the intrinsic function for changing the tested software system that input information causes it to cover, it is nearest to save test case under the scene The use-case and corresponding function call link data got in implementation procedure;
S405, according to the running practical calling function of test case described in test case identification search;
S406 judges whether practical calling function includes expected calling function, if it is, integration testing use-case passes through, If it is not, then adjustment integration testing use-case.
So far, the processing method of test case provided in this embodiment is described in detail, the test case Processing method can construct test case and tested software system function grade by test case and corresponding function call data Relationship, so as to debug test case.
Based on above-described embodiment, the application second embodiment provides a kind of data processing method.
It is illustrated below in conjunction with Fig. 5 data processing method provided second embodiment, relevant portion refers to first The explanation of embodiment corresponding part.
Data processing method shown in fig. 5, comprising: step S501 to step S503.
Step S501 obtains the call request comprising test case mark.
Each interface layer functions receive the input information carried in call request
In the present embodiment, when running test case, tested software system obtains the call request comprising test case mark, The input information that the test case identifies this operation of corresponding test case is obtained according to call request;According to the input Information calls the objective function that the expectation function of the test case is realized in tested software system;It returns and is directed to the target letter Several call results.
Wherein, described that the expectation function that the test case is realized in tested software system is called according to the input information Objective function, comprising:
The interface layer functions of tested software system are called according to the input information;
By in the next stage function of objective function described in the interface layer function call and the objective function at least One function.
In one embodiment of the present embodiment, further includes: obtain the test case from the test case data Execution conditional information, correspondingly, it is described according to it is described input information call tested software system interface layer functions, comprising: According to the input information and the interface layer functions for executing conditional information and calling tested software system.
In one embodiment of the present embodiment, the interface layer that tested software system is called according to the input information Function, comprising: the execution conditional information that the test case is determined according to the input information, further, according to the execution The interface layer functions of conditional information calling tested software system.
Step S502 obtains the corresponding function call data of the call request.
In the present embodiment, specifically, intercepting the call request corresponding function call chain road using probe card Function call obtains function call data;Wherein, the function call link includes interface layer functions, realizes that the test is used At least one function in the objective function of expectation function and the next stage function of the objective function of example.
In the present embodiment, during running test case, tested software system is according to the input information of the test case Calling interface layer functions, by the next stage function of objective function described in the interface layer function call and the objective function At least one function, then the test case this run corresponding function call data, comprising: function call chain road Data are called, the function call link includes at least one in the next stage function of the objective function and the objective function A function and the interface layer functions.Correspondingly, described obtain this corresponding function call number of operation of the test case According to, comprising: obtain the calling data of function call chain road.Further, by obtaining the corresponding expection of the test case Function information is called, calls function information to be compared with the calling data of function call chain road for expected, Ke Yifu Test Engineer is helped to confirm whether the test case meets expected test target.In practical application, it is contemplated that function information is called, The stress test function that the test case operation needs to cover, the stress test letter are usually determined when design test case Number includes the function and newly-increased function that tested software system research and development is changed relative to former software systems in the process, In, tested software system is the software systems changed on the basis of former software systems.
In the present embodiment, obtaining the test case using probe card, this runs corresponding function call data, packet Include following processing steps:
The function of this operation calling of the test case is intercepted using plug-in unit;
Obtain the function call data.
Step S503 records the test case mark and the function call data.
In the present embodiment, record is had to the record information preservation of the test case mark and the function call data In memory.It is of course also possible to be stored in other storage entities.
Further, further includes: export the test case mark and the function call data.Preferably, by institute It states test case mark and the function call data is exported to search engine.
Based on above-described embodiment, the application 3rd embodiment provides a kind of data processing method.
It is illustrated below in conjunction with Fig. 6 data processing method provided 3rd embodiment, relevant portion refers to above-mentioned The explanation of embodiment corresponding part.
Data processing method shown in fig. 6, comprising: step S601 to step S603.
Step S601 obtains the record information comprising test case mark and function call data.
The data processing method provided in this embodiment can be deployed in search engine, include test case for being directed to The record information of mark and function call data provides search capability.Wherein it is possible to using described in the building of following two ways Search engine: mode one builds Website server using database and webservice, and use-case to be checked is received by the page Mark and tested software system banner, Website server inquiry database and return inquire comprising test case with it is corresponding The record information of function call data;Mode two uses general search engine framework elastic search and Kibana Construct search engine.
The function call data refer to that operation test case realizes tested software system during corresponding expectation function The internal calling data for successively carrying out function call generation, wherein the test case refers to that the test case is marked The use-case of knowledge.For example, the function call link information of tested software system operation Test cases technology, the function call link Information includes realizing in the objective function of the test case expectation function and the next stage function of the objective function at least The interface layer functions of one function and tested software system.
The record information obtained comprising test case mark and function call data, comprising: obtain data acquisition The record information of entity push.
Step S602 obtains test case mark to be checked.
In the present embodiment, the practical calling function letter of this operation of the test case is inquired according to test case mark Breath.In practical application, the test case mark of input is obtained, is identified for test case to be checked.
Step S603 is identified according to the test case to be checked, inquired from the record information with it is described to be checked The corresponding practical calling function information of the test case mark of inquiry.
In the present embodiment, the function call data are function call link information;Correspondingly, described according to described to be checked It askes use-case mark and inquires corresponding practical calling function information from the record information, comprising: according to the use-case to be checked Mark inquiry from the record information obtains corresponding function call link information;It is obtained from the function call link information Take the practical calling function information.
In one embodiment of the present embodiment, further includes: obtain tested software system banner to be checked;According to described Test case mark to be checked and tested software system banner to be checked, inquire corresponding reality from the record information Call function information in border.
In one embodiment of the present embodiment, what it is according to acquisition includes test case mark and function call data Information is recorded, the function call data are updated.It, may be due to for example, the same test case is in debugging process There is variation in the intrinsic function for the tested software system that change input information causes it to cover, save test case most under the scene The use-case and corresponding function call link data got in a nearly implementation procedure.
In one embodiment of the present embodiment, further includes: output reality corresponding with the test case to be checked Function information is called, is compared for use in expected calling function information corresponding with the test case, adjusts the survey Example on probation.Wherein, the expected calling function information, comprising: the function information of change and/or newly-increased function information.
Corresponding with first embodiment, the application fourth embodiment provides a kind of processing unit of test case.Below in conjunction with Fig. 7 is illustrated the processing unit for the test case that fourth embodiment provides.
The processing unit of test case shown in Fig. 7, comprising:
Use-case obtaining unit 701, for obtaining test case data;
Use-case running unit 702, for running the corresponding survey of the test case data according to the test case data Example on probation;
Function call data acquiring unit 703, for obtaining the test case, this runs corresponding function call number According to;
Use-case adjustment unit 704, for adjusting the test case according to the function call data.
Optionally, the use-case running unit 702, is specifically used for: the test is obtained from the test case data The input information of this operation of use-case;It is called in tested software system according to the input information and realizes the pre- of the test case The objective function of phase function;Return to the call result for being directed to the objective function.
Optionally, the use-case running unit 702, is also used to: calling tested software system according to the input information Interface layer functions;By in the next stage function of objective function described in the interface layer function call and the objective function extremely A few function;
Correspondingly, the function call data acquiring unit 703, is specifically used for: obtaining the calling of function call chain road Data, the function call link include at least one letter in the next stage function of the objective function and the objective function The several and described interface layer functions.
Optionally, the function call data acquiring unit 703, is specifically used for: intercepting the test case using plug-in unit The function that this operation is called;Obtain the function call data.
Optionally, the use-case adjustment unit 704, is specifically used for: obtaining expected the adjusting of this operation of the test case Use function information;The practical calling function information that this runs according to test case described in the function call data acquisition;Root According to the expected calling function information and the practical calling function information, the test case is adjusted.
Optionally, the use-case adjustment unit 704, is specifically used for: if it is determined that the practical calling function information includes The expected calling function information, it is determined that the test case is to meet the default test case for judging rule;Otherwise, then it adjusts The whole test case.
Optionally, the use-case adjustment unit 704, is specifically used for: according to the function call data, adjusting the test The input information of case data;And/or the newly-increased test case data different from the test case.
Optionally, described device further includes data acquisition unit, and the data acquisition unit is used for: record is for identifying State test case test case mark and the test case this run corresponding function call data;Described in output Test case mark and the function call data.
Optionally, the data acquisition unit, is specifically used for: will include test case mark and the function tune It is exported with the record information of data to search engine;
The use-case adjustment unit 704, is specifically used for: obtaining test case mark to be checked;According to described to be checked Test case mark, using described search engine search record have comprising test case mark and function call data note Information is recorded, the practical calling function information is obtained.
Optionally, described device includes search unit, and described search unit is used for: obtaining tested software system to be checked Mark;According to the test case mark to be checked and the tested software system banner to be checked, searched using described Rope engine search record has the record information comprising test case mark and function call data, obtains the practical calling letter Number information.
Optionally, the expected calling function information, comprising: the function information of change and/or newly-increased function information.
Corresponding with second embodiment, the 5th embodiment of the application provides a kind of data processing equipment.Below in conjunction with Fig. 8 to The data processing equipment that five embodiments provide is illustrated.
Data processing equipment shown in Fig. 8, comprising:
Call request obtaining unit 801, for obtaining the call request comprising test case mark;
Function call data acquiring unit 802, for obtaining the corresponding function call data of the call request;
Recording unit 803, for recording the test case mark and the function call data.
Optionally, described device further includes output unit, and the output unit is used for: export test case mark with And the function call data.
Optionally, the output unit, is specifically used for: the test case being identified and the function call data are defeated Out to search engine.
Optionally, the function call data acquiring unit 802, is specifically used for: intercepting the calling using probe card The function call of corresponding function call chain road is requested, function call data are obtained;Wherein, the function call link includes Interface layer functions are realized in the objective function of expectation function and the next stage function of the objective function of the test case At least one function.
Corresponding with 3rd embodiment, the application sixth embodiment provides a kind of data processing equipment.Below in conjunction with Fig. 9 to The data processing equipment that six embodiments provide is illustrated.
Data processing equipment shown in Fig. 9, comprising:
Obtaining unit 901 is recorded, for obtaining the record information comprising test case mark and function call data;
Use-case identifies obtaining unit 902, for obtaining test case mark to be checked;
Query unit 903, for being identified according to the test case to be checked, inquiry and institute from the record information State the corresponding practical calling function information of test case mark to be checked.
Optionally, the function call data are function call link information;
The query unit 903, is specifically used for: being inquired from the record information according to the use-case mark to be checked To corresponding function call link information;The practical calling function information is obtained from the function call link information.
Optionally, described device further includes data updating unit, and the data updating unit is used for: what it is according to acquisition includes The record information of test case mark and function call data, is updated the function call data.
Optionally, the query unit 903 is specifically used for: obtaining tested software system banner to be checked;According to described Test case mark to be checked and tested software system banner to be checked, inquire corresponding reality from the record information Call function information in border.
Optionally, described device further includes output unit, and the output unit is used for: output and the test to be checked The corresponding practical calling function information of use-case.
Corresponding with first embodiment, the 7th embodiment of the application provides a kind of electricity of processing method for test case Sub- equipment.Figure 10 is the schematic diagram of the electronic equipment.
Electronic equipment described in Figure 10, comprising:
Memory 1001 and processor 1002;
The memory 1001 is for storing computer executable instructions, and the processor 1002 is for executing the calculating Machine executable instruction:
Obtain test case data;
According to the test case data, the corresponding test case of the test case data is run;
Obtaining the test case, this runs corresponding function call data;
According to the function call data, the test case is adjusted.
Optionally, the processor 1002 is also used to execute following computer executable instructions: from the test case number According to the middle input information for obtaining this operation of the test case;It is called in tested software system and is realized according to the input information The objective function of the expectation function of the test case;Return to the call result for being directed to the objective function.
Optionally, the processor 1002 is also used to execute following computer executable instructions: according to the input information Call the interface layer functions of tested software system;Pass through objective function described in the interface layer function call and the objective function Next stage function at least one function;Obtain the calling data of function call chain road, the function call link packet Include at least one function and the interface layer functions in the next stage function of the objective function and the objective function.
Optionally, the processor 1002 is also used to execute following computer executable instructions: using described in plug-in unit interception The function that this operation of test case is called;Obtain the function call data.
Optionally, the processor 1002 is also used to execute following computer executable instructions: obtaining the test case The expected of this operation calls function information;The reality that this runs according to test case described in the function call data acquisition Call function information;According to the expected calling function information and the practical calling function information, the test case is adjusted.
Optionally, the processor 1002 is also used to execute following computer executable instructions:
If it is determined that the practical calling function information includes the expected calling function information, it is determined that the test is used Example presets the test case for judging rule to meet;Otherwise, then the test case is adjusted.
Optionally, the processor 1002 is also used to execute following computer executable instructions: according to the function call Data adjust the input information of the test case data;And/or the newly-increased test case number different from the test case According to.
Optionally, the processor 1002 is also used to execute following computer executable instructions: record is described for identifying The test case of test case identify and the test case this run corresponding function call data;Export the survey Example mark on probation and the function call data.
Optionally, the processor 1002 is also used to execute following computer executable instructions: will use comprising the test The record information of example mark and the function call data is exported to search engine;Obtain test case mark to be checked; According to the test case mark to be checked, had using described search engine search record comprising test case mark and letter Number calls the record information of data, obtains the practical calling function information.
Optionally, the processor 1002 is also used to execute following computer executable instructions: obtaining to be checked be tested Software systems mark;According to the test case mark to be checked and the tested software system banner to be checked, make There is the record information comprising test case mark and function call data with described search engine search record, obtains the reality Call function information in border.
Optionally, the expected calling function information, comprising: the function information of change and/or newly-increased function information.
Corresponding with second embodiment, the 8th embodiment of the application provides a kind of electronics for data processing method and sets It is standby.Its schematic diagram is similar to Figure 10.
The electronic equipment that 8th embodiment provides, comprising:
Memory and processor;
For the memory for storing computer executable instructions, the processor is executable for executing the computer Instruction:
Obtain the call request comprising test case mark;
Obtain the corresponding function call data of the call request;
Record the test case mark and the function call data.
Optionally, the processor is also used to execute following computer executable instructions: exporting the test case mark And the function call data.
Optionally, the processor is also used to execute following computer executable instructions: by the test case identify with And the function call data are exported to search engine.
Optionally, the processor is also used to execute following computer executable instructions: using described in probe card interception The function call of call request corresponding function call chain road obtains function call data;Wherein, the function call link Including interface layer functions, the objective function for the expectation function for realizing the test case and the next stage function of the objective function In at least one function.
Corresponding with 3rd embodiment, the 9th embodiment of the application provides a kind of electronics for data processing method and sets It is standby.Its schematic diagram is similar to Figure 10.
The electronic equipment that 9th embodiment provides, comprising:
Memory and processor;
For the memory for storing computer executable instructions, the processor is executable for executing the computer Instruction:
Obtain the record information comprising test case mark and function call data;
Obtain test case mark to be checked;
According to the test case mark to be checked, inquiry is used with the test to be checked from the record information The corresponding practical calling function information of example mark.
Optionally, the function call data are function call link information;The processor is also used to execute following meters Calculation machine executable instruction: corresponding function call chain is obtained according to use-case mark inquiry from the record information to be checked Road information;The practical calling function information is obtained from the function call link information.
Optionally, the processor is also used to execute following computer executable instructions: according to using comprising test for acquisition The record information of example mark and function call data, is updated the function call data.
Optionally, the processor is also used to execute following computer executable instructions: obtaining tested software to be checked System banner;According to the test case mark to be checked and tested software system banner to be checked, from the record Corresponding practical calling function information is inquired in information.
Optionally, the processor is also used to execute following computer executable instructions: output and the survey to be checked Try out the corresponding practical calling function information of example.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
1, computer-readable medium can be by any side including permanent and non-permanent, removable and non-removable media Method or technology realize that information stores.Information can be computer readable instructions, data structure, the module of program or other numbers According to.The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory techniques, CD-ROM are read-only Memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or Other magnetic storage devices or any other non-transmission medium, can be used for storage can be accessed by a computing device information.According to Herein defines, and computer-readable medium does not include non-temporary computer readable media (transitorymedia), such as modulation Data-signal and carrier wave.
2, it will be understood by those skilled in the art that embodiments herein can provide as the production of method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It can be used moreover, the application can be used in the computer that one or more wherein includes computer usable program code The computer program product implemented on storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Form.
Although the application is disclosed as above with preferred embodiment, it is not for limiting the application, any this field skill Art personnel are not departing from spirit and scope, can make possible variation and modification, therefore the guarantor of the application Shield range should be subject to the range that the claim of this application defined.

Claims (10)

1. a kind of processing method of test case characterized by comprising
Obtain test case data;
According to the test case data, the corresponding test case of the test case data is run;
Obtaining the test case, this runs corresponding function call data;
According to the function call data, the test case is adjusted.
2. running the survey the method according to claim 1, wherein described according to the test case data Try the corresponding test case of case data, comprising:
The input information of this operation of the test case is obtained from the test case data;
The objective function that the expectation function of the test case is realized in tested software system is called according to the input information;
Return to the call result for being directed to the objective function.
3. according to the method described in claim 2, it is characterized in that, described call tested software system according to the input information The objective function of the middle expectation function for realizing the test case, comprising:
The interface layer functions of tested software system are called according to the input information;
Pass through at least one of objective function described in the interface layer function call and the next stage function of the objective function Function;
It is described to obtain this corresponding function call data of operation of the test case, comprising:
The calling data of function call chain road are obtained, the function call link includes the objective function and the target letter At least one function and the interface layer functions in several next stage functions.
4. the method according to claim 1, wherein described obtain this corresponding letter of operation of the test case Number calls data, comprising:
The function of this operation calling of the test case is intercepted using plug-in unit;
Obtain the function call data.
5. adjusting the survey the method according to claim 1, wherein described according to the function call data Example on probation, comprising:
Obtain the expected calling function information of this operation of the test case;
The practical calling function information that this runs according to test case described in the function call data acquisition;
According to the expected calling function information and the practical calling function information, the test case is adjusted.
6. according to the method described in claim 5, it is characterized in that, described according to the expected calling function information and the reality Function information is called on border, adjusts the test case, comprising:
If it is determined that described, practical to call function information include described expected calling function information, it is determined that the test case is Meet the default test case for judging rule;Otherwise, then the test case is adjusted.
7. adjusting the survey the method according to claim 1, wherein described according to the function call data Example on probation, comprising:
According to the function call data, the input information of the test case data is adjusted;And/or it is newly-increased different from described The test case data of test case.
8. according to the method described in claim 5, it is characterized by further comprising:
Recording test case mark and the test case for identifying the test case, this runs corresponding function Call data;
Export the test case mark and the function call data.
9. a kind of data processing method characterized by comprising
Obtain the call request comprising test case mark;
Obtain the corresponding function call data of the call request;
Record the test case mark and the function call data.
10. a kind of data processing method characterized by comprising
Obtain the record information comprising test case mark and function call data;
Obtain test case mark to be checked;
According to the test case mark to be checked, inquiry and the test case mark to be checked from the record information Know corresponding practical calling function information.
CN201910266530.3A 2019-04-03 2019-04-03 The processing of test case and data processing method and device Pending CN110134582A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910266530.3A CN110134582A (en) 2019-04-03 2019-04-03 The processing of test case and data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910266530.3A CN110134582A (en) 2019-04-03 2019-04-03 The processing of test case and data processing method and device

Publications (1)

Publication Number Publication Date
CN110134582A true CN110134582A (en) 2019-08-16

Family

ID=67568968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910266530.3A Pending CN110134582A (en) 2019-04-03 2019-04-03 The processing of test case and data processing method and device

Country Status (1)

Country Link
CN (1) CN110134582A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111159033A (en) * 2019-12-25 2020-05-15 口碑(上海)信息技术有限公司 Software testing method and device
CN111459824A (en) * 2020-04-01 2020-07-28 腾讯科技(深圳)有限公司 Test case processing method and device for concurrent service
CN111459547A (en) * 2020-04-01 2020-07-28 腾讯科技(深圳)有限公司 Method and device for displaying function call link
CN112579467A (en) * 2020-12-28 2021-03-30 北京百家科技集团有限公司 Test method, test device, computer equipment and storage medium
CN112799951A (en) * 2021-02-04 2021-05-14 上海云轴信息科技有限公司 Method and equipment for generating automatic test case for charging system
CN113094252A (en) * 2019-12-23 2021-07-09 腾讯科技(深圳)有限公司 Test case generation method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103198010A (en) * 2012-01-06 2013-07-10 腾讯科技(深圳)有限公司 Software testing method, device and system
CN104794059A (en) * 2015-05-08 2015-07-22 北京理工大学 Defect positioning method and device based on function calling records
CN107153608A (en) * 2016-03-02 2017-09-12 腾讯科技(深圳)有限公司 Code detection method and code detecting apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103198010A (en) * 2012-01-06 2013-07-10 腾讯科技(深圳)有限公司 Software testing method, device and system
CN104794059A (en) * 2015-05-08 2015-07-22 北京理工大学 Defect positioning method and device based on function calling records
CN107153608A (en) * 2016-03-02 2017-09-12 腾讯科技(深圳)有限公司 Code detection method and code detecting apparatus

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094252A (en) * 2019-12-23 2021-07-09 腾讯科技(深圳)有限公司 Test case generation method and device, computer equipment and storage medium
CN113094252B (en) * 2019-12-23 2023-09-29 腾讯科技(深圳)有限公司 Test case generation method and device, computer equipment and storage medium
CN111159033A (en) * 2019-12-25 2020-05-15 口碑(上海)信息技术有限公司 Software testing method and device
CN111159033B (en) * 2019-12-25 2023-07-04 口碑(上海)信息技术有限公司 Software testing method and device
CN111459824A (en) * 2020-04-01 2020-07-28 腾讯科技(深圳)有限公司 Test case processing method and device for concurrent service
CN111459547A (en) * 2020-04-01 2020-07-28 腾讯科技(深圳)有限公司 Method and device for displaying function call link
CN111459824B (en) * 2020-04-01 2021-09-14 腾讯科技(深圳)有限公司 Test case processing method and device for concurrent service
CN112579467A (en) * 2020-12-28 2021-03-30 北京百家科技集团有限公司 Test method, test device, computer equipment and storage medium
CN112799951A (en) * 2021-02-04 2021-05-14 上海云轴信息科技有限公司 Method and equipment for generating automatic test case for charging system
CN112799951B (en) * 2021-02-04 2023-03-31 上海云轴信息科技有限公司 Method and equipment for generating automatic test case for charging system

Similar Documents

Publication Publication Date Title
CN110134582A (en) The processing of test case and data processing method and device
US9965255B2 (en) Code origination data management for code assembly
US9612943B2 (en) Prioritization of tests of computer program code
CN103164328B (en) The regression testing method of a kind of business function, Apparatus and system
US9356966B2 (en) System and method to provide management of test data at various lifecycle stages
Becker et al. Decision criteria in digital preservation: What to measure and how
Ghoshal et al. Provenance from log files: a BigData problem
WO2019085061A1 (en) Automatic test management method, apparatus and device for fund system, and storage medium
Corradini et al. Automated black‐box testing of nominal and error scenarios in RESTful APIs
US11636028B2 (en) Stress test impact isolation and mapping
Ding et al. Hfcontractfuzzer: Fuzzing hyperledger fabric smart contracts for vulnerability detection
CN110968437A (en) Method, device, equipment and medium for parallel execution of single contract based on Java intelligent contract
CN101853200A (en) High-efficiency dynamic software vulnerability exploiting method
CN103186463B (en) Determine the method and system of the test specification of software
CN109558316A (en) A kind of HTTP interface mobilism parameter test method of Test Strategy automatic configuration
Yang et al. Vuldigger: A just-in-time and cost-aware tool for digging vulnerability-contributing changes
CN108897686A (en) It is complete to record separately automated testing method and device
Autili et al. Software engineering techniques for statically analyzing mobile apps: research trends, characteristics, and potential for industrial adoption
Walter et al. Architecture-based attack path analysis for identifying potential security incidents
US11194704B2 (en) System testing infrastructure using combinatorics
US20210326243A1 (en) Dynamic reordering of test case execution
US9626492B2 (en) Sharing and executing sensitive logic semantics
CN110147313B (en) Log output method and device
Severin et al. Smart money wasting: Analyzing gas cost drivers of ethereum smart contracts
US11057416B2 (en) Analyze code that uses web framework using local parameter model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination