CN110502432A - Intelligent test method, device, equipment and readable storage medium storing program for executing - Google Patents

Intelligent test method, device, equipment and readable storage medium storing program for executing Download PDF

Info

Publication number
CN110502432A
CN110502432A CN201910667875.XA CN201910667875A CN110502432A CN 110502432 A CN110502432 A CN 110502432A CN 201910667875 A CN201910667875 A CN 201910667875A CN 110502432 A CN110502432 A CN 110502432A
Authority
CN
China
Prior art keywords
test cases
data
test
algorithm
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910667875.XA
Other languages
Chinese (zh)
Other versions
CN110502432B (en
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 CN201910667875.XA priority Critical patent/CN110502432B/en
Publication of CN110502432A publication Critical patent/CN110502432A/en
Application granted granted Critical
Publication of CN110502432B publication Critical patent/CN110502432B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3676Test management for coverage analysis
    • 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/3684Test management for test design, e.g. generating new test cases
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention relates to field of artificial intelligence, disclose a kind of intelligent test method, comprising the following steps: are cleaned using cleaning algorithm to original test cases data, obtain test cases data;By each algorithm in the preset set of algorithms for calculating path, test cases data are trained, obtain the algorithm according to preset calculating path processing test cases data;It obtains test cases data at random by random algorithm, extracts the keyword in the test cases data, test cases data are expanded according to keyword, obtain expanding data set;It is handled by shot and long term memory network data set is expanded, obtains pending test cases collection;Pending test cases collection is expanded by the method for exhaustion;Test cases is executed, test result is obtained.The invention also discloses a kind of intelligent test device, equipment and computer readable storage mediums.Intelligent test method provided by the invention solves the technical issues of test poor quality.

Description

Intelligent test method, device, equipment and readable storage medium storing program for executing
Technical field
The present invention relates to field of artificial intelligence more particularly to a kind of intelligent test method, device, equipment and computers Readable storage medium storing program for executing.
Background technique
Currently, the odjective cause limited based on PROJECT TIME, limited personnel in reality scene, therefore surveyed in engineer All situations can not be considered when trying case, so typically tester is according to analysis or experience to emphasis Case is designed and tests, and test cases coverage rate is low, so as to cause test poor quality.
Summary of the invention
The main purpose of the present invention is to provide a kind of intelligent test method, device, equipment and computer-readable storage mediums Matter, it is intended to the technical issues of solving test poor quality.
To achieve the above object, the present invention provides a kind of intelligent test method, and the intelligent test method includes following step It is rapid:
Original test cases data are successively traversed, using corresponding preset cleaning algorithm to the original test cases data It is cleaned, obtains test cases data;
Successively the preset initial algorithm to be selected for calculating path is trained by the test cases data, is obtained to be selected Algorithm, the algorithm to be selected include at least: algorithm, the method for exhaustion, the random algorithm of shot and long term memory network;
It obtains test cases data at random by random algorithm, extracts the keyword in the test cases data, according to The keyword expands the test cases data, obtains expanding data set;
The expansion data set is handled by shot and long term memory network, obtains pending test cases collection;
Judge survey needed for whether the quantity of the pending test cases integrated test case is less than present test field scape Try growing number;
If test cases quantity needed for the pending test cases quantity is less than present test field scape, passes through exhaustion Method expands the pending test cases, until the pending test cases quantity is greater than or equal to present test field Test cases quantity needed for scape, if the pending test cases quantity is more than or equal to test needed for present test field scape Growing number is not handled then;
The test cases that the pending test cases is concentrated successively is executed, test result is obtained.
Optionally, described to obtain test cases data at random by random algorithm, it extracts in the test cases data Keyword expands the test cases data according to the keyword, obtains expansion data set and includes:
Obtain test cases data at random by random algorithm;
The keyword in the test cases data is extracted by word frequency and reversed word frequency algorithm, obtains the first pass Key word;
First keyword is matched with the preset keyword in preset keyword thesaurus by hash algorithm, is obtained To the second keyword, and replacement first keyword, obtain expanding data set.
Optionally, the data type according to the original test cases data, using corresponding preset cleaning algorithm The original test cases data are cleaned, obtaining test cases data includes:
Whether the data type for judging the original test cases data is numeric type;
If the data type of the original test cases data is numeric type, using normalization algorithm to the original survey Examination case data is handled, if the data type of the original test cases data is nonumeric type, is judged described original Whether the data type of test cases data is classification type;
If the data type of the original test cases data is classification type, using discretization algorithm to the original survey Examination case data is handled, if the data type of the original test cases data is non-classification type, is judged described original Whether the data type of test cases data is time type;
If the data type of the original test cases data is time type, using time-sharing method to the original survey Examination case data is handled, if not handling if the data type of the original test cases data is non-temporal type.
Optionally, the intelligent test method, further includes:
Original test cases data after judgement cleaning whether there is missing values;
If there are missing values for the original test cases data after the cleaning, missing values are carried out using k nearest neighbor algorithm Interpolation is not handled if missing values are not present in the original test cases data after the cleaning.
Optionally, the intelligent test method, further includes:
Test cases data are handled by shot and long term memory network, obtain the first test cases;
Judge whether the quantity of first test cases is less than present test field scape to the demand of test cases quantity;
If the quantity of first test cases is less than present test field scape to the demand of test cases quantity, pass through The method of exhaustion expands first test cases, obtains the second test cases collection, if the quantity of first test cases More than or equal to present test field scape to the demand of test cases quantity, then do not handle;
The test cases that second test cases is concentrated is obtained by random algorithm, extracts the pass in the test cases Key word expands the test cases according to the keyword, obtains pending test cases.
Optionally, the intelligent test method, further includes:
The code of test cases data is detected by the junit unit testing frame constructed in advance, is tested The code coverage of case data;
Judge whether the code coverage of the test cases data is less than default coverage rate;
If the code coverage of the test cases data is less than default coverage rate, continue according to the preset calculating road The set of algorithms of diameter is trained test cases data, until the code coverage of the test cases data of output is greater than or equal to Default coverage rate is not handled if the code coverage of the test cases data is greater than or equal to default coverage rate.
Further, to achieve the above object, the present invention also provides a kind of intelligent test device, the intelligent test devices Include:
Cleaning module, for successively traversing original test cases data, using corresponding preset cleaning algorithm to the original Beginning test cases data are cleaned, and test cases data are obtained;
First training module, for by the test cases data successively to it is preset calculate path initial algorithm to be selected It is trained, obtains algorithm to be selected;
First expands module, for obtaining test cases data at random by random algorithm, extracts the test cases number Keyword in expands the test cases data according to the keyword, obtains expanding data set;
First processing module is obtained for being handled by shot and long term memory network the expansion data set wait hold Row test cases collection;
First judgment module, for judging whether the quantity of the pending test cases integrated test case is less than currently Test cases quantity needed for test scene;
Second expands module, if test cases number needed for being less than present test field scape for pending test cases quantity Amount, then expand the pending test cases by the method for exhaustion, be greater than up to the pending test cases quantity or Equal to test cases quantity needed for present test field scape;
Execution module, the test cases concentrated for successively executing the pending test cases, obtains test result.
Optionally, the first expansion module includes:
Acquiring unit, for obtaining test cases data at random by random algorithm;
Extraction unit, for being mentioned by word frequency and reversed word frequency algorithm to the keyword in the test cases data It takes, obtains the first keyword;
Matching unit, for passing through hash algorithm for the preset key in first keyword and preset keyword thesaurus Word is matched, and is obtained the second keyword, and replacement first keyword, is obtained expanding data set.
Optionally, the cleaning module specifically includes:
Taxon, for successively traversing the original test cases data, and to the original test cases data into Row classification, obtains the data type of the original test cases data, the data type include: numeric type, classification type and when Between type;
Cleaning unit is calculated for the data type according to the original test cases data using corresponding preset cleaning Method cleans the original test cases data, obtains test cases data.
Optionally, the cleaning unit is specifically used for:
Whether the data type for judging the original test cases data is numeric type;
If the data type of the original test cases data is numeric type, using normalization algorithm to the original survey Examination case data is handled, if the data type of the original test cases data is nonumeric type, is judged described original Whether the data type of test cases data is classification type;
If the data type of the original test cases data is classification type, using discretization algorithm to the original survey Examination case data is handled, if the data type of the original test cases data is non-classification type, is judged described original Whether the data type of test cases data is time type;
If the data type of the original test cases data is time type, using time-sharing method to the original survey Examination case data is handled, if it is not, not handling then.
Optionally, the intelligent test device method, further includes:
Second judgment module, for judging that the original test cases data after cleaning whether there is missing values;
Interpolation module uses k nearest neighbor algorithm if there are missing values for the original test cases data after the cleaning Interpolation is carried out to missing values.
Optionally, the intelligent test device method, further includes:
Second processing module obtains the first survey for handling by shot and long term memory network test cases data Try case;
Third judgment module, for judging whether the quantity of first test cases is less than present test field scape to test The demand of growing number;
Third expands module, if the quantity for first test cases is less than present test field scape to test cases number The demand of amount then expands first test cases by the method for exhaustion, obtains the second test cases collection;
4th expands module, for obtaining the test cases that second test cases is concentrated by random algorithm, extracts Keyword in the test cases expands the test cases according to the keyword, obtains pending test case Example.
Optionally, the intelligent test method, further includes:
Detection module is carried out for code of the junit unit testing frame by constructing in advance to test cases data Detection, obtains the code coverage of test cases data;
4th judgment module, for judging whether the code coverage of the test cases data is less than default coverage rate;
Second training module continues if the code coverage for the test cases data is less than default coverage rate Test cases data are trained according to the preset set of algorithms for calculating path, until the generation of the test cases data of output Code coverage rate is greater than or equal to default coverage rate.
Further, to achieve the above object, the present invention also provides a kind of Intelligent test device, the Intelligent test devices Including memory, processor and it is stored in the intelligence test program that can be run on the memory and on the processor, The step of intelligence test program realizes intelligent test method as described in any one of the above embodiments when being executed by the processor.
Further, to achieve the above object, the present invention also provides a kind of computer readable storage medium, the computers It is stored with intelligence test program on readable storage medium storing program for executing, realizes when the intelligence test program is executed by processor as any of the above-described The step of intelligent test method described in item.
The present invention can generate a large amount of test cases according to the method for exhaustion by test cases model, therefore be adapted to a variety of Test scene, to adapt to more actual scenes, is increased in addition, being parsed using test cases of the random algorithm to acquisition The accuracy of test.In addition, the coverage rate to test cases is defined, test case is generated by test cases model every time After example, coverage rate will be detected, by detecting coverage rate, can make newly-generated test cases that original test case be completely covered Example, and the accuracy that test cases model generates test cases can also be continued to optimize according to test cases coverage rate, it solves The technical issues of test cases coverage rate is low, tests poor quality.
Detailed description of the invention
Fig. 1 is the structural schematic diagram for the Intelligent test device running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of intelligent test method first embodiment of the present invention;
Fig. 3 is the refinement flow diagram of step S30 in Fig. 2;
Fig. 4 is the refinement flow diagram of step S10 in Fig. 2:
Fig. 5 is the refinement flow diagram of step S102 in Fig. 4;
Fig. 6 is the flow diagram of intelligent test method second embodiment of the present invention;
Fig. 7 is the flow diagram of intelligent test method 3rd embodiment of the present invention;
Fig. 8 is the flow diagram of intelligent test method fourth embodiment of the present invention;
Fig. 9 is the functional block diagram of one embodiment of intelligent test device of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that described herein, specific examples are only used to explain the present invention, is not intended to limit the present invention.
The present invention provides a kind of Intelligent test device.
Referring to Fig.1, Fig. 1 is the structural schematic diagram for the Intelligent test device running environment that the embodiment of the present invention is related to.
As shown in Figure 1, the Intelligent test device includes: processor 1001, such as CPU, communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 is for realizing the connection communication between these components. User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), and network interface 1004 can Choosing may include standard wireline interface and wireless interface (such as WI-FI interface).Memory 1005 can be high-speed RAM storage Device is also possible to stable memory (non-volatile memory), such as magnetic disk storage.Memory 1005 is optional It can also be the storage device independently of aforementioned processor 1001.
It will be understood by those skilled in the art that the hardware configuration of Intelligent test device shown in Fig. 1 is not constituted to intelligence The restriction of energy test equipment may include perhaps combining certain components or different portions than illustrating more or fewer components Part arrangement.
As shown in Figure 1, as may include operating system, net in a kind of memory 1005 of computer readable storage medium Network communication module, Subscriber Interface Module SIM and intelligence test program.Wherein, operating system is to manage and control Intelligent test device With the program of software resource, the operation of intelligence test program and other softwares and/or program is supported.
In the hardware configuration of Intelligent test device shown in Fig. 1, network interface 1004 is mainly used for accessing network;User Interface 1003 is mainly used for detecting confirmation Command And Edit instruction etc..And processor 1001 can be used for calling in memory 1005 The intelligence test program of storage, and execute the operation of each embodiment of following intelligent test method.
Based on above-mentioned Intelligent test device hardware configuration, each embodiment of intelligent test method of the present invention is proposed.
It is the flow diagram of one embodiment of intelligent test method of the present invention referring to Fig. 2, Fig. 2.In the present embodiment, the intelligence Can test method the following steps are included:
Step S10 successively traverses original test cases data, using corresponding preset cleaning algorithm to the original test Case data is cleaned, and test cases data are obtained;
In the present embodiment, original test cases data are successively traversed, using corresponding preset cleaning algorithm to described original Test cases data are cleaned, and test cases data are obtained, wherein in order to reduce invalid original test cases data to survey Therefore the interference of test result before by original test cases input test case training algorithm, needs to carry out data clear It washes.The mode of cleaning is unlimited, for example, being cleaned according to preset rule, such as concentrates, it is specified that washing one group of test cases The test cases with space.Data cleansing refers to discovery and corrects last one of journey of identifiable mistake in data file Sequence, including check data consistency, handle invalid value and missing values etc..
Before this, need to acquire original test cases data, the mode for acquiring original test cases data is unlimited, can be with It is to be acquired by preset api interface.
Step S20 is successively trained the preset initial algorithm to be selected for calculating path by the test cases data, Algorithm to be selected is obtained, the algorithm to be selected includes at least: algorithm, the method for exhaustion, the random algorithm of shot and long term memory network;
In the present embodiment, test cases model is constructed based on deep learning frame tensorflow.Tensorflow is to use In the frame for indicating certain type of calculating abstract (referred to as calculating figure).Calculating in figure can be with preset many algorithms, calculating figure The step of template of the calculating of execution, it lists algorithm.In order to which calculating is used to scheme, session is set, only after starting session, Export calculated result.
During training algorithm, the gradient descent algorithm and back-propagation algorithm of tensorflow have mainly been used.Tool Body process is as follows:
The formula of gradient descent algorithm are as follows: θ10- α ▽ J (θ), in formula, J is a function about θ, θ0It represents Current location, θ1Next step position is represented, α is called learning rate or step-length in gradient descent algorithm, and what ▽ was represented is Gradient declines most fast direction.This formula entirety means that the data of input are θ in the position being currently located0, pass through One step or multistep (iteration) reach next step position θ1.Such as the case is inputted into test cases training algorithm: " input Account ABC, password: 123, login successfully ", i.e., the current location θ in formula0;When second of training, instructed to test cases Practice in algorithm " input account abc, password: 123, login successfully ", " input account ABD, password: 123, login failure ", wherein By " input account abc, password: 123, login successfully " it is found that by once training, so that it may new test cases is obtained, i.e., Password: learning rate α in formula, and input account abc 123, is logined successfully " it is exactly next step position θ in formula1, " defeated Enter account abc " and refer to that gradient declines most fast direction ▽, " input account ABD " leads to login failure, then illustrates " input account Number ABD " is that gradient declines most fast opposite direction, and in the present embodiment, the purpose of training test cases training algorithm is to allow test The study of case training algorithm declines most fast direction ▽ to gradient.Test cases training algorithm can learn in what situation Under can login successfully, and export the test cases that can login successfully.In the present embodiment, main is exactly by input " input account ABC, password: 123, login successfully ", eventually find " input account ABC, password: 123, login successfully ", " input Account abc, password: 123, login successfully ", " input account abc, password: 123, login successfully ".
But when training test cases training algorithm, need by multiple adjusting step, it could be according to " input Account ABC, password: 123, login successfully " find " input account abc, password: 123, login successfully ", therefore in the present embodiment In need to use back-propagation algorithm.
It is that the data of test cases are first inputted into input layer, using hidden layer when using gradient descent algorithm Processing, finally output layer export, for example, output layer export test cases after, we can referring to preset rule, I.e. under account and the correct situation of Password Input, no matter whether there is space between account and password, if be capitalization shape Formula can login successfully.If output the result is that " input account ABD, password: 123, login successfully " then with it is preset Rule is not inconsistent, because account is wrong in this test cases, therefore can be determined that and occurs accidentally in the node of hidden layer Difference.So the node of hidden layer can be gone to look for this error, and adjust the section for error occur according to back propagation algorithm The shared weight of point.For example, hidden layer is at present there are two node c and d, c node pass through to input " input account ABC, it is close Code: 123, login successfully " handled, had found according to gradient descent algorithm " input account ABD, password: 123, log at Function ", d node have found " input account abc, password: 123, login successfully ", are according to weight shared by preset rules c node Weight shared by 60, d nodes is 40, the big node of output weight accounting as a result, by normalizing algorithm process in output Afterwards, export " input account ABD, password: 123, login successfully ", but discovery account is mistake according to preset rules , therefore it is not inconsistent preset rule, so back propagation algorithm is called, weight shared by adjustment c node and d node, Until the result of output meets preset rule.
In order to allow test cases training algorithm to learn various test cases under different scenes as much as possible Data, therefore, it is necessary to acquire the original test cases of a large amount of various dimensions, optionally, these original test cases collection be can wrap Data containing interface testing: calling interface: A, B, C, D, E return the result A-a, B-b, C-c, D-d, E-e, i.e., each interface returns Value is the combining form of interface name and the small letter of its title, goes to train test cases model according to this rule, as input F When, it returns the result as F-f, i.e., it is believed that the success of test cases model training.
In addition to this it is possible to each syslog data, each system state data, link information data, the network information Data, error reporting system data are original test cases data, to train test cases training algorithm.
Step S30 obtains test cases data by random algorithm at random, extracts the key in the test cases data Word expands the test cases data according to the keyword, obtains expanding data set;
In the present embodiment, test cases data are parsed using random algorithm, can be preset to keyword, number, word Accord with the resolution rules of string;Resolution rules include: to preset the keyword for needing to parse, number, character string;Preset parsing Keyword, number, the mode of character string.
For example, for test cases: " in dialog box input 18, calling No. 18 interfaces ", " in dialog box input 19, Call No. 19 interfaces " ... the test cases of " in dialog box input 30, calling No. 30 interfaces ", still, these test cases Example can not Complete test finish the interface in actual scene whether can normal call therefore increase in the present embodiment Random algorithm, the first number in parsing test cases in first test cases and the last one test cases, therefore can To obtain, " 18 ", " calling ", " 30 ", then " 18 " can be parsed into " 17 " and " 18 " according to random algorithm, " 30 " are parsed into " 31 " and " 30 " increase " in dialog box input 17, calling No. 17 interfaces " again on the basis of original test cases in this way " in dialog box input 31, calling No. 31 interfaces ", what can be tested in this way is more comprehensive.
" 18 " and " 30 " are the boundary value of entire test cases collection, there is two boundary values, so that it may check beyond this two After a boundary value, if can be with normal call interface.
Step S40 handles the expansion data set by shot and long term memory network, obtains pending test cases Collection;
In the present embodiment, shot and long term memory network be in advance it is trained, the shot and long term memory network can to parsing survey Examination case data is handled, and pending test cases, the training process of shot and long term memory network are then obtained are as follows: for example, surveying Try example analysis data are as follows: 123.Shot and long term memory network can be obtained according to initial weight test cases " input password 123, Login successfully ", " input password 123, login failure ".It should be noted that the two test cases are not final output wait hold Row test cases, according to artificial test results it is found that " input password 123, login successfully ", this case be meet it is currently practical Demand, therefore in the present embodiment, normalization algorithm is also used, by normalization algorithm to the parsing test cases Data are handled, and the probability for obtaining " input password 123, login successfully " is 20%, obtain " input password 123, login mistake Lose " probability be 80%, by artificial test results it is found that needing the test cases of " input password 123, login successfully ", still The probability of " input password 123, login successfully " is less than the probability of " input password 123, login failure ", therefore to export test case Example " input password 123, login failure ", in order to export correct test cases, therefore also needs through back-propagation algorithm tune Whole output " input password 123, login successfully " and " input password 123, login failure " respective shared weight, until output It as a result is " input password 123, login successfully ".
Step S50, judges whether the quantity of the pending test cases integrated test case is less than present test field scape Required test cases quantity;
In the present embodiment, test cases quantity needed for present test field scape is referred to when testing, be to difference Test cases tested, if missing certain important test cases, it will cause test result inaccuracy.For example, one A four and 10000 kinds of combinations are all shared by the password that forms of number, that is to say, that most to need to attempt 9999 ability Find real password.If the scene task in the example is made into test cases, at least 9999 test cases are needed, If only 9998 test cases, it is likely that omit by important test cases, so that affecting test cases executes knot Fruit.
Step S60, if the pending test cases quantity be less than present test field scape needed for test cases quantity, The pending test cases is expanded by the method for exhaustion, is worked as until the pending test cases quantity is greater than or equal to Test cases quantity needed for preceding test scene, if the pending test cases quantity is greater than or equal to present test field scape institute The test cases quantity needed, then do not handled;
In the present embodiment, the effect of the method for exhaustion is that the test cases for meeting scene demand, example are expanded out according to current scene Such as, one four and all by the password that forms of number, need to make 10000 test cases if by if artificial Example, and by that if the method for exhaustion, then can export this 10000 permutation and combination one by one can be with according to a large amount of test cases Test cases quantity needed for making pending test cases quantity be greater than present test field scape.If described wait hold in the present embodiment Test cases quantity needed for row test cases quantity is less than present test field scape, then by the method for exhaustion to the pending test Case is expanded, until the pending test cases quantity is more than or equal to test cases number needed for present test field scape Amount, if it is not, not handling then.
Step S70 successively executes the test cases that the pending test cases is concentrated, obtains test result.
In the present embodiment, since all exhaustions of the various test cases under current scene having been come out by the method for exhaustion, because This can successively execute the test cases that the pending test cases is concentrated, and obtain test result, will not omit in this way Certain important test cases.
By step S30 it is found that input " inputting 19 in dialog box ", test cases model, which can generate, " inputs 17 in dialog box When, call No. 17 interfaces ", " in dialog box input 18, calling No. 18 interfaces " " in dialog box input 19, is called No. 19 and is connect Mouthful " ... " in dialog box input 30, calling No. 30 interfaces ", the survey of " in dialog box input 31, calling No. 31 interfaces " Try case.These test cases are just needed to be implemented in the present embodiment, that is, are examined in dialog box input 17, can be called No. 17 Can interface call No. 18 interfaces ... in dialog box input 31, call No. 31 to connect in dialog box input 18 Mouthful.And output test result, for example, it is not capable of calling No. 17 interfaces in dialog box input 17, and in dialog box input 18, energy It calls No. 18 interfaces ... in dialog box input 31, is capable of calling No. 31 interfaces.
It is the refinement flow diagram of step S30 in Fig. 2 referring to Fig. 3, Fig. 3.In the present embodiment, above-mentioned steps S30 is specific The following steps are included:
Step S301 obtains test cases data by random algorithm at random;
In the present embodiment, test cases data are parsed using random algorithm, can be preset to keyword, number, word Accord with the resolution rules of string;Resolution rules include: to preset the keyword for needing to parse, number, character string;Preset parsing Keyword, number, the mode of character string.
For example, for test cases: " in dialog box input 18, calling No. 18 interfaces ", " in dialog box input 19, Call No. 19 interfaces " ... the test cases of " in dialog box input 30, calling No. 30 interfaces ", still, these test cases Example can not Complete test finish the interface in actual scene whether can normal call therefore increase in the present embodiment Random algorithm, the first number in parsing test cases in first test cases and the last one test cases, therefore can To obtain, " 18 ", " calling ", " 30 ", then " 18 " can be parsed into " 17 " and " 18 " according to random algorithm, " 30 " are parsed into " 31 " and " 30 " increase " in dialog box input 17, calling No. 17 interfaces " again on the basis of original test cases in this way " in dialog box input 31, calling No. 31 interfaces ", what can be tested in this way is more comprehensive.
" 18 " and " 30 " are the boundary value of entire test cases collection, there is two boundary values, so that it may check beyond this two After a boundary value, if can be with normal call interface.
Step S302 extracts the keyword in the test cases data by word frequency and reversed word frequency algorithm, Obtain the first keyword;
In the present embodiment, calculating by word frequency and reversed word frequency algorithm to the weight of each word, and will by word frequency and The value that reversed word frequency algorithm obtains after calculating is normalized.For example, three available for " input password 1234 " Weight, " input " be w1, " password " is w2, " 1234 " are w3If after normalized, w1Weight be the largest, then basis " input " finds other relative words, such as " output " from keyword thesaurus, can thus expand out new test Case " output password 1234 " is to get having arrived expansion data.
Step S303, by hash algorithm by the preset keyword in first keyword and preset keyword thesaurus into Row matching obtains the second keyword, and replacement first keyword, obtains expanding data set.
In the present embodiment, the preset keyword of each of preset keyword thesaurus has the first different weights, when logical After hash algorithm is calculated the first keyword, a weight, i.e. the second weight can be also obtained, according to the second weight from preset Searching and matched first weight of the weight in keyword thesaurus, and keyword extraction corresponding to the first weight is come out, and Replace the first keyword in test cases data.
It is the refinement flow diagram of step S10 in Fig. 2 referring to Fig. 4, Fig. 4.In the present embodiment, above-mentioned steps S10 is specific The following steps are included:
Step S101 successively traverses the original test cases data, and divides the original test cases data Class, obtains the data type of the original test cases data, and the data type includes: numeric type, classification type and time type;
In the present embodiment, successively goes through all over the original test cases, obtain the data class of the original test cases data Type, the data type include: numeric type, classification type and time type, and in the present embodiment, difference difference divides method for distinguishing not Limit if going through all over marking B to classification type data, time is arrived if going through for example, mark A if to numeric type data if going through Time categorical data then marks C.For example, 17 or 18 belong to numeric type data;byte,short,int,long,float, Double, boolean, char belong to classification type data, and one year (1 year) and one hour (one hour) belong to time class Other data.
Step S102, according to the data type of the original test cases data, using corresponding preset cleaning algorithm pair The original test cases data are cleaned, and test cases data are obtained.
In the present embodiment, since different original test cases data have different type, for example, original test cases number According to data type include: numeric type, classification type and time type, and the original test cases data of different types are needed by not Same method is cleaned, so the data type according to the original test cases data is needed, using corresponding preset clear It washes algorithm to clean the original test cases data, obtains test cases data, cleaning method includes: that normalization is calculated Method, discretization algorithm and time-sharing method.
It is the refinement flow diagram of step S102 in Fig. 4 referring to Fig. 5, Fig. 5.In the present embodiment, above-mentioned steps S102 tool Body the following steps are included:
Step S1021 judges whether the data type of the original test cases data is numeric type;
In the present embodiment, in order to precisely wash the data of numeric type in original test cases data, therefore, it is necessary to clean Operation, need first to judge judge whether the data type of the original test cases data is numeric type before washing.With Just the data of different classifications are handled using different processing modes.
Step S1022 uses normalization algorithm pair if the data type of the original test cases data is numeric type The original test cases data are handled;
In the present embodiment, if the data type of the original test cases data is numeric type, normalization algorithm is used The original test cases data are handled, in order to precisely wash the data of classification type in original test cases data, Therefore, it is necessary to the operations of cleaning, need first to judge before washing, judge that the data type of the original test cases data is No is classification type.So that the data to different classifications are handled using different processing modes.If for example, numeric type number According to, then use normalized, if classification type data, use sliding-model control, if time categorical data, then use the time Partitioning is handled.For example, A { 2,4,4,6 }, successively goes through all over original test cases A, and by obtaining A after normalized { 4 }, data 2,6 and another extra number 4 are thus washed.
Step S1023 judges the original survey if the data type of the original test cases data is nonumeric type Whether the data type for trying case data is classification type;
In the present embodiment, if the data type of the original test cases data is nonumeric type, judge described original Whether the data type of test cases data is classification type.
Step S1024 uses discretization algorithm pair if the data type of the original test cases data is classification type The original test cases data are handled;
In the present embodiment, in order to precisely wash the data of time type in original test cases data, therefore, it is necessary to clean Operation, need first to judge judge whether the data type of the original test cases data is time type before washing.With Just the data of different classifications are handled using different processing modes.
If the data type of the original test cases data is classification type, using discretization algorithm to the original survey Examination case data is handled, if the data type of the original test cases data is non-classification type, is judged described original Whether the data type of test cases data is time type.For one group of data A { 1,2......18 } and another set data B A can be divided into " youth " with the mode of classification, B is divided into " middle age ", for example, having one at present by { 19,20......30 } Group " youth " data C { 17,18,20 } can wash numerical value 20 by using sliding-model control from C, obtain C 17, 18}。
Step S1025 judges the original survey if the data type of the original test cases data is non-classification type Whether the data type for trying case data is time type;
In the present embodiment, if the data type of the original test cases data is non-classification type, judge described original Whether the data type of test cases data is time type.
Step S1026 uses time-sharing method pair if the data type of the original test cases data is time type The original test cases data are handled, if the data type of the original test cases data is non-temporal type, no Processing.
In the present embodiment, if the data type of original test cases data is time type, using time-sharing method to original Beginning test cases data are handled, if it is not, not handling then.It, can be by when not being able to satisfy need of work on normal working day Production activity is carried out according to early, middle and late three-shift system, such as 6:00-10:00 is mornig shift, 11:00-14:00 is the middle class in a kindergarten, 14:00-18: 00 is night shift, and wherein 10:00-11:00 is the time of having a rest, it can be seen that, reality can not will be met according to time-sharing method The time of scene washes.
It is the flow diagram of intelligent test method second embodiment of the present invention referring to Fig. 6, Fig. 6.In the present embodiment, scheming It is further comprising the steps of after step S10 in 2:
Step S80, the original test cases data after judging cleaning are with the presence or absence of missing values;
In the present embodiment, in the process of cleaning, there is the possibility for washing and meeting actual scene data, it is therefore desirable in time It after judgement cleaning, whether there is missing values in original test cases, if it exists missing values, then need using certain processing method It is handled.Therefore need to judge that the original test cases data after cleaning whether there is missing values.
Step S90, if there are missing values for the original test cases data after the cleaning, using k nearest neighbor algorithm to scarce Mistake value carries out interpolation, if missing values are not present in the original test cases data after the cleaning, does not handle.
In the present embodiment, the algorithm description of k value minimum distance neighbour's method is as follows: input: training dataset: T={ (x1,y1), (x2,y2),...,(xn,yn), wherein xi∈Rn,yi∈{c1,c2,...,ckAnd test data x.
Output: classification belonging to example x.According to given distance metric, found in training set T with x apart from nearest k A sample, the neighborhood for covering the x of this k point are denoted as Nk(x), in Nk(x) determining x according to classifying rules (such as majority voting) in Classification y:
Categorised decision rule is usually majority voting, i.e., the most classes for closing on sample by the k of test sample determine test The classification of sample.Majority voting rule has description below: given test sample x, and closest k trained example constitutes set Nk(x), Classification Loss function is 0-1 loss.If covering Nk(x) classification in region is cj, then error in classification rate be:
The small i.e. empirical risk minimization of error in classification rate, so majority voting is equivalent to empirical risk minimization.
Therefore, according to above-mentioned formula, classification belonging to missing values in original test cases data out can be decided by vote, for example, Original test cases is input 17, input 18...... input 30, input 31.After over cleaning, input 18...... is become Input 30, input 31.After k value minimum distance neighbour's method method, it is known that the test cases of missing is numeric type data classification The data of the inside, therefore the test cases lacked herein can be filled up into the form of numerical value.
It is the flow diagram of intelligent test method 3rd embodiment of the present invention referring to Fig. 7, Fig. 7.In the present embodiment, scheming It is further comprising the steps of before step S70 in 2:
Step S100 handles test cases data by shot and long term memory network, obtains the first test cases;
In the present embodiment, can by changing preset calculating path, to change the sequence of processing of the algorithms of different to data, After handling by shot and long term memory network test cases data, the first test cases can be obtained, it is long in the present embodiment Short-term memory network be in advance it is trained, the shot and long term memory network can to parsing test cases data handle, so After obtain pending test cases, the training process of shot and long term memory network are as follows: for example, test cases parse data are as follows: 123. Shot and long term memory network can obtain test cases " input password 123, login successfully ", " input password according to initial weight 123, login failure ".It should be noted that the two test cases are not the pending test cases of final output, according to artificial Test result is it is found that " input password 123, login successfully ", this case meets currently practical demand, therefore in this implementation In example, normalization algorithm is also used, the parsing test cases data are handled by normalization algorithm, are obtained The probability of " input password 123, login successfully " is 20%, and the probability for obtaining " input password 123, login failure " is 80%, by Artificial test results it is found that the test cases of " input password 123, login successfully " be it is correct, still " input password 123, step on Record successfully " probability be less than the probability of " input password 123, login failure ", therefore to output test cases " input password 123, login failure ", it is also necessary to pass through back-propagation algorithm adjustment output " input password 123, login successfully " and " input password The respective shared weight of 123, login failure ", until the result of output is " input password 123, login successfully ".
Step S110, judges whether the quantity of first test cases is less than present test field scape to test cases quantity Demand;
In the present embodiment, accuracy in order to ensure the test results, it is therefore desirable to more test cases as far as possible, described in judgement Whether the quantity of the first test cases is less than present test field scape to the demand of test cases quantity.For example, one four simultaneously And 10000 kinds of combinations are all shared by the password that number forms, do not knowing the case where specifically which combination is proper password Under, present test field scape is exactly 10000 to the demand of test cases quantity, if the quantity of the first test cases is 8000 It is a, less than present test field scape to the demand of test cases quantity, it is likely that omit correct password, to affect Test result.Therefore the quantity of the first test cases must be greater than or equal to present test field scape to test cases quantity Demand.
Step S120, if the quantity of first test cases is less than demand of the present test field scape to test cases quantity Amount, then expand first test cases by the method for exhaustion, obtain the second test cases collection, if the first test case The quantity of example is greater than or equal to present test field scape to the demand of test cases quantity, then does not handle;
In the present embodiment, need to expand new test cases according to the method for exhaustion according to different test scenes.If for example, Numeric type, then the permutation and combination according to number is needed, all test cases being composed of number are all enumerated, example Such as, for number combination 123, then six kinds of combinations can are respectively: 123,132,231,213,321,312.
If the quantity of first test cases is less than present test field scape to the demand of test cases quantity, pass through The method of exhaustion expands first test cases, the second test cases collection is obtained, if it is not, not handling then.Pass through the method for exhaustion Increase the quantity of test cases.
Step S130 obtains the test cases that second test cases is concentrated by random algorithm, extracts the test Keyword in case expands the test cases according to the keyword, obtains pending test cases.
In the present embodiment, is concentrated using random algorithm from the second test cases and obtain test cases, and from getting at random Test cases in extract extract keyword, the test cases is expanded according to the keyword extracted, is obtained new Test cases, but due to being expanded by the method for exhaustion after, all surveys under the included test scene of the second test cases collection Case is tried, then obtaining one of test cases at random by random algorithm, it is likely that expand out and the second test The test cases that test cases in casebook is overlapped, in order to avoid this kind of situation, therefore pre-sets keyword Dictionary, when the keyword in the keyword and keyword thesaurus in test cases case only got at random is mutually matched, The test cases can just be expanded.The keyword saved in keyword thesaurus is unlimited, for example, number, text and punctuation mark etc..It is logical The present embodiment is crossed, the quantity of test cases is again increased.
It is the flow diagram of intelligent test method fourth embodiment of the present invention referring to Fig. 8, Fig. 8.In the present embodiment, scheming It is further comprising the steps of after step S20 in 2:
Step S140 detects the code of test cases data by the junit unit testing frame constructed in advance, Obtain the code coverage of test cases data;
In the present embodiment, test cases code coverage is obtained by the junit unit testing frame constructed in advance.Pass through Junit unit testing frame detects the code scanned, can detecte out code coverage is how many, for example, being 90%.The purpose for detecting coverage rate is for the ease of allowing the code of newly-generated test cases effectively to cover original test case The code of example.If not imitating the code for having covered original test cases, illustrate newly-generated test cases there are quantity not The situation of foot.
Step S150, judges whether the code coverage of the test cases data is less than default coverage rate;
In the present embodiment, default coverage rate refers to the value of preset coverage rate, for example, it may be 90%, it can also To be 80%, the purpose of judgement be in order to examine whether current examination case code coverage is less than default coverage rate, for example, if Current examination case code coverage is less than default coverage rate, then illustrates, current code coverage rate does not reach requirement, if worked as Preceding examination case code coverage is greater than in default coverage rate, then illustrates, current code coverage rate has reached requirement.
Step S160 continues according to if the code coverage of the test cases data is less than default coverage rate The preset set of algorithms for calculating path is trained test cases data, until the code coverage of the test cases data of output More than or equal to default coverage rate, if the code coverage of the test cases data is greater than or equal to default coverage rate, no Processing.
In the present embodiment, test can be counted and shown by the junit unit testing frame integrated in java engineering The coverage condition of case code, and then test cases code coverage can be obtained.Integrating junit unit testing frame method is The jar packet of junit is imported into Lib under engineering, use is then carried out according to the agreement of frame.The effect of regression test It is, it is whether correct by testing original function, to judge that the online of this new function will not influence original function.By using Artificial intelligence+heuristic test Solution frame, i.e. test cases model, since test cases model has automatically generated A large amount of test cases, these cases cover the test of all original functions, after executing these cases automatically, it will be able to solve The problem of regression test covers.It should be noted that being also possible to exist in actual scene, generated according to preset condition The case where former test cases cannot be completely covered in test cases, for example, the code complexity of test cases 1 is excessively high, therefore logical 2,3,4 are only possible to produce after crossing the method for exhaustion.It can be seen that may have the case where cannot being completely covered in some cases, because This needs to preset coverage rate.For example, coverage rate, which can be set, to be continued to train survey lower than 90%, if being lower than 90% Case model is tried, until former test cases is completely covered in the new test cases generated;If being higher than 90%, illustrate newly-generated survey Examination case completely covers former test cases, therefore will not influence the function of former test cases.
In previous test job, to accomplish regression test covering completely, be a very difficult thing, because, it is former It is functional it is very more, have a large amount of function scene, in limited time and manpower, whole regression tests, being can not Can, main original function can only be chosen and tested.Now with artificial intelligence intelligence test, so that complete return is surveyed Examination covering is possibly realized.For example, certain test cases is 1,2,3,0,1,2,3,4 test can be generated after input test case model Case, it can be seen that, newly-generated test cases completely covers original test cases, therefore will not influence original test Case.
The present invention also provides a kind of intelligent test devices.
It is the functional block diagram of one embodiment of intelligent test device of the present invention referring to Fig. 9, Fig. 9.In the present embodiment, institute Stating intelligent test device includes:
Cleaning module 10, for successively traversing original test cases data, using corresponding preset cleaning algorithm to described Original test cases data are cleaned, and test cases data are obtained;
First training module 20, for passing through the test cases data successively initial calculation to be selected to preset calculating path Method is trained, and obtains algorithm to be selected;
First expands module 30, for obtaining test cases data at random by random algorithm, extracts the test cases Keyword in data expands the test cases data according to the keyword, obtains expanding data set;
First processing module 40, for being handled by shot and long term memory network the expansion data set, obtain to Execute test cases collection;
First judgment module 50 is worked as judging whether the quantity of the pending test cases integrated test case is less than Test cases quantity needed for preceding test scene;
Second expands module 60, if test cases needed for being less than present test field scape for pending test cases quantity Quantity then expands the pending test cases by the method for exhaustion, until the pending test cases quantity is greater than Or equal to test cases quantity needed for present test field scape;
Execution module 70, the test cases concentrated for successively executing the pending test cases, obtains test result.
In the present embodiment, cleaning module 10 is for successively traversing original test cases data, using corresponding preset cleaning Algorithm cleans the original test cases data, obtains test cases data;First training module 20 is for passing through institute It states test cases data to be successively trained the preset initial algorithm to be selected for calculating path, obtains algorithm to be selected;First expands Module 30 is used to obtain test cases data at random by random algorithm, extracts the keyword in the test cases data, root The test cases data are expanded according to the keyword, obtain expanding data set;First processing module 40 is for passing through shot and long term Memory network handles the expansion data set, obtains pending test cases collection;First judgment module 50 is for judging Test cases quantity needed for whether the quantity of the pending test cases integrated test case is less than present test field scape;The If two expand test cases quantity needed for module 60 is less than present test field scape for pending test cases quantity, pass through The method of exhaustion expands the pending test cases, until the pending test cases quantity is greater than or equal to current survey Test cases quantity needed for the scape of examination hall;Execution module 70 is used to successively execute the test case that the pending test cases is concentrated Example, obtains test result.This programme increases the quantity of test cases by the method for exhaustion and random random algorithm, solves test The technical issues of poor quality.
The present invention also provides a kind of computer readable storage mediums.
In the present embodiment, intelligence test program, the intelligence test journey are stored on the computer readable storage medium The step of intelligent test method as described in the examples such as any of the above-described is realized when sequence is executed by processor.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM), including some instructions are used so that a terminal (can be mobile phone, computer, server or network are set It is standby etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, it is all using equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content, directly or indirectly Other related technical areas are used in, all of these belong to the protection of the present invention.

Claims (10)

1. a kind of intelligent test method, which is characterized in that the intelligent test method the following steps are included:
Original test cases data are successively traversed, the original test cases data are carried out using corresponding preset cleaning algorithm Cleaning, obtains test cases data;
Successively the preset initial algorithm to be selected for calculating path is trained by the test cases data, obtains calculation to be selected Method, the algorithm to be selected include at least: algorithm, the method for exhaustion, the random algorithm of shot and long term memory network;
It obtains test cases data at random by random algorithm, the keyword in the test cases data is extracted, according to described Keyword expands the test cases data, obtains expanding data set;
The expansion data set is handled by shot and long term memory network, obtains pending test cases collection;
Judge test case needed for whether the quantity of the pending test cases integrated test case is less than present test field scape Number of cases amount;
If so, being expanded by the method for exhaustion to the pending test cases collection, until the pending test cases collection Described in test cases quantity be greater than or equal to the present test field scape needed for test cases quantity;
The test cases that the pending test cases is concentrated successively is executed, test result is obtained.
2. intelligent test method as described in claim 1, which is characterized in that described to obtain test case at random by random algorithm Number of cases evidence extracts the keyword in the test cases data, expands the test cases data according to the keyword, obtains Expanding data set includes:
Obtain test cases data at random by random algorithm;
The keyword in the test cases data is extracted by word frequency and reversed word frequency algorithm, obtains the first key Word;
First keyword is matched with the preset keyword in preset keyword thesaurus by hash algorithm, obtains Two keywords, and replacement first keyword, obtain expanding data set.
3. intelligent test method as claimed in claim 2, which is characterized in that it is described successively to traverse original test cases data, The original test cases data are cleaned using corresponding preset cleaning algorithm, obtaining test cases data includes:
The original test cases data are successively traversed, and are classified to the original test cases data, the original is obtained The data type of beginning test cases data, the data type include: numeric type, classification type and time type;
According to the data type of the original test cases data, using corresponding preset cleaning algorithm to the original test case Number of cases obtains test cases data according to being cleaned.
4. intelligent test method as claimed in claim 3, which is characterized in that described according to the original test cases data Data type cleans the original test cases data using corresponding preset cleaning algorithm, obtains test cases number According to including:
Whether the data type for judging the original test cases data is numeric type;
If the data type of the original test cases data is numeric type, using normalization algorithm to the original test case Number of cases, if the data type of the original test cases data is nonumeric type, judges the original test according to being handled Whether the data type of case data is classification type;
If the data type of the original test cases data is classification type, using discretization algorithm to the original test case Number of cases, if the data type of the original test cases data is non-classification type, judges the original test according to being handled Whether the data type of case data is time type;
If the data type of the original test cases data is time type, using time-sharing method to the original test case Number of cases is according to being handled.
5. intelligent test method as described in claim 1, which is characterized in that successively traverse original test cases number described According to being cleaned using corresponding preset cleaning algorithm to the original test cases data, obtain the step of test cases data After rapid, further includes:
Original test cases data after judgement cleaning whether there is missing values;
If it exists, then interpolation is carried out to missing values using k nearest neighbor algorithm.
6. intelligent test method as described in claim 1, which is characterized in that successively execute the pending test case described The test cases that example is concentrated, before the step of obtaining test result, further includes:
Test cases data are handled by shot and long term memory network, obtain the first test cases;
Judge whether the quantity of first test cases is less than present test field scape to the demand of test cases quantity;
If so, expanding by the method for exhaustion to first test cases, the second test cases collection is obtained;
The test cases that second test cases is concentrated is obtained by random algorithm, extracts the key in the test cases Word expands the test cases according to the keyword, obtains pending test cases.
7. intelligent test method as described in claim 1, which is characterized in that it is described by the test cases data successively After the step of being trained to the preset initial algorithm to be selected for calculating path, obtain algorithm to be selected, further includes:
The code of test cases data is detected by the junit unit testing frame constructed in advance, obtains test cases The code coverage of data;
Judge whether the code coverage of the test cases data is less than default coverage rate;
If so, continue to be trained test cases data according to the preset set of algorithms for calculating path, until output The code coverage of test cases data is greater than or equal to default coverage rate.
8. a kind of intelligent test device, which is characterized in that the intelligent test device includes:
Cleaning module, for successively traversing original test cases data, using corresponding preset cleaning algorithm to the original survey Examination case data is cleaned, and test cases data are obtained;
First training module, for successively being carried out to the preset initial algorithm to be selected for calculating path by the test cases data Training, obtains algorithm to be selected;
First expands module, for obtaining test cases data at random by random algorithm, extracts in the test cases data Keyword, the test cases data are expanded according to the keyword, obtain expanding data set;
First processing module obtains pending survey for handling by shot and long term memory network the expansion data set Try casebook;
First judgment module, for judging whether the quantity of the pending test cases integrated test case is less than current test Test cases quantity needed for scene;
Second expands module, if test cases quantity needed for being less than present test field scape for pending test cases quantity, Then the pending test cases is expanded by the method for exhaustion, until the pending test cases quantity is greater than or equal to Test cases quantity needed for present test field scape;
Execution module, the test cases concentrated for successively executing the pending test cases, obtains test result.
9. a kind of Intelligent test device, which is characterized in that the Intelligent test device includes memory, processor and is stored in On the memory and the intelligence test program that can run on the processor, the intelligence test program is by the processor It realizes when execution such as the step of intelligent test method of any of claims 1-7.
10. a kind of computer readable storage medium, which is characterized in that be stored with intelligent testing on the computer readable storage medium Program is tried, such as intelligence test of any of claims 1-7 is realized when the intelligence test program is executed by processor The step of method.
CN201910667875.XA 2019-07-23 2019-07-23 Intelligent test method, device, equipment and readable storage medium Active CN110502432B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910667875.XA CN110502432B (en) 2019-07-23 2019-07-23 Intelligent test method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910667875.XA CN110502432B (en) 2019-07-23 2019-07-23 Intelligent test method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN110502432A true CN110502432A (en) 2019-11-26
CN110502432B CN110502432B (en) 2023-11-28

Family

ID=68587619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910667875.XA Active CN110502432B (en) 2019-07-23 2019-07-23 Intelligent test method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110502432B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597121A (en) * 2020-07-24 2020-08-28 四川新网银行股份有限公司 Precise test method based on historical test case mining
CN113312258A (en) * 2021-05-25 2021-08-27 平安壹钱包电子商务有限公司 Interface testing method, device, equipment and storage medium
CN113342683A (en) * 2021-06-29 2021-09-03 深圳前海微众银行股份有限公司 Test case processing method, device, platform and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853202A (en) * 2010-05-28 2010-10-06 浙江大学 Test case autogeneration method based on genetic algorithm and weighted matching algorithm
CN105988920A (en) * 2015-02-04 2016-10-05 阿里巴巴集团控股有限公司 Test case generating method and device based on data sets
CN107886366A (en) * 2017-11-22 2018-04-06 深圳市金立通信设备有限公司 Generation method, sex fill method, terminal and the storage medium of Gender Classification model
CN108170529A (en) * 2017-12-26 2018-06-15 北京工业大学 A kind of cloud data center load predicting method based on shot and long term memory network
CN108768946A (en) * 2018-04-27 2018-11-06 中山大学 A kind of Internet Intrusion Detection Model based on random forests algorithm
CN109379329A (en) * 2018-09-05 2019-02-22 中国人民解放军战略支援部队信息工程大学 Network security protocol fuzz testing method and system based on LSTM
CN109389030A (en) * 2018-08-23 2019-02-26 平安科技(深圳)有限公司 Facial feature points detection method, apparatus, computer equipment and storage medium
CN109947756A (en) * 2019-03-18 2019-06-28 成都好享你网络科技有限公司 Data cleaning method, device and equipment for Augmented Data

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853202A (en) * 2010-05-28 2010-10-06 浙江大学 Test case autogeneration method based on genetic algorithm and weighted matching algorithm
CN105988920A (en) * 2015-02-04 2016-10-05 阿里巴巴集团控股有限公司 Test case generating method and device based on data sets
CN107886366A (en) * 2017-11-22 2018-04-06 深圳市金立通信设备有限公司 Generation method, sex fill method, terminal and the storage medium of Gender Classification model
CN108170529A (en) * 2017-12-26 2018-06-15 北京工业大学 A kind of cloud data center load predicting method based on shot and long term memory network
CN108768946A (en) * 2018-04-27 2018-11-06 中山大学 A kind of Internet Intrusion Detection Model based on random forests algorithm
CN109389030A (en) * 2018-08-23 2019-02-26 平安科技(深圳)有限公司 Facial feature points detection method, apparatus, computer equipment and storage medium
CN109379329A (en) * 2018-09-05 2019-02-22 中国人民解放军战略支援部队信息工程大学 Network security protocol fuzz testing method and system based on LSTM
CN109947756A (en) * 2019-03-18 2019-06-28 成都好享你网络科技有限公司 Data cleaning method, device and equipment for Augmented Data

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597121A (en) * 2020-07-24 2020-08-28 四川新网银行股份有限公司 Precise test method based on historical test case mining
CN113312258A (en) * 2021-05-25 2021-08-27 平安壹钱包电子商务有限公司 Interface testing method, device, equipment and storage medium
CN113342683A (en) * 2021-06-29 2021-09-03 深圳前海微众银行股份有限公司 Test case processing method, device, platform and storage medium
CN113342683B (en) * 2021-06-29 2024-04-09 深圳前海微众银行股份有限公司 Test case processing method, device, platform and storage medium

Also Published As

Publication number Publication date
CN110502432B (en) 2023-11-28

Similar Documents

Publication Publication Date Title
WO2019184557A1 (en) Method and device for locating root cause alarm, and computer-readable storage medium
KR101965839B1 (en) It system fault analysis technique based on configuration management database
CN110502432A (en) Intelligent test method, device, equipment and readable storage medium storing program for executing
US10860410B2 (en) Technique for processing fault event of IT system
CN109784636A (en) Fraudulent user recognition methods, device, computer equipment and storage medium
US20170200101A1 (en) Systems and methods for optimized task allocation
CN109918554A (en) Web data crawling method, device, system and computer readable storage medium
KR20200057903A (en) Artificial intelligence model platform and operation method thereof
CN109743311A (en) A kind of WebShell detection method, device and storage medium
US11296925B2 (en) Network analyzer that provides answer to inquiry about network failure and network analyzing method
CN110188834A (en) A kind of method for diagnosing faults of power telecom network, device and equipment
CN111294819A (en) Network optimization method and device
US20210318947A1 (en) Methods and apparatuses for generating smart contract test case
US7395457B2 (en) System and method for detecting faults in a system
CN117221087A (en) Alarm root cause positioning method, device and medium
CN115577858A (en) Block chain-based carbon emission prediction method and device and electronic equipment
CN107579844A (en) It is a kind of that failure method for digging is dynamically associated based on service path and frequency matrix
Ding et al. TraceDiag: Adaptive, Interpretable, and Efficient Root Cause Analysis on Large-Scale Microservice Systems
CN112416800B (en) Intelligent contract testing method, device, equipment and storage medium
CN104657491B (en) A kind of method that data are sent to client
Xu et al. Cina: Suppressing the detection of unstable context inconsistency
US20230306343A1 (en) Business process management system and method thereof
Lee et al. An investigation of essential topics on software fault-proneness prediction
de la Torre-Abaitua et al. A compression based framework for the detection of anomalies in heterogeneous data sources
Venkataraman et al. Towards identifying impacted users in cellular services

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
GR01 Patent grant
GR01 Patent grant