CN106502890A - Method for generating test case and system - Google Patents
Method for generating test case and system Download PDFInfo
- Publication number
- CN106502890A CN106502890A CN201610906380.4A CN201610906380A CN106502890A CN 106502890 A CN106502890 A CN 106502890A CN 201610906380 A CN201610906380 A CN 201610906380A CN 106502890 A CN106502890 A CN 106502890A
- Authority
- CN
- China
- Prior art keywords
- training
- control data
- input
- characteristic
- group
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
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)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the present invention provides a kind of method for generating test case and system, obtains the Action Events sequence of the control data sequence and output being input under running environment parameter and the running environment;Training control data sequence obtains being input into training pattern;Training Action Events sequence obtains exporting training pattern;The corresponding test case of running environment parameter is obtained according to input training pattern and output training pattern.By such scheme, tester only needs to treat test software and is operated, scheme in the embodiment of the present invention records input operation and corresponding output result automatically, training obtains obtaining training pattern with input control data sequence and output function sequence of events, test case can be obtained according to training pattern, the workload of tester can be reduced, testing efficiency is improved, reduces the maintenance cost of test case.
Description
Technical field
The present invention relates to software testing technology field, a kind of Test cases technology side with self-learning function of specific design
Method and system.
Background technology
Inventor has found that during the present invention is realized existing automation software testing is all by tester oneself
Test case is write, is manually operated.Detailed process is:Tester's execution operation is treated test software and is tested, and surveys
Operation and corresponding result performed by examination personnel's manual record, writes test according to the operation and corresponding result that execute and uses
Example.This mode testing efficiency is relatively low, is also inconvenient for being adjusted test case, and the maintenance cost of test case is higher.Cause
This, it is necessary to improve defect of the prior art.
Content of the invention
The embodiment of the present invention provides a kind of method for generating test case and system, is needed with solving tester in prior art
The technical problem that efficiency is low, maintenance cost is high caused by artificial operation.
For solving above-mentioned technical problem, the embodiment of the present invention provides a kind of method for generating test case, comprises the steps:
Obtain the running environment parameter of software to be tested;
At least two groups input control data sequence of the software to be tested are obtained, and in response to control described in each group
At least two groups output function sequences of events of the software described to be tested that data sequence is obtained;
At least two groups control data sequences described in training, obtain being input into training pattern, at least two groups operation things described in training
Part sequence, obtains exporting training pattern;
The software to be tested is obtained in the operation ring according to the input training pattern and the output training pattern
Test case under the parameter of border.
Alternatively, in above-mentioned method for generating test case, described in the training, at least two groups control data sequences, obtain defeated
Entering training pattern includes:
Control data sequence according to default input feature vector community set parses each group, obtains control described in each group
The characteristic of data sequence;Wherein, the characteristic of the control data sequence includes and each input feature vector attribute
Corresponding eigenvalue;
According to the input feature vector attribute and control data sequence described in each group characteristic, obtain described input instruction
Practice model.
Alternatively, in above-mentioned method for generating test case, the control according to the input feature vector attribute and each group
The characteristic of part data sequence, obtaining the input training pattern includes:
Obtain all spies corresponding with same input feature vector attribute in the characteristic of control data sequence described in each group
Value indicative, using the average of all eigenvalues as training characteristics value corresponding with the input feature vector attribute;
According to each input feature vector attribute and its corresponding training characteristics value, the input training pattern is obtained.
Alternatively, in above-mentioned method for generating test case, the control according to the input feature vector attribute and each group
The characteristic of part data sequence, obtaining the input training pattern includes:
Obtain all spies corresponding with same input feature vector attribute in the characteristic of control data sequence described in each group
Value indicative, is worth to training characteristics value scope according to all features;
According to each input feature vector attribute and its corresponding training characteristics value scope, the input training pattern is obtained.
Alternatively, in above-mentioned method for generating test case, the characteristic number of control data sequence described in each group of the acquisition
All eigenvalues corresponding with same input feature vector attribute according in, being worth to training characteristics value scope according to all features includes:
The training characteristics value scope is worth to according to the maximum in all eigenvalues and minimum;Or,
Eigenvalue average is worth to according to all features, training is worth to according to the eigenvalue average and permission floating special
Value indicative scope.
Alternatively, in above-mentioned method for generating test case, described in the training, at least two groups Action Events sequences, obtain defeated
Going out training pattern includes:
Action Events sequence according to default output characteristic community set parses each group, obtains operating described in each group
The characteristic of sequence of events;Wherein, the characteristic of the Action Events sequence includes and each output characteristic attribute
Corresponding eigenvalue;
According to the output characteristic attribute and Action Events sequence described in each group characteristic, obtain described output instruction
Practice model.
The embodiment of the present invention also provides a kind of Test cases technology device, including:
Ambient parameter acquisition module, obtains the running environment parameter of software to be tested;
Retrieval module, at least two groups input control data sequence of the acquisition software to be tested, and in response to
At least two groups output function sequences of events of the software described to be tested that control data sequence described in each group is obtained;
Training module, training described at least two groups control data sequences, obtain be input into training pattern, train described at least two
Group Action Events sequence, obtains exporting training pattern;
Use-case generation module, obtains the software to be tested according to the input training pattern and the output training pattern
Test case under the running environment parameter.
Alternatively, in above-mentioned Test cases technology device, the training module is used for:
Control data sequence according to default input feature vector community set parses each group, obtains control described in each group
The characteristic of data sequence;Wherein, the characteristic of the control data sequence includes and each input feature vector attribute
Corresponding eigenvalue;
According to the input feature vector attribute and control data sequence described in each group characteristic, obtain described input instruction
Practice model.
Alternatively, in above-mentioned Test cases technology device, the training module specifically for:
Obtain all spies corresponding with same input feature vector attribute in the characteristic of control data sequence described in each group
Value indicative, using the average of all eigenvalues as training characteristics value corresponding with the input feature vector attribute;
According to each input feature vector attribute and its corresponding training characteristics value, the input training pattern is obtained.
Alternatively, in above-mentioned Test cases technology device, the training module specifically for:
Obtain all spies corresponding with same input feature vector attribute in the characteristic of control data sequence described in each group
Value indicative, is worth to training characteristics value scope according to all features;
According to each input feature vector attribute and its corresponding training characteristics value scope, the input training pattern is obtained.
Alternatively, in above-mentioned Test cases technology device, the training module specifically for:
The training characteristics value scope is worth to according to the maximum in all eigenvalues and minimum;Or,
Eigenvalue average is worth to according to all features, training is worth to according to the eigenvalue average and permission floating special
Value indicative scope.
Alternatively, in above-mentioned Test cases technology device, the training module is additionally operable to:
Action Events sequence according to default output characteristic community set parses each group, obtains operating described in each group
The characteristic of sequence of events;Wherein, the characteristic of the Action Events sequence includes and each output characteristic attribute
Corresponding eigenvalue;
According to the output characteristic attribute and Action Events sequence described in each group characteristic, obtain described output instruction
Practice model.
The such scheme of the embodiment of the present invention compared with prior art, at least has the advantages that:
Method for generating test case and system described in the embodiment of the present invention, method for generating test case therein are being given birth to
Into a certain software to be tested test case when, obtain the running environment parameter of software to be tested, and at least two groups input controls
Data sequence, and at least two groups output behaviour of the software described to be tested obtained in response to control data sequence described in each group
Make sequence of events;Training control data sequence obtains being input into training pattern;Training Action Events sequence obtains exporting training pattern;
Test case of the software to be tested under the running environment parameter according to input training pattern is with output training pattern.Logical
Cross embodiment of the present invention such scheme, tester only needs to treat test software and operated, by embodiment of the present invention energy
Enough record input operation and corresponding output result automatically, and training input control data sequence and output function event sequence automatically
Row obtain corresponding training pattern, test case can be obtained according to training pattern such that it is able to greatly reduce tester
Workload, improve testing efficiency, reduce test case maintenance cost.
Description of the drawings
Fig. 1 is the flow chart of the method for generating test case described in one embodiment of the invention;
Fig. 2 is to input training pattern method flow diagram described in one embodiment of the invention;
Fig. 3 is the flow chart of the automated testing method described in one embodiment of the invention;
Fig. 4 is the theory diagram of the automatization test system described in one embodiment of the invention.
Specific embodiment
Method for generating test case and system described in the embodiment of the present invention, for the terminal tested by software under testing
In equipment.Carried out by the test operating procedure that tester is executed by the method for generating test case described in the embodiment of the present invention
The process of objectification modelling, is obtained test case according to modelling result, below by specific embodiment and combines
Figure of description is described in detail to the solution of the present invention.
Embodiment 1
The present embodiment provides a kind of method for generating test case, is applied to be mounted with the terminal unit of software to be tested,
As shown in figure 1, comprising the steps:
S101:Obtain the running environment parameter of software to be tested.The ambient parameter includes each required by running software
The condition of kind, including software environment and hardware environment.For example various operating systems, cpu models and physical parameter, the requirement to internal memory
Deng.And many application softwaries not only require nothing more than hardware condition, in addition it is also necessary to the support of the condition of software environment, such as windows
The software linux for holding not necessarily supports that the software of Fructus Mali pumilae can only be run on Macintosh, if cross-platform fortune thought by these softwares
OK, it is necessary to change software itself, or simulate the software environment required for it.
S102:At least two groups input control data sequence of the software to be tested are obtained, and in response to each group of institute
State at least two groups output function sequences of events of the software described to be tested that control data sequence is obtained;In this step, can basis
The actual input operation of tester obtains control data sequence, specifically in terminal unit, has defined in advance and has been directed to
Each mode of operation, corresponding data sequence after its code, as long as therefore identifying the input operation of tester, according to
Have been defined mode, you can obtain control data sequence.And for the scheme in the present embodiment, obtain more multigroup control
Data sequence, Action Events sequence obtains training result can be more accurate, however it is necessary that the data volume for processing is also bigger, in reality
The group number of control data sequence, Action Events sequence can be selected in situation according to the data capability of terminal unit.
S103:At least two groups control data sequences described in training, obtain being input into training pattern, at least two groups behaviour described in training
Make sequence of events, obtain exporting training pattern;Using the control data sequence as sample data in this step, select specific
Mathematical model as Computational frame, by the parameter in data-optimized Computational frame so that the result that Computational frame is obtained meets
Actual demand.For example selectable modes recognizer is realized, can specifically select the self-organizing nerve in algorithm for pattern recognition
Network algorithm is realized.Can be identical with the training method of control data sequence to the training method of Action Events sequence, it is also possible to
Different.If control data sequence, Action Events sequence can simplify training process, if adopted using identical training method
With different training methodes, need to introduce at least two training patterns, make training process slightly more complex.
S104:The software to be tested is obtained in the fortune according to the input training pattern and the output training pattern
Test case under row ambient parameter.
Illustrated using mobile phone unblock software as software to be tested below.
Existing smart mobile phone, can pass through to slide solves the method realization unblock operation of closing piece.Surveyed for the software
Examination, input operation are the solution closing piece that slides, and obtain corresponding with the solution closing piece that slides after carrying out code process to the solution closing piece that slides
Control data sequence.Obtained from output result for unblock enter main interface.Software environment and hardware of the running environment for mobile phone
Environment.This method is trained to the corresponding control data sequence of the operation of multiple " slip unlocked state " and obtains input training mould
Type.And " unblock entrance main interface " corresponding Action Events sequence is trained and obtains exporting training pattern, it is input into training mould
The respective conditions of type and output training pattern software environment and hardware environment then for mobile phone, is consequently formed test case.In profit
When being tested with the test case, tester executes unblock operation of sliding, with corresponding input training pattern coupling, then
The Action Events sequence obtained according to corresponding output training pattern is and enters main interface, as desired output knot
Really, compared by obtaining actual output result and desired output result, obtain automatization's test result.For example, real
The input operation on border is slip unlocked state, and, for entering main interface, actual output result is if entering for desired output result
Enter main interface, then identical with desired output result, then for this test case, the software test result is qualified.Instead
It, is if under the input operation of slip unlocked state, not entering into main interface, but occurring in that other output results, that
This test case is directed to, the result of the software test is underproof.
Such scheme in using the present embodiment, can automatically generate test case, and tester is only needed to to be tested
Software is operated, and can be recorded automatically input operation and corresponding output result by the embodiment of the present invention, and be adopted pattern
Recognizer such as self organizing neural network training obtains corresponding with input control data sequence and output function sequence of events
Special object pattern, obtains training pattern, can obtain test case according to training pattern.So as to greatly reduce tester
The workload of member, improves testing efficiency, reduces the maintenance cost of test case.
Embodiment 2
The present embodiment provide method for generating test case, in embodiment 1 the step of S103 in, described in the training at least
Two groups of control data sequences, obtaining input training pattern can realize in the following way:
S201:Control data sequence according to default input feature vector community set parses each group, obtains each group of institute
State the characteristic of control data sequence;Wherein, the characteristic of the control data sequence includes special with each input
Levy the corresponding eigenvalue of attribute.
S202:According to the input feature vector attribute and control data sequence described in each group characteristic, obtain described
Input training pattern.
Wherein preset input feature vector community set, for being stored in advance in terminal unit, for different terminal units,
Different softwares to be tested, which is input into attribute character may be different.For example, for the terminal unit with touch screen, wherein
Input may include slide, then the input feature vector attribute for slide is potentially included:Touch screen, displacement,
Initial coordinate, final coordinate, touching intensity, touch time etc..Corresponding to multiple slide according to features described above attribute
Control data sequence is trained, and obtains being input into training pattern, whether can determine a certain operation according to the input training pattern
Mate with slide.When detecting input operation, input operation is parsed according to above-mentioned input feature vector attribute, if held
Capable is slide, is obtained in that in input operation analysis result corresponding with above-mentioned input feature vector attribute.
Alternatively, S202 can be realized in the following way:
S2021:Obtain corresponding with same input feature vector attribute in the characteristic of control data sequence described in each group
All eigenvalues, using the average of all eigenvalues as training characteristics value corresponding with the input feature vector attribute.For example, for choosing
In a certain button or icon operation, then characteristic attribute can be set to:The coordinate figure of touch point position.If having ten groups
Control data sequence, then according in this ten groups of control data sequences, the coordinate of touch point position is averaged and obtains one
Average, the average can be used as training characteristics value.
S2022:According to each input feature vector attribute and its corresponding training characteristics value, the input training pattern is obtained.
If worked as in a certain clicking operation, the coordinate figure of touch point position is identical with corresponding training characteristics value, it is believed that its
Input is the operation for choosing the button or coordinate.
Alternatively, S202 can also be realized in the following way:
S202A:Obtain corresponding with same input feature vector attribute in the characteristic of control data sequence described in each group
All eigenvalues, are worth to training characteristics value scope according to all features.Specifically, according to the maximum in all eigenvalues and
Minimum is worth to the training characteristics value scope;For example, a certain attribute character is touching intensity, in ten groups of control data sequences
In ten dynamics values, using minima as training characteristics value scope in lower limit, using maximum as training characteristics value scope
In higher limit.Or, being worth to eigenvalue average according to all features, it is worth to according to the eigenvalue average and permission floating
Training characteristics value scope.For example, a certain attribute character be touching intensity, ten dynamics values in ten groups of control data sequences equal
It is worth for 5N, it is allowed to which float value is 1N, then training characteristics value scope is 4N-6N.Other modes can also be selected, such as some
The control data sequence that eigenvalue is differed greatly with eigenvalue average, can be given up, with remaining control data sequence
Characteristic is operated, and according to specific calculation, obtains training characteristics value scope.
S202B:According to each input feature vector attribute and its corresponding training characteristics value scope, the input training mould is obtained
Type.Using the such scheme of the present embodiment, training method is simply effective, can improve training effectiveness.
Embodiment 3
The present embodiment provide method for generating test case, in embodiment 1 the step of S103 in, described in the training at least
Two groups of Action Events sequences, obtain output training pattern and are accomplished by:
S301:Action Events sequence according to default output characteristic community set parses each group, obtains each group of institute
State the characteristic of Action Events sequence;Wherein, the characteristic of the Action Events sequence includes special with each output
Levy the corresponding eigenvalue of attribute.For output characteristic set, the Action Events sequence that is all to determine in theory.For example, right
For unblock operation of sliding, necessarily this result is corresponding with " unblock enters main interface " for the Action Events sequence which exports
Action Events sequence, if so in theory for for a certain test case, its corresponding operation of theoretical output result
Sequence of events should be identical.
S302:According to the output characteristic attribute and Action Events sequence described in each group characteristic, obtain described
Output training pattern.
Specifically, training method can be identical to the training method of control data sequence with embodiment 2, simply feature category
Property is come predetermined according to output result, is no longer discussed in detail in the present embodiment.Using identical training method to control
Data sequence and Action Events sequence are trained, and can adopt less training pattern, be favorably improved training effectiveness.
Embodiment 4
The present embodiment provides a kind of Test cases technology device, for terminal unit in, be provided with the terminal unit
Software to be tested, as shown in figure 3, including:
Ambient parameter acquisition module 301, obtains the running environment parameter of software to be tested;The ambient parameter includes software
The required various conditions of operation, including software environment and hardware environment.For example various operating systems, cpu models and physics are joined
Number, the requirement to internal memory etc..And many application softwaries not only require nothing more than hardware condition, in addition it is also necessary to the condition of software environment
Hold, the software linux that such as windows is supported not necessarily supports that the software of Fructus Mali pumilae can only be run on Macintosh, if these
Cross-platform operation thought by software, it is necessary to changes software itself, or simulates the software environment required for it.
Retrieval module 302, obtains at least two groups input control data sequence of the software to be tested, and response
At least two groups output function sequences of events of the software described to be tested obtained in control data sequence described in each group;Can basis
The actual input operation of tester obtains control data sequence, specifically in terminal unit, has defined in advance and has been directed to
Each mode of operation, corresponding data sequence after its code, as long as therefore identifying the input operation of tester, according to
Have been defined mode, you can obtain control data sequence.And for the scheme in the present embodiment, obtain more multigroup control
Data sequence, Action Events sequence obtains training result can be more accurate, however it is necessary that the data volume for processing is also bigger, in reality
The group number of control data sequence, Action Events sequence can be selected in situation according to the data capability of terminal unit.
Training module 303, training described at least two groups control data sequences, obtain be input into training pattern, train described in extremely
Few two groups of Action Events sequences, obtain exporting training pattern;Using the control data sequence as sample data, select specific
Mathematical model as Computational frame, by the parameter in data-optimized Computational frame so that the result that Computational frame is obtained meets
Actual demand.For example selectable modes recognizer is realized, can specifically select the self-organizing nerve in algorithm for pattern recognition
Network algorithm is realized.Can be identical with the training method of control data sequence to the training method of Action Events sequence, it is also possible to
Different.If control data sequence, Action Events sequence can simplify training process, if adopted using identical training method
With different training methodes, need to introduce at least two training patterns, make training process slightly more complex.
Use-case generation module 304, obtains according to the input training pattern and the output training pattern described to be tested
Test case of the software under the running environment parameter.
Such scheme in using the present embodiment, can automatically generate test case, and tester is only needed to to be tested
Software is operated, and can be recorded automatically input operation and corresponding output result by the embodiment of the present invention, and be adopted pattern
Recognizer such as self organizing neural network training obtains corresponding with input control data sequence and output function sequence of events
Special object pattern, obtains training pattern, can obtain test case according to training pattern.So as to greatly reduce tester
The workload of member, improves testing efficiency, reduces the maintenance cost of test case.
Used as a kind of preferred scheme, the training module 303 is used for:
Control data sequence according to default input feature vector community set parses each group, obtains control described in each group
The characteristic of data sequence;Wherein, the characteristic of the control data sequence includes and each input feature vector attribute
Corresponding eigenvalue;
According to the input feature vector attribute and control data sequence described in each group characteristic, obtain described input instruction
Practice model.
Wherein preset input feature vector community set, for being stored in advance in terminal unit, for different terminal units,
Different softwares to be tested, which is input into attribute character may be different.For example, for the terminal unit with touch screen, wherein
Input may include slide, then the input feature vector attribute for slide is potentially included:Touch screen, displacement,
Initial coordinate, final coordinate, touching intensity, touch time etc..Corresponding to multiple slide according to features described above attribute
Control data sequence is trained, and obtains being input into training pattern, whether can determine a certain operation according to the input training pattern
Mate with slide.When detecting input operation, input operation is parsed according to above-mentioned input feature vector attribute, if held
Capable is slide, is obtained in that in input operation analysis result corresponding with above-mentioned input feature vector attribute.
Alternatively, the training module 303 specifically for:
Obtain all spies corresponding with same input feature vector attribute in the characteristic of control data sequence described in each group
Value indicative, using the average of all eigenvalues as training characteristics value corresponding with the input feature vector attribute;For example, a certain for choosing
Button or the operation of icon, then can be set to characteristic attribute:The coordinate figure of touch point position.If having ten groups of control numbers
According to sequence, then according in this ten groups of control data sequences, the coordinate of touch point position is averaged and obtains an average, should
Average can be used as training characteristics value.
According to each input feature vector attribute and its corresponding training characteristics value, the input training pattern is obtained.If i.e.
When, in a certain clicking operation, the coordinate figure of touch point position is identical with corresponding training characteristics value, it is believed which is input into
It is the operation for choosing the button or coordinate.
Used as another kind of optional mode, the training module concrete 303 is used for:
Obtain all spies corresponding with same input feature vector attribute in the characteristic of control data sequence described in each group
Value indicative, is worth to training characteristics value scope according to all features;Specifically, according to the maximum in all eigenvalues and minima
Obtain the training characteristics value scope;For example, a certain attribute character be touching intensity, ten power in ten groups of control data sequences
In angle value, using minima as training characteristics value scope in lower limit, using maximum as training characteristics value scope in upper
Limit value.Or, eigenvalue average is worth to according to all features, training is worth to according to the eigenvalue average and permission floating special
Value indicative scope.For example, a certain attribute character is touching intensity, and the average of ten dynamics values in ten groups of control data sequences is
5N, it is allowed to which float value is 1N, then training characteristics value scope is 4N-6N.Other modes can also be selected, such as some features
The control data sequence that value is differed greatly with eigenvalue average, can be given up, with the feature of remaining control data sequence
Data are operated, and according to specific calculation, obtain training characteristics value scope.
According to each input feature vector attribute and its corresponding training characteristics value scope, the input training pattern is obtained.
Using the such scheme of the present embodiment, training method is simply effective, can improve training effectiveness.
Further, the training module 303 is additionally operable to:
Action Events sequence according to default output characteristic community set parses each group, obtains operating described in each group
The characteristic of sequence of events;Wherein, the characteristic of the Action Events sequence includes and each output characteristic attribute
Corresponding eigenvalue;
According to the output characteristic attribute and Action Events sequence described in each group characteristic, obtain described output instruction
Practice model.
For output characteristic set, the Action Events sequence that is all to determine in theory.For example, for the unblock behaviour that slides
For work, necessarily corresponding with " unblock enter main interface " this result Action Events sequence of Action Events sequence which exports
Row, if so in theory for for a certain test case, the corresponding Action Events sequence of its theoretical output result should
It is identical.Specifically, training method can be identical with the training method to control data sequence, and simply characteristic attribute is basis
Output result is next predetermined, is no longer discussed in detail in the present embodiment.Using identical training method to control data sequence
It is trained with Action Events sequence, less training pattern can be adopted, be favorably improved training effectiveness.
Embodiment 5
The embodiment of the present application provides a kind of nonvolatile computer storage media, and the computer-readable storage medium is stored with
Computer executable instructions, the computer executable instructions can perform the Test cases technology side in above-mentioned any means embodiment
Method.
Embodiment 6
Fig. 4 is the hardware architecture diagram of the electronic equipment of the implementation of test cases generation method that the present embodiment is provided, such as
Shown in Fig. 4, the equipment includes:
One or more processors 401 and memorizer 402, in Fig. 4 by taking a processor 401 as an example.
The equipment of implementation of test cases generation method can also include:Input equipment 403 and output device 404.
Processor 401, memorizer 402, input equipment 403 and output device 404 can pass through bus or other modes
Connection, in Fig. 4 as a example by being connected by bus.
Memorizer 402 can be used to store non-volatile software journey as a kind of non-volatile computer readable storage medium storing program for executing
Sequence, non-volatile computer executable program and module, the such as method for generating test case in the embodiment of the present application are corresponding
Programmed instruction/module (ambient parameter acquisition module 301 for example, shown in accompanying drawing 3, retrieval module 302, training module 303
With use-case generation module 304).Processor 401 is stored in the non-volatile software program in memorizer 402, instruction by operation
And module, so as to various function application and the data processing of execute server, that is, realize that the test of said method embodiment is used
Example generation method.
Memorizer 402 can include storing program area and storage data field, and wherein, storing program area can store operation system
Application program required for system, at least one function;Storage data field can store the use institute according to Test cases technology device
Data of establishment etc..Additionally, memorizer 402 can include high-speed random access memory, non-volatile memories can also be included
Device, for example, at least one disk memory, flush memory device or other non-volatile solid state memory parts.In some embodiments
In, memorizer 402 is optional including relative to the remotely located memorizer of processor 401, these remote memories can pass through net
Network is connected to the processing meanss of list items operation.The example of above-mentioned network includes but is not limited to the Internet, intranet, local
Net, mobile radio communication and combinations thereof.
Input equipment 403 can receives input numeral or character information, and produce and the use of Test cases technology device
The key signals input that family is arranged and function control is relevant.Output device 404 may include the display devices such as display screen.
One or more of module stores in the memorizer 402, when by one or more of processors
During 401 execution, the method for generating test case in above-mentioned any means embodiment is executed.
The method provided by the executable the embodiment of the present application of the said goods, possesses the corresponding functional module of execution method and has
Beneficial effect.The ins and outs of detailed description in the present embodiment, not can be found in the method provided by the embodiment of the present application.
The electronic equipment of the embodiment of the present invention is present in a variety of forms, including but not limited to:
(1) mobile communication equipment:The characteristics of this kind equipment is that possess mobile communication function, and with offer speech, data
Communicate as main target.This Terminal Type includes:Smart mobile phone (such as iPhone), multimedia handset, feature mobile phone, and low
End mobile phone etc..
(2) super mobile personal computer equipment:This kind equipment belongs to the category of personal computer, has calculating and processes work(
Can, typically also possess mobile Internet access characteristic.This Terminal Type includes:PDA, MID and UMPC equipment etc., such as iPad.
(3) portable entertainment device:This kind equipment can show and play content of multimedia.The kind equipment includes:Audio frequency,
Video player (such as iPod), handheld device, e-book, and intelligent toy and portable car-mounted navigator.
(4) server:The equipment of the service of calculating is provided, the composition of server includes that processor, hard disk, internal memory, system are total
Line etc., server are similar with general computer architecture, but due to needing to provide highly reliable service, are therefore processing energy
The aspects such as power, stability, reliability, safety, extensibility, manageability require higher.
(5) other have the electronic installation of data interaction function.
Device embodiment described above is only that schematically the wherein described unit illustrated as separating component can
To be or may not be physically separate, as the part that unit shows can be or may not be physics list
Unit, you can be located at a place, or can also be distributed on multiple NEs.Which is selected according to the actual needs can
In some or all of module realizing the purpose of this embodiment scheme.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
Mode by software plus required general hardware platform is realizing, naturally it is also possible to by hardware.Such understanding is based on, on
State the part that technical scheme substantially contributes prior art in other words to embody in the form of software product, should
Computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD etc., including some fingers
Order is used so that a computer equipment (can be personal computer, server, or network equipment etc.) executes each enforcement
Method described in some parts of example or embodiment.
Finally it should be noted that:Above example only in order to technical scheme to be described, rather than a limitation;Although
With reference to the foregoing embodiments the present invention has been described in detail, it will be understood by those within the art that:Which still may be used
To modify to the technical scheme described in foregoing embodiments, or equivalent is carried out to which part technical characteristic;
And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and
Scope.
Claims (12)
1. a kind of method for generating test case, it is characterised in that comprise the steps:
Obtain the running environment parameter of software to be tested;
At least two groups input control data sequence of the software to be tested are obtained, and in response to control data described in each group
At least two groups output function sequences of events of the software described to be tested that sequence is obtained;
At least two groups control data sequences described in training, obtain being input into training pattern, at least two groups Action Events sequences described in training
Row, obtain exporting training pattern;
The software to be tested is obtained according to the input training pattern and the output training pattern to join in the running environment
Test case under several.
2. method for generating test case according to claim 1, it is characterised in that at least two groups controls described in the training
Data sequence, obtaining input training pattern includes:
Control data sequence according to default input feature vector community set parses each group, obtains control data described in each group
The characteristic of sequence;Wherein, the characteristic of the control data sequence includes corresponding with each input feature vector attribute
Eigenvalue;
According to the input feature vector attribute and control data sequence described in each group characteristic, obtain described input training mould
Type.
3. method for generating test case according to claim 2, it is characterised in that described according to the input feature vector attribute
And the characteristic of control data sequence described in each group, obtaining the input training pattern includes:
All eigenvalues corresponding with same input feature vector attribute in the characteristic of control data sequence described in each group are obtained,
Using the average of all eigenvalues as training characteristics value corresponding with the input feature vector attribute;
According to each input feature vector attribute and its corresponding training characteristics value, the input training pattern is obtained.
4. method for generating test case according to claim 2, described according to the input feature vector attribute and each group of institute
The characteristic of control data sequence is stated, obtaining the input training pattern includes:
All eigenvalues corresponding with same input feature vector attribute in the characteristic of control data sequence described in each group are obtained,
Training characteristics value scope is worth to according to all features;
According to each input feature vector attribute and its corresponding training characteristics value scope, the input training pattern is obtained.
5. method for generating test case according to claim 4, the spy of control data sequence described in each group of the acquisition
All eigenvalues corresponding with same input feature vector attribute in data are levied, and training characteristics value scope bag are worth to according to all features
Include:
The training characteristics value scope is worth to according to the maximum in all eigenvalues and minimum;Or, according to all eigenvalues
Eigenvalue average is obtained, training characteristics value scope is worth to according to the eigenvalue average and permission floating.
6. the method for generating test case according to any one of claim 1-5, it is characterised in that described in the training at least
Two groups of Action Events sequences, obtaining output training pattern includes:
Action Events sequence according to default output characteristic community set parses each group, obtains Action Events described in each group
The characteristic of sequence;Wherein, the characteristic of the Action Events sequence includes corresponding with each output characteristic attribute
Eigenvalue;
According to the output characteristic attribute and Action Events sequence described in each group characteristic, obtain described output training mould
Type.
7. a kind of Test cases technology device, it is characterised in that include:
Ambient parameter acquisition module, obtains the running environment parameter of software to be tested;
Retrieval module, obtains at least two groups input control data sequence of the software to be tested, and in response to each
At least two groups output function sequences of events of the software described to be tested that the group control data sequence is obtained;
Training module, at least two groups control data sequences described in training obtain being input into training pattern, at least two groups behaviour described in training
Make sequence of events, obtain exporting training pattern;
Use-case generation module, obtains the software to be tested in institute according to the input training pattern and the output training pattern
State the test case under running environment parameter.
8. Test cases technology device according to claim 7, it is characterised in that the training module is used for:
Control data sequence according to default input feature vector community set parses each group, obtains control data described in each group
The characteristic of sequence;Wherein, the characteristic of the control data sequence includes corresponding with each input feature vector attribute
Eigenvalue;
According to the input feature vector attribute and control data sequence described in each group characteristic, obtain described input training mould
Type.
9. Test cases technology device according to claim 8, it is characterised in that the training module specifically for:
All eigenvalues corresponding with same input feature vector attribute in the characteristic of control data sequence described in each group are obtained,
Using the average of all eigenvalues as training characteristics value corresponding with the input feature vector attribute;
According to each input feature vector attribute and its corresponding training characteristics value, the input training pattern is obtained.
10. Test cases technology device according to claim 8, it is characterised in that the training module specifically for:
All eigenvalues corresponding with same input feature vector attribute in the characteristic of control data sequence described in each group are obtained,
Training characteristics value scope is worth to according to all features;
According to each input feature vector attribute and its corresponding training characteristics value scope, the input training pattern is obtained.
11. Test cases technology devices according to claim 10, the training module specifically for:
The training characteristics value scope is worth to according to the maximum in all eigenvalues and minimum;Or, according to all eigenvalues
Eigenvalue average is obtained, training characteristics value scope is worth to according to the eigenvalue average and permission floating.
The 12. Test cases technology devices according to any one of claim 7-11, it is characterised in that the training module is also
For:
Action Events sequence according to default output characteristic community set parses each group, obtains Action Events described in each group
The characteristic of sequence;Wherein, the characteristic of the Action Events sequence includes corresponding with each output characteristic attribute
Eigenvalue;
According to the output characteristic attribute and Action Events sequence described in each group characteristic, obtain described output training mould
Type.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610906380.4A CN106502890A (en) | 2016-10-18 | 2016-10-18 | Method for generating test case and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610906380.4A CN106502890A (en) | 2016-10-18 | 2016-10-18 | Method for generating test case and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106502890A true CN106502890A (en) | 2017-03-15 |
Family
ID=58294634
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610906380.4A Pending CN106502890A (en) | 2016-10-18 | 2016-10-18 | Method for generating test case and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106502890A (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108334895A (en) * | 2017-12-29 | 2018-07-27 | 腾讯科技(深圳)有限公司 | Sorting technique, device, storage medium and the electronic device of target data |
CN108491325A (en) * | 2018-03-20 | 2018-09-04 | 广东欧珀移动通信有限公司 | file system test method, device, storage medium and terminal |
CN108681508A (en) * | 2018-05-15 | 2018-10-19 | 福建天泉教育科技有限公司 | A kind of test method and terminal of view-based access control model identification |
CN109900494A (en) * | 2019-02-25 | 2019-06-18 | 上海机动车检测认证技术研究中心有限公司 | A kind of generation method of test case |
WO2019144346A1 (en) * | 2018-01-25 | 2019-08-01 | 腾讯科技(深圳)有限公司 | Object processing method in virtual scene, device and storage medium |
CN110221970A (en) * | 2019-05-21 | 2019-09-10 | 深圳壹账通智能科技有限公司 | Ui testing method, apparatus, computer equipment and storage medium |
CN110457207A (en) * | 2019-07-12 | 2019-11-15 | 平安普惠企业管理有限公司 | Test method and relevant device based on machine learning model |
CN110737570A (en) * | 2018-07-20 | 2020-01-31 | 北京奇虎科技有限公司 | Training method and device for automated test behaviors |
CN110795336A (en) * | 2019-09-25 | 2020-02-14 | 腾讯科技(深圳)有限公司 | Application program control method, device, equipment and readable storage medium |
CN111176990A (en) * | 2019-12-23 | 2020-05-19 | 深圳壹账通智能科技有限公司 | Test data generation method and device based on data decision and computer equipment |
CN111722610A (en) * | 2019-03-20 | 2020-09-29 | 北京新能源汽车股份有限公司 | Test case generation method and device |
CN111936976A (en) * | 2018-02-06 | 2020-11-13 | 西门子股份公司 | Artificial intelligence enabled output space exploration for guided test case generation |
CN112346953A (en) * | 2019-08-06 | 2021-02-09 | 阿里巴巴集团控股有限公司 | Method and device for generating use case, electronic device and commodity recommendation method |
CN108304324B (en) * | 2018-01-22 | 2022-07-19 | 百度在线网络技术(北京)有限公司 | Test case generation method, device, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090199047A1 (en) * | 2008-01-31 | 2009-08-06 | Yahoo! Inc. | Executing software performance test jobs in a clustered system |
CN105938454A (en) * | 2016-04-13 | 2016-09-14 | 珠海迈科智能科技股份有限公司 | Generation method and system of test cases |
-
2016
- 2016-10-18 CN CN201610906380.4A patent/CN106502890A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090199047A1 (en) * | 2008-01-31 | 2009-08-06 | Yahoo! Inc. | Executing software performance test jobs in a clustered system |
CN105938454A (en) * | 2016-04-13 | 2016-09-14 | 珠海迈科智能科技股份有限公司 | Generation method and system of test cases |
Non-Patent Citations (1)
Title |
---|
尤枫等: "基于输出域的测试用例自动生成方法研究", 《计算机研究与发展》 * |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108334895B (en) * | 2017-12-29 | 2022-04-26 | 腾讯科技(深圳)有限公司 | Target data classification method and device, storage medium and electronic device |
CN108334895A (en) * | 2017-12-29 | 2018-07-27 | 腾讯科技(深圳)有限公司 | Sorting technique, device, storage medium and the electronic device of target data |
CN108304324B (en) * | 2018-01-22 | 2022-07-19 | 百度在线网络技术(北京)有限公司 | Test case generation method, device, equipment and storage medium |
WO2019144346A1 (en) * | 2018-01-25 | 2019-08-01 | 腾讯科技(深圳)有限公司 | Object processing method in virtual scene, device and storage medium |
CN111936976A (en) * | 2018-02-06 | 2020-11-13 | 西门子股份公司 | Artificial intelligence enabled output space exploration for guided test case generation |
CN108491325A (en) * | 2018-03-20 | 2018-09-04 | 广东欧珀移动通信有限公司 | file system test method, device, storage medium and terminal |
CN108681508A (en) * | 2018-05-15 | 2018-10-19 | 福建天泉教育科技有限公司 | A kind of test method and terminal of view-based access control model identification |
CN108681508B (en) * | 2018-05-15 | 2022-04-01 | 福建天泉教育科技有限公司 | Testing method based on visual recognition and terminal |
CN110737570A (en) * | 2018-07-20 | 2020-01-31 | 北京奇虎科技有限公司 | Training method and device for automated test behaviors |
CN109900494A (en) * | 2019-02-25 | 2019-06-18 | 上海机动车检测认证技术研究中心有限公司 | A kind of generation method of test case |
CN109900494B (en) * | 2019-02-25 | 2021-04-13 | 上海机动车检测认证技术研究中心有限公司 | Test case generation method |
CN111722610A (en) * | 2019-03-20 | 2020-09-29 | 北京新能源汽车股份有限公司 | Test case generation method and device |
CN110221970A (en) * | 2019-05-21 | 2019-09-10 | 深圳壹账通智能科技有限公司 | Ui testing method, apparatus, computer equipment and storage medium |
CN110457207A (en) * | 2019-07-12 | 2019-11-15 | 平安普惠企业管理有限公司 | Test method and relevant device based on machine learning model |
CN112346953A (en) * | 2019-08-06 | 2021-02-09 | 阿里巴巴集团控股有限公司 | Method and device for generating use case, electronic device and commodity recommendation method |
CN110795336A (en) * | 2019-09-25 | 2020-02-14 | 腾讯科技(深圳)有限公司 | Application program control method, device, equipment and readable storage medium |
WO2021128679A1 (en) * | 2019-12-23 | 2021-07-01 | 深圳壹账通智能科技有限公司 | Data decision-making-based test data generation method and apparatus, and computer device |
CN111176990A (en) * | 2019-12-23 | 2020-05-19 | 深圳壹账通智能科技有限公司 | Test data generation method and device based on data decision and computer equipment |
CN111176990B (en) * | 2019-12-23 | 2023-05-30 | 深圳壹账通智能科技有限公司 | Test data generation method and device based on data decision, and computer equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106502890A (en) | Method for generating test case and system | |
CN110009171B (en) | User behavior simulation method, device, equipment and computer readable storage medium | |
CN109976998B (en) | Software defect prediction method and device and electronic equipment | |
Kőrösi et al. | MOOC performance prediction by deep learning from raw clickstream data | |
CN111079001A (en) | Decoration recommendation information generation method and device, storage medium and electronic equipment | |
CN105975269B (en) | A kind of requirements verification method based on procedural model | |
CN110059794A (en) | Man-machine recognition methods and device, electronic equipment, storage medium | |
CN108604317A (en) | Scalability holds device | |
CN104182272A (en) | Simulation testing platform and controlling method for hypersonic flight vehicle assessment | |
Wasilewski et al. | Measuring the perceived iq of multimodal large language models using standardized iq tests | |
CN113961765B (en) | Searching method, searching device, searching equipment and searching medium based on neural network model | |
CN110348471A (en) | Exception object recognition methods, device, medium and electronic equipment | |
Walker et al. | A simulation environment for ITER PCS development | |
US9983965B1 (en) | Method and system for implementing virtual users for automated test and retest procedures | |
CN107632850A (en) | A kind of method and apparatus for obtaining application controls information | |
CN114358278A (en) | Training method and device of neural network model | |
CN114154622A (en) | Algorithm model for traffic operation system flow data acquisition missing completion | |
Moon et al. | Rich representations for analyzing learning trajectories: Systematic review on sequential data analytics in game-based learning research | |
US20150262061A1 (en) | Contextual real-time feedback for neuromorphic model development | |
Rafaila et al. | Design of experiments for effective pre-silicon verification of automotive electronics | |
Susarev et al. | Training simulators development technique for oil and gas industry automation control systems | |
CN107357729A (en) | The method and electronic equipment of test software | |
WO2024203382A1 (en) | Learning model generation device, inspection value prediction device, learning model generation method, inspection value prediction method, and computer-readable recording medium | |
CN116531764B (en) | Game data processing method, device, equipment and computer readable storage medium | |
Laughery Jr | Computer modeling of human performance on microcomputers |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20170315 |
|
WD01 | Invention patent application deemed withdrawn after publication |