CN105843743B - A kind of verification method of specific automation test case reality output result correctness - Google Patents
A kind of verification method of specific automation test case reality output result correctness Download PDFInfo
- Publication number
- CN105843743B CN105843743B CN201610220057.1A CN201610220057A CN105843743B CN 105843743 B CN105843743 B CN 105843743B CN 201610220057 A CN201610220057 A CN 201610220057A CN 105843743 B CN105843743 B CN 105843743B
- Authority
- CN
- China
- Prior art keywords
- neural network
- value
- output
- result
- test
- 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.)
- Active
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/3688—Test management for test execution, e.g. scheduling of test suites
-
- 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
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 invention discloses a kind of verification method of specific automation test case reality output result correctness, this method does not influence the process of its automatic test itself when the real data generated to automatic test cases carries out particular analysis processing.Step 1:Acquisition is stored in without Bug data under local file;Step 2:With getting a neural network model is trained without Bug data;Step 3:The feature vector of given m dimensions is input value [x1,x2,…,xi,…,xm], it executes corresponding automatic test cases and obtains actual test result Tk;Step 4:Input value in above-mentioned steps 3 is substituted into the neural network trained and completed in step 2, the training by neural network obtains prediction output valve ok, corresponding automatic test cases then will be executed in step 3 obtains actual test result TkWith the predicted value o of the neural network output after the completion of trainingkIt is compared, result Δ T by comparingkTo judge whether this test case Bug occurs.
Description
Technical field
The present invention relates to a kind of verification methods of specific automation test case reality output result correctness, belong to automatic
Change testing field.
Background technology
At present to the verification of automatic test cases implementing result be design specific function automatic test cases it
Preceding first to provide determining expected result, expected results before are compared by when implementation of test cases with actual result, if
Expected results are identical as actual result, illustrate this function without Bug, otherwise illustrate that Bug occurs in this function.This test case executes
As a result verification is well suited for the design of the automatic test cases of known accurate result, and to those test case implementing results without
Test case the method for method precognition can not be verified.Due to the particularity of industrial software, so this defect is soft in industry
It is particularly evident in the automatic test of part.
It is directed to existing automatization testing technique problems faced at present, is that the difficulty solved is badly in need of in automatic test field
Topic.And the present invention can well solve problem above.
Invention content
Present invention aims at for deficiency existing for existing automatic test cases verification technique, a kind of spy is provided
The correctness verification method of different automatic test cases output data.The present invention trains nerve net by acquiring without Bug data
Network so that its expected results can be calculated when designing special test case, to design complete test case.This
Invention can solve the design to the unexpected automatic test cases of test result.
The technical scheme adopted by the invention to solve the technical problem is that:The present invention provides a kind of tests of specific automation
The verification method of use-case reality output result correctness, the described method comprises the following steps:
Step 1:Acquisition is stored in without Bug data under local file;
Step 2:With getting a neural network model is trained without Bug data;
Step 3:The feature vector of given m dimensions is input value [x1,x2,...,xi,...,xm], it executes corresponding automation and surveys
Example on probation obtains actual test result Tk;
Step 4:Input value in above-mentioned steps 3 is substituted into the neural network trained and completed in step 2, by nerve
The training of network obtains prediction output valve ok, corresponding automatic test cases then will be executed in step 3 obtains actual test knot
Fruit TkWith the predicted value o of the neural network output after the completion of trainingkIt is compared, result Δ T by comparingkTo judge this survey
Whether example on probation there is Bug.
Further, it in the step 1 of the method for the invention, is acquired without Bug numbers by using automated test tool
According to being stored under local file, this data includes input value and output valve, and input value therein refers to design nominative testing use-case
When according to this test case the characteristics of, numerical value that the input numerical value that is given in edit script inputs when can also be recording interface
Deng these input numerical value are to the assignment of corresponding parameter when executing automatic test;Output valve refers to that this test case executes
After finishing in the log that the result value of interface display can also be machine feedback information.
Further, in step 2 of the present invention, the data obtained in step 1 are carried out with the training of neural network,
Establish neural network model.N sample being collected into step 1 is divided into two parts, is training sample and test specimens respectively
This.Neural network is trained using the input and output value of training sample, is then tested again with the input and output value of test sample
The accuracy of trained neural network.
Further, in step 3 of the present invention, with given data [x1,x2,...,xi,...,xm] it is input value
The automatic test cases of specific function are executed, obtain corresponding real output value Tk。
Further, in step 4 of the present invention, input value [x that the step 3 is used1,x2,...,xi,...,
xm] substitute into step 2 in trained neural network, exported accordingly as a result, i.e. specific automatic test cases it is pre-
Time value ok, the reality output result T of the automatic test cases of corresponding function will be executedkSystem output is obtained with after the completion of training
Desired value okIt is compared, it is [x to acquire input value1,x2,...,xi,...,xm] when output error Δ Tk, according to error delta
TkTo determine whether there is Bug, given threshold μ by brake in this, as error delta TkWhen more than threshold value μ, existed using script
Bug is written in test report, and terminates the execution of this automatic test cases, continues to execute next automatic test and uses
Example;As error delta TkWhen being not above threshold value μ, continue the execution of this automatic test cases.
Advantageous effect:
1, the present invention without Bug data to history by carrying out neural net model establishing and training so that originally can not be pre- in advance
The test case implementing result known becomes predictable.
2, the present invention solves the bottleneck of special industry software automated testing, that is, is being unable to get test case expection knot
When fruit, the implementing result of this test case can not be verified.
Description of the drawings
Fig. 1 is the flow chart of the method for the present invention.
Fig. 2 is the schematic network structure of BP (Backpropagation) algorithm.
Specific implementation mode
The invention is described in further detail with reference to the accompanying drawings of the specification.
As shown in Figure 1, the present invention provides a kind of verifications of specific automation test case reality output result correctness
Method the described method comprises the following steps:
Step 1:Acquisition is stored in without Bug data under local file;
The numerical value without Bug is acquired using automated test tool, for example uses Ranorex automated test tools,
Reference is stored with the Excel of n items record needed for test in Ranorex, it is assumed that in Excel, every record has m numerical value, i.e.,
Feature vector is m dimensions.The automatic test for executing corresponding function, the feelings without Bug during ensuring to execute automatic test cases
Under condition, the result executed using automatic test cases is output valve.By in Excel n input value and execute automation
The n output valve that test case obtains is stored in the file of certain format, this is that n sample is stored in file, each sample
There is (m+1) a numerical value in this, wherein it is input value there are m, 1 is output valve.
Step 2:With getting a neural network model is trained without Bug data;
The training of neural network is carried out using the data obtained in step 1.This trains the neural network model used
It is the neural network of BP algorithm.Before using neural metwork training data, it must be determined that the structure of neural network, i.e. nerve net
The number of the number of plies of network and every layer of neural node.
(1) network structure of BP algorithm
Fig. 2 is the network structure for the BP algorithm for being directed to this training design.
Introduce mark:xiThe input value for indicating i-th of neural node of input layer, assumes the n being collected into the present invention
Sample, and two parts are classified as, it is training sample (p) and test sample (n-p) respectively, wherein has in each sample
The feature vector of m input value, 1 output valve, i.e., one example is [x1,x2,…,xi,…,xm];wijIndicate neural node i
With the weight between neural node j;ojIndicate the output valve of neural node j;θjIndicate biasing, wherein each neural node
There is specific biasing.
The BP algorithm neural network being used in the present invention has one layer of input layer, one layer of hidden layer, one layer of output layer.Input
The neural node number of layer is the dimension m of feature vector;The neural node number of hidden layer can be arbitrary, and the later stage can
It is tested and is improved according to experiment test error and accuracy, hidden layer nerve node is first arranged in we in the present invention
Number is (k-1);Output layer nerve node number is the dimension 1 of output valve.
(2) BP algorithm principle
BP algorithm is to handle the example in training set by iterative, and two steps of BP algorithm point carry out, i.e., forward-propagating and
Backpropagation.Start train BP neural network before need all weights of random initializtion (weight usually randomly selected -
Between 1 to 1) and random initializtion biasing (bias usually randomly selected is between -0.5 to 0.5).The present invention is first with single
The two processes are sketched for sample:
(2.1) forward-propagating
The sample of input is handled from input layer by hidden layer nerve node in layer, passes through all hidden layers
Later, then it is transmitted to output layer;During successively handling, the state of each layer of neuron is only to the state of next layer of neuron
It has an impact.Reality output and desired output are compared in output layer, if reality output is not equal to desired output, into
Enter back-propagation process.
The neural network forward-propagating specific algorithm for being directed to the present invention is as follows:
Sigmoid functions (S curve) are used in the present invention to carry out the simulation of non-linear relation.Neural node j's is defeated
Go out value ojSolution procedure be that the inclined of neural node j is added in the weighted sum of last layer of layer where first obtaining neural node j
The sum set, then again to itself and progress non-linear conversion, specific formula is as follows:
Wherein ojIndicate the output valve of neural node j;IjThe weighted sum of the last layer of layer where indicating neural node j it
The sum of the biasing of neural node j is added afterwards;wijIndicate the weight between nerve node i and neural node j;oiIndicate last layer
The output valve of neural node i;θjIndicate the biasing of neural node j.
The output valve o of all hidden layers and output layer nerve node is found out according to formula (1) (2)j(j=1,2 ..., k).It is logical
Cross the reality output o that forward-propagating obtains this samplek, by itself and desired output TkIt is compared, if reality output is not equal to the phase
It hopes output, then enters back-propagation process.
(2.2) backpropagation
When backpropagation, error is reversely passed back by the access of original forward-propagating, and to each god of each hidden layer
Weight and biasing through member are modified, to hope output error tend to minimum.
It is reversely transmitted according to error
For the error E rr between output layer nerve node k reality outputs and desired outputk:
Errk=ok(1-ok)(Tk-ok) formula (3)
Wherein ErrkIndicate the error between output layer nerve node k reality outputs and desired output;οkIndicate neural node
The reality output of k;TkIndicate the desired output of neural node k.ok(1-ok) be sigmoid functions derivative.
For the error E rr between hidden layer nerve node j reality outputs and desired outputj:
Wherein ErrjIndicate the error between hidden layer nerve node j reality outputs and desired output;ojIndicate neural node
The real output value of j;
Weight updates:
Δwij=(l) ErrjoiFormula (5)
wij=wij+ΔwijFormula (6)
Wherein Δ wijIndicate the weight w after propagated forwardijWith the weight w after back-propagatingijBetween error;L indicates to learn
Habit rate or change rate can randomly select between 0 to 1.The w on formula (6) equal sign left sideijNewer power after expression back-propagating
Weight;
Biasing update:
Δθj=(l) ErrjFormula (7)
θj=θj+ΔθjFormula (8)
Wherein Δ θjIndicate the weight θ after propagated forwardjWith the weight θ after back-propagatingjBetween error;Formula (8) equation
The θ on the left sidejNewer bias after expression back-propagating;
The weight to each neuron of hidden layer and output layer and biasing by the backpropagation steps of formula (3)~(8)
It modifies so that output error value gradually tends to minimum.
It is the specific steps realized to the training philosophy and BP algorithm of BP neural network using a sample, this hair above
The training of other bright (p-1) a samples is as above.After in p sample, all training is completed, tested originally with (n-p) a test specimens
The accuracy of trained BP neural network.
Step 3:The feature vector of given m dimensions is input value [x1,x2,...,xi,...,xm], it executes corresponding automation and surveys
Example on probation obtains actual test result Tk;
In step 3, input value [x is given1,x2,...,xi,...,xm] used to execute the automatic test of specific function
Example.For example reference is stored with the Excel of data needed for test in Ranorex, executes the automatic test of corresponding function, obtains
Corresponding real output value Tk。
Step 4:Input value in above-mentioned steps 3 is substituted into the neural network trained and completed in step 2, by nerve
The training of network obtains prediction output valve ok, corresponding automatic test cases then will be executed in step 3 obtains actual test knot
Fruit TkWith the predicted value o of the neural network output after the completion of trainingkIt is compared, result Δ T by comparingkTo judge this survey
Whether example on probation there is Bug.
In step 4, [x step 3 used1,x2,...,xi,...,xm] input value substitute into step 2 in trained
BP neural network in, exported the desired value o as a result, i.e. specific automatic test cases accordinglyk.Corresponding work(will be executed
The reality output result T of the automatic test cases of energykThe desired value o of system output is obtained with after the completion of trainingkIt is compared,
And it is [x to acquire input value1,x2,...,xi,...,xm] when output error Δ Tk, according to error delta TkTo determine whether this quilt
There is Bug in brake.In view of in actual environment, the machinery of industrial software control may be by working environment and machinery sheet
The influence of body temperature, loss etc., given threshold μ, as error delta TkWhen more than threshold value μ, Bug will be written in Ranorex in report,
And the execution for terminating this automatic test cases continues to execute next automatic test cases;As error delta TkDo not surpass
When crossing threshold value μ, continue the execution of this automatic test cases.
Present invention is generally directed to existing automatic test cases test result verification method problems faceds, provide one kind
The verification method of specific automation test case reality output result correctness, which will be to the specific automation of industrial software
The solution of testing case result verification problem has application value.
In the above-described embodiments, exemplary description only has been carried out to the present invention, but those skilled in the art are reading this
The present invention can be carry out various modifications without departing from the spirit and scope of the present invention after patent application.
Claims (1)
1. a kind of verification method of specific automation test case reality output result correctness, which is characterized in that the method
Include the following steps:
Step 1:Acquisition is stored in without Bug data under local file, is acquired using automated test tool and is stored in without Bug data
Under local file, this data includes input value and output valve, according to this when input value therein refers to design nominative testing use-case
The characteristics of test case, the numerical value etc. that the input numerical value given in edit script inputs when can also be recording interface execute
These input numerical value are to the assignment of corresponding parameter when automatic test;Output valve refers to after this test case is finished
The information in the result value of interface display can also be the log of machine feedback;
Step 2:A neural network model is trained without Bug data with getting, establishes neural network model, will be used certainly
The collected n sample of dynamicization testing tool is divided into two parts, is training sample and test sample respectively, uses training sample
Input and output value trains neural network, then tests trained neural network with the input and output value of test sample again
Accuracy;
Step 3:The feature vector of given m dimensions is input value [x1,x2,...,xi,...,xm], execute corresponding automatic test cases
Obtain actual test result Tk, with given data [x1,x2,...,xi,...,xm] for input value come execute specific function from
Dynamicization test case obtains corresponding real output value Tk;
Step 4:Input value in above-mentioned steps 3 is substituted into the neural network trained and completed in step 2, by neural network
Training obtain prediction output valve ok, corresponding automatic test cases then will be executed in step 3 obtains actual test result TkWith
The predicted value o of neural network output after the completion of trainingkIt is compared, result Δ T by comparingkTo judge this test case
Whether Bug is occurred, using the neural network that training is completed in above-mentioned steps 2, the input value [x that the step 3 is used1,
x2,...,xi,...,xm] step 2 is substituted into trained neural network, it is exported accordingly as a result, i.e. specific automation
The desired value o of test casek, the reality output result T of the automatic test cases of corresponding function will be executedkAfter the completion of training
Obtain the desired value o of system outputkIt is compared, it is [x to acquire input value1,x2,...,xi,...,xm] when output error Δ
Tk, according to error delta TkTo determine whether there is Bug, given threshold μ by brake in this, as error delta TkWhen more than threshold value μ,
Bug is written in test report using script, and terminates the execution of this automatic test cases, continues to execute next
Automatic test cases;As error delta TkWhen being not above threshold value μ, continue the execution of this automatic test cases.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610220057.1A CN105843743B (en) | 2016-04-11 | 2016-04-11 | A kind of verification method of specific automation test case reality output result correctness |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610220057.1A CN105843743B (en) | 2016-04-11 | 2016-04-11 | A kind of verification method of specific automation test case reality output result correctness |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105843743A CN105843743A (en) | 2016-08-10 |
CN105843743B true CN105843743B (en) | 2018-10-02 |
Family
ID=56597138
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610220057.1A Active CN105843743B (en) | 2016-04-11 | 2016-04-11 | A kind of verification method of specific automation test case reality output result correctness |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105843743B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107967218B (en) * | 2017-12-26 | 2018-10-30 | 中原工学院 | Boundary value test method in industrial software on-the-spot test based on user's history data |
CN108304318B (en) * | 2018-01-02 | 2020-12-04 | 深圳壹账通智能科技有限公司 | Device compatibility testing method and terminal device |
CN108470000B (en) * | 2018-03-06 | 2024-05-03 | 睿云联(厦门)网络通讯技术有限公司 | Automatic testing method, system and medium for communication terminal software |
CN108874665A (en) * | 2018-05-29 | 2018-11-23 | 百度在线网络技术(北京)有限公司 | A kind of test result method of calibration, device, equipment and medium |
CN109636786B (en) * | 2018-12-11 | 2022-11-22 | 嘉楠明芯(北京)科技有限公司 | Verification method and device of image recognition module |
CN110232020A (en) * | 2019-05-20 | 2019-09-13 | 平安普惠企业管理有限公司 | Test result analysis method and relevant apparatus based on intelligent decision |
CN110309064B (en) * | 2019-05-30 | 2024-07-26 | 邓辉 | Unit test method, device, equipment and storage medium based on log record |
CN110377511B (en) * | 2019-07-11 | 2021-04-06 | 河海大学 | Test case generation method oriented to data flow |
CN111026664B (en) * | 2019-12-09 | 2020-12-22 | 遵义职业技术学院 | Program detection method and detection system based on ANN and application |
CN111445115B (en) * | 2020-03-20 | 2023-10-17 | Oppo(重庆)智能科技有限公司 | Test item verification method, device, electronic equipment and computer readable storage medium |
CN113434408B (en) * | 2021-06-25 | 2022-04-08 | 北京理工大学 | Unit test case sequencing method based on test prediction |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103092748A (en) * | 2011-11-07 | 2013-05-08 | 阿里巴巴集团控股有限公司 | Method and system of test cases surely needing to perform regression testing |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB0206761D0 (en) * | 2002-03-22 | 2002-05-01 | Object Media Ltd | Software testing |
-
2016
- 2016-04-11 CN CN201610220057.1A patent/CN105843743B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103092748A (en) * | 2011-11-07 | 2013-05-08 | 阿里巴巴集团控股有限公司 | Method and system of test cases surely needing to perform regression testing |
Non-Patent Citations (1)
Title |
---|
汽车产品回收再制造企业特征属性与生产性服务需求匹配预测研究;庞金茹;《中国优秀硕士学位论文全文数据库》;20150615;说明书第22页第3.1节-第34页第3.3节 * |
Also Published As
Publication number | Publication date |
---|---|
CN105843743A (en) | 2016-08-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105843743B (en) | A kind of verification method of specific automation test case reality output result correctness | |
US11709979B1 (en) | Bridge damage identification method considering uncertainty | |
US10997711B2 (en) | Appearance inspection device | |
CN105957086A (en) | Remote sensing image change detection method based on optimized neural network model | |
Chandra et al. | Improving software quality using machine learning | |
EP4075281A1 (en) | Ann-based program test method and test system, and application | |
White et al. | Toward reproducible environmental modeling for decision support: A worked example | |
CN112668809B (en) | Method for establishing autism children rehabilitation effect prediction model | |
Aceituna et al. | Model-based requirements verification method: Conclusions from two controlled experiments | |
CN113065581A (en) | Vibration fault migration diagnosis method for reactance domain adaptive network based on parameter sharing | |
Bandara et al. | The three-stage artificial neural network method for damage assessment of building structures | |
CN116089870A (en) | Industrial equipment fault prediction method and device based on meta-learning under small sample condition | |
CN111122811A (en) | Sewage treatment process fault monitoring method of OICA and RNN fusion model | |
CN109725597A (en) | Test device and machine learning device | |
CN113836789A (en) | DEM (digital elevation model) mesoscopic parameter calibration method based on macro-mesoscopic parameter association criterion | |
CN112561035A (en) | Fault diagnosis method based on CNN and LSTM depth feature fusion | |
CN114580239B (en) | Bridge damage identification method considering uncertainty | |
CN110188039A (en) | The method and system of software test, software optimization | |
Neutens | Unsupervised functional analysis of graphical programs for physical computing | |
Venugopal et al. | Use of genetic algorithms in software testing models | |
CN114138328A (en) | Software reconstruction prediction method based on code peculiar smell | |
CN104317706B (en) | A kind of program mutation software error localization method based on pre-computation | |
Dube et al. | Machine Learning Approach to Predict Aerodynamic Performance of Underhood and Underbody Drag Enablers | |
CN114018727A (en) | Method for determining shear strength of slip band soil in whole process of large deformation | |
CN113704085A (en) | Method and device for checking a technical system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |