CN110471829A - The inspection method and device of software code test coverage - Google Patents
The inspection method and device of software code test coverage Download PDFInfo
- Publication number
- CN110471829A CN110471829A CN201810440103.8A CN201810440103A CN110471829A CN 110471829 A CN110471829 A CN 110471829A CN 201810440103 A CN201810440103 A CN 201810440103A CN 110471829 A CN110471829 A CN 110471829A
- Authority
- CN
- China
- Prior art keywords
- code section
- patch code
- tested
- patch
- coverage rate
- 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
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/3676—Test management for coverage analysis
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application provides a kind of inspection method of software code test coverage, comprising: is tested according to test set the software code for including patch code section;Determine the tested coverage rate of the patch code section, the tested coverage rate of the patch code section is for measuring the size of code that the patch code section is performed during the test;According to the coverage rate that the patch code section is tested, the coverage rate test result of the patch code section is determined.By the coverage rate checking process of the code submitted every time with continuance test process integration to together so that being formed during the inspection of coverage rate extends through the lasting submission of code and continuing coverage rate inspection.And it if the tested coverage rate of this code submitted is unsatisfactory for requiring, is tested again, this makes, and the inspection of the covering to software patch is more timely, has more specific aim.
Description
Technical field
This application involves software test fields, and in particular to a kind of inspection method and dress of software code test coverage
It sets, further relates to a kind of electronic equipment, computer readable storage medium.
Background technique
In CI (Continuous integration, continuous integrating) system, generally detected by testing, ensure it is soft
Part quality.Meanwhile the coverage rate of tested code can be checked, with the reliability tested for Estimation Software.
The coverage rate of the tested code of prior art inspection carries out as follows: integrated carrying out software continuous
During, software developer would generally construct executable software version after having submitted code, and be tested.A certain survey
After examination failure, developer can remodify and submit again, test, until test passes through.After all test items all pass through, In
New version is issued in situation appropriate.A total coverage rate statistics may also be had, to know that entire software code is being surveyed
The ratio being capped in examination.For example, the code of a software has 10,000 rows, this 10,000 row may be tested 5000 rows, this is entire
The tested coverage rate of this all 10,000 line code of software is exactly 50%.
In this case, coverage rate inspection is in software test, for the institute for the entire software for constituting executable version
The coverage rate for having code tested is checked.When using this inspection method, the size of code of one-time inspection is very big, checks
Granularity is not thin enough.Due to the coverage rate that the partial code for being difficult to judge to submit every time is tested, so will lead to large-scale
It cannot find the problem in time in software development process, can not ensure whether the code submitted every time meets quality requirement.
Summary of the invention
The application provides a kind of inspection method of software code test coverage, it is intended to solve the prior art and examine to coverage rate
The size of code of one-time inspection is very big when looking into, checks not thin enough the technical problem of granularity.
The application also provides a kind of check device of software code test coverage, further relates to a kind of electronic equipment and one
Kind computer readable storage medium.
The inspection method of software code test coverage provided by the present application includes:
The software code for including patch code section is tested according to test set;
Determine the tested coverage rate of the patch code section, the tested coverage rate of the patch code section is for measuring
The size of code that the patch code section is performed during the test;
According to the coverage rate that the patch code section is tested, the coverage rate test result of the patch code section is determined.
Optionally, the tested coverage rate of the determination patch code section, comprising:
Obtain the execution information of the patch code section;
The tested coverage rate of the patch code section is determined according to the execution information.
Optionally, the execution information includes at least one of the following:
The line number for the code being performed in the patch code section;
The line number for the code being performed in the patch code section;
The number that every line code is performed in the patch code section.
It is optionally, described that the tested coverage rate of the patch code section is determined according to the execution information, comprising:
According to the line number for the code being performed in the patch code section, the generation being performed in the patch code section is determined
The line number of code, by the line number for the code being performed in the patch code section relative to all codes in the patch code section
The ratio of line number, the coverage rate being tested as the patch code section;Alternatively,
The line number for determining the code being performed in the patch code section, the code that will be performed in the patch code section
Line number and the patch code section in all codes line number ratio, as the patch code section be tested covering
Rate;Alternatively,
According to the number that every line code is performed in the patch code section, determines and be performed in the patch code section
The line number of code, by the line number for the code being performed in the patch code section relative to all codes in the patch code section
Line number ratio, as the patch code section be tested coverage rate.
Optionally, the coverage rate being tested according to the patch code section, determines the covering of the patch code section
Rate test result, comprising:
If the tested coverage rate of the patch code section reaches code segment coverage rate threshold value, it is determined that the patch generation
Code section passes through coverage rate test;
If the tested coverage rate of the patch code section is not up to code segment coverage rate threshold value, it is determined that the patch
Code segment does not pass through coverage rate test.
Optionally, if the patch code Duan Wei passes through coverage rate test, the method also includes:
The software code for including patch code section is tested again.
Optionally, described pair include patch code section software code carry out again test include:
For the code not being tested in the patch code section, supplement test set is generated;
The supplement test set is updated into the test set;
The software code for including patch code section is tested again according to updated test set.
It is optionally, described for the code building not being tested in patch code section supplement test set, comprising:
According to the mark of the patch code section, the mark of the corresponding uploader of the patch code section is determined;
According to the mark of the uploader, notify the uploader for not tested covering in the supplement code segment
Code building supplements test set.
Optionally, if after being tested again the software code for including patch code section, the patch code section
Tested coverage rate reaches the code segment coverage rate threshold value, then the method also includes:
Calculating includes the whole coverage rate of the software code of patch code section;
If described includes that the whole coverage rate of the software code of patch code section reaches whole coverage rate threshold value, obtain
Taking described includes that the software code of patch code section is tested the first operating parameter generated when trial operation, first operation
It includes running quality when the software code of patch code section is tested trial operation that parameter, which is used to characterize described,.
Optionally, the method also includes:
If first operating parameter reaches the first operating index threshold value, it is determined that described includes patch code section
Software code is tested by running quality.
Optionally, if the patch code section passes through coverage rate test, the method also includes:
It obtains the patch code section and is tested the second operating parameter generated when trial operation, second operating parameter is used
Running quality when characterizing the patch code section and being tested trial operation.
Optionally, the method also includes:
If second operating parameter is not up to the second operating index threshold value, second operating parameter is sent to
The uploader of the patch code section, and the uploader is notified to optimize the patch code section.
Optionally, the method also includes:
After patch code section after acquired optimization is integrated into the software, test again;
Patch code section after obtaining the optimization is tested third operating parameter when trial operation;
If the third operating parameter reaches the third operating index threshold value, it is determined that the patch generation after the optimization
Code section is tested by running quality.
The application also provides a kind of method in software continuous Integrated scenario to patch code section coverage rate inspection, comprising:
Detect whether that patch code section is integrated into Current software;
When having detected that patch code section is integrated into Current software, according to test set to including the soft of patch code section
Part code is tested;
Determine the tested coverage rate of patch code section;
It is determined as the patch code section that tested coverage rate reaches first threshold to meet the patch code of integrated condition
Section.
The check device of software code test coverage provided by the present application includes:
First test unit, for being tested according to test set the software code for including patch code section;
Coverage rate determination unit, for determining the tested coverage rate of the patch code section, the patch code section quilt
The coverage rate of test is for measuring the size of code that the patch code section is performed during the test;
Coverage rate test result determination unit, for according to the patch code section be tested coverage rate, determine described in
The coverage rate test result of patch code section.
Optionally, the coverage rate determination unit includes:
Execution information obtains subelement, for obtaining the execution information of the patch code section;
Coverage rate obtains subelement, for determining the tested covering of the patch code section according to the execution information
Rate.
Optionally, the execution information obtains subelement and is configured to obtain at least one of following execution information:
The row for the code being performed in the line number for the code being performed in the patch code section, the patch code section
The number that every line code is performed in several, the described patch code section.
Optionally, the coverage rate acquisition subelement includes:
Coverage rate obtains the first subelement of second level, for the line number according to the code being performed in the patch code section,
The line number for determining the code being performed in the patch code section, by the line number phase for the code being performed in the patch code section
For the ratio of the line number of all codes in the patch code section, the coverage rate being tested as the patch code section;Or
Person,
Coverage rate obtains the second subelement of second level, for determining the line number for the code being performed in the patch code section,
By the ratio of the line number of all codes in the line number for the code being performed in the patch code section and the patch code section, make
The coverage rate being tested for the patch code section;Alternatively,
Coverage rate obtains second level third subelement, time for being performed according to every line code in the patch code section
Number, determines the line number for the code being performed in the patch code section, by the row for the code being performed in the patch code section
Ratio of the number relative to the line number of all codes in the patch code section, the covering being tested as the patch code section
Rate.
Optionally, the coverage rate test result determination unit includes:
Coverage rate test result determines the first subelement, if the coverage rate for the patch code section to be tested reaches
Code segment coverage rate threshold value, it is determined that the patch code section passes through coverage rate test;
Coverage rate test result determines the second subelement, if the coverage rate for the patch code section to be tested does not reach
To code segment coverage rate threshold value, it is determined that the patch code Duan Wei passes through coverage rate test.
Optionally, described device further include:
Second test cell, for being tested again the software code for including patch code section.
Optionally, second test cell includes:
It supplements test set and generates subelement, for generating and mending for the code not being tested in the patch code section
Fill test set;
It supplements test set and updates subelement, for updating the supplement test set into the test set;
Second test subelement, for according to updated test set to include the software code of patch code section again
It is tested.
Optionally, the supplement test set generation subelement includes:
Uploader, which identifies, determines that second level subelement determines the patch generation for the mark according to the patch code section
The mark of the corresponding uploader of code section;
It notifies second level subelement, is directed to the supplement code for the uploader according to the identification notification of the uploader
The code building of the tested covering of Duan Zhongwei supplements test set.
Optionally, described device further include:
Whole coverage rate computing unit, for calculate include patch code section software code whole coverage rate;
First operating parameter acquiring unit, if for it is described include patch code section software code whole covering
Rate reaches whole coverage rate threshold value, then obtain described in include patch code section software code be tested trial operation when it is generated
First operating parameter, it includes that the software code of patch code section is tested trial operation that first operating parameter, which is used to characterize described,
When running quality.
Optionally, described device further include:
First running quality determination unit, if reaching the first operating index threshold value for first operating parameter,
Include described in determination patch code section software code pass through running quality test.
Optionally, described device further include:
Second operating parameter acquiring unit, for obtain the patch code section be tested trial operation when it is generated second fortune
Row parameter, second operating parameter are used to characterize the running quality when patch code section is tested trial operation.
Optionally, described device further include:
Notice optimization unit will be described if being not up to the second operating index threshold value for second operating parameter
Second operating parameter is sent to the uploader of the patch code section, and the uploader is notified to carry out the patch code section
Optimization.
Optionally, described device further include:
Third test cell is surveyed again after the patch code section after acquired optimization is integrated into the software
Examination;
Third operating parameter acquiring unit, for obtaining the third when patch code section after the optimization is tested trial operation
Operating parameter;
Second running quality determination unit, if reaching the third operating index threshold for the third operating parameter
Value, it is determined that the patch code section after the optimization is tested by running quality.
Electronic equipment provided by the present application, comprising:
Memory and processor;
For the memory for storing computer executable instructions, the processor is executable for executing the computer
Instruction:
The software code for including patch code section is tested according to test set;
Determine the tested coverage rate of the patch code section, the tested coverage rate of the patch code section is for measuring
The size of code that the patch code section is performed during the test;
According to the coverage rate that the patch code section is tested, the coverage rate test result of the patch code section is determined.
Computer readable storage medium provided by the present application, is stored thereon with computer program, which is held by processor
When row, perform the following operations:
The software code for including patch code section is tested according to test set;
Determine the tested coverage rate of the patch code section, the tested coverage rate of the patch code section is for measuring
The size of code that the patch code section is performed during the test;
According to the coverage rate that the patch code section is tested, the coverage rate test result of the patch code section is determined.
Technical scheme is that the checking process to coverage rate is included in for a part of software continuous integrating process, with
The coverage rate being tested for the code submitted every time is checked, so as to know the tested of the code submitted every time
Coverage rate on earth how.And it if the tested coverage rate of this code submitted is unsatisfactory for requiring, is surveyed again
Examination, this makes, and the inspection of the covering to software patch is more timely, has more specific aim.
Detailed description of the invention
Fig. 1 is a kind of process flow of the embodiment of the inspection method of software code test coverage provided by the present application
Figure;
Fig. 2 is a kind of application scenarios schematic diagram of the inspection method of software code test coverage provided by the present application;
Fig. 3 is a kind of schematic diagram of the embodiment of the check device of software code test coverage provided by the present application;
Fig. 4 is the schematic diagram of a kind of electronic equipment embodiment provided by the present application.
Specific embodiment
Many details are explained in the following description in order to fully understand the application.But the application can be with
Much it is different from other way described herein to implement, those skilled in the art can be without prejudice to the application intension the case where
Under do similar popularization, therefore the application is not limited by following public specific implementation.
The application provides a kind of inspection method of software code test coverage, and Fig. 1 is software code provided by the present application
The process flow diagram of the embodiment of the inspection method of test coverage.Below with reference to software code test coverage shown in FIG. 1
Inspection method embodiment process flow diagram, to illustrate the inspection method of software code test coverage provided by the present application
Technical solution.
The process flow of the embodiment of the inspection method of software code test coverage shown in fig. 1 includes:
Step S101 tests the software code for including patch code section according to test set.
This step S101 is intended to carry out the software code for including patch code section test in case of root in the next steps
It include the software code of patch code section or the situation of patch code section according to test result determination.
Wherein, the patch is patch in the term of software field, and Chinese is properly termed as patch.The patch is in this Shen
Please in refer in order to solve defect present in Current software or make Current software enhance a function when, Current software is again
The fresh code for increasing and integrating.Correspondingly, the patch code section refers to code included by the patch.For example, current
Software has 10,000 rows, but Current software lacks a certain item function.In this case, one section of code for realizing the function can be designed,
Such as realize that the code of the function is 30 rows.30 line codes for realizing the function can be integrated on Current software, 30 row
The code of supplement is equivalent to the patch of Current software.
The test refers to verify the operation conditions for all codes that software integrally includes or in order to verify software
A part of code operation conditions when, to the process that is run of software code for including patch code section.Due to the application
Technical solution in test process be mainly whether to be run to code and carries out, therefore the test process is mainly to generation
The function of code carries out functional test.The test can assist realizing by testing tool.Carrying out test to software is to calculate
The prior art of machine software field comparative maturity, those of ordinary skill in the art can be realized, and details are not described herein.
The test set refers to the set for the test data that used functional test is concentrated in test software function,
The functional test collection is prepared for the patch to pending functional test.With traditional to software entirety coverage rate inspection
Test set required in the process for software entirety is compared, the functional test collection for patch in technical scheme
It is smaller, functional test pointedly can be carried out to patch when allowing to carry out test, improve testing efficiency.For example, the survey
Examination data can be a certain number of user identifiers that are pre-generated or preparing, user behavior data etc..In general, the test number
According to can be generated by testing tool.When being tested using testing tool software, which can be according to institute
Stating test data runs software to be tested, to judge every operating index of the software.
Step S102 determines the tested coverage rate of the patch code section, the tested covering of the patch code section
Rate is for measuring the size of code that the patch code section is performed during the test.
This step S102 is intended to determine the tested coverage rate of the patch code section, according to the patch code section quilt
Quality, the credibility of the coverage rate assessment test of test.Because if only some code is run when test, although can
Operational excellence when can test, but not can determine that the partial code running quality not being tested, it is in this case obtained
Test result credibility is not especially high.
Optionally, the step S102 includes:
A the execution information of the patch code section) is obtained.
During being tested according to test set the software code for including patch code section due to step S101, meeting
Use compilation tool, such as compilation tool gcc (GNU Compiler Collection, compiler external member).Use compilation tool
After being compiled to the software code for including patch code section, can to generate record during surveying to have includes to mend
The execution information of every line code of the software of fourth code segment.
In the sub-step A of the step S102) in, optionally, the execution information includes at least one of the following: the benefit
The line number for the code being performed in the line number for the code being performed in fourth code segment, the patch code section, the patch code
The number that every line code is performed in section.
When testing the software code for including patch code section, not all code is all under normal conditions
It is run one time, some possible code is not run.The patch code section may also not be wherein all generations
Code is all run, and a part in the possible patch code section is run and another part is not run.The patch code section
In the line number of code that is performed be exactly the code that the patch code section is run in test line number.The patch code section
In the line number of code that is performed just refer to the sum of the row being performed in the patch code section.Every row in the patch code section
The number that code is performed refers to the number that every line code is performed in the patch code section, such as the row having is performed 1 time,
It is inferior that some rows are performed 0.
B the tested coverage rate of the patch code section) is determined according to the execution information.
The sub-step B of this S102) it is intended to determine the tested coverage rate of the patch code section according to the execution information,
With quality, the credibility of the coverage rate assessment test being tested according to the patch code section.The patch code section is tested
Coverage rate refer to that the line number that is run accounts for the ratio of total line number of the code of the code segment in test in patch code section.
Optionally, the sub-step B of the step S102) include:
Sub-step A based on S102) described in execution information include previously described three above type.Correspondingly, institute
State the sub-step B of step S102) it can be realized by following three kinds of modes.
Mode one: according to the line number for the code being performed in the patch code section, quilt in the patch code section is determined
The line number of the code of execution, by the line number for the code being performed in the patch code section relative to institute in the patch code section
There is the ratio of the line number of code, the coverage rate being tested as the patch code section;
If the sub-step A of S102) described in execution information include the code being performed in the patch code section row
Number, then this step B) it can be realized with employing mode one.For example, count the line number for the code being performed in the patch code section
Number can determine the line number for the code being performed in the patch code section.And then it can will be in the patch code section
Ratio of the line number for the code being performed relative to the line number of all codes in the patch code section, as the patch code
The tested coverage rate of section.
Mode two: determining the line number for the code being performed in the patch code section, will be held in the patch code section
The ratio of the line number of all codes in the line number of capable code and the patch code section, it is tested as the patch code section
Coverage rate.
If the sub-step A of S102) described in execution information include the code being performed in the patch code section row
Count, then this step B) it can be realized with employing mode two.For example, the line number for calculating the code being performed in the patch code section accounts for
The accounting result being calculated is determined as the patch code by the accounting of the line number of all codes in the patch code section
The tested coverage rate of section.
Mode three: it according to the number that every line code is performed in the patch code section, determines in the patch code section
The line number for the code being performed, by the line number for the code being performed in the patch code section relative in the patch code section
The ratio of the line number of all codes, the coverage rate being tested as the patch code section.
If the sub-step A of S102) described in execution information include in the patch code section every line code be performed
Number, then this step B) it can be realized with employing mode three.For example, time that the code of the row of the patch code Duan Zhongyou is performed
Number is 0, and the number that the code of some rows is performed is 1, and the number that the code of some rows is performed is 2 etc., then counts all and hold
The number of row of the capable number more than or equal to 1 is assured that the line number for the code being performed in the patch code section.In turn
Ratio by the line number for the code being performed in the patch code section relative to the line number of all codes in the patch code section
Value, the coverage rate being tested as the patch code section.
Step S103 determines the coverage rate of the patch code section according to the coverage rate that the patch code section is tested
Test result.
This step S103 is intended to the coverage rate being tested according to the patch code section, determines covering for the patch code section
Lid rate test result, the coverage rate test result of the patch code section refer to that the patch code section is surveyed by coverage rate
Examination.
Optionally, the step S103 includes:
A) if the coverage rate that the patch code section is tested reaches code segment coverage rate threshold value, it is determined that the patch
Code segment passes through coverage rate test.For example, the coverage rate that the patch code section is tested is 93%, code segment covering is reached
Rate threshold value 90%, it is determined that the patch code section passes through coverage rate test.
B) if the coverage rate that the patch code section is tested is not up to code segment coverage rate threshold value, it is determined that the benefit
Fourth code segment does not pass through coverage rate test.For example, the coverage rate that the patch code section is tested is 60%, do not reach code
Section coverage rate threshold value 90%, it is determined that the patch code Duan Wei passes through coverage rate test.
Optionally, in the sub-step B of the step S103) execute after, that is, if the patch code section is tested
Coverage rate be not up to code segment coverage rate threshold value, it is determined that the patch code Duan Wei pass through coverage rate test after, it is described
Method further include:
Step S104 tests the software code for including patch code section again.
This step S104 is intended to test the software code for including patch code section again, in case by surveying again
The tested coverage rate of the patch code section is reaffirmed in examination, and then again according to the covering that the patch code section is tested
Quality, the credibility of rate assessment test.
Optionally, the step S104 includes:
Step 1: generating supplement test set for the code not being tested in the patch code section.
The supplement test set refers to the test set for the code building not being tested in the patch code section.It should
The code that supplement test set is intended to help not to be tested in the patch code section is able to be run when being tested again to be covered
Lid.Since the test data in test set is insufficient, the code for existing in the patch code section and not being tested may cause.Institute
Supplement test set is generated, for when by benefit generated according to the code not being tested in the patch code section
When filling test set and testing again, it is performed to the code not being tested in the patch code section just.
Optionally, the first step includes:
1) according to the mark of the patch code section, the mark of the corresponding uploader of the patch code section is determined.It is described
The mark of patch code section is the code name of the patch code section.For example, the mark of the patch code section can be a word
Section code101.The mark of the corresponding uploader of the patch code section is by opening accordingly for characterizing the patch code section
What originator uploaded.For example, the mark of the corresponding uploader of the patch code section can be user101.It is described according to the benefit
The mark of fourth code segment determines the mark of the corresponding uploader of the patch code section, can realize in the following way: according to
Mapping relations between the mark of corresponding with the patch code section uploader of mark of the patch code section, determine described in
The mark of the corresponding uploader of patch code section.Optionally, the mark of the patch code section is corresponding with the patch code section
Uploader mark between mapping relations can be characterized by looking into mapping table.
2) according to the mark of the uploader, notify the uploader for covering not tested in the supplement code segment
Code building supplement test set.
The corresponding uploader of the patch code section is determined according to the mark of the patch code section executing step 1)
After mark, this step is intended to that the uploader is notified to mend for the code building of not tested covering in the supplement code segment
Fill test set.
Code building by the uploader for not tested covering in the supplement code segment supplements test set, can
To enhance the specific aim for generating supplement test set.Since the corresponding uploader of the patch code section is to the patch code section
Function most understands, therefore the code by the uploader for not tested covering in the supplement code segment generates supplement
The code of tested covering has stronger correspondence in test set and the supplement code segment, so that when by being generated
Supplement test set and the code that is not tested in while testing again patch code section can be performed to.
Step 2: updating the supplement test set into the test set.
This step is intended to update the supplement test set into the test set.It is integrated into when by the patch code section
After in Current software, correspondingly in order to when keeping the supplement code segment tested coverage rate reach requirement, it is also desirable to by the benefit
Test set is filled to update into the test set.After the patch code section is integrated into Current software, if the test
Collection lacks corresponding with patch code section test data, may result in coverage rate that the supplement code segment is tested compared with
It is low.Therefore, by the supplement test set update into the test set so that when by generates supplement test set and again
The code not being tested in the patch code section when test can be performed to.
Step 3: being tested again according to updated test set the software code for including patch code section.
This step is intended to test again by supplement test set generated, so that not having in the patch code section
Tested code is proud when testing again to be performed to, to meet the tested coverage rate requirement of the patch code section, into
And quality, the credibility for the coverage rate assessment test being tested according to the patch code section.Specific test process is this field
In obtainable technology, details are not described herein.
Optionally, in the A of the step S104) software code for including patch code section is carried out testing it again
Afterwards, if the coverage rate that the patch code section is tested reaches the code segment coverage rate threshold value, the method also includes:
Step S105, calculating include the whole coverage rate of the software code of patch code section.
Based on the description that the coverage rate being tested above to the patch code section is carried out, correspondingly, it is known that include
The whole coverage rate of the software code of patch code section refer to include patch code section software code in tested when institute
The coverage rate for having code tested.Calculating includes that the mode of the whole coverage rate of the software code of patch code section is referred to
Obtain the mode of the tested coverage rate of the patch code section above, or other modes can also be taken, herein without
It limits.
Optionally, it is based on step S105, the method also includes:
Step S106, if described includes that the whole coverage rate of the software code of patch code section reaches whole coverage rate
Threshold value, then obtain described in include the first operating parameter generated when the software code of patch code section is tested trial operation, institute
It includes running quality when the software code of patch code section is tested trial operation that the first operating parameter, which is stated, for characterizing described.
The whole coverage rate that this step S106 is intended to the software code for including patch code section reaches whole covering
Include in the case where rate threshold value, described in acquisition patch code section software code be tested trial operation when it is generated first operation
Parameter, with include according to when the software code of patch code section is tested trial operation the first operating parameter generated know
Described includes the running quality when software code of patch code section is tested trial operation.
It is described include when the software code of patch code section is tested trial operation the first operating parameter generated can be
The utilization rate of central processing unit is used to characterize the packet with memory, disk input and output rate and network throughput etc.
Software code containing patch code section be tested trial operation when running quality parameter.Wherein, the utilization of central processing unit
Rate refers to the ratio of resource in the occupied central processing unit of active program.Resource includes fortune in central processing unit
Calculate device component, arithmetic and logic unit, controller part, register block etc..Refer to that active program is just accounting for memory
Memory.Disk input and output rate refers to the number that disk read-write operates in the unit time.Network throughput refers to
The quantity of processing user request in unit time.
Optionally, it is based on step S106, the method also includes:
Step S107, if first operating parameter reaches the first operating index threshold value, it is determined that described includes to mend
The software code of fourth code segment is tested by running quality.
It include that the software code of patch code section is tested trial operation being got based on step S106 for characterizing described
When running quality the first operating parameter after, this step S107 is intended to determine that first operating parameter reaches the first operation
It include the software code of patch code section by running quality test after metrics-thresholds, and then described in determination.Wherein, base
Following first parameter cited by step S106: the utilization rate of central processing unit has used memory, disk input and output rate
And network throughput, the first operating index threshold value can be the utilization rate metrics-thresholds of central processing unit, used in
Deposit metrics-thresholds, disk input and output rate index threshold value and network throughput metrics-thresholds.
By step S106 determine described in include that the whole coverage rate of software code of patch code section reaches whole and covers
Lid rate threshold value, and then the software code by described in step S107 determination including patch code section passes through running quality test
Afterwards, it can determine that described test by running quality includes that the software code of patch code section obtains the guarantor of whole coverage rate
Card, so that test confidence level is higher.
Optionally, the sub-step B based on step S103) if the coverage rate that the patch code section is tested is not up to generation
Code section coverage rate threshold value, it is determined that after the patch code Duan Wei passes through coverage rate test, the method also includes:
Step S108, obtains the second operating parameter generated when the patch code section is tested trial operation, and described second
Operating parameter is used to characterize the running quality when patch code section is tested trial operation.
Second operating parameter is used to characterize the running quality when patch code section is tested trial operation.Wherein, institute
State the second operating parameter be also possible to the utilization rate of corresponding central processing unit when the patch code section is tested trial operation,
With memory, disk input and output rate and network throughput etc. be used to characterize it is described include patch code section software generation
The parameter of running quality when the tested trial operation of code.It may be certain since patch code section when being tested trial operation is corresponding
One server, therefore for characterizing the running quality when patch code section is tested trial operation in such as corresponding server
Central processing unit utilization rate, used second parameters such as memory, disk input and output rate and network throughput can be with
Individually obtain.
Optionally, it is based on step S108, the method also includes:
Step S109 is run if second operating parameter is not up to the second operating index threshold value by described second
Parameter is sent to the uploader of the patch code section, to notify the uploader to optimize the patch code section.
This step S109 be intended to determine for characterize the patch code section be tested trial operation when running quality it is described
When second operating parameter is not up to the second operating index threshold value, second operating parameter is sent to the patch code section
Uploader, and the uploader is notified to optimize the patch code section.
The uploader, which optimizes the patch code section, refers to the uploader according to not up to the second operation
Second operating parameter of metrics-thresholds, carries out the optimization of corresponding amplitude.For example, if second operating parameter and second
Operating index threshold value difference is larger, then carries out optimization by a relatively large margin.If second operating parameter and the second operating index
Threshold value difference is smaller, then carries out optimization more by a small margin.By the way that second operating parameter is sent to the patch code section
Uploader to notify the uploader to optimize the patch code section, the uploader can be made to the patch generation
The amplitude that code section optimizes has more specific aim, more effective percentage.
After notifying the uploader to optimize the patch code section based on step S109, the method is also wrapped
It includes:
Step S110 is tested again after the patch code section after acquired optimization is integrated into the software.
Step S111, the patch code section after obtaining the optimization are tested third operating parameter when trial operation.
Step S112, if the third operating parameter reaches the third operating index threshold value, it is determined that the optimization
Patch code section afterwards is tested by running quality.
Step S110, step S111 and step S112 is intended to for the patch code section after acquired optimization being integrated into
It is tested again after the software, and obtains the third operating parameter when patch code section after the optimization is tested trial operation, into
And if the third operating parameter reaches the third operating index threshold value, it is determined that the patch code section after the optimization is logical
Running quality test is crossed, running quality requirement is reached with this patch code section after ensuring to optimize.
In addition to the inspection method of software code test coverage provided above, the application also provides a kind of software continuous collection
At in scene to the method for patch code section coverage rate inspection.
To the method for patch code section coverage rate inspection in software continuous Integrated scenario provided by the present application, comprising:
Step 1 has detected whether that patch code section is integrated into Current software.
Step 2, when having detected that patch code section is integrated into Current software, according to test set to including patch generation
The software code of code section is tested.
Step 3 determines the tested coverage rate of patch code section.
Step 4 is determined as the patch code section that tested coverage rate reaches first threshold to meet the benefit of integrated condition
Fourth code segment.
Due in the software continuous Integrated scenario to the method for patch code section coverage rate inspection and software provided above
The inspection method of code tester coverage rate is similar, therefore is not described in detail.
This Shen is analyzed below with reference to the application scenarios schematic diagram of the inspection method of software code test coverage shown in Fig. 2
It please the technical effect that can obtain of technical solution.
As shown in Fig. 2, wherein developer it is signified be exactly the patch code section described in embodiment above volume
Writer, code storage may include all codes of Current software, and the patch code section that developer can be write is integrated into
In the code of Current software.Test macro in Fig. 2 can be testing tool signified above, which can be right
Software code in code storage is tested.What coverage rate inspection referred to be exactly be described above it is tested to the patch code section
The coverage rate of examination is checked.Tester refers to the people tested the software comprising the patch code section.Test is used
What example i.e. test event referred to is exactly the data in the test set being described above for being tested software code.If test system
When system fails to the software test comprising the patch code section, such as the coverage rate that the patch code section is tested is not achieved
It is required that when, or when there is bug when the software test comprising the patch code section, then the above process is re-executed, until surveying
It tries successfully, and version publication can be carried out.
Technical scheme is that the checking process to coverage rate is included in for a part of software continuous integrating process, with
The coverage rate being tested for the code submitted every time is checked, so as to know the tested of the code submitted every time
Coverage rate on earth how.By the coverage rate checking process of the code submitted every time with and continuance test process integration to one
It rises, so that forming so-called persistently coverage rate inspection during inspections of coverage rate extends through the lasting submission of code
(Continuous Coverage Check).This is conducive to specific development person and test case is replenished in time, and control software quality is more
Have specific aim, more in time, the quality of code has been effectively ensured.For example, certain patch submitted there are 100 line codes, tested
When can be tested for this 100 line code statistics coverage rate, be covered if it find that only 60 line codes are tested, then this
The coverage rate of 100 row patch is 60%, while knowing that the tested covering of the code of whose submission or coverage rate are inadequate.
Optionally, if certain code submitted is tested covering or coverage rate is inadequate, system will be considered that latent
Quality problems and refuse to integrate, and specific development person is replenished in time test case, optimizes the patch code section in time, from
And control software quality have more specific aim, more in time.For example, if it is considered to 60% coverage rate is lower than expected requirement, Ke Yijin
The test of row supplement, code optimization, until coverage rate reaches expected requirement, operating parameter reaches operating index.
The application also provides a kind of check device of software code test coverage.Fig. 3 is software generation provided by the present application
The schematic diagram of the embodiment of the check device of code test coverage.Since Installation practice is substantially similar to embodiment of the method, institute
To describe fairly simple, relevant part refers to the corresponding explanation of the embodiment of the method for above-mentioned offer.
The check device of software code test coverage in embodiment illustrated in fig. 3, comprising:
First test unit 301, for being tested according to test set the software code for including patch code section;
Coverage rate determination unit 302, for determining the tested coverage rate of the patch code section, the patch code section
Tested coverage rate is for measuring the size of code that the patch code section is performed during the test;
Coverage rate test result determination unit 303, the coverage rate for being tested according to the patch code section, determines institute
State the coverage rate test result of patch code section.
Optionally, the coverage rate determination unit 302 includes:
Execution information obtains subelement, for obtaining the execution information of the patch code section;
Coverage rate obtains subelement, for determining the tested covering of the patch code section according to the execution information
Rate.
Optionally, the execution information obtains subelement and is configured to obtain at least one of following execution information:
The row for the code being performed in the line number for the code being performed in the patch code section, the patch code section
The number that every line code is performed in several, the described patch code section.
Optionally, the coverage rate acquisition subelement includes:
Coverage rate obtains the first subelement of second level, for the line number according to the code being performed in the patch code section,
The line number for determining the code being performed in the patch code section, by the line number phase for the code being performed in the patch code section
For the ratio of the line number of all codes in the patch code section, the coverage rate being tested as the patch code section;Or
Person,
Coverage rate obtains the second subelement of second level, for determining the line number for the code being performed in the patch code section,
By the ratio of the line number of all codes in the line number for the code being performed in the patch code section and the patch code section, make
The coverage rate being tested for the patch code section;Alternatively,
Coverage rate obtains second level third subelement, time for being performed according to every line code in the patch code section
Number, determines the line number for the code being performed in the patch code section, by the row for the code being performed in the patch code section
Ratio of the number relative to the line number of all codes in the patch code section, the covering being tested as the patch code section
Rate.
Optionally, the coverage rate test result determination unit 303 includes:
Coverage rate test result determines the first subelement, if the coverage rate for the patch code section to be tested reaches
Code segment coverage rate threshold value, it is determined that the patch code section passes through coverage rate test;
Coverage rate test result determines the second subelement, if the coverage rate for the patch code section to be tested does not reach
To code segment coverage rate threshold value, it is determined that the patch code Duan Wei passes through coverage rate test.
Optionally, described device further include:
Second test cell, for being tested again the software code for including patch code section.
Optionally, second test cell includes:
It supplements test set and generates subelement, for generating and mending according to the code not being tested in the patch code section
Fill test set;
It supplements test set and updates subelement, for updating the supplement test set into the test set;
Second test subelement, for according to updated test set to include the software code of patch code section again
It is tested.
Optionally, the supplement test set generation subelement includes:
Uploader, which identifies, determines that second level subelement determines the patch generation for the mark according to the patch code section
The mark of the corresponding uploader of code section;
Second level subelement is notified, for notifying the uploader for the generation of not tested covering in the supplement code segment
Code generates supplement test set.
Optionally, described device further include:
Whole coverage rate computing unit, for calculate include patch code section software code whole coverage rate;
First operating parameter acquiring unit, if for it is described include patch code section software code whole covering
Rate reaches whole coverage rate threshold value, then obtain described in include patch code section software code be tested trial operation when it is generated
First operating parameter, it includes that the software code of patch code section is tested trial operation that first operating parameter, which is used to characterize described,
When running quality.
Optionally, described device further include:
First running quality determination unit, if reaching the first operating index threshold value for first operating parameter,
Include described in determination patch code section software code pass through running quality test.
Optionally, described device further include:
Second operating parameter acquiring unit, for obtaining generated second when the patch code section is tested trial operation
Operating parameter, second operating parameter are used to characterize the running quality when patch code section is tested trial operation.
Optionally, described device further include:
Notice optimization unit will be described if being not up to the second operating index threshold value for second operating parameter
Second operating parameter is sent to the uploader of the patch code section, and the uploader is notified to carry out the patch code section
Optimization.
Optionally, described device further include:
Third test cell is surveyed again after the patch code section after acquired optimization is integrated into the software
Examination;
Third operating parameter acquiring unit, for obtaining the third when patch code section after the optimization is tested trial operation
Operating parameter;
Second running quality determination unit, if reaching the third operating index threshold for the third operating parameter
Value, it is determined that the patch code section after the optimization is tested by running quality.
The application also provides a kind of electronic equipment.Fig. 4 shows one embodiment of the electronic equipment.Since the electronics is set
Standby embodiment is substantially similar to embodiment of the method, so describing fairly simple, relevant part refers to above-mentioned offer
The corresponding explanation of embodiment of the method.
Electronic equipment includes: in embodiment illustrated in fig. 4
Memory 401 and processor 402;
For the memory for storing computer executable instructions, the processor is executable for executing the computer
Instruction:
The software code for including patch code section is tested according to test set;
Determine the tested coverage rate of the patch code section, the tested coverage rate of the patch code section is for measuring
The size of code that the patch code section is performed during the test;
According to the coverage rate that the patch code section is tested, the coverage rate test result of the patch code section is determined.
The application also provides a kind of computer readable storage medium, is stored thereon with computer program, and the program is processed
When device executes, perform the following operations:
The software code for including patch code section is tested according to test set;
Determine the tested coverage rate of the patch code section, the tested coverage rate of the patch code section is for measuring
The size of code that the patch code section is performed during the test;
According to the coverage rate that the patch code section is tested, the coverage rate test result of the patch code section is determined.
Although the application is disclosed as above with preferred embodiment, it is not for limiting the application, any this field skill
Art personnel are not departing from spirit and scope, can make possible variation and modification, therefore the guarantor of the application
Shield range should be subject to the range that the claim of this application defined.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include non-temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
Claims (29)
1. a kind of inspection method of software code test coverage characterized by comprising
The software code for including patch code section is tested according to test set;
Determine that the tested coverage rate of the patch code section, the tested coverage rate of the patch code section are described for measuring
The size of code that patch code section is performed during the test;
According to the coverage rate that the patch code section is tested, the coverage rate test result of the patch code section is determined.
2. the method according to claim 1, wherein the covering that the determination patch code section is tested
Rate, comprising:
Obtain the execution information of the patch code section;
The tested coverage rate of the patch code section is determined according to the execution information.
3. according to the method described in claim 2, it is characterized in that, the execution information includes at least one of the following:
The line number for the code being performed in the patch code section;
The line number for the code being performed in the patch code section;
The number that every line code is performed in the patch code section.
4. according to the method described in claim 3, it is characterized in that, described determine the patch code according to the execution information
The tested coverage rate of section, comprising:
According to the line number for the code being performed in the patch code section, the code being performed in the patch code section is determined
Line number, the line number by the line number for the code being performed in the patch code section relative to all codes in the patch code section
Ratio, as the patch code section be tested coverage rate;Alternatively,
The line number for determining the code being performed in the patch code section, by the row for the code being performed in the patch code section
Several ratios with the line number of all codes in the patch code section, the coverage rate being tested as the patch code section;Or
Person,
According to the number that every line code is performed in the patch code section, the code being performed in the patch code section is determined
Line number, the row by the line number for the code being performed in the patch code section relative to all codes in the patch code section
Several ratio, the coverage rate being tested as the patch code section.
5. the method according to claim 1, wherein the covering being tested according to the patch code section
Rate determines the coverage rate test result of the patch code section, comprising:
If the tested coverage rate of the patch code section reaches code segment coverage rate threshold value, it is determined that the patch code section
Pass through coverage rate test;
If the tested coverage rate of the patch code section is not up to code segment coverage rate threshold value, it is determined that the patch code
Duan Wei passes through coverage rate test.
6. according to the method described in claim 5, it is characterized in that, if the patch code Duan Wei by coverage rate test,
Then the method also includes:
The software code for including patch code section is tested again.
7. according to the method described in claim 6, it is characterized in that, described pair include the software code of patch code section again
Carrying out test includes:
For the code not being tested in the patch code section, supplement test set is generated;
The supplement test set is updated into the test set;
The software code for including patch code section is tested again according to updated test set.
8. the method according to the description of claim 7 is characterized in that described for not being tested in the patch code section
Code generates supplement test set, comprising:
According to the mark of the patch code section, the mark of the corresponding uploader of the patch code section is determined;
According to the mark of the uploader, notify the uploader for the code of not tested covering in the supplement code segment
Generate supplement test set.
9. according to the method described in claim 6, it is characterized in that, if to include the software code of patch code section again
After being tested, the tested coverage rate of the patch code section reaches the code segment coverage rate threshold value, then the method is also
Include:
Calculating includes the whole coverage rate of the software code of patch code section;
If described includes that the whole coverage rate of the software code of patch code section reaches whole coverage rate threshold value, institute is obtained
State includes the first operating parameter generated when the software code of patch code section is tested trial operation, first operating parameter
It include running quality when the software code of patch code section is tested trial operation for characterizing described.
10. according to the method described in claim 9, it is characterized in that, the method also includes:
If first operating parameter reaches the first operating index threshold value, it is determined that described includes the software of patch code section
Code is tested by running quality.
11. according to the method described in claim 5, it is characterized in that, if the patch code section by coverage rate test,
The method also includes:
It obtains the patch code section and is tested the second operating parameter generated when trial operation, second operating parameter is used for table
Levy the running quality when patch code section is tested trial operation.
12. according to the method for claim 11, which is characterized in that the method also includes:
If second operating parameter is not up to the second operating index threshold value, second operating parameter is sent to described
The uploader of patch code section, and the uploader is notified to optimize the patch code section.
13. according to the method for claim 12, which is characterized in that the method also includes:
After patch code section after acquired optimization is integrated into the software, test again;
Patch code section after obtaining the optimization is tested third operating parameter when trial operation;
If the third operating parameter reaches the third operating index threshold value, it is determined that the patch code section after the optimization
It is tested by running quality.
14. to the method for patch code section coverage rate inspection in a kind of software continuous Integrated scenario characterized by comprising
Detect whether that patch code section is integrated into Current software;
When having detected that patch code section is integrated into Current software, according to test set to the software generation for including patch code section
Code is tested;
Determine the tested coverage rate of patch code section;
It is determined as the patch code section that tested coverage rate reaches first threshold to meet the patch code section of integrated condition.
15. a kind of check device of software code test coverage characterized by comprising
First test unit, for being tested according to test set the software code for including patch code section;
Coverage rate determination unit, for determining that the tested coverage rate of the patch code section, the patch code section are tested
Coverage rate for measuring the size of code that the patch code section is performed during the test;
Coverage rate test result determination unit, the coverage rate for being tested according to the patch code section, determines the patch
The coverage rate test result of code segment.
16. device according to claim 15, which is characterized in that the coverage rate determination unit includes:
Execution information obtains subelement, for obtaining the execution information of the patch code section;
Coverage rate obtains subelement, for determining the tested coverage rate of the patch code section according to the execution information.
17. device according to claim 16, which is characterized in that the execution information obtains subelement and is configured to obtain
At least one of following execution information:
The line number for the code being performed in the line number for the code being performed in the patch code section, the patch code section, institute
State the number that every line code is performed in patch code section.
18. device according to claim 17, which is characterized in that the coverage rate obtains subelement and includes:
Coverage rate obtains the first subelement of second level, for the line number according to the code being performed in the patch code section, determines
The line number for the code being performed in the patch code section, by the line number for the code being performed in the patch code section relative to
The ratio of the line number of all codes in the patch code section, the coverage rate being tested as the patch code section;Alternatively,
Coverage rate obtains the second subelement of second level, for determining the line number for the code being performed in the patch code section, by institute
The ratio for stating the line number of all codes in the line number and the patch code section for the code being performed in patch code section, as institute
State the tested coverage rate of patch code section;Alternatively,
Coverage rate obtains second level third subelement, for according to the number that every line code is performed in the patch code section, really
The line number for the code being performed in the fixed patch code section, the line number for the code being performed in the patch code section is opposite
The ratio of the line number of all codes in the patch code section, the coverage rate being tested as the patch code section.
19. device according to claim 15, which is characterized in that the coverage rate test result determination unit includes:
Coverage rate test result determines the first subelement, if the coverage rate for the patch code section to be tested reaches code
Section coverage rate threshold value, it is determined that the patch code section passes through coverage rate test;
Coverage rate test result determines the second subelement, if the coverage rate for the patch code section to be tested is not up to generation
Code section coverage rate threshold value, it is determined that the patch code Duan Wei passes through coverage rate test.
20. device according to claim 19, which is characterized in that described device further include:
Second test cell, for being tested again the software code for including patch code section.
21. device according to claim 20, which is characterized in that second test cell includes:
It supplements test set and generates subelement, for generating supplement and surveying for the code not being tested in the patch code section
Examination collection;
It supplements test set and updates subelement, for updating the supplement test set into the test set;
Second test subelement, for being carried out again according to updated test set to the software code for including patch code section
Test.
22. device according to claim 21, which is characterized in that the supplement test set generates subelement and includes:
Uploader, which identifies, determines that second level subelement determines the patch code section for the mark according to the patch code section
The mark of corresponding uploader;
Second level subelement is notified, for the uploader according to the identification notification of the uploader in the supplement code segment
The code building of not tested covering supplements test set.
23. device according to claim 20, which is characterized in that described device further include:
Whole coverage rate computing unit, for calculate include patch code section software code whole coverage rate;
First operating parameter acquiring unit, if for it is described include that the whole coverage rate of software code of patch code section reaches
To whole coverage rate threshold value, then obtain described in include generated first when the software code of patch code section is tested trial operation
Operating parameter, it includes when the software code of patch code section is tested trial operation that first operating parameter, which is used to characterize described,
Running quality.
24. device according to claim 23, which is characterized in that described device further include:
First running quality determination unit, if reaching the first operating index threshold value for first operating parameter, it is determined that
Described includes that the software code of patch code section is tested by running quality.
25. device according to claim 19, which is characterized in that described device further include:
Second operating parameter acquiring unit, for obtain the patch code section be tested trial operation when it is generated second operation ginseng
Number, second operating parameter are used to characterize the running quality when patch code section is tested trial operation.
26. device according to claim 25, which is characterized in that described device further include:
Notice optimization unit, if the second operating index threshold value is not up to for second operating parameter, by described second
Operating parameter is sent to the uploader of the patch code section, and it is excellent to notify that the uploader carries out the patch code section
Change.
27. device according to claim 26, which is characterized in that described device further include:
Third test cell is tested again after the patch code section after acquired optimization is integrated into the software;
Third operating parameter acquiring unit, for obtaining the third operation when patch code section after the optimization is tested trial operation
Parameter;
Second running quality determination unit, if reaching the third operating index threshold value for the third operating parameter,
Patch code section after determining the optimization is tested by running quality.
28. a kind of electronic equipment characterized by comprising
Memory and processor;
The memory is for storing computer executable instructions, and for executing, the computer is executable to be referred to the processor
It enables:
The software code for including patch code section is tested according to test set;
Determine that the tested coverage rate of the patch code section, the tested coverage rate of the patch code section are described for measuring
The size of code that patch code section is performed during the test;
According to the coverage rate that the patch code section is tested, the coverage rate test result of the patch code section is determined.
29. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
When execution, perform the following operations:
The software code for including patch code section is tested according to test set;
Determine that the tested coverage rate of the patch code section, the tested coverage rate of the patch code section are described for measuring
The size of code that patch code section is performed during the test;
According to the coverage rate that the patch code section is tested, the coverage rate test result of the patch code section is determined.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810440103.8A CN110471829B (en) | 2018-05-09 | 2018-05-09 | Method and device for checking software code test coverage rate |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810440103.8A CN110471829B (en) | 2018-05-09 | 2018-05-09 | Method and device for checking software code test coverage rate |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110471829A true CN110471829A (en) | 2019-11-19 |
CN110471829B CN110471829B (en) | 2023-07-18 |
Family
ID=68503750
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810440103.8A Active CN110471829B (en) | 2018-05-09 | 2018-05-09 | Method and device for checking software code test coverage rate |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110471829B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112783800A (en) * | 2021-03-19 | 2021-05-11 | 北京奇艺世纪科技有限公司 | Test case screening method and device |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080222472A1 (en) * | 2007-03-09 | 2008-09-11 | Grise Gary D | Method for automatic test pattern generation for one test constraint at a time |
US20120233596A1 (en) * | 2011-03-07 | 2012-09-13 | International Business Machines Corporation | Measuring coupling between coverage tasks and use thereof |
CN102722436A (en) * | 2012-05-29 | 2012-10-10 | 百度在线网络技术(北京)有限公司 | Statistical method and device for incremental coverage information |
CN104714882A (en) * | 2013-12-17 | 2015-06-17 | 腾讯科技(深圳)有限公司 | Code information processing method and device |
US20150169432A1 (en) * | 2013-12-12 | 2015-06-18 | Vertafore, Inc. | Integration testing method and system for web services |
CN105404585A (en) * | 2015-12-01 | 2016-03-16 | 腾讯科技(深圳)有限公司 | Method and apparatus for acquiring code coverage rate |
CN106897217A (en) * | 2017-02-13 | 2017-06-27 | 北京趣拿软件科技有限公司 | Method of testing and test device |
CN107015821A (en) * | 2016-01-28 | 2017-08-04 | 腾讯科技(深圳)有限公司 | The method and apparatus of incremental update |
WO2018029668A1 (en) * | 2016-08-09 | 2018-02-15 | Sealights Technologies Ltd. | System and method for continuous testing and delivery of software |
CN107807881A (en) * | 2017-09-28 | 2018-03-16 | 北京新能源汽车股份有限公司 | Method of testing, device and the computer equipment of code coverage |
CN107992404A (en) * | 2016-10-26 | 2018-05-04 | 中兴通讯股份有限公司 | A kind of Software Automatic Testing Method and device |
CN108572912A (en) * | 2017-09-22 | 2018-09-25 | 北京金山云网络技术有限公司 | A kind of continuous integrating method, apparatus, electronic equipment and storage medium |
-
2018
- 2018-05-09 CN CN201810440103.8A patent/CN110471829B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080222472A1 (en) * | 2007-03-09 | 2008-09-11 | Grise Gary D | Method for automatic test pattern generation for one test constraint at a time |
US20120233596A1 (en) * | 2011-03-07 | 2012-09-13 | International Business Machines Corporation | Measuring coupling between coverage tasks and use thereof |
CN102722436A (en) * | 2012-05-29 | 2012-10-10 | 百度在线网络技术(北京)有限公司 | Statistical method and device for incremental coverage information |
US20150169432A1 (en) * | 2013-12-12 | 2015-06-18 | Vertafore, Inc. | Integration testing method and system for web services |
CN104714882A (en) * | 2013-12-17 | 2015-06-17 | 腾讯科技(深圳)有限公司 | Code information processing method and device |
CN105404585A (en) * | 2015-12-01 | 2016-03-16 | 腾讯科技(深圳)有限公司 | Method and apparatus for acquiring code coverage rate |
CN107015821A (en) * | 2016-01-28 | 2017-08-04 | 腾讯科技(深圳)有限公司 | The method and apparatus of incremental update |
WO2018029668A1 (en) * | 2016-08-09 | 2018-02-15 | Sealights Technologies Ltd. | System and method for continuous testing and delivery of software |
CN107992404A (en) * | 2016-10-26 | 2018-05-04 | 中兴通讯股份有限公司 | A kind of Software Automatic Testing Method and device |
CN106897217A (en) * | 2017-02-13 | 2017-06-27 | 北京趣拿软件科技有限公司 | Method of testing and test device |
CN108572912A (en) * | 2017-09-22 | 2018-09-25 | 北京金山云网络技术有限公司 | A kind of continuous integrating method, apparatus, electronic equipment and storage medium |
CN107807881A (en) * | 2017-09-28 | 2018-03-16 | 北京新能源汽车股份有限公司 | Method of testing, device and the computer equipment of code coverage |
Non-Patent Citations (4)
Title |
---|
SASWAT ANAND等: "An orchestrated survey of methodologies for automated software test case generation", JOURNAL OF SYSTEMS AND SOFTWARE * |
孟蓝茹: "敏捷项目质量保证过程改进的研究与实践", 中国优秀硕士学位论文全文数据库 信息科技辑 * |
褚悦: "代码覆盖率驱动的测试用例管理系统的设计与实现", 中国优秀硕士学位论文全文数据库 信息科技辑 * |
许姝韫: "嵌入式软件自动测试技术研究", 中国优秀博硕士学位论文全文数据库 (硕士) 信息科技辑 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112783800A (en) * | 2021-03-19 | 2021-05-11 | 北京奇艺世纪科技有限公司 | Test case screening method and device |
CN112783800B (en) * | 2021-03-19 | 2023-09-05 | 北京奇艺世纪科技有限公司 | Test case screening method and device |
Also Published As
Publication number | Publication date |
---|---|
CN110471829B (en) | 2023-07-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105760292B (en) | A kind of assertion verification method and apparatus for unit testing | |
US9921948B2 (en) | Software commit risk level | |
TW201941058A (en) | Anomaly detection method and device | |
US11720334B2 (en) | Inductive equivalence in machine-based instruction editing | |
US20160041893A1 (en) | System and method for display of software quality | |
US8140911B2 (en) | Dynamic software tracing | |
WO2016188170A1 (en) | Test method and device, apparatus and computer storage medium | |
KR20170052672A (en) | Conditional validation rules | |
US10209984B2 (en) | Identifying a defect density | |
CN109871316A (en) | A kind of control recognition methods and device | |
EP2975527A2 (en) | A method for tracing computer software | |
CN106021054A (en) | Method and apparatus for testing upgrading and downgrading stability of BMC | |
US20160188441A1 (en) | Testing multi-threaded applications | |
CN103678115A (en) | Apparatus and method for detecting location of source code error in mixed-mode program | |
CN111581036A (en) | Internet of things fault detection method, detection system and storage medium | |
CN110032505A (en) | Software quality determining device, software quality determine that method and software quality determine program | |
JP2017174418A (en) | Data structure abstraction for model checking | |
US9195730B2 (en) | Verifying correctness of a database system via extended access paths | |
CN110471829A (en) | The inspection method and device of software code test coverage | |
US10324829B2 (en) | Application testing | |
CN112506802B (en) | Test data management method and system | |
CN110221143A (en) | A kind of measured device soft error discriminating method, device and computer equipment | |
Kim et al. | Automated bug neighborhood analysis for identifying incomplete bug fixes | |
CN109299012A (en) | A kind of test method, device and electronic equipment | |
Eloussi | Determining flaky tests from test failures |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |