CN110489321A - Test case screening technique, device, computer equipment and storage medium - Google Patents

Test case screening technique, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110489321A
CN110489321A CN201910610425.7A CN201910610425A CN110489321A CN 110489321 A CN110489321 A CN 110489321A CN 201910610425 A CN201910610425 A CN 201910610425A CN 110489321 A CN110489321 A CN 110489321A
Authority
CN
China
Prior art keywords
code
label
test
modification
test case
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
CN201910610425.7A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910610425.7A priority Critical patent/CN110489321A/en
Publication of CN110489321A publication Critical patent/CN110489321A/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Factory Administration (AREA)

Abstract

This application involves a kind of test case screening technique, device, computer equipment and storage mediums.This method comprises: then identifying the code revision label of code file to be measured, and code revision label is stored into history lists when detecting code file to be measured every time;Multiple test cases are obtained, multiple test cases are executed based on code file to be measured every time;The test case that test result is test crash is modified label with respective code to be associated, by respective associated relation record in history lists;The frequency of failure of the associated every kind of test case of every kind of code revision label is calculated based on history lists;According to every kind of code revision label and the frequency of failure of associated each test case, target detection use-case corresponding with every kind of code revision label is determined.Test case specific aim can be improved in operation system after testing code revision using this method.

Description

Test case screening technique, device, computer equipment and storage medium
Technical field
This application involves field of computer technology, set more particularly to a kind of test case screening technique, device, computer Standby and storage medium.
Background technique
With the development of computer technology, business scope involved in operation system becomes more bulky complex.Due to right The demand of operation system is constantly updated, and the exploitation code of operation system can also continuously improve optimization.In order to guarantee operation system energy It is enough to operate normally, after each code file modifies update, require to carry out regression test to operation system.Tradition side It needs to be implemented all test cases in formula to test operation system, however the quantity of test case is more, it is difficult to be directed to All test cases quickly and accurately are completed in modification partial code, cause test period very long, and if only to modification part Code execution part test case, is easy to cause the spreadability of test case poor, and system is not comprehensive enough, thus in test code After modification when operation system, the specific aim of test case is poor.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide one kind can in operation system after testing code revision, Improve test case targetedly test case screening technique, device, computer equipment and storage medium.
A kind of test case screening technique, which comprises when detecting code file to be measured every time, then identify institute The code revision label of code file to be measured is stated, and the code revision label is stored into history lists;Obtain multiple tests Use-case executes the multiple test case based on each code file to be measured, obtains test result;Test result includes that test is lost It loses;The test case that test result is test crash is modified label with respective code to be associated, respective associated relationship is remembered Record is in the history lists;The failure time of the associated every kind of test case of every kind of code revision label is calculated based on the history lists Number;The test case that the frequency of failure reaches preset value is determined as the corresponding target detection of respective code modification label to use Example.
In one of the embodiments, the method also includes: according to Multiple Code modify label and filter out with The corresponding target detection use-case of every kind of code revision label generates mapping table;When detecting the code file to be measured newly uploaded again When, then identify the label to be matched of the code file to be measured;It is searched and the tag match to be matched in the mapping table Code revision label;The code file to be measured is carried out based on the corresponding target detection use-case of matched code revision label Regression test.
The code file to be measured carries version information, the identification code to be measured in one of the embodiments, The code revision label of file, comprising: search the history codes file of the corresponding previous version of the version information;It is more to be measured Code file and the history codes file, obtain difference code snippet;Corresponding generation is generated according to the difference code snippet Code modification label.
It is described in one of the embodiments, that corresponding code revision label, packet are generated according to the difference code snippet It includes: identifying a variety of modification informations of the difference code snippet;Corresponding modification mark is respectively created according to every kind of modification information Label;Multiple modification subtabs are spliced and generate code revision label.
It is described in one of the embodiments, to repair the test case that the test result is test crash with respective code Change label to be associated, by respective associated relation record in the history lists, comprising: by every kind of modification subtab with accordingly repair Change the corresponding multiple test crash case associated records of subtab in the history lists;It is described to be calculated often based on the history lists The frequency of failure of the kind associated every kind of test case of code revision label, comprising: every kind of modification is calculated based on the history lists The frequency of failure of the associated every kind of test case of label.
The test case that the frequency of failure is reached preset value is determined as corresponding generation in one of the embodiments, The corresponding target detection use-case of code modification label, comprising: the failure of the associated every kind of test case of subtab is modified according to every kind Number calculates the sub- failure rate of the corresponding every kind of test case of every kind of modification subtab;It is corresponding more according to code revision label The corresponding sub- failure rate of kind modification subtab, calculation code modification label correspond to the synthesis failure rate of every kind of test case; The test case that the comprehensive failure rate is greater than preset threshold is determined as to the target detection use-case of respective code modification label.
A kind of test case screening plant, described device include: identification module, for that ought detect code text to be measured every time When part, then the code revision label of the code file to be measured is identified, and the code revision label is stored into history lists; Execution module executes the multiple test case based on each code file to be measured, is surveyed for obtaining multiple test cases Test result;Test result includes test crash;Relating module, for by test case that test result is test crash and corresponding Code revision label is associated, by respective associated relation record in the history lists;Statistical module, for being gone through based on described History meter calculates the frequency of failure of the associated every kind of test case of every kind of code revision label;Screening module is used for the failure The test case that number reaches preset value is determined as the corresponding target detection use-case of respective code modification label.
The identification module is also used to search the corresponding previous version of the version information in one of the embodiments, History codes file;Code file more to be measured and the history codes file, obtain difference code snippet;According to the difference Code snippet generates corresponding code revision label.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing The step of device realizes above-mentioned each test case screening technique as described in the examples when executing the computer program.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor The step of above-mentioned each test case screening technique as described in the examples is realized when row.
Above-mentioned test case screening technique, device, computer equipment and storage medium, when server detects generation to be measured every time When code file, then the code revision label of code file to be measured is identified, and code revision label is stored in history tab.Clothes Business device can obtain multiple test cases, and execute multiple test cases to be screened based on the modification post code newly uploaded.Service The test case of test crash can be associated with respective code modification label record in history lists by device.When server detects enough It, can be based on the associated every kind of test case of every kind of code revision label of history lists statistic of classification after multiple code file to be measured The frequency of failure, so as to filter out and every kind of generation the frequency of failure of every kind of code revision label and associated each test case The corresponding target detection use-case of code modification label.Quantify the spy of each code revision by way of according to code revision label Sign, and different test cases count the test result of different code modification feature, and it is higher accurately to filter out probability of failure Target detection use-case, so as to improve the specific aim of test case, accurately when testing operation system code file to be measured Efficiently code file to be measured is tested.
Detailed description of the invention
Fig. 1 is the application scenario diagram of test case screening technique in one embodiment;
Fig. 2 is the flow diagram of test case screening technique in one embodiment;
Fig. 3 is the flow diagram of test case screening technique in another embodiment;
Fig. 4 is the structural block diagram of test case screening plant in one embodiment;
Fig. 5 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
Test case screening technique provided by the present application, can be applied in application environment as shown in Figure 1.Wherein, eventually End 102 is communicated with server 104 by network.Wherein, terminal 102 can be, but not limited to be various personal computers, pen Remember this computer, smart phone, tablet computer and portable wearable device, server 104 can with independent server or It is the server cluster of multiple server compositions to realize.When server 104 detects the generation to be measured that terminal 102 newly uploads every time When code file, then the code revision label of code file to be measured is identified, and code revision label is stored in history tab.Clothes Business device 104 can obtain multiple test cases, and execute multiple test cases to be screened based on the modification post code newly uploaded.Clothes Being engaged in device 104 can be by the test case of test crash association respective code modification label record in history lists.When server 104 is examined It, can be associated based on every kind of code revision label of history lists statistic of classification after measuring the code file to be measured that enough times newly upload The frequency of failure of every kind of test case, so as to by the frequency of failure of every kind of code revision label and associated each test case Machine learning model is inputted as input data, filters out target detection use-case corresponding with every kind of code revision label.
In one embodiment, as shown in Fig. 2, providing a kind of test case screening technique, it is applied to Fig. 1 in this way In server for be illustrated, comprising the following steps:
Step 202, when detecting code file to be measured every time, then the code revision label of code file to be measured is identified, And code revision label is stored into history lists.
Code file to be measured refers to the code obtained after developer modifies to the history codes file of operation system File.Code file refers to the uncompiled text file according to certain programming language specification writing.Due to business system The demand of system is constantly updated, and the code file of operation system is also required to constantly update therewith.Code revision label can be to be measured The label that code file carries is also possible to the label generated by parsing code file automation to be measured.Code revision label It can reflect the related amendments information of code file to be measured, the including but not limited to letter such as modification type, modification content, location revision Breath.
In one embodiment, developer can be based on modification type, repair after terminal modifications history codes file Changing the information such as content, location revision is that code file to be measured marks upper code revision label.Modifying type includes but is not limited to delete It removes, increase, modify.Modification content includes but is not limited to java class, Java function, corresponding service logic etc..Location revision includes But it is not limited to initial position and the end position of code revision part.By code revision label, can quantify actually to repair every time The case where changing, so that developer can clearly be chased after based on modification course of the history lists to the code file of operation system It traces back.
Step 204, multiple test cases are obtained, multiple test cases are executed based on each code file to be measured, are surveyed Test result;Test result includes test crash.
Test case refers to for testing whether operation system can normally realize the one group of input data and phase of required function The intended response result answered.The number being made of multiple input parameters that input data is used when referring to for realizing system function According to.Expected results refer to according to defined in interface definition document, based on input data can be inferred to as a result, expected results It also may include multiple output parameters.Test case can be used for carrying out the operation system after code revision logic testing, such as Whether test operation system can obtain correct response results in the case where normal input, for another example can also be to operation system Error test is carried out, for example can test operation system normally report an error in input extremely or abnormal scene input.
In one embodiment, when modifying number less than preset threshold, the modification post code to newly uploading every time is needed Execute multiple test cases to be screened.After obtaining enough test datas, test result could be based on and carry out machine Study, analyzes those test cases.
In one embodiment, test case includes input data and multiple anticipated output parameters, is used by executing test After example obtains multiple reality output parameters, when there are any one reality output parameter and corresponding anticipated output parameter are different When cause, it is determined that testing case failure;When each reality output parameter is consistent with corresponding anticipated output parameter, then Determine that the testing case passes through.
Step 206, the test case that test result is test crash is modified label with respective code to be associated, by phase Incidence relation is answered to be recorded in history lists.
After for each code file implementation of test cases to be measured, it may be determined that the test result of each test case. After the test case of test crash is screened, the mark of the test case of test crash can be associated with phase in history lists The code revision label answered.It may include revision information, code revision label, code in history lists shown in following history lists 1 The one of them or multinomial such as code, modification post code and association test case before file path, modification.It is directed to revision The code file to be measured of V1.0, code revision label are " modification-ETF fund product-XX type-applies to purchase transaction function ", association Test case be case 1, case 2 and case 3;The code file to be measured of revision V2.0, code revision label are " to repair Change-ETF fund product-XX type-order pay off function ", associated test case is case 2, case 4 and case 5.
History lists 1
Step 208, the frequency of failure of the associated every kind of test case of every kind of code revision label is calculated based on history lists.
After the code file of operation system is by repeatedly modification, then multiple code revision marks may be present in history lists Label, each code revision label can be associated with the test case of one or more test crash.It can be by identical code revision label As one kind, count in corresponding all test cases, the frequency of failure of every kind of test case.The test cases come out loses It is higher to lose number, then explanation is directed to the corresponding code file to be measured of this kind of code revision label, executes the failure of the test cases Probability is higher.
Step 210, the test case that the frequency of failure reaches preset value is determined as the corresponding mesh of respective code modification label Mark test case.
The frequency of failure refers to that test result is the number of test crash.The frequency of failure can be reached preset value by server Test case is determined as the corresponding target detection use-case of respective code modification label.Server can also be based on the machine of pre-training Learning model according to the frequency of failure determines the corresponding target detection use-case of each code revision label.Wherein, machine learning mould Type refer to for after training with to code revision label have recognition capability model.Nerve can be used in the machine learning model Network model, support vector machines or Logic Regression Models etc..By by a large amount of code revision label and associated each survey After the input machine learning model of example on probation, the corresponding higher survey of probability of failure of every kind of code revision label can be used to identify Example on probation.Machine learning model after training can be used for going out corresponding target according to the code revision label filtration of input The higher test case of test cases, i.e. probability of failure.It is readily appreciated that, server can also be using other modes come according to failure Number determines the corresponding target detection use-case of each code revision label, is not construed as limiting to this.
In above-mentioned test case screening technique, when server detects code file to be measured every time, then code to be measured is identified The code revision label of file, and code revision label is stored in history tab.Server can obtain multiple test cases, And multiple test cases to be screened are executed based on the modification post code newly uploaded.Server can be by the test case of test crash Respective code modification label record is associated in history lists.It, can after server detects the code file to be measured of enough times Based on the frequency of failure of the associated every kind of test case of every kind of code revision label of history lists statistic of classification, so as to by every kind of generation The frequency of failure of code modification label and associated each test case filters out target corresponding with every kind of code revision label and surveys Example on probation.Quantify the feature of each code revision, and different test cases by way of according to code revision label to not Test result with code revision feature counts, and accurately filters out the higher target detection use-case of probability of failure, so as to When testing operation system code file to be measured, improve the specific aim of test case, accurately and efficiently to code file to be measured into Row test.
In one embodiment, this method further include: according to Multiple Code modify label and filter out with every kind of generation The corresponding target detection use-case of code modification label generates mapping table;When detecting the code file to be measured newly uploaded again, then Identify the label to be matched of code file to be measured;The code revision label with tag match to be matched is searched in the mapping table;Base Regression test is carried out to code file to be measured in matched code revision label corresponding target detection use-case.
After filtering out target detection use-case corresponding with every kind of code revision label by machine learning model, it can create The mapping relations of every kind of code revision label and respective objects test case, and generate the mapping table that can be used for indexing.Work as needs When testing the code file to be measured newly uploaded again, the accordingly corresponding mesh of label to be matched can be searched by mapping table Mark test case.Targetedly regression test, Neng Gou are carried out to code file to be measured based on the partial test use-case filtered out Under the premise of guaranteeing modification partial code coverage rate, shorten test period, realizes efficiently test.Regression test, which refers to have modified, goes through After history code file, test is re-started to confirm modification without introducing new mistake or other codes being caused to generate mistake.From The cost in the stages such as system testing, maintenance upgrade will be greatly reduced in dynamic regression test.
In one embodiment, code file to be measured carries version information, identifies the code revision mark of code file to be measured Label, comprising: search the history codes file of the corresponding previous version of version information;Code file more to be measured and history codes text Part obtains difference code snippet;Corresponding code revision label is generated according to difference code snippet.
Each code file to be measured is all in previous vncsion history code file by being surveyed again on the basis of test Examination.It therefore can be by comparing the difference code snippet between code file to be measured and the history codes file of previous version, automatically Change analysis code difference segment and generates corresponding code revision label.Those difference code snippets are the generation of the last modification Code part.Code revision label is generated by automation, can be avoided and edit code file omission label to be measured in developer Test case caused by code revision label is searched abnormal.
In one embodiment, corresponding code revision label is generated according to difference code snippet, comprising: identification difference generation A variety of modification informations of chip segment;Corresponding modification subtab is respectively created according to every kind of modification information;By multiple modification marks Label splicing generates code revision label.
Modifying type includes but is not limited to delete, increase, modifying.Modifying content includes but is not limited to java class, Java letter Number, corresponding service logic etc..Location revision includes but is not limited to initial position and the end position of code revision part.One generation Code modification label may include the modification subtab of multiple dimensions.Such as code revision label can be for " modification-ETF fund produces Product-XX type-applies to purchase transaction function ", then modifying subtab includes modifying type " modification ", code source " ETF fund product ", Modification content " XX type " and " applying to purchase transaction function ".Modification subtab by splicing various dimensions generates code revision label, The information content that code revision label includes can be improved, to position with refining to each code file to be measured.
In one embodiment, by the test case association respective code modification label record of test crash in history lists In, comprising: by every kind of modification subtab multiple test crash case associated records corresponding with corresponding modification subtab in history In table;The frequency of failure of the associated every kind of test case of every kind of code revision label is calculated based on history lists, comprising: be based on history Meter calculates the frequency of failure of every kind of modification associated every kind of test case of subtab.
After code revision label to be divided into the code revision subtab of multiple dimensions, every kind of modification can be created Incidence relation between subtab and the test case of corresponding test crash.To be based on every kind of associated test of modification subtab Use-case is counted, and the frequency of failure for being directed to every kind of test case of every kind of modification subtab is obtained, so as to be based on being somebody's turn to do The scanning machine device learning model more refined a bit is trained.
In one embodiment, the test case that the frequency of failure reaches preset value is determined as respective code modification label pair The target detection use-case answered, comprising: the frequency of failure for modifying the associated every kind of test case of subtab according to every kind calculates every kind Modify the sub- failure rate of the corresponding every kind of test case of subtab;According to the corresponding a variety of modification subtabs point of code revision label Not corresponding sub- failure rate, calculation code modification label correspond to the synthesis failure rate of every kind of test case;Comprehensive failure rate is big It is determined as the target detection use-case of respective code modification label in the test case of preset threshold.
After the test case for being associated with the corresponding failure of each modification subtab, each modification subtab can be counted The test crash number and testing time of associated test case;Machine learning model can be calculated first to every kind of modification subtab The failure rate of corresponding every kind of test case, passes through formulaThe sub- failure rate Q of modification subtab i is calculatedi, In, SiIt is test crash number, CiIt is testing time;Certain is respectively corresponded according to multiple modification subtabs in code revision label The sub- failure rate of a test case carries out comprehensive marking to the test case, obtains comprehensive failure rate.Such as it can be by multiple sub- mistakes It is one of as comprehensive failure rate to lose average value, maximum value, median of rate etc..The variance of multiple sub- failure rates can also be made For comprehensive failure rate, the variance of the sub- failure rate of each test case is calculated by variance calculation formulaWherein, q is the average value of multiple sub- failure rates, and k is modification subtab Number;All test cases are ranked up according to the variance of sub- failure rate, the association test case of predetermined number before filtering out As target detection use-case, preferentially tested using target detection use-case.Pass through the target detection use-case high according to failure rate Code file to be measured is preferentially tested, can guarantee the test coverage in the case of less test case.
In one embodiment, as shown in figure 3, providing another test case screening technique, it is applied in this way It is illustrated for server 104 in Fig. 1, comprising the following steps:
Step 302, when detecting code file to be measured every time, then the version information of code file to be measured is identified.
Step 304, the history codes file of the corresponding previous version of version information is searched.
Step 306, code file more to be measured and history codes file, obtain difference code snippet.
Step 308, corresponding code revision label is generated according to difference code snippet.
Step 310, code revision label and version information correspondence are stored into history lists.
Step 312, multiple test cases are obtained, multiple test cases are executed based on each code file to be measured, are surveyed Test result;Test result includes test crash.
Step 314, the test case that test result is test crash is modified label with respective code to be associated, by phase Incidence relation is answered to be recorded in history lists.
Step 316, the frequency of failure of the associated every kind of test case of every kind of code revision label is calculated based on history lists.
Step 318, the test case that the frequency of failure reaches preset value is determined as the corresponding mesh of respective code modification label Mark test case.
Step 320, the target corresponding with every kind of code revision label label being modified according to Multiple Code and being filtered out Test cases technology mapping table.
Step 322, when detecting the code file to be measured newly uploaded again, then the to be matched of code file to be measured is identified Label.
Step 324, the code revision label with tag match to be matched is searched in the mapping table.
Step 326, code file to be measured is returned based on the corresponding target detection use-case of matched code revision label Return test.
In above-mentioned test case screening technique, when server detects code file to be measured every time, then automate generation to The code revision label of code file is surveyed, and code revision label is stored in history tab.Server can obtain multiple surveys Example on probation, and multiple test cases to be screened are executed based on the modification post code newly uploaded.Server can be by test crash Test case is associated with respective code modification label record in history lists.When server detects the code to be measured text of enough times After part, can based on the frequency of failure of the associated every kind of test case of every kind of code revision label of history lists statistic of classification, so as to It is corresponding with every kind of code revision label according to the determination of the frequency of failure of every kind of code revision label and associated each test case Target detection use-case.Quantify the feature of each code revision, and different tests by way of according to code revision label Use-case counts the test result of different code modification feature, accurately filters out the higher target detection use-case of probability of failure, So as to the specific aim of test case be improved, accurately and efficiently to generation to be measured in test operation system code file to be measured Code file is tested.
It should be understood that although each step in the flow chart of Fig. 2 and 3 is successively shown according to the instruction of arrow, It is these steps is not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps There is no stringent sequences to limit for rapid execution, these steps can execute in other order.Moreover, in Fig. 2 and 3 at least A part of step may include that perhaps these sub-steps of multiple stages or stage are not necessarily in same a period of time to multiple sub-steps Quarter executes completion, but can execute at different times, the execution in these sub-steps or stage be sequentially also not necessarily according to Secondary progress, but in turn or can replace at least part of the sub-step or stage of other steps or other steps Ground executes.
In one embodiment, as shown in figure 4, providing a kind of test case screening plant 400, comprising: identification module 402, for when detecting code file to be measured every time, then identifying the code revision label of code file to be measured, and by code Modification label is stored into history lists;Execution module 404 is based on each code file to be measured for obtaining multiple test cases Multiple test cases are executed, test result is obtained;Test result includes test crash;Relating module 406 is used for test result It is associated for the test case and respective code modification label of test crash, by respective associated relation record in history lists; Statistical module 408, for calculating the frequency of failure of the associated every kind of test case of every kind of code revision label based on history lists;Sieve Modeling block 410, the test case for the frequency of failure to be reached preset value are determined as the corresponding target of respective code modification label Test case.
In one embodiment, which further includes test module, for modifying label and screening according to Multiple Code Target detection use-case corresponding with every kind of code revision label out generates mapping table;When detecting the generation to be measured newly uploaded again When code file, then the label to be matched of code file to be measured is identified;The code with tag match to be matched is searched in the mapping table Modify label;Regression test is carried out to code file to be measured based on matched code revision label corresponding target detection use-case.
In one embodiment, code file to be measured carries version information, and identification module 402 is also used to search version information The history codes file of corresponding previous version;Code file more to be measured and history codes file, obtain difference code snippet; Corresponding code revision label is generated according to difference code snippet.
In one embodiment, identification module 402 is also used to identify a variety of modification informations of difference code snippet;According to every Corresponding modification subtab is respectively created in kind modification information;Multiple modification subtabs are spliced and generate code revision label.
In one embodiment, relating module 406 is also used to every kind of modification subtab is corresponding with corresponding modification subtab Multiple test crash case associated records in history lists;Statistical module 408 is also used to based on every kind of history lists statistic of classification Modify the frequency of failure of the associated every kind of test case of subtab.
In one embodiment, screening module 410 is also used to according to every kind of associated every kind of test case of modification subtab The frequency of failure calculate the sub- failure rate of every kind of corresponding every kind of test case of modification subtab;It is corresponding according to code revision label The corresponding sub- failure rate of a variety of modification subtabs, calculation code modification label correspond to the comprehensive of every kind of test case and fails Rate;The target detection that the test case that the comprehensive failure rate is greater than preset threshold is determined as respective code modification label is used Example.
Specific about test case screening plant limits the limit that may refer to above for test case screening technique Fixed, details are not described herein.Modules in above-mentioned test case screening plant can fully or partially through software, hardware and its Combination is to realize.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with It is stored in the memory in computer equipment in a software form, in order to which processor calls the above modules of execution corresponding Operation.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction Composition can be as shown in Figure 5.The computer equipment include by system bus connect processor, memory, network interface and Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The database of machine equipment is for storing the data such as history lists.The network interface of the computer equipment is used to pass through with external terminal Network connection communication.To realize a kind of test case screening technique when the computer program is executed by processor.
It will be understood by those skilled in the art that structure shown in Fig. 5, only part relevant to application scheme is tied The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, another computer equipment, including memory and processor, memory storage are provided There is computer program, which realizes the test case screening technique in above-mentioned each embodiment when executing computer program Step.
In one embodiment, another computer readable storage medium is provided, computer program is stored thereon with, is counted Calculation machine program realizes the step of test case screening technique in above-mentioned each embodiment when being executed by processor.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of test case screening technique, which comprises
When detecting code file to be measured every time, then the code revision label of the code file to be measured is identified, and will be described Code revision label is stored into history lists;
Multiple test cases are obtained, the multiple test case is executed based on each code file to be measured, obtains test result, institute Stating test result includes test crash;
The test case of test crash and respective code modification label are associated, respective associated relation record is gone through described In history table;
The frequency of failure of the associated every kind of test case of every kind of code revision label is calculated based on the history lists;
The test case that the frequency of failure reaches preset value is determined as the corresponding target detection of respective code modification label to use Example.
2. the method according to claim 1, wherein the method also includes:
Label is modified according to Multiple Code and the target detection use-case corresponding with every kind of code revision label filtered out generates Mapping table;
When detecting the code file to be measured newly uploaded again, then the label to be matched of the code file to be measured is identified;
The code revision label with the tag match to be matched is searched in the mapping table;
Regression test is carried out to the code file to be measured based on matched code revision label corresponding target detection use-case.
3. the method according to claim 1, wherein the code file to be measured carries version information, the knowledge The code revision label of the not described code file to be measured, comprising:
Search the history codes file of the corresponding previous version of the version information;
Code file more to be measured and the history codes file, obtain difference code snippet;
Corresponding code revision label is generated according to the difference code snippet.
4. according to the method described in claim 3, it is characterized in that, described generate corresponding generation according to the difference code snippet Code modification label, comprising:
Identify a variety of modification informations of the difference code snippet;
Corresponding modification subtab is respectively created according to every kind of modification information;
Multiple modification subtabs are spliced and generate code revision label.
5. according to the method described in claim 3, it is characterized in that, described use the test that the test result is test crash Example is associated with respective code modification label, by respective associated relation record in the history lists, comprising:
By every kind of modification subtab multiple test crash case associated records corresponding with corresponding modification subtab in the history In table;
The frequency of failure that the associated every kind of test case of every kind of code revision label is calculated based on the history lists, comprising:
The frequency of failure of every kind of modification associated every kind of test case of subtab is calculated based on the history lists.
6. according to the method described in claim 5, it is characterized in that, the test that the frequency of failure is reached preset value is used Example is determined as the corresponding target detection use-case of respective code modification label, comprising:
The frequency of failure of the associated every kind of test case of subtab is modified according to every kind, and it is corresponding every to calculate every kind of modification subtab The sub- failure rate of kind test case;
According to the corresponding sub- failure rate of the corresponding a variety of modification subtabs of code revision label, calculation code modifies label pair Should every kind of test case synthesis failure rate;
The target detection that the test case that the comprehensive failure rate is greater than preset threshold is determined as respective code modification label is used Example.
7. a kind of test case screening plant, which is characterized in that described device includes:
Identification module, for when detecting code file to be measured every time, then identifying the code revision of the code file to be measured Label, and the code revision label is stored into history lists;
Execution module executes the multiple test case based on each code file to be measured, obtains for obtaining multiple test cases To test result;The test result includes test crash;
Relating module is closed for the test case that the test result is test crash to be modified label with respective code Connection, by respective associated relation record in the history lists;
Statistical module, for calculating the failure time of the associated every kind of test case of every kind of code revision label based on the history lists Number;
Screening module, it is corresponding that the test case for the frequency of failure to be reached preset value is determined as respective code modification label Target detection use-case.
8. device according to claim 7, which is characterized in that the identification module is also used to search the version information pair The history codes file for the previous version answered;
Code file more to be measured and the history codes file, obtain difference code snippet;
Corresponding code revision label is generated according to the difference code snippet.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In the step of processor realizes any one of claims 1 to 6 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 6 is realized when being executed by processor.
CN201910610425.7A 2019-07-08 2019-07-08 Test case screening technique, device, computer equipment and storage medium Pending CN110489321A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910610425.7A CN110489321A (en) 2019-07-08 2019-07-08 Test case screening technique, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910610425.7A CN110489321A (en) 2019-07-08 2019-07-08 Test case screening technique, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110489321A true CN110489321A (en) 2019-11-22

Family

ID=68546661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910610425.7A Pending CN110489321A (en) 2019-07-08 2019-07-08 Test case screening technique, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110489321A (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941555A (en) * 2019-11-26 2020-03-31 广州品唯软件有限公司 Test case recommendation method and device, computer equipment and storage medium
CN111221817A (en) * 2019-12-25 2020-06-02 中国平安财产保险股份有限公司 Service information data storage method and device, computer equipment and storage medium
CN111258916A (en) * 2020-03-06 2020-06-09 贝壳技术有限公司 Automatic testing method and device, storage medium and equipment
CN111274126A (en) * 2020-01-14 2020-06-12 华为技术有限公司 Test case screening method, device and medium
CN111813684A (en) * 2020-07-17 2020-10-23 济南浪潮数据技术有限公司 Test method, test device and test equipment for web front-end component
CN111858379A (en) * 2020-07-30 2020-10-30 中国工商银行股份有限公司 Application testing method and device
CN111881025A (en) * 2020-07-20 2020-11-03 中国工商银行股份有限公司 Automatic test task scheduling method, device and system
CN112380125A (en) * 2020-11-16 2021-02-19 中信银行股份有限公司 Test case recommendation method and device, electronic equipment and readable storage medium
CN112416765A (en) * 2020-11-18 2021-02-26 平安普惠企业管理有限公司 Code review method, device, equipment and medium
CN112506803A (en) * 2021-01-09 2021-03-16 杭银消费金融股份有限公司 Big data testing method and system
CN112597046A (en) * 2020-12-29 2021-04-02 上海商汤智能科技有限公司 Test method, test device, computer equipment and storage medium
CN112817847A (en) * 2021-01-28 2021-05-18 杭州网易再顾科技有限公司 Data processing task testing method and device, electronic equipment and storage medium
CN113064824A (en) * 2021-03-31 2021-07-02 重庆紫光华山智安科技有限公司 Result analysis method and device, electronic device and storage medium
CN113900962A (en) * 2021-12-10 2022-01-07 广州易方信息科技股份有限公司 Code difference detection method and device
CN114138634A (en) * 2021-11-15 2022-03-04 苏州浪潮智能科技有限公司 Test case selection method and device, computer equipment and storage medium
CN114564388A (en) * 2022-02-23 2022-05-31 中国农业银行股份有限公司 Program testing method and device, electronic equipment and storage medium
CN114756477A (en) * 2022-06-13 2022-07-15 南京讯优智超软件科技有限公司 Multidimensional test method and system fusing customer behavior playback
CN115658550A (en) * 2022-12-09 2023-01-31 合肥高维数据技术有限公司 Automatic testing method and system for improving large-scale sample testing efficiency
CN116822424A (en) * 2023-07-11 2023-09-29 北京云枢创新软件技术有限公司 Source file modifying and positioning system and readable storage medium
CN117290253A (en) * 2023-11-23 2023-12-26 苏州元脑智能科技有限公司 Code testing method, device, communication equipment and storage medium
CN117331849A (en) * 2023-12-01 2024-01-02 杭银消费金融股份有限公司 Testing method and system based on accurate analysis of codes

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831057A (en) * 2012-08-13 2012-12-19 于秀山 Method for analyzing software function change and influence thereof by using function diagram
CN104750601A (en) * 2013-12-25 2015-07-01 中国移动通信集团吉林有限公司 Test method and test device
CN105930257A (en) * 2015-10-12 2016-09-07 中国银联股份有限公司 Method and apparatus for determining target test cases
CN106201857A (en) * 2015-05-05 2016-12-07 阿里巴巴集团控股有限公司 The choosing method of test case and device
CN107315689A (en) * 2017-07-04 2017-11-03 上海爱数信息技术股份有限公司 The Automation regression testing method of granularity is retrieved based on Git code files
CN107423214A (en) * 2017-04-18 2017-12-01 恒生电子股份有限公司 Software regression testing use-case acquisition methods, device and storage medium and electronic equipment
CN108255699A (en) * 2017-03-27 2018-07-06 平安科技(深圳)有限公司 regression testing method and device
CN108959059A (en) * 2017-05-19 2018-12-07 腾讯科技(深圳)有限公司 A kind of test method and test platform

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831057A (en) * 2012-08-13 2012-12-19 于秀山 Method for analyzing software function change and influence thereof by using function diagram
CN104750601A (en) * 2013-12-25 2015-07-01 中国移动通信集团吉林有限公司 Test method and test device
CN106201857A (en) * 2015-05-05 2016-12-07 阿里巴巴集团控股有限公司 The choosing method of test case and device
CN105930257A (en) * 2015-10-12 2016-09-07 中国银联股份有限公司 Method and apparatus for determining target test cases
CN108255699A (en) * 2017-03-27 2018-07-06 平安科技(深圳)有限公司 regression testing method and device
CN107423214A (en) * 2017-04-18 2017-12-01 恒生电子股份有限公司 Software regression testing use-case acquisition methods, device and storage medium and electronic equipment
CN108959059A (en) * 2017-05-19 2018-12-07 腾讯科技(深圳)有限公司 A kind of test method and test platform
CN107315689A (en) * 2017-07-04 2017-11-03 上海爱数信息技术股份有限公司 The Automation regression testing method of granularity is retrieved based on Git code files

Cited By (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941555A (en) * 2019-11-26 2020-03-31 广州品唯软件有限公司 Test case recommendation method and device, computer equipment and storage medium
CN110941555B (en) * 2019-11-26 2023-07-28 广州品唯软件有限公司 Test case recommendation method and device, computer equipment and storage medium
CN111221817A (en) * 2019-12-25 2020-06-02 中国平安财产保险股份有限公司 Service information data storage method and device, computer equipment and storage medium
CN111221817B (en) * 2019-12-25 2023-08-22 中国平安财产保险股份有限公司 Service information data storage method, device, computer equipment and storage medium
CN111274126A (en) * 2020-01-14 2020-06-12 华为技术有限公司 Test case screening method, device and medium
WO2021143175A1 (en) * 2020-01-14 2021-07-22 华为技术有限公司 Test case screening method and device, and medium
CN111274126B (en) * 2020-01-14 2022-10-04 华为云计算技术有限公司 Test case screening method, device and medium
CN111258916B (en) * 2020-03-06 2023-08-15 贝壳技术有限公司 Automatic test method, device, storage medium and equipment
CN111258916A (en) * 2020-03-06 2020-06-09 贝壳技术有限公司 Automatic testing method and device, storage medium and equipment
CN111813684A (en) * 2020-07-17 2020-10-23 济南浪潮数据技术有限公司 Test method, test device and test equipment for web front-end component
CN111881025A (en) * 2020-07-20 2020-11-03 中国工商银行股份有限公司 Automatic test task scheduling method, device and system
CN111881025B (en) * 2020-07-20 2023-08-04 中国工商银行股份有限公司 Automatic test task scheduling method, device and system
CN111858379B (en) * 2020-07-30 2024-03-29 中国工商银行股份有限公司 Application testing method and device
CN111858379A (en) * 2020-07-30 2020-10-30 中国工商银行股份有限公司 Application testing method and device
CN112380125A (en) * 2020-11-16 2021-02-19 中信银行股份有限公司 Test case recommendation method and device, electronic equipment and readable storage medium
CN112380125B (en) * 2020-11-16 2024-04-26 中信银行股份有限公司 Recommendation method and device for test cases, electronic equipment and readable storage medium
CN112416765A (en) * 2020-11-18 2021-02-26 平安普惠企业管理有限公司 Code review method, device, equipment and medium
CN112416765B (en) * 2020-11-18 2024-02-09 天翼安全科技有限公司 Code review method, device, equipment and medium
CN112597046A (en) * 2020-12-29 2021-04-02 上海商汤智能科技有限公司 Test method, test device, computer equipment and storage medium
CN112506803A (en) * 2021-01-09 2021-03-16 杭银消费金融股份有限公司 Big data testing method and system
CN112817847A (en) * 2021-01-28 2021-05-18 杭州网易再顾科技有限公司 Data processing task testing method and device, electronic equipment and storage medium
CN113064824A (en) * 2021-03-31 2021-07-02 重庆紫光华山智安科技有限公司 Result analysis method and device, electronic device and storage medium
CN114138634B (en) * 2021-11-15 2024-01-12 苏州浪潮智能科技有限公司 Test case selection method and device, computer equipment and storage medium
CN114138634A (en) * 2021-11-15 2022-03-04 苏州浪潮智能科技有限公司 Test case selection method and device, computer equipment and storage medium
CN113900962A (en) * 2021-12-10 2022-01-07 广州易方信息科技股份有限公司 Code difference detection method and device
CN114564388A (en) * 2022-02-23 2022-05-31 中国农业银行股份有限公司 Program testing method and device, electronic equipment and storage medium
CN114756477A (en) * 2022-06-13 2022-07-15 南京讯优智超软件科技有限公司 Multidimensional test method and system fusing customer behavior playback
CN115658550B (en) * 2022-12-09 2023-04-07 合肥高维数据技术有限公司 Automatic testing method and system for improving large-scale sample testing efficiency
CN115658550A (en) * 2022-12-09 2023-01-31 合肥高维数据技术有限公司 Automatic testing method and system for improving large-scale sample testing efficiency
CN116822424A (en) * 2023-07-11 2023-09-29 北京云枢创新软件技术有限公司 Source file modifying and positioning system and readable storage medium
CN116822424B (en) * 2023-07-11 2023-12-22 北京云枢创新软件技术有限公司 Source file modifying and positioning system and readable storage medium
CN117290253A (en) * 2023-11-23 2023-12-26 苏州元脑智能科技有限公司 Code testing method, device, communication equipment and storage medium
CN117290253B (en) * 2023-11-23 2024-03-01 苏州元脑智能科技有限公司 Code testing method, device, communication equipment and storage medium
CN117331849A (en) * 2023-12-01 2024-01-02 杭银消费金融股份有限公司 Testing method and system based on accurate analysis of codes
CN117331849B (en) * 2023-12-01 2024-02-27 杭银消费金融股份有限公司 Testing method and system based on accurate analysis of codes

Similar Documents

Publication Publication Date Title
CN110489321A (en) Test case screening technique, device, computer equipment and storage medium
CN110399293B (en) System test method, device, computer equipment and storage medium
US11494295B1 (en) Automated software bug discovery and assessment
US11675691B2 (en) System and method for performing automated API tests
CN106844217B (en) Method and device for embedding point of applied control and readable storage medium
US9317400B2 (en) Code coverage rate determination method and system
CN110109897A (en) Database script generation method, device, computer equipment and storage medium
CN111382070B (en) Compatibility testing method and device, storage medium and computer equipment
CN110019566A (en) Data checking, device, computer equipment and storage medium based on data warehouse
CN109299094A (en) Tables of data processing method, device, computer equipment and storage medium
CN109446065A (en) User tag test method, device, computer equipment and storage medium
CN112181854B (en) Method, device, equipment and storage medium for generating process automation script
CN111966580A (en) Automatic testing method, device, equipment and storage medium based on artificial intelligence
CN110069404A (en) Code debugging method, apparatus, equipment and medium
CN110008119A (en) Report test method, device, computer equipment and storage medium
CN110069364A (en) Spare part data error-correcting method, device, computer equipment and storage medium
CN108399125A (en) Automated testing method, device, computer equipment and storage medium
CN110362478A (en) Application upgrade test method, device, computer equipment and storage medium
CN110008180A (en) Financial data recording method, device, computer equipment and storage medium
CN116662203A (en) Test method, test device, computer equipment and storage medium
CN115829925A (en) Appearance defect detection method and device, computer equipment and storage medium
CN116932360A (en) Page testing method and device, computer equipment and storage medium
CN113672509A (en) Automatic testing method, device, testing platform and storage medium
CN107341423B (en) Test method and test equipment for smart card and computer readable storage medium
CN114064157B (en) Automatic flow implementation method, system, equipment and medium based on page element identification

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