CN106227669A - Code testing method and device and electronic equipment - Google Patents

Code testing method and device and electronic equipment Download PDF

Info

Publication number
CN106227669A
CN106227669A CN201610617740.9A CN201610617740A CN106227669A CN 106227669 A CN106227669 A CN 106227669A CN 201610617740 A CN201610617740 A CN 201610617740A CN 106227669 A CN106227669 A CN 106227669A
Authority
CN
China
Prior art keywords
test
new
test problem
code
new 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.)
Granted
Application number
CN201610617740.9A
Other languages
Chinese (zh)
Other versions
CN106227669B (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.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software 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 Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201610617740.9A priority Critical patent/CN106227669B/en
Publication of CN106227669A publication Critical patent/CN106227669A/en
Application granted granted Critical
Publication of CN106227669B publication Critical patent/CN106227669B/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

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 application provides a code testing method and device and electronic equipment, and belongs to the technical field of testing. The method comprises the following steps: testing the codes every other first preset time period to obtain a test problem; comparing the test problem with the previous test problem; and when a new test problem different from the previous test problem exists in the test problem, selecting the problem type of the new test problem from a problem type set library corresponding to the code. According to the method, codes are tested every other first preset time period to obtain test problems; comparing the test problem with the previous test problem, and when a new test problem different from the previous test problem exists in the test problem, selecting the problem type of the new test problem from the problem type set library corresponding to the code, wherein the problem type of the new test problem is selected from the problem type set library corresponding to the code, so that the selected problem type can be closely related to the code, and dynamic adjustment can be guaranteed.

Description

The method of testing of a kind of code, device and electronic equipment
Technical field
The application relates to technical field of measurement and test, particularly relates to the method for testing of code, device and electronic equipment.
Background technology
In software development process, procedural problem is inevitable, therefore needs to carry out its code strictly before software is reached the standard grade Test, Jenkins is a kind of conventional method of testing.
Software code can be tested by Jenkins every preset time period, by comparing the test of this and last time Result determines procedural problem, provides the problem types corresponding with this procedural problem in common question type set storehouse simultaneously, with Subtest personnel, developer and management personnel etc. carry out statistical analysis.
Problem types in this kind of method problem types set is universal class, in order to embody versatility, and problem types collection Problem types in conjunction goes for all kinds code produced problem so that problem types is thicker, it is impossible to enough accurate The code practical problem of reaction reality test.
Summary of the invention
For the degree of association of Upgrade Problem type Yu code, the embodiment of the present application propose a kind of code method of testing, Device and electronic equipment.
First aspect, the embodiment of the present application provides the method for testing of a kind of code, and described method includes:
Every the first preset time period, code is tested, obtain test problem;
Contrast this test problem and test problem last time;
When this test problem described exists the new test problem different from test problem described last time, in described generation In the problem types set storehouse that code is corresponding, select the problem types of described new test problem.
Alternatively, in the described problem types set storehouse corresponding at described code, the problem selecting described new test problem After type, also include:
Select permeability type is the new test problem of preset kind;
Determine the research and development object of the new test problem correspondence code of selection;
New test problem and the problem types of described selection is sent to described reparation object.
Alternatively, when this test problem described exists the new test problem different from test problem described last time it After, also include:
Described new test problem is stored as test result, and recording test time.
Alternatively, in the described problem types set storehouse corresponding at described code, the problem selecting described new test problem Before type, also include:
One or more problem types is set for described code, forms problem types set storehouse.
Alternatively, described method, also include:
Every the second preset time period, the acquisition testing time is positioned at the test result of the 3rd preset time period;
The repairing effect of new test problem in the test result that assessment obtains.
Alternatively, the repairing effect of new test problem in the test result that described assessment obtains, including:
Assess the reparation quantity of new test problem in the test result of described acquisition, and/or, assess the test of described acquisition The repair rate of new test problem in result.
Alternatively, the repair rate of new test problem in the test result of the described acquisition of described assessment, including:
Assess the reparation quantity of new test problem in the test result of described acquisition;
Determine the total quantity of non-repetitive new test problem in the test result of described acquisition;
The business of described reparation quantity Yu described total quantity is defined as in the test result of described acquisition new test problem Repair rate.
Alternatively, the reparation quantity of new test problem in the test result that described assessment obtains, including:
Determining the test problem do not repaired, the described test problem do not repaired is the test institute corresponding with nearest test result The whole test problems obtained, described corresponding with nearest test result test as testing time institute corresponding to nearest test result The test carried out;
Determine the new test problem in non-nearest test result;
According to the new test problem in the described test problem do not repaired and described non-nearest test result, determine reparation New test problem, the new test problem of described reparation is the new test problem in described non-nearest test result, but non-described The test problem do not repaired;
The quantity of the new test problem of non-repetitive reparation is defined as in the test result of described acquisition new test problem Reparation quantity.
Second aspect, the embodiment of the present application provides the test device of a kind of code, and described device includes:
Test module, for every the first preset time period, tests code, obtains test problem;
Contrast module, is used for contrasting this test problem and test problem last time;
First selects module, for when existing in this test problem described and described different newly the surveying of test problem last time When why inscribing, in the problem types set storehouse that described code is corresponding, select the problem types of described new test problem.
Alternatively, described device, also include:
Second selects module, for the new test problem that select permeability type is preset kind;
Determine module, for determining the research and development object of the new test problem correspondence code of selection;
Sending module, for sending new test problem and the problem types of described selection to described research and development object.
Alternatively, described device, also include:
Memory module, for described new test problem is stored as test result, and recording test time.
Alternatively, described device, also include:
Module is set, for arranging one or more problem types for described code, forms problem types set storehouse.
Alternatively, described device, also include:
Acquisition module, for every the second preset time period, the acquisition testing time is positioned at the survey of the 3rd preset time period Test result;
Evaluation module, the repairing effect of new test problem in the test result assessing acquisition.
Alternatively, described evaluation module, the reparation quantity of new test problem in the test result assessing described acquisition, And/or, assess the repair rate of new test problem in the test result of described acquisition.
Alternatively, described evaluation module, the reparation quantity of new test problem in the test result assessing described acquisition; Determine the total quantity of non-repetitive new test problem in the test result of described acquisition;By described reparation quantity and described total quantity Business be defined as in the test result of described acquisition the repair rate of new test problem.
Alternatively, described evaluation module, for determining the test problem do not repaired, the described test problem do not repaired for The whole test problems acquired in test that recently test result is corresponding, test corresponding to described and nearest test result is nearest The test that testing time corresponding to test result is carried out;Determine the new test problem in non-nearest test result;According to described New test problem in the test problem do not repaired and described non-nearest test result, determines the new test problem of reparation, institute The new test problem stating reparation is the new test problem in described non-nearest test result, but non-described in the test do not repaired ask Topic;The quantity of the new test problem of non-repetitive reparation is defined as in the test result of described acquisition the reparation of new test problem Quantity.
The third aspect, the embodiment of the present application provides a kind of electronic equipment, including: processor, memorizer, communication interface and Bus;
Described processor, described memorizer and described communication interface are connected by described bus and complete mutual leading to Letter;
Described memorizer storage executable program code;
Described processor is run by the executable program code of storage in the described memorizer of reading and performs with described The program that program code is corresponding, for the method for testing performing a kind of code;
Wherein, the method for testing of described code includes:
Every the first preset time period, code is tested, obtain test problem;
Contrast this test problem and test problem last time;
When this test problem described exists the new test problem different from test problem described last time, in described generation In the problem types set storehouse that code is corresponding, select the problem types of described new test problem.
Have the beneficial effect that:
Every the first preset time period, code is tested, obtain test problem;Contrast this test problem and last time Test problem, when there is the new test problem different from test problem last time in this test problem, in corresponding the asking of code In topic type set storehouse, selecting the problem types of new test problem, wherein, the problem types of new test problem is corresponding from code Problem types set storehouse in select so that the problem types of selection i.e. can guarantee that closely related with code, can guarantee that again dynamic State adjusts.
Accompanying drawing explanation
The specific embodiment of the application is described below with reference to accompanying drawings, wherein:
Fig. 1 shows the method for testing schematic flow sheet of a kind of code that the embodiment of the present application one provides;
Fig. 2 shows the method for testing schematic flow sheet of the another kind of code that the embodiment of the present application one provides;
Fig. 3 shows that a kind of problem that the embodiment of the present application one provides repairs the schematic diagram of estimation flow;
Fig. 4 shows the test apparatus structure schematic diagram of the first code that the embodiment of the present application two provides;
Fig. 5 shows the test apparatus structure schematic diagram of the second code that the embodiment of the present application two provides;
Fig. 6 shows the test apparatus structure schematic diagram of the third code that the embodiment of the present application two provides;
Fig. 7 shows the test apparatus structure schematic diagram of the 4th kind of code that the embodiment of the present application two provides;
Fig. 8 shows the test apparatus structure schematic diagram of the 5th kind of code that the embodiment of the present application two provides;
Fig. 9 shows the structural representation of a kind of electronic equipment that the embodiment of the present application three provides.
Detailed description of the invention
Technical scheme and advantage in order to make the application are clearer, below in conjunction with exemplary to the application of accompanying drawing Embodiment is described in more detail, it is clear that described embodiment be only the application a part of embodiment rather than All embodiments exhaustive.And in the case of not conflicting, the embodiment in this explanation and the feature in embodiment can be mutual Combine.
At present in general problem types set storehouse, select the problem types of the test problem tested out, and general Problem types can not react the practical problem being test for code accurately.Present applicant proposes the method for testing of a kind of code, Code, every the first preset time period, is tested by the method for this test, obtains test problem;Contrast this test problem with Last time, test problem, when there is the new test problem different from test problem last time in this test problem, corresponding at code Problem types set storehouse in, select the problem types of new test problem, wherein, the problem types of new test problem is from code Corresponding problem types set storehouse selects so that the problem types of selection i.e. can guarantee that closely related with code, can protect again Card dynamically adjusts.
Embodiment one
In conjunction with above-mentioned implementation environment, the present embodiment provides the method for testing of a kind of code.Seeing Fig. 1, the present embodiment provides Method flow specific as follows:
101: for code, one or more problem types is set, form problem types set storehouse;
This step in the specific implementation, can first arrange an overall problem types storehouse, and the inside includes various code The problem types of the various problems being likely to occur, then from this entirety problem types storehouse, select the problem class relevant to current code Type set storehouse.The various problems that can also be directly likely to occur according to code determine corresponding problem types set storehouse.
It addition, this problem types set storehouse can also change so that problem accordingly according to the difference of test degree Problem types in type set storehouse i.e. can ensure that closely related with code, can ensure that again dynamically adjustment.
102: every the first preset time period, code is tested, obtain test problem;
Code herein is source code, when testing, is all that the latest edition to this code is tested every time.
Every time when code is tested, all can use according to the testing process being pre-designed, test according to existing method The contents such as example are tested, and concrete test process is same as the prior art, and the present embodiment does not repeats.
It should be noted that the test problem obtained in this step is the whole test problem being tested out code, The i.e. full dose test problem of code.Check in order to follow-up, the test problem got can be stored.Wherein, storage mode is permissible It is to store with the form of temporary file, it is also possible to be to permanently store in the form of a file temporarily.
103: contrast this test problem and test problem last time, when this test problem existing and test problem last time During different new test problem, in the problem types set storehouse that code is corresponding, select the problem types of new test problem;
Owing to, in step 102, every the first preset time period, code being tested, obtain test problem and (i.e. obtain this The full dose test problem that secondary test obtains), this mode can bring a phenomenon: this tests the test problem obtained (i.e. originally Full dose test problem that secondary test obtains) in there may be with testing the test problem that obtains last time that (i.e. last time, test obtained Full dose test problem) test problem that repeats.As, obtained full dose test problem after test last time and specifically included: problem 1, problem 2, problem 3 and problem 4, obtains full dose test problem after this test and specifically includes: problem 1, problem 5 and problem 6, now problem 1 is exactly the test problem repeated.
For this kind of situation, if all the test problem (i.e. full dose test problem) tested out is operated every time, can make The test problem repeated in pairs carries out the operation repeated, and not only wastes resource, and increases the testing time.Therefore, in this step, After obtaining up-to-date test problem (i.e. this tests the full dose test problem obtained), contrast this test problem (i.e. this The full dose test problem that test obtains) and test problem last time (i.e. last time tests the full dose test problem obtained), find this In test problem (i.e. this tests the full dose test problem obtained), (full dose that i.e. last time, test obtained is surveyed with test problem last time Why inscribe) different new test problem, only new test problem is operated.Such as, for clearer description test problem, Determine the problem types of new test problem.The most such as, in order to preserve test result in case follow-up monitoring, using new test problem as Test result stores, and recording test time.
It addition, different codes is likely to occur different test problems.Such as: the code of header file, in fact it could happen that code The test problems such as specification, the code in specific algorithm part, in fact it could happen that the test problems such as useless resource, null pointer.In order to make Obtain the problem types finally determined more to mate with code, new survey can be selected in the problem types set storehouse that code is corresponding The problem types why inscribed.The problem types set storehouse that this code is corresponding can be to pre-set in step 101, can be step Select from big problem types set storehouse in rapid 101, it is also possible to be newly-installed.
104: determine the research and development object of new test problem correspondence code;
Wherein, research and development object includes but not limited to: 1) the actual author of code, or the mailbox of actual author, electricity Words etc..2) reviser of this code, or the mailbox of reviser, phone etc. it are responsible for.3) other objects that this code is responsible for, or Person is responsible for the contact method of object.
The specific implementation of this step includes but not limited to the following two kinds:
The first implementation: determine the research and development object of all new test problem correspondence codes.
The second implementation: select permeability type is the new test problem of preset kind, determines that the new test of selection is asked The research and development object of the corresponding code of topic.
Concrete, the problem types paid close attention to can will be needed to be set to preset kind, according to preset kind selection portion in advance Divide new test problem, determine the research and development object of the new test problem correspondence code of part.
105: send new test problem and problem types to research and development object.
If the implementation of step 104 is the first implementation: determine the research and development of all new test problem correspondence codes Object, then this step sends all new test problems and problem types to research and development object.If the implementation of step 104 is second Plant implementation: select permeability type is the new test problem of preset kind, determines the new test problem correspondence code of selection Research and development object, then this step sends the new test problem and problem types selected to research and development object.
As a example by the mailbox of the research and development object actual author as code, new test problem can be sent to this mailbox and ask Topic type, makes author can repair new test problem based on problem types.
Every Preset Time, code is tested to step 105, meeting by performing step 101, and test is obtained New test problem sends the most corresponding research and development object and repairs.
Below as a example by the flow process shown in Fig. 2, above-mentioned test process is illustrated again.After testing process starts, every 1 Up-to-date code is scanned by it, present scan result is contrasted with lastlook, asks if there is no new test Topic, then continue to be scanned up-to-date code every 1 day.If there is new test problem, then using new test problem as test Result achieves, and determines the problem types of new test problem simultaneously, determine new test problem correspondence code developer and Its mailbox, sends new test problem and problem types to this mailbox.
After execution step 101 to step 105, test result also can be included by the method for testing that the present embodiment provides The reparation situation of new test problem be tracked, to guarantee that the new test problem that test result includes is developed object and repaiies Multiple.
Specific implementation includes but not limited to: every the second preset time period, and the acquisition testing time is positioned at the 3rd and presets Test result in time period, the repairing effect of new test problem in the test result that assessment obtains.
Because being that the reparation situation to test problem new in test result is estimated, therefore, assessment cycle will not be than survey The examination cycle is short, it is preferred that longer than test period, such as: the second preset time period is weekly, monthly etc..
In the test result that assessment obtains, the concrete assessment content of the repairing effect of new test problem can have multiple, example As: the reparation quantity of new test problem in the test result that assessment obtains, and/or, the test result that assessment obtains newly is tested The repair rate of problem.
(1) for the reparation quantity of test problem new in the test result of assessment acquisition, can assess in the following way: Determining the test problem do not repaired, the test problem do not repaired is the whole surveys acquired in the test corresponding with nearest test result Why inscribe, the test that the test corresponding with nearest test result was carried out by the testing time that nearest test result is corresponding;Determine New test problem in non-nearest test result;According to the new test in the test problem do not repaired and non-nearest test result Problem, determines the new test problem of reparation, and the new test problem of reparation is the new test problem in non-nearest test result, but non- The test problem do not repaired;It is defined as the quantity of the new test problem of non-repetitive reparation in the test result obtained newly testing The reparation quantity of problem.
(2) for the repair rate of test problem new in the test result of assessment acquisition, can assess in the following way: comment Estimate the reparation quantity of new test problem in the test result of acquisition;Determine non-repetitive new test problem in the test result of acquisition Total quantity;It is defined as the repair rate of new test problem in the test result obtained by repairing the quantity business with total quantity.
Wherein, the specific implementation of the reparation quantity of new test problem in the test result that assessment obtains, including but not Being limited to: determine the test problem do not repaired, the test problem do not repaired is acquired in the test corresponding with nearest test result All test problem, surveys that the test corresponding with nearest test result was carried out by the testing time that nearest test result is corresponding Examination;Determine the new test problem in non-nearest test result;According in the test problem do not repaired and non-nearest test result New test problem, determine the new test problem of reparation, the new test problem of reparation is the new test in non-nearest test result Problem, but the non-test problem do not repaired;The quantity of the new test problem of non-repetitive reparation is defined as the test knot obtained The reparation quantity of new test problem in Guo.
With the 3rd preset time period as current time and before 7 days, and it is currently that 2016-6-17,2016-6-17 pass through When the method for testing of the code that the present embodiment is provided is tested, all test problems obtained in a step 102, i.e. full dose As a example by test problem is problem 2, problem 4 and problem 5, wherein, the 3rd preset time period is 2016-6-17,2016-6-16, 2016-6-15、2016-6-14、2016-6-13、2016-6-12、2016-6-11、2016-6-10.Obtain the testing time be 2016-6-17、2016-6-16、2016-6-15、2016-6-14、2016-6-13、2016-6-12、2016-6-11、2016-6- The test result of 10 is as shown in table 1.
Table 1
Testing time Test result Including new test problem
2016-6-17 Test result 617 Problem 2, problem 5
2016-6-16 Test result 616 Problem 4
2016-6-15 Test result 615 Problem 1
2016-6-14 Test result 614 Problem 4
2016-6-13 Test result 613 Problem 2
2016-6-12 Test result 612 Problem 3, problem 4
2016-6-11 Test result 611 Problem 2
2016-6-10 Test result 610 Problem 1
(1) the reparation quantity of new test problem in the test result that assessment obtains:
1) test problem do not repaired is determined;
Wherein, the test problem do not repaired is acquired in the test corresponding with nearest test result (test result 617) All test problems, the test corresponding with nearest test result (test result 617) is nearest test result (test result 617) The test that the corresponding testing time (2016-6-17) is carried out, i.e. the survey of the code that 2016-6-17 is provided by the present embodiment When method for testing is tested, the test problem that obtains in a step 102, namely 2016-6-17 provided by the present embodiment When the method for testing of code is tested, the full dose test problem obtained in a step 102.
Concrete, the test problem do not repaired is problem 2, problem 4 and problem 5.
2) determine non-nearest test result (test result 616, test result 615, test result 614, test result 613, Test result 612, test result 611, test result 610) in new test problem be: problem 4 (new in test result 616 Test problem), problem 1 (the new test problem in test result 615), problem 4 (the new test problem in test result 614), Problem 2 (the new test problem in test result 613), problem 3 and problem 4 (the new test problem in test result 612), problem 2 (the new test problems in test result 611), problem 1 (the new test problem in test result 610);
3) according to the new test problem in the test problem do not repaired and non-nearest test result, the new survey of reparation is determined Why inscribe;
Wherein, the new test problem of reparation is non-nearest test result (test result 616, test result 615, test knot Really 614, test result 613, test result 612, test result 611, test result 610) in new test problem, but non-do not repair Multiple test problem (problem 2, problem 4 and problem 5).
Concrete, the new test problem of reparation is: problem 1 (the new test problem in test result 615), problem 3 (test New test problem in 612 as a result), problem 1 (the new test problem in test result 610);
4) quantity 2 of the new test problem (problem 1 and problem 3) of non-repetitive reparation is defined as the test result obtained In the reparation quantity of new test problem.
(2) repair rate of new test problem in the test result that assessment obtains:
1) test problem do not repaired is determined: problem 2, problem 4 and problem 5;
2) determine non-nearest test result (test result 616, test result 615, test result 614, test result 613, Test result 612, test result 611, test result 610) in new test problem be: problem 4 (new in test result 616 Test problem), problem 1 (the new test problem in test result 615), problem 4 (the new test problem in test result 614), Problem 2 (the new test problem in test result 613), problem 3 and problem 4 (the new test problem in test result 612), problem 2 (the new test problems in test result 611), problem 1 (the new test problem in test result 610);
3) according to the new test problem in the test problem do not repaired and non-nearest test result, the new survey of reparation is determined The most entitled: problem 1 (the new test problem in test result 615), problem 3 (the new test problem in test result 612), to ask Topic 1 (the new test problem in test result 610);
4) quantity 2 of the new test problem (problem 1 and problem 3) of non-repetitive reparation is defined as the test result obtained In the reparation quantity of new test problem;
5) non-repetitive new test problem in the test result of acquisition (problem 1, problem 2, problem 3, problem 4 and ask are determined Topic 5) total quantity 5;
6) it is defined as the reparation of new test problem in the test result obtained by repairing the quantity 2 business 0.4 with total quantity 5 Rate.
Periodically the repairing effect of test problem new in test result is estimated by this kind, is possible not only to determine The reparation situation of new test problem in test test result, it is also possible to solve in existing scheme new test problem in test result and repair Multiple uncontrollable problem.
Below as a example by the flow process shown in Fig. 3, new test problem in above-mentioned test result is repaired evaluation process and again says Bright.After reparation estimation flow starts, every 1 week triggering task, this task was: from the test result of storage, obtain up-to-date Achieving the test result of the archive of test result and 7 days before, in the test result that assessment obtains, the reparation of new test problem is imitated Really.
The embodiment of the present invention, every the first preset time period, tests code, obtains test problem;Contrast this Test problem and test problem last time, when this test problem exists the new test problem different from test problem last time, In the problem types set storehouse that code is corresponding, select the problem types of new test problem, wherein, the problem class of new test problem Type is to select from the problem types set storehouse that code is corresponding so that the problem types of selection i.e. can guarantee that phase close with code Close, can guarantee that again dynamically adjustment.
Embodiment two
Based on same inventive concept, present embodiments provide the test device of a kind of code, owing to this device solves problem Principle similar to the method for testing of a kind of code shown in embodiment one, therefore the enforcement of this device may refer to embodiment one The embodiment of shown method, repeats no more in place of repetition.
Seeing Fig. 4, this device includes:
Test module 401, for every the first preset time period, tests code, obtains test problem;
Contrast module 402, is used for contrasting this test problem and test problem last time;
First selects module 403, for asking when the new test different from test problem last time of existence in this test problem During topic, in the problem types set storehouse that code is corresponding, select the problem types of new test problem.
See Fig. 5, this device, also include:
Second selects module 404, for the new test problem that select permeability type is preset kind;
Determine module 405, for determining the research and development object of the new test problem correspondence code of selection;
Sending module 406, for sending the new test problem and problem types selected to research and development object.
See Fig. 6, this device, also include:
Memory module 407, for new test problem is stored as test result, and recording test time.
See Fig. 7, this device, also include:
Module 408 is set, for arranging one or more problem types for code, forms problem types set storehouse.
See Fig. 8, this device, also include:
Acquisition module 409, for every the second preset time period, the acquisition testing time is positioned at the 3rd preset time period Test result;
Evaluation module 410, the repairing effect of new test problem in the test result assessing acquisition.
Alternatively, evaluation module 410, the reparation quantity of new test problem in the test result assessing acquisition, and/ Or, the repair rate of new test problem in the test result that assessment obtains.
Alternatively, evaluation module 410, the reparation quantity of new test problem in the test result assessing acquisition;Determine The total quantity of non-repetitive new test problem in the test result obtained;It is defined as acquisition by repairing the quantity business with total quantity The repair rate of new test problem in test result..
Alternatively, evaluation module 410, for determining the test problem do not repaired, the test problem do not repaired is for recently Whole test problems acquired in the test that test result is corresponding, the test corresponding with nearest test result is nearest test result The test that the corresponding testing time is carried out;Determine the new test problem in non-nearest test result;According to the test do not repaired New test problem in problem and non-nearest test result, determines the new test problem of reparation, and the new test problem of reparation is New test problem in non-nearest test result, but the non-test problem do not repaired;By the new test problem of non-repetitive reparation Quantity be defined as the reparation quantity of new test problem in the test result obtained.
The embodiment of the present invention, every the first preset time period, tests code, obtains test problem;Contrast this Test problem and test problem last time, when this test problem exists the new test problem different from test problem last time, In the problem types set storehouse that code is corresponding, select the problem types of new test problem, wherein, the problem class of new test problem Type is to select from the problem types set storehouse that code is corresponding so that the problem types of selection i.e. can ensure that close with code Relevant, can ensure that again dynamically adjustment.
Embodiment three
Present embodiments providing a kind of electronic equipment, see Fig. 9, this electronic equipment 900 may include that processor 901, deposits Reservoir 902, communication interface 903 and bus 904;
Processor 901, memorizer 902 are connected with communication interface 903 by bus 904 and are completed mutual communicating;
Memorizer 902 stores executable program code;
Processor 901 runs and executable program generation by reading the executable program code of storage in memorizer 902 The program that code is corresponding, for the method for testing performing a kind of code;Wherein, the method for testing of code includes:
Every the first preset time period, code is tested, obtain test problem;
Contrast this test problem and test problem last time;
When this test problem exists the new test problem different from test problem last time, in the problem that code is corresponding In type set storehouse, select the problem types of new test problem.
Alternatively, in the problem types set storehouse that code is corresponding, after selecting the problem types of new test problem, also wrap Include:
Select permeability type is the new test problem of preset kind;
Determine the research and development object of the new test problem correspondence code of selection;
The new test problem and problem types selected is sent to research and development object.
Alternatively, after this test problem exists the new test problem different from test problem last time, also include:
New test problem is stored as test result, and recording test time.
Alternatively, in the problem types set storehouse that code is corresponding, before selecting the problem types of new test problem, also wrap Include:
One or more problem types is set for code, forms problem types set storehouse.
Alternatively, the method for testing of this software, also include:
Every the second preset time period, the acquisition testing time is positioned at the test result of the 3rd preset time period;
The repairing effect of new test problem in the test result that assessment obtains.
Alternatively, the repairing effect of new test problem in the test result that assessment obtains, including:
The reparation quantity of new test problem in the test result that assessment obtains, and/or, new in the test result that assessment obtains The repair rate of test problem.
Alternatively, the repair rate of new test problem in the test result that assessment obtains, including:
The reparation quantity of new test problem in the test result that assessment obtains;
Determine the total quantity of non-repetitive new test problem in the test result of acquisition;
It is defined as the repair rate of new test problem in the test result obtained by repairing the quantity business with total quantity.
Alternatively, the reparation quantity of new test problem in the test result that assessment obtains, including:
Determining the test problem do not repaired, the test problem do not repaired is acquired in the test corresponding with nearest test result Whole test problems, the survey that the test corresponding with nearest test result was carried out by the testing time that nearest test result is corresponding Examination;
Determine the new test problem in non-nearest test result;
According to the new test problem in the test problem do not repaired and non-nearest test result, determine the new test of reparation Problem, the new test problem of reparation is the new test problem in non-nearest test result, but the non-test problem do not repaired;
The quantity of the new test problem of non-repetitive reparation is defined as repairing of new test problem in the test result obtained Phasor.
The embodiment of the present invention, every the first preset time period, tests code, obtains test problem;Contrast this Test problem and test problem last time, when this test problem exists the new test problem different from test problem last time, In the problem types set storehouse that code is corresponding, select the problem types of new test problem, wherein, the problem class of new test problem Type is to select from the problem types set storehouse that code is corresponding so that the problem types of selection i.e. can guarantee that phase close with code Close, can guarantee that again dynamically adjustment.
For convenience of description, each several part of apparatus above is divided into various module or unit to be respectively described with function.Certainly, The function of each module or unit can be realized in same or multiple softwares or hardware when implementing the present invention.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program Product.Therefore, the reality in terms of the present invention can use complete hardware embodiment, complete software implementation or combine software and hardware Execute the form of example.And, the present invention can use at one or more computers wherein including computer usable program code The upper computer program product implemented of usable storage medium (including but not limited to disk memory, CD-ROM, optical memory etc.) The form of product.
The present invention is with reference to method, equipment (system) and the flow process of computer program according to embodiments of the present invention Figure and/or block diagram describe.It should be understood that can the most first-class by computer program instructions flowchart and/or block diagram Flow process in journey and/or square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided Instruction arrives the processor of general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce A raw machine so that the instruction performed by the processor of computer or other programmable data processing device is produced for real The device of the function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame now.
These computer program instructions may be alternatively stored in and computer or other programmable data processing device can be guided with spy Determine in the computer-readable memory that mode works so that the instruction being stored in this computer-readable memory produces and includes referring to Make the manufacture of device, this command device realize at one flow process of flow chart or multiple flow process and/or one square frame of block diagram or The function specified in multiple square frames.
These computer program instructions also can be loaded in computer or other programmable data processing device so that at meter Perform sequence of operations step on calculation machine or other programmable devices to produce computer implemented process, thus at computer or The instruction performed on other programmable devices provides for realizing at one flow process of flow chart or multiple flow process and/or block diagram one The step of the function specified in individual square frame or multiple square frame.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation Property concept, then can make other change and amendment to these embodiments.So, claims are intended to be construed to include excellent Select embodiment and fall into all changes and the amendment of the scope of the invention.

Claims (10)

1. the method for testing of a code, it is characterised in that described method includes:
Every the first preset time period, code is tested, obtain test problem;
Contrast this test problem and test problem last time;
When this test problem described exists the new test problem different from test problem described last time, at described code pair In the problem types set storehouse answered, select the problem types of described new test problem.
Method the most according to claim 1, it is characterised in that the described problem types set storehouse corresponding at described code In, after selecting the problem types of described new test problem, also include:
Select permeability type is the new test problem of preset kind;
The reparation object of the new test problem correspondence code of selection is determined according to default label;
New test problem and the problem types of described selection is sent to described reparation object.
Method the most according to claim 1, it is characterised in that surveyed with described last time when existing in this test problem described After why inscribing different new test problems, also include:
Described new test problem is stored as test result, and recording test time.
4. according to the method described in claims 1 to 3 any claim, it is characterised in that described corresponding at described code In problem types set storehouse, before selecting the problem types of described new test problem, also include:
One or more problem types is set for described code, forms problem types set storehouse.
Method the most according to claim 3, it is characterised in that described method, also includes:
Every the second preset time period, the acquisition testing time is positioned at the test result of the 3rd preset time period;
The repairing effect of new test problem in the test result that assessment obtains.
Method the most according to claim 5, it is characterised in that new test problem in the test result that described assessment obtains Repairing effect, including:
Add up the reparation quantity of new test problem in the test result of described acquisition, and/or, assess the test result of described acquisition In the repair rate of new test problem.
Method the most according to claim 6, it is characterised in that in the test result of the described acquisition of described assessment, new test is asked The repair rate of topic, including:
Add up the reparation quantity of new test problem in the test result of described acquisition;
Determine the total quantity of non-repetitive new test problem in the test result of described acquisition;
The business of described reparation quantity Yu described total quantity is defined as in the test result of described acquisition the reparation of new test problem Rate.
8. according to the method described in claim 6 or 7, it is characterised in that in the test result that described statistics obtains, new test is asked The reparation quantity of topic, including:
Determining the test problem do not repaired, the described test problem do not repaired is acquired in the test corresponding with nearest test result Whole test problems, test corresponding to described and nearest test result was carried out by the testing time that nearest test result is corresponding Test;
Determine the new test problem in non-nearest test result;
According to the new test problem in the described test problem do not repaired and described non-nearest test result, determine the new of reparation Test problem, the new test problem of described reparation is the new test problem in described non-nearest test result, but non-described in do not repair Multiple test problem;
The quantity of the new test problem of non-repetitive reparation is defined as in the test result of described acquisition repairing of new test problem Phasor.
9. the test device of a code, it is characterised in that described device includes:
Test module, for every the first preset time period, tests code, obtains test problem;
Contrast module, is used for contrasting this test problem and test problem last time;
First selects module, is used for when in this test problem described, existence is asked from described different newly the testing of test problem last time During topic, in the problem types set storehouse that described code is corresponding, select the problem types of described new test problem.
Device the most according to claim 9, it is characterised in that described device, also includes:
Second selects module, for the new test problem that select permeability type is preset kind;
Determine module, for determining the research and development object of the new test problem correspondence code of selection;
Sending module, for sending new test problem and the problem types of described selection to described research and development object.
CN201610617740.9A 2016-07-29 2016-07-29 Code testing method and device and electronic equipment Active CN106227669B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610617740.9A CN106227669B (en) 2016-07-29 2016-07-29 Code testing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610617740.9A CN106227669B (en) 2016-07-29 2016-07-29 Code testing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN106227669A true CN106227669A (en) 2016-12-14
CN106227669B CN106227669B (en) 2019-07-12

Family

ID=57536259

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610617740.9A Active CN106227669B (en) 2016-07-29 2016-07-29 Code testing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN106227669B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111260203A (en) * 2020-01-13 2020-06-09 联宝(合肥)电子科技有限公司 Data processing method and device, computer storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1648872A (en) * 2004-12-08 2005-08-03 上海科泰世纪科技有限公司 Automatic detection building method
CN101201787A (en) * 2006-12-12 2008-06-18 英业达股份有限公司 System and method for debugging software program
CN101556550A (en) * 2009-05-22 2009-10-14 北京星网锐捷网络技术有限公司 Analysis method for automatic test log and device
CN103246603A (en) * 2013-03-21 2013-08-14 中国科学院软件研究所 Automatic distribution method for software bug reports of bug tracking system
US20150095887A1 (en) * 2013-10-01 2015-04-02 Wipro Limited Systems and methods for fixing software defects in a binary or executable file

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1648872A (en) * 2004-12-08 2005-08-03 上海科泰世纪科技有限公司 Automatic detection building method
CN101201787A (en) * 2006-12-12 2008-06-18 英业达股份有限公司 System and method for debugging software program
CN101556550A (en) * 2009-05-22 2009-10-14 北京星网锐捷网络技术有限公司 Analysis method for automatic test log and device
CN103246603A (en) * 2013-03-21 2013-08-14 中国科学院软件研究所 Automatic distribution method for software bug reports of bug tracking system
US20150095887A1 (en) * 2013-10-01 2015-04-02 Wipro Limited Systems and methods for fixing software defects in a binary or executable file

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111260203A (en) * 2020-01-13 2020-06-09 联宝(合肥)电子科技有限公司 Data processing method and device, computer storage medium and electronic equipment
CN111260203B (en) * 2020-01-13 2022-06-10 联宝(合肥)电子科技有限公司 Data processing method and device, computer storage medium and electronic equipment

Also Published As

Publication number Publication date
CN106227669B (en) 2019-07-12

Similar Documents

Publication Publication Date Title
CN108959059B (en) Test method and test platform
CN108829593A (en) Code coverage calculation and analysis methods, device, equipment and storage medium
CN105004985B (en) A kind of chip automatic test approach for multi-temperature test
CN105930274A (en) Automated test method and system
CN108664372A (en) Monitoring device, method and the computer readable storage medium of test process
CN107506294A (en) Visualize automated testing method, device, storage medium and computer equipment
CN105187608A (en) Method and device obtaining power consumption of application program in mobile terminal
CN108958890A (en) Container microscope testing method, apparatus and electronic equipment
US20020078401A1 (en) Test coverage analysis system
CN113535567B (en) Software testing method, device, equipment and medium
CN114168471A (en) Test method, test device, electronic equipment and storage medium
CN106227669A (en) Code testing method and device and electronic equipment
CN103593429B (en) Commodity template failure detection method and device
CN103902445B (en) A kind of regression test object determines method and device
CN105653445B (en) A kind of implementation method for meeting DO 178C test results
CN101206616B (en) Method for testing resource leakage of graphical interface program and method for locating question
Wohlin et al. Reliability certification of software components
CN116028365A (en) Automatic detection method, device, equipment and medium for wafer test codes
CN110888809B (en) Risk prediction method and device for test task
CN114638096A (en) Method, device and equipment for displaying logic among program variables and storage medium
CN109375606A (en) A kind of algorithm library test method
CN115269389A (en) Project quality determination method and device, electronic equipment and storage medium
US20230117395A1 (en) Gas inspection management system, gas inspection management method, and program
CN110866492B (en) Baseline branch identification method and device and computer system
CN114490337A (en) Debugging method, debugging platform, equipment and storage medium

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