CN102722436B - A kind of statistical method of incremental coverage information and device - Google Patents

A kind of statistical method of incremental coverage information and device Download PDF

Info

Publication number
CN102722436B
CN102722436B CN201210172285.8A CN201210172285A CN102722436B CN 102722436 B CN102722436 B CN 102722436B CN 201210172285 A CN201210172285 A CN 201210172285A CN 102722436 B CN102722436 B CN 102722436B
Authority
CN
China
Prior art keywords
newly
increased
file
function
line number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210172285.8A
Other languages
Chinese (zh)
Other versions
CN102722436A (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201210172285.8A priority Critical patent/CN102722436B/en
Publication of CN102722436A publication Critical patent/CN102722436A/en
Application granted granted Critical
Publication of CN102722436B publication Critical patent/CN102722436B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides a kind of statistical method and device of incremental coverage information, described method comprises: S1, obtain edition code to be measured and baseline version code; S2, all list is run to described edition code to be measured survey use-case, obtain the coverage information of all functions in described edition code to be measured; And, described edition code to be measured and described baseline version code are compared, obtains function information that is newly-increased or amendment; S3, utilize the function information of described newly-increased or amendment, from the coverage information of described all functions, statistics obtains incremental coverage information that is newly-increased or amendment.Compared to prior art, the present invention automatically can add up the increment information carried and survey version, makes tester can obtain incremental coverage information rapidly, and according to incremental coverage information design test case targetedly, improve testing efficiency and accuracy rate, reduce test leakage.

Description

A kind of statistical method of incremental coverage information and device
[technical field]
The present invention relates to computer software testing technical field, particularly a kind of statistical method of incremental coverage information and device.
[background technology]
Software test is the important means ensureing software quality, by test, software just must can guarantee that it is working properly in applied environment.Whether, in the project development process of software, developer can do unit test (i.e. single survey) targetedly, to check software unit to have inerrancy, coincide, then the software completed is submitted to tester and test with design.
Put forward for improving developer the quality surveying code, tester can formulate the standard of some test accesses, such as, requires that putting forward the row coverage rate surveying the new increasing function of code must reach 60% with first-class.But developer not knowing puies forward the quality surveying software and whether reaches requirement under normal circumstances, and such as do not know whether the coverage rate of unit testing reaches the requirement of test access, just may cause carrying survey software can not reach requirements for sale.Tester is before each test, and all manually must add up incremental coverage information that is newly-increased and Modification growth function, this will inevitably affect the work efficiency of tester.And the coverage information manually to add up due to tester is not accurate enough, also easily causes erroneous judgement.
When proposing survey, developer just can carry and survey the content of software and tester and carry out test emphasis and link up, and informs that tester increases newly and have modified which function.But developer can not illustrate which function they have tested usually, and tester often designs the repetition use-case that some developers had tested, and causes unnecessary repeated work.In addition, may occur in communication process that developer misses the explanation to part what's new point, may cause test leakage.
[summary of the invention]
In view of this, the invention provides a kind of statistical method and device of incremental coverage information, automatically can obtain incremental coverage information, make tester can according to incremental coverage information design test case targetedly, improve testing efficiency and accuracy rate, reduce test leakage.
Concrete technical scheme is as follows:
A statistical method for incremental coverage information, the method comprises the following steps:
S1, obtain edition code to be measured and baseline version code;
S2, all list is run to described edition code to be measured survey use-case, obtain the coverage information of all functions in described edition code to be measured; And, described edition code to be measured and described baseline version code are compared, obtains function information that is newly-increased or amendment;
S3, utilize the function information of described newly-increased or amendment, from the coverage information of described all functions, statistics obtains incremental coverage information that is newly-increased or amendment.
According to one preferred embodiment of the present invention, before described step S1, the method also comprises:
Generating configuration file, wherein the content of configuration file at least comprises: version number to be measured, baseline version number, the path of edition code to be measured and the path of baseline version code;
Described step S1 specifically comprises:
Utilize the path of version number to be measured and edition code to be measured in described configuration file, obtain edition code to be measured;
Utilize the path of baseline version in described configuration file number and baseline version code, obtain baseline version code.
According to one preferred embodiment of the present invention, describedly all list run to described edition code to be measured survey use-case, obtain the coverage information of all functions in described edition code to be measured, specifically comprise:
All lists are run to described edition code to be measured and surveys use-case, generate and cover statistics file;
From the covering statistics file generated, extract the coverage information of often going in each file;
According to function line number hereof, add up the line number and line number that are covered to.
According to one preferred embodiment of the present invention, before the coverage information obtaining all functions in described edition code to be measured, also comprise:
All functions under comprising the function of preset keyword, the file comprising preset keyword or catalogue are filtered out.
According to one preferred embodiment of the present invention, described described edition code to be measured and described baseline version code to be compared, obtain function information that is newly-increased or amendment, specifically comprise:
Journal file from described edition code to be measured, obtains file that is newly-increased or that revise and filename;
Obtain the newly-increased line number of newly-increased file correspondence and line number, and the file that the file of amendment is corresponding with described baseline version code contrasts, obtain line number and the line number of amendment file modification;
Obtain the function name at the line number place of described newly-increased line number or amendment, obtain the described function information increasing newly or revise.
According to one preferred embodiment of the present invention, described function information that is newly-increased or amendment comprises:
The filename at the code place of the function name of the function line number scope of the code line number of newly-increased or amendment, newly-increased or amendment, newly-increased or amendment and newly-increased or amendment.
According to one preferred embodiment of the present invention, described step S3 specifically comprises:
By the line number revised in the line number of row all in newly-increased file or amendment file, compare with the described line number be covered to, obtain newly-increased or revise the line number and line number that are covered in file;
According to the function name of the described line number be covered to those line number places, obtain the function sum functions number be covered in function that is newly-increased or that revise.
According to one preferred embodiment of the present invention, described step S3 also comprises:
Utilize the line number summation obtaining newly-increased or amendment and the line number increasing newly or revise be covered to, calculate the row coverage rate of increment;
Function sum and the function number increasing newly or revise be covered to of the newly-increased or amendment that utilization obtains, calculate the function coverage rate of increment.
According to one preferred embodiment of the present invention, described incremental coverage information comprise following listed in one or more combine:
Newly-increased or the function coverage rate of amendment, newly-increased or the row coverage rate of amendment, capped newly-increased or Modification growth function title, not capped newly-increased or Modification growth function title.
According to one preferred embodiment of the present invention, the method also comprises:
Judge whether add up the incremental coverage information obtained meets preset requirement;
Incremental coverage information is not met to the edition code to be measured of preset requirement, send alarm mail to corresponding developer or tester.
A statistic device for incremental coverage information, this device comprises:
Version acquisition module, for obtaining edition code to be measured and baseline version code;
All standing acquisition module, surveys use-case for running all lists to described edition code to be measured, obtains the coverage information of all functions in described edition code to be measured;
Increment acquisition module, for described edition code to be measured and described baseline version code being compared, obtains function information that is newly-increased or amendment;
Increment covers statistical module, the function information of the newly-increased or amendment obtained for utilizing described increment acquisition module, and from the coverage information of all functions of described all standing acquisition module acquisition, statistics obtains incremental coverage information that is newly-increased or amendment.
According to one preferred embodiment of the present invention, before described step S1, the method device also comprises:
Configuration module, for generating configuration file, wherein the content of configuration file at least comprises: version number to be measured, baseline version number, the path of edition code to be measured and the path of baseline version code;
Described version acquisition module utilizes the path of version number to be measured and edition code to be measured in described configuration file, obtains edition code to be measured;
Described version acquisition module utilizes the path of baseline version in described configuration file number and baseline version code, obtains baseline version code.
According to one preferred embodiment of the present invention, described all standing acquisition module, concrete configuration is:
All lists are run to described edition code to be measured and surveys use-case, generate and cover statistics file;
From the covering statistics file generated, extract the coverage information of often going in each file;
According to function line number hereof, add up the line number and line number that are covered to.
According to one preferred embodiment of the present invention, this device also comprises:
Keyword filtration module, for filtering out all functions under comprising the function of preset keyword, the file comprising preset keyword or catalogue;
Described all standing acquisition module only obtains coverage information to function remaining after filtration.
According to one preferred embodiment of the present invention, described increment function acquisition module, concrete configuration is:
Journal file from described edition code to be measured, obtains file that is newly-increased or that revise and filename;
Obtain the newly-increased line number of newly-increased file correspondence and line number, and the file that the file of amendment is corresponding with described baseline version code contrasts, obtain line number and the line number of amendment file modification;
Obtain the function name at the line number place of described newly-increased line number or amendment, obtain the described function information increasing newly or revise.
According to one preferred embodiment of the present invention, described function information that is newly-increased or amendment comprises:
The filename at the code place of the function name of the function line number scope of the code line number of newly-increased or amendment, newly-increased or amendment, newly-increased or amendment and newly-increased or amendment.
According to one preferred embodiment of the present invention, described increment covering statistical module concrete configuration is:
By the line number revised in the line number of row all in newly-increased file or amendment file, compare with the described line number be covered to, obtain newly-increased or revise the line number and line number that are covered in file;
According to the function name of the described line number be covered to those line number places, obtain the function sum functions number be covered in function that is newly-increased or that revise.
According to one preferred embodiment of the present invention, described increment covers the concrete configuration of statistical module, also comprises:
Utilize the line number summation obtaining newly-increased or amendment and the line number increasing newly or revise be covered to, calculate the row coverage rate of increment;
Function sum and the function number increasing newly or revise be covered to of the newly-increased or amendment that utilization obtains, calculate the function coverage rate of increment.
According to one preferred embodiment of the present invention, described incremental coverage information comprise following listed in one or more combine:
Newly-increased or the function coverage rate of amendment, newly-increased or the row coverage rate of amendment, capped newly-increased or Modification growth function title, not capped newly-increased or Modification growth function title.
According to one preferred embodiment of the present invention, this device also comprises:
Judge module, for judging whether the incremental coverage information that described increment covering statistical module counts obtains meets preset requirement;
Result output module, for the judgment result displays of described judge module being exported, does not meet the edition code to be measured of preset requirement for incremental coverage information, result output module sends alarm mail to corresponding developer or tester.
As can be seen from the above technical solutions, the statistical method of incremental coverage information provided by the invention and device, programming count carries the increment information surveying version, greatly improve the efficiency of entry test, clearly can count coverlet and survey the function increasing newly and revised covered, and the function increasing newly and revised be not covered to, make tester can quick obtaining incremental coverage information, and according to coverage condition design test case targetedly, improve the work efficiency of tester, reduce test leakage.
[accompanying drawing explanation]
The statistical method process flow diagram of the incremental coverage information that Fig. 1 provides for the embodiment of the present invention one;
Fig. 2 a is the concrete grammar process flow diagram of step S102 in the embodiment of the present invention one;
Fig. 2 b is the concrete grammar process flow diagram of step S103 in the embodiment of the present invention one;
Fig. 2 c is the concrete grammar process flow diagram of step S104 in the embodiment of the present invention one;
The statistical method process flow diagram of the incremental coverage information that Fig. 3 provides for the embodiment of the present invention two;
The configuration file schematic diagram that Fig. 4 provides for the embodiment of the present invention two;
The statistic device schematic diagram of the incremental coverage information that Fig. 5 provides for the embodiment of the present invention three;
The statistic device schematic diagram of the incremental coverage information that Fig. 6 provides for the embodiment of the present invention four.
[embodiment]
In order to make the object, technical solutions and advantages of the present invention clearly, describe the present invention below in conjunction with the drawings and specific embodiments.
Due to change or the upgrading of program, the program code for a functional module has successively different several versions, and include several files in each version, each file is made up of one or more function, and a function comprises the code line of some quantity.
A program code is when proposing survey, and its coverage rate or increment coverage rate need to reach requirements for sale, could tested personnel receive.In the standard of the test access of tester's formulation, generally can require to put forward the row coverage rate sum functions coverage rate surveying code.Wherein:
In general, developer upgrades new version, or is to repair some bug, or is exactly to increase new function, thus only has minority file to be modified and to change, or also may be increase some new files.When carrying out software test, the file that tester then mainly pays close attention to those amendments and the file newly increased.Therefore, the present invention judges mainly for incremental coverage information.
Embodiment one,
Fig. 1 is the statistical method process flow diagram of the incremental coverage information that the present embodiment provides, and as shown in Figure 1, the method comprises:
Step S101, obtain edition code to be measured and baseline version code.
Usual baseline version code is the amendment of edition code to be detected and newly-increased basis, can be the last edition code of edition code to be detected, also can be the edition code that user specifies.
Obtain edition code to be detected and the baseline version code corresponding to this edition code to be detected, comprise All Files and the journal file of version Program code.
Step S102, all list is run to described edition code to be measured survey use-case, obtain the coverage information of all functions in described edition code to be measured.
Single survey use-case is the test sub-project of carrying out for unit.For the software unit of in module, research and development or tester can write multiple test case for the different input condition of this unit, and have inerrancy to detect this unit, whether meet expected results, use-case surveyed by the list that this multiple test case constitutes this unit.Along with the continuous accumulation of researching and developing and test, these single survey use-cases can be use-case set constantly improved.
Obtain all lists relevant to software unit in edition code to be measured and survey use-case, and run the coverage information obtaining all functions in edition code to be measured, comprise the line number and line number that are covered in each file.
Fig. 2 a is the concrete grammar process flow diagram of this step, as shown in Figure 2 a, specifically comprises:
Step S102_1, all list is run to described edition code to be measured survey use-case, generate and cover statistics file.
Covering statistics file adopts xml (extend markup language) file to process usually, existing single use-case running tool of surveying is utilized to run all list survey use-cases, use similar parameters such as "--xml--coverage-clover ", survey after use-case runs when all lists and can generate an xml file.
Following content is at least comprised: single each file path surveyed use-case and cover, in each file, the number of times that use-case covers surveyed by every a line coverlet in xml file.
Step S102_2, from the covering statistics file generated, to extract in each file the coverage information of often going.
From covering statistics file, can obtain the coverage information that in each file, all row are concrete, comprise which row and be covered to, which row is not covered to.
Such as, the partial information in certain xml file:
<filename=″/**/**/su_group.php″>
<linenum=″4″type=″stmt″count=″6″/>
<linenum=″5″type=″stmt″count=″6″/>
<linenum=″6″type=″stmt″count=″6″/>
<linenum=″7″type=″stmt″count=″6″/>
<linenum=″8″type=″stmt″count=″6″/>
<linenum=″9″type=″stmt″count=″6″/>
<linenum=″10″type=″stmt″count=″6″/>
<linenum=″11″type=″stmt″count=″6″/>
<linenum=″12″type=″stmt″count=″6″/>
<linenum=″14″type=″stmt″count=″6″/>
<linenum=″15″type=″stmt″count=″0″/>
<linenum=″16″type=″stmt″count=″0″/>
Above information represents: in file su_group.php file, 4-14 provisional capital coverlet is surveyed use-case and covered 6 times, and 15-16 is capable not to be covered to.
Step S102_3, according to function line number hereof, add up the line number that is covered to and line number.
According to the line number of each function in respective file, namely add up according to the line number of code line in whole file.
A code line may fail to be performed certain single survey in use-case, is not namely covered to, but can be covered to another single survey in use-case.Thus, in whole covering statistics file, add up the line number and line number that are covered at least one times.
Continue see Fig. 1, step S103, described edition code to be measured and described baseline version code to be compared, obtain function information that is newly-increased or that revise.
Described function information that is newly-increased or amendment can include but not limited to following information:
The filename at the code place of the function name of the function line number scope of the code line number of newly-increased or amendment, newly-increased or amendment, newly-increased or amendment and newly-increased or amendment.
Fig. 2 b is the concrete grammar process flow diagram of this step, as shown in Figure 2 b, specifically comprises:
Step S103_1, from the journal file described edition code to be measured, obtain filename and the respective file of newly-increased or amendment.
A program file can be submitted to code library after revising, and during submission code, journal file can record concrete file and submit information to, include file name etc.
Utilize the journal file submitted to, extract filename, if this filename is the filename existed in baseline version, then this file is exactly the file that amendment occurs, and if there is no in baseline version, then this file is exactly newly-increased file.
Such as, two different editions of a module: baseline version and version to be measured, include file in baseline version: a, b, c tri-files, have modified file a in version to be measured, and with the addition of new file d.Correspondingly, the information of the journal file of version submission code to be measured is:
Fileamodified2012-3-2523:50:53
Filedmodified2012-3-2523:50:53
Analyze the log information of version to be measured, wherein filename comprises a and d.Then the file name obtained in baseline version contrasts, and can judge that file a is the file that there occurs amendment, file d is newly-increased file.
From edition code to be measured, extract the file that filename that is newly-increased or amendment is corresponding.
The line number that the file correspondence that step S103_2, acquisition increase newly is newly-increased and line number, and the file that the file of amendment is corresponding with described baseline version code contrasts, and obtains the line number and line number of revising file modification.
The file that is newly-increased or amendment that step S103_1 extracts is analyzed, is obtained newly-increased line number or the line number of amendment.
Be all new increasing function for all functions in newly-increased file, obtain newly-increased line number and line number.
For the file of amendment, the file that it is corresponding with baseline version code contrasts, and contrasts algorithm (diff algorithm), find out different code lines by file, obtains line number and the line number of amendment file modification.
Such as, the file a in version to be measured and file d is analyzed, the function information in file a and d that step S103_1 extracts:
[filename:a,{func1:(1,20),func2:(21,34),….funcn:(205,256)}]
[filename:d,{func1:(1,23),func2:(24,50),….funcn:(105,206)}]
By diff algorithm, the file a in comparison base version and version to be measured, the line number obtaining occurring amendment is 18-25, and line number is 8.
Step S1033, obtain the function name at the line number place of described newly-increased line number or amendment, obtain the function information of described newly-increased or amendment.
According to the line number of the newly-increased or amendment obtained in step S103_2, the line number scope of function in respective file, obtains function information that is newly-increased or amendment, adds up function number that is newly-increased or amendment.
Such as, the line number scope of function in the file a of line number and edition code to be measured that amendment occurs in a file is compared known: in file a, func1 and func2 there occurs amendment, and function number is 2.
All functions in file d are all new increasing function, and function number is the function number in file d.
It is worth mentioning that, the order of above-mentioned steps S102 and step S103 can be exchanged.
Continue see Fig. 1, step S104, the function information increasing newly or revise utilizing step S103 to get, from the coverage information of all functions of step S102 acquisition, statistics obtains incremental coverage information that is newly-increased or that revise.
Described incremental coverage information can be, but not limited to comprise: the newly-increased or function coverage rate of amendment, newly-increased or the row coverage rate of amendment, capped newly-increased or Modification growth function title, not capped newly-increased or Modification growth function title.
Fig. 2 c is the concrete grammar process flow diagram of this step, as shown in Figure 2 c, specifically comprises:
Step S104_1, will line number that revise in the line number of row all in newly-increased file or amendment file, compare with the described line number be covered to, obtain the line number that is covered in newly-increased or amendment file and line number.
Utilize the line number of newly-increased line number or the amendment obtained in step S103_2, compare with the line number be covered to of adding up in step S102_3, the line number that can mate as the line number be covered in newly-increased or amendment file, and adds up line number.
Such as, the line number obtaining occurring to revise through step S103_2 in file a is 18-25, and counting on the line number be covered in step S102_3 is 15-20, then the line number 18-20 that can mate is as the line number be covered in file a, and statistics line number is 3.
The line number be covered to described in step S104_2, basis and the function name at those line number places, obtain the function sum functions number be covered in function that is newly-increased or that revise.
Function information that is newly-increased or amendment comprises: the function increasing newly or revise and those function line number scopes hereof that is newly-increased or amendment.Such as: the function be modified in file a has func1 and func2, then function information comprises: [{ fun1, range (10,20) }, { fun2, range (21,34) }]
The line number be covered to utilizing step S104_1 to obtain, according to function line number scope hereof that is newly-increased or amendment, determines the function be covered to, adds up the function number be covered to.If have a line to be covered in the function increased newly or revise, then think that this function is covered to.
Such as, in file a, 18-20 is capable is covered to, and the line number scope (1,20) of function f unc1 in respective file a, can determine that in file a, function f unc1 is the function be covered to.
Step S104_3, utilization obtain line number summation that is newly-increased or that revise and the line number increasing newly or revise be covered to, the row coverage rate of calculating increment.
Function sum and the function number increasing newly or revise be covered to of the newly-increased or amendment that step S104_4, utilization obtain, calculate the function coverage rate of increment.
Finally, obtain incremental coverage information that is newly-increased or amendment, comprising: the newly-increased or function coverage rate of amendment, newly-increased or the row coverage rate of amendment, capped newly-increased or Modification growth function title, not capped newly-increased or Modification growth function title.
Embodiment two,
Fig. 3 is the statistical method process flow diagram of the incremental coverage information that the present embodiment provides, and as shown in Figure 3, the method comprises:
The content of step S201, generating configuration file.
According to the demand of reality test, generate different configuration file content.
The content of configuration file can be, but not limited to comprise following:
The path of the path of preset keyword, version number to be measured and edition code to be measured, baseline version number and baseline version code, preset the various information such as access threshold value, alert receipt people and program language classification.
Fig. 4 is a configuration file schematic diagram, as shown in Figure 4, comprise: for the preset keyword " blacklist " filtered, user profile " user=***** " in version repository (svn) and " pwd=***** ", the svn path " [svn] path=https: //svn.***.com/**/* */* */* */* */* * " of module, the deployment path " [module] path=/* */* */* */* */* */" of module, version number to be measured " test_version ", baseline version number " target_version ", preset access threshold value " threshold ", alert receipt people " mail " and program language classification " languageType ".Utilize the svn path of module and the deployment path of module can combine the path of path and the baseline version code obtaining edition code to be measured.
Step S202, according to described configuration file, obtain edition code to be measured and baseline version code.
Utilize the path of version number to be measured and edition code to be measured in configuration file respectively, obtain edition code to be measured, utilize the path of baseline version number and baseline version code, obtain baseline version code.
Step S203, the preset keyword utilized in configuration file, filter out all functions under comprising the function of preset keyword, the file comprising preset keyword or catalogue.
Such as, the preset keyword that the configuration file of Fig. 4 is arranged has " abc, aaa.txt, bcd, 123, rfv.php, ffff.php ", everyly in function name, filename or directory name, comprises all being filtered of above-mentioned key word.
Step S204, all list is run to described edition code to be measured survey use-case, obtain the coverage information of remaining function after step S203 filters in edition code to be measured.
Obtain step S102 in the coverage information of function and embodiment one similar, repeat no more.
Step S205, described edition code to be measured and described baseline version code to be compared, obtain function information that is newly-increased or amendment.
Step S206, the function information increasing newly or revise utilizing step S205 to get, from the coverage information of the function of step S204 acquisition, statistics obtains incremental coverage information that is newly-increased or that revise.
Above-mentioned steps S205 is corresponding identical with step S104 with step S103 in embodiment one with step S206, repeats no more.
Step S207, the incremental coverage information generating report forms increasing newly or revise that will count on.
Form correspondence exports the incremental coverage information of adding up and obtaining, and all exports or choose some outputs.Table 1 is the form schematic diagram generated.
Table 1
As shown in table 1, comprise the information such as the function name that row coverage rate is 35.71%, function coverage rate is 9.30%, be covered to and the function name be not covered to.File 1 is "/abcd/cde/sadfasdf/***/file1.php ", comprise function " func1 ", corresponding " yes " representative function is covered to, file 2 is "/abcd/cde/sadfasdf/***/file1.php ", comprise multiple function " func2 " to " func10 ", " func2 " to " func3 " correspondence " yes " representative function is covered to, and " func4 " to " func10 " correspondence " no " representative function is not covered to.
Whether the incremental coverage information that step S208, judgement count on meets preset requirement, if met, enters step S209, is shown as access code, otherwise, enter step S210, send alarm mail to corresponding developer or tester.
Preset requirement is the every default access threshold value configured in configuration file, such as, comprise the capable coverage rate of increment, increment function coverage rate etc.The mode such as pilot lamp or chimes of doom output display can be passed through to the statistics of incremental coverage information.Such as, if the row coverage rate of increment or function coverage rate reach predetermined threshold value, just pilot lamp is become green; Otherwise, pilot lamp is become red, sends three chimes of dooms, and send the below standard mail of increment coverage rate to corresponding personnel.
Be more than the detailed description that method provided by the present invention is carried out, below the statistic device of incremental coverage information provided by the invention be described in detail.
Embodiment three
Fig. 5 is the statistic device schematic diagram of the incremental coverage information that the present embodiment provides.As shown in Figure 5, this device comprises:
Version acquisition module 501, for obtaining edition code to be measured and baseline version code.
Usual baseline version code is the amendment of edition code to be detected and newly-increased basis, can be the last edition code of edition code to be detected, also can be the edition code that user specifies.
Obtain edition code to be detected and the baseline version code corresponding to this edition code to be detected, comprise All Files and the journal file of version Program code.
All standing acquisition module 502, surveys use-case for running all lists to described edition code to be measured, obtains the coverage information of all functions in described edition code to be measured.
Single survey use-case is the test sub-project of carrying out for unit.For the software unit of in module, research and development or tester can write multiple test case for the different input condition of this unit, and have inerrancy to detect this unit, whether meet expected results, use-case surveyed by the list that the plurality of test case constitutes this unit.Along with the continuous accumulation of researching and developing and test, these single survey use-cases can be use-case set constantly improved.
All standing acquisition module 502 obtains all lists relevant to software unit in edition code to be measured and surveys use-case, and runs the coverage information obtaining all functions in edition code to be measured, comprises the line number and line number that are covered in each file.
The concrete configuration of all standing acquisition module 502 comprises:
All standing acquisition module 502 first runs all lists to described edition code to be measured and surveys use-case, generates and covers statistics file.
Covering statistics file adopts xml (extend markup language) file to process usually, existing single use-case running tool of surveying is utilized to run all list survey use-cases, use similar parameters such as "--xml--coverage-clover ", survey after use-case runs when all lists and can generate an xml file.
Following content is at least comprised: single each file path surveyed use-case and cover, in each file, the number of times that use-case covers surveyed by every a line coverlet in xml file.
All standing acquisition module 502 from the covering statistics file generated, extracts the coverage information of often going in each file again.
From covering statistics file, can obtain the coverage information that in each file, all row are concrete, comprise which row and be covered to, which row is not covered to.
Such as, the partial information in certain xml file:
<filename=″/**/**/su_group.php″>
<linenum=″4″type=″stmt″count=″6″/>
<linenum=″5″type=″stmt″count=″6″/>
<linenum=″6″type=″stmt″count=″6″/>
<linenum=″7″type=″stmt″count=″6″/>
<linenum=″8″type=″stmt″count=″6″/>
<linenum=″9″type=″stmt″count=″6″/>
<linenum=″10″type=″stmt″count=″6″/>
<linenum=″11″type=″stmt″count=″6″/>
<linenum=″12″type=″stmt″count=″6″/>
<linenum=″14″type=″stmt″count=″6″/>
<linenum=″15″type=″stmt″count=″0″/>
<linenum=″16″type=″stmt″count=″0″/>
Above information represents: in file su_group.php file, 4-14 provisional capital coverlet is surveyed use-case and covered 6 times, and 15-16 is capable not to be covered to.
Finally, all standing acquisition module 502, according to function line number hereof, adds up the line number and line number that are covered to.
According to the line number of each function in respective file, namely add up according to the line number of code line in whole file.
A code line may fail to be performed certain single survey in use-case, is not namely covered to, but can be covered to another single survey in use-case.Thus, in whole covering statistics file, add up the line number and line number that are covered at least one times.
Increment acquisition module 503, for described edition code to be measured and described baseline version code being compared, obtains function information that is newly-increased or amendment.
Described function information that is newly-increased or amendment can include but not limited to following information:
The filename at the code place of the function name of the function line number scope of the code line number of newly-increased or amendment, newly-increased or amendment, newly-increased or amendment and newly-increased or amendment.
The concrete configuration of increment acquisition module 503 comprises:
Increment acquisition module 503, first from the journal file described edition code to be measured, obtains filename that is newly-increased or that revise and respective file.
A program file can be submitted to code library after revising, and during submission code, journal file can record concrete file and submit information to, include file name etc.
Utilize the journal file submitted to, extract filename, if this filename is the filename existed in baseline version, then this file is exactly the file that amendment occurs, and if there is no in baseline version, then this file is exactly newly-increased file.
Such as, two different editions of a module: baseline version and version to be measured, include file in baseline version: a, b, c tri-files, have modified file a in version to be measured, and with the addition of new file d.Correspondingly, the information of the journal file of version submission code to be measured is:
Fileamodified2012-3-2523:50:53
Filedmodified2012-3-2523:50:53
Analyze the log information of version to be measured, wherein filename comprises a and d.Then the file name obtained in baseline version contrasts, and can judge that file a is the file that there occurs amendment, file d is newly-increased file.
From edition code to be measured, extract the file that filename that is newly-increased or amendment is corresponding.
Increment acquisition module 503 obtains the newly-increased line number of newly-increased file correspondence and line number again, and the file that the file of amendment is corresponding with described baseline version code contrasts, and obtains line number and the line number of amendment file modification.
The file that is newly-increased or amendment extracted is analyzed, is obtained newly-increased line number or the line number of amendment.
Be all new increasing function for all functions in newly-increased file, obtain newly-increased line number and line number.
For the file of amendment, the file that it is corresponding with baseline version code contrasts, and contrasts algorithm (diff algorithm), find out different code lines by file, obtains line number and the line number of amendment file modification.
Such as, the file a in version to be measured and file d is analyzed, the function information in file a and d extracted:
[filename:a,{func1:(1,20),func2:(21,34),….funcn:(205,256)}]
[filename:d,{func1:(1,23),func2:(24,50),….funcn:(105,206)}]
By diff algorithm, the file a in comparison base version and version to be measured, the line number obtaining occurring amendment is 18-25, and line number is 8.
Finally, increment acquisition module 503 obtains the function name at the line number place of described newly-increased line number or amendment, obtains the described function information increasing newly or revise.
According to the line number of the newly-increased or amendment obtained, the line number scope of function in respective file, obtains function information that is newly-increased or amendment, adds up function number that is newly-increased or amendment.
Such as, the line number scope of function in the file a of line number and edition code to be measured that amendment occurs in a file is compared known: in file a, func1 and func2 there occurs amendment, and function number is 2.
All functions in file d are all new increasing function, and function number is the function number in file d.
It is worth mentioning that, the order of all standing acquisition module 502 and increment acquisition module 503 can be exchanged.
Increment covers statistical module 504, the function information of the newly-increased or amendment got for utilizing increment acquisition module 503, and from the coverage information of all functions of all standing acquisition module 502 acquisition, statistics obtains incremental coverage information that is newly-increased or amendment.
Described incremental coverage information can be, but not limited to comprise: the newly-increased or function coverage rate of amendment, newly-increased or the row coverage rate of amendment, capped newly-increased or Modification growth function title, not capped newly-increased or Modification growth function title.
The concrete configuration that increment covers statistical module 504 comprises:
Increment covers statistical module 504 will line number that revise in the line number of row all in newly-increased file or amendment file, compares with the described line number be covered to, and obtains the line number that is covered in newly-increased or amendment file and line number.
The newly-increased line number utilizing increment acquisition module 503 to obtain or the line number of amendment, the line number be covered to of adding up with all standing acquisition module 502 is compared, and the line number that can mate as the line number be covered in newly-increased or amendment file, and adds up line number.
Such as, the line number obtaining occurring to revise through increment acquisition module 503 in file a is 18-25, it is 15-20 that all standing acquisition module 502 counts on the line number be covered to, then the line number 18-20 that can mate is as the line number be covered in file a, and statistics line number is 3.
Increment covers statistical module 504 according to the function name of the described line number be covered to those line number places, obtains the function sum functions number be covered in function that is newly-increased or that revise.
Function information that is newly-increased or amendment comprises: the function increasing newly or revise and those function line number scopes hereof that is newly-increased or amendment.Such as: the function be modified in file a has func1 and func2, then function information comprises: [{ fun1, range (10,20) }, { fun2, range (21,34) }]
Utilize the line number be covered to obtained, according to function line number scope hereof that is newly-increased or amendment, determine the function be covered to, add up the function number be covered to.If have a line to be covered in the function increased newly or revise, then think that this function is covered to.
Such as, in file a, 18-20 is capable is covered to, and the line number scope (1,20) of function f unc1 in respective file a, can determine that in file a, function f unc1 is the function be covered to.
Increment covering statistical module 504 utilizes the line number summation obtaining newly-increased or amendment and the line number increasing newly or revise be covered to, and calculates the row coverage rate of increment.
Increment covers the function sum of the newly-increased or amendment that statistical module 504 utilization obtains and the function number increasing newly or revise be covered to, and calculates the function coverage rate of increment.
Finally, obtain incremental coverage information that is newly-increased or amendment, comprising: the newly-increased or function coverage rate of amendment, newly-increased or the row coverage rate of amendment, capped newly-increased or Modification growth function title, not capped newly-increased or Modification growth function title.
Embodiment four,
Fig. 6 is the statistic device schematic diagram of the incremental coverage information that the present embodiment provides, and as shown in Figure 6, this device comprises:
Configuration module 601, for generating configuration file.
According to the demand of reality test, generate different configuration file content.
The content of configuration file can be, but not limited to comprise following:
The path of the path of preset keyword, version number to be measured and edition code to be measured, baseline version number and baseline version code, preset the various information such as access threshold value, alert receipt people and program language classification.
Fig. 4 is a configuration file schematic diagram, as shown in Figure 4, comprise: for the preset keyword " blacklist " filtered, user profile " user=***** " in version repository (svn) and " pwd=***** ", the svn path " [svn] path=https: //svn.***.com/**/* */* */* */* */* * " of module, the deployment path " [module] path=/* */* */* */* */* */" of module, version number to be measured " test_version ", baseline version number " target_version ", preset access threshold value " threshold ", alert receipt people " mail " and program language classification " languageType ".Utilize the svn path of module and the deployment path of module can combine the path of path and the baseline version code obtaining edition code to be measured.
Version acquisition module 602, for according to described configuration file, obtains edition code to be measured and baseline version code.
Utilize the path of version number to be measured and edition code to be measured in configuration file respectively, obtain edition code to be measured, utilize the path of baseline version number and baseline version code, obtain baseline version code.
Keyword filtration module 603, for utilizing the preset keyword in configuration file, filters out all functions under comprising the function of preset keyword, the file comprising preset keyword or catalogue.
Such as, the preset keyword that the configuration file of Fig. 4 is arranged has " abc, aaa.txt, bcd, 123, rfv.php, ffff.php ", everyly in function name, filename or directory name, comprises all being filtered of above-mentioned key word.
Function covers acquisition module 604, surveys use-case, obtain the coverage information of remaining function after keyword filtration module 603 is filtered in edition code to be measured for running all lists to described edition code to be measured.
Function covers acquisition module 604, and to obtain the acquisition process of all standing acquisition module 502 in the process of the coverage information of function and embodiment three similar, repeats no more.
Increment acquisition module 605, for described edition code to be measured and described baseline version code being compared, obtains function information that is newly-increased or amendment.
Increment covers statistical module 606, and the function information of the newly-increased or amendment got for utilizing increment acquisition module 605, covers the coverage information of the function that acquisition module 604 obtains from function, and statistics obtains incremental coverage information that is newly-increased or amendment.
Above-mentioned increment acquisition module 605 and increment cover statistical module 606 and increment acquisition module 503 in embodiment three and increment to cover statistical module 504 corresponding identical, repeat no more.
Report generation module 607, for covering the incremental coverage information generating report forms of the newly-increased or amendment that statistical module 606 counts on by increment.
Form correspondence exports the incremental coverage information of adding up and obtaining, and all exports or choose some outputs.Table 1 is the form schematic diagram generated, as shown in table 1, comprises the information such as the function name that row coverage rate is 35.71%, function coverage rate is 9.30%, be covered to and the function name be not covered to.File 1 is "/abcd/cde/sadfasdf/***/file1.php ", comprise function " func1 ", corresponding " yes " representative function is covered to, file 2 is "/abcd/cde/sadfasdf/***/file1.php ", comprise multiple function " func2 " to " func10 ", " func2 " to " func3 " correspondence " yes " representative function is covered to, and " func4 " to " func10 " correspondence " no " representative function is not covered to.
Judge module 608, for judging whether the incremental coverage information that increment covering statistical module 606 counts on meets preset requirement.
Result output module 609, for exporting the judgment result displays of judge module 608.
If the judged result of judge module 608 is satisfied, then triggers result output module 609 and Output rusults is shown as access code, otherwise, trigger result output module 609 and send alarm mail to corresponding developer or tester.
Preset requirement is the every default access threshold value configured in configuration file, such as, comprise the capable coverage rate of increment, increment function coverage rate etc.The mode such as pilot lamp or chimes of doom output display can be passed through to the statistics of incremental coverage information.Such as, if the row coverage rate of increment or function coverage rate reach predetermined threshold value, just pilot lamp is become green; Otherwise, pilot lamp is become red, sends three chimes of dooms, and send the below standard mail of increment coverage rate to corresponding personnel.
The statistical method of incremental coverage information provided by the invention and device, the increment information surveying version and baseline version list survey coverage rate can be carried by programming count, can warning message be sent when coverage rate that is newly-increased and Modification growth function does not reach and specifies threshold value, greatly improve the efficiency of entry test.Simultaneously, coverlet can also be counted clearly and survey the function increasing newly and revised covered, and count the function increasing newly and revised be not covered to, be convenient to tester and obtain incremental coverage information rapidly, and can according to coverage information design test case targetedly, improve the work efficiency of tester, reduce test leakage.
In addition, the present invention can combine with continuous integrating pattern well, in version repository, can continue the programming count to priority version and differentiation, obtain statistics fast.By continuous accumulation, can collect more comprehensively, use-case surveyed by preferred list and single survey increment coverage rate, can count incremental coverage information in time fast.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.

Claims (18)

1. a statistical method for incremental coverage information, is characterized in that, comprising:
S1, obtain edition code to be measured and baseline version code;
S2, all list is run to described edition code to be measured survey use-case, obtain the coverage information of all functions in described edition code to be measured; And, described edition code to be measured and described baseline version code are compared, obtains function information that is newly-increased or amendment;
S3, utilize the function information of described newly-increased or amendment, from the coverage information of described all functions, statistics obtains incremental coverage information that is newly-increased or amendment; Wherein,
Described step S3 specifically comprises:
By the line number revised in the line number of row all in newly-increased file or amendment file, compare with the line number be covered to, obtain newly-increased or revise the line number and line number that are covered in file;
According to the function name of the described line number be covered to those line number places, obtain the function sum functions number be covered in function that is newly-increased or that revise.
2. method according to claim 1, is characterized in that, before described step S1, the method also comprises:
Generating configuration file, wherein the content of configuration file at least comprises: version number to be measured, baseline version number, the path of edition code to be measured and the path of baseline version code;
Described step S1 specifically comprises:
Utilize the path of version number to be measured and edition code to be measured in described configuration file, obtain edition code to be measured;
Utilize the path of baseline version in described configuration file number and baseline version code, obtain baseline version code.
3. method according to claim 1, is characterized in that, describedly runs all list to described edition code to be measured and surveys use-case, obtains the coverage information of all functions in described edition code to be measured, specifically comprises:
All lists are run to described edition code to be measured and surveys use-case, generate and cover statistics file;
From the covering statistics file generated, extract the coverage information of often going in each file;
According to function line number hereof, add up the line number and line number that are covered to.
4. the method according to claim 1 or 3, is characterized in that, before the coverage information obtaining all functions in described edition code to be measured, also comprises:
All functions under comprising the function of preset keyword, the file comprising preset keyword or catalogue are filtered out.
5. method according to claim 1, is characterized in that, describedly described edition code to be measured and described baseline version code is compared, and obtains function information that is newly-increased or amendment, specifically comprises:
Journal file from described edition code to be measured, obtains file that is newly-increased or that revise and filename;
Obtain the newly-increased line number of newly-increased file correspondence and line number, and the file that the file of amendment is corresponding with described baseline version code contrasts, obtain line number and the line number of amendment file modification;
Obtain the function name at the line number place of described newly-increased line number or amendment, obtain the described function information increasing newly or revise.
6. method according to claim 1 or 5, is characterized in that, described function information that is newly-increased or amendment comprises:
The filename at the code place of the function name of the function line number scope of the code line number of newly-increased or amendment, newly-increased or amendment, newly-increased or amendment and newly-increased or amendment.
7. method according to claim 1, is characterized in that, described step S3 also comprises:
Utilize the line number summation obtaining newly-increased or amendment and the line number increasing newly or revise be covered to, calculate the row coverage rate of increment;
Function sum and the function number increasing newly or revise be covered to of the newly-increased or amendment that utilization obtains, calculate the function coverage rate of increment.
8. method according to claim 1, is characterized in that, described incremental coverage information comprise following listed in one or more combine:
Newly-increased or the function coverage rate of amendment, newly-increased or the row coverage rate of amendment, capped newly-increased or Modification growth function title, not capped newly-increased or Modification growth function title.
9. method according to claim 1, is characterized in that, the method also comprises:
Judge whether add up the incremental coverage information obtained meets preset requirement;
Incremental coverage information is not met to the edition code to be measured of preset requirement, send alarm mail to corresponding developer or tester.
10. a statistic device for incremental coverage information, is characterized in that, comprising:
Version acquisition module, for obtaining edition code to be measured and baseline version code;
All standing acquisition module, surveys use-case for running all lists to described edition code to be measured, obtains the coverage information of all functions in described edition code to be measured;
Increment acquisition module, for described edition code to be measured and described baseline version code being compared, obtains function information that is newly-increased or amendment;
Increment covers statistical module, the function information of the newly-increased or amendment obtained for utilizing described increment acquisition module, and from the coverage information of all functions of described all standing acquisition module acquisition, statistics obtains incremental coverage information that is newly-increased or amendment; Wherein,
Described increment covers statistical module concrete configuration:
By the line number revised in the line number of row all in newly-increased file or amendment file, compare with the line number be covered to, obtain newly-increased or revise the line number and line number that are covered in file;
According to the function name of the described line number be covered to those line number places, obtain the function sum functions number be covered in function that is newly-increased or that revise.
11. devices according to claim 10, is characterized in that, this device also comprises:
Configuration module, for generating configuration file, wherein the content of configuration file at least comprises: version number to be measured, baseline version number, the path of edition code to be measured and the path of baseline version code;
Described version acquisition module utilizes the path of version number to be measured and edition code to be measured in described configuration file, obtains edition code to be measured;
Described version acquisition module utilizes the path of baseline version in described configuration file number and baseline version code, obtains baseline version code.
12. devices according to claim 10, is characterized in that, described all standing acquisition module, and concrete configuration is:
All lists are run to described edition code to be measured and surveys use-case, generate and cover statistics file;
From the covering statistics file generated, extract the coverage information of often going in each file;
According to function line number hereof, add up the line number and line number that are covered to.
13. devices according to claim 10 or 12, it is characterized in that, this device also comprises:
Keyword filtration module, for filtering out all functions under comprising the function of preset keyword, the file comprising preset keyword or catalogue;
Described all standing acquisition module only obtains coverage information to function remaining after filtration.
14. devices according to claim 10, is characterized in that, described increment function acquisition module, and concrete configuration is:
Journal file from described edition code to be measured, obtains file that is newly-increased or that revise and filename;
Obtain the newly-increased line number of newly-increased file correspondence and line number, and the file that the file of amendment is corresponding with described baseline version code contrasts, obtain line number and the line number of amendment file modification;
Obtain the function name at the line number place of described newly-increased line number or amendment, obtain the described function information increasing newly or revise.
15. devices according to claim 10 or 14, is characterized in that, described function information that is newly-increased or amendment comprises:
The filename at the code place of the function name of the function line number scope of the code line number of newly-increased or amendment, newly-increased or amendment, newly-increased or amendment and newly-increased or amendment.
16. devices according to claim 10, is characterized in that, described increment covers the concrete configuration of statistical module, also comprises:
Utilize the line number summation obtaining newly-increased or amendment and the line number increasing newly or revise be covered to, calculate the row coverage rate of increment;
Function sum and the function number increasing newly or revise be covered to of the newly-increased or amendment that utilization obtains, calculate the function coverage rate of increment.
17. devices according to claim 10, is characterized in that, described incremental coverage information comprise following listed in one or more combine:
Newly-increased or the function coverage rate of amendment, newly-increased or the row coverage rate of amendment, capped newly-increased or Modification growth function title, not capped newly-increased or Modification growth function title.
18. devices according to claim 10, is characterized in that, this device also comprises:
Judge module, for judging whether the incremental coverage information that described increment covering statistical module counts obtains meets preset requirement;
Result output module, for the judgment result displays of described judge module being exported, does not meet the edition code to be measured of preset requirement for incremental coverage information, result output module sends alarm mail to corresponding developer or tester.
CN201210172285.8A 2012-05-29 2012-05-29 A kind of statistical method of incremental coverage information and device Active CN102722436B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210172285.8A CN102722436B (en) 2012-05-29 2012-05-29 A kind of statistical method of incremental coverage information and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210172285.8A CN102722436B (en) 2012-05-29 2012-05-29 A kind of statistical method of incremental coverage information and device

Publications (2)

Publication Number Publication Date
CN102722436A CN102722436A (en) 2012-10-10
CN102722436B true CN102722436B (en) 2016-03-02

Family

ID=46948210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210172285.8A Active CN102722436B (en) 2012-05-29 2012-05-29 A kind of statistical method of incremental coverage information and device

Country Status (1)

Country Link
CN (1) CN102722436B (en)

Families Citing this family (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019933B (en) * 2012-11-27 2016-01-13 网宿科技股份有限公司 Test case coverage automatic identifying method and device
CN103246575B (en) * 2013-04-27 2016-01-13 青岛海信传媒网络技术有限公司 Valid software code quantity calculation method and device
CN104714882B (en) * 2013-12-17 2018-11-23 腾讯科技(深圳)有限公司 The method and device of code information processing
CN105204982A (en) * 2014-06-13 2015-12-30 腾讯科技(深圳)有限公司 Code testing method and code testing system
CN105302710B (en) * 2014-07-03 2019-06-07 腾讯科技(深圳)有限公司 The method and apparatus that a kind of determination needs the test case of regression test
CN105988926B (en) * 2015-02-13 2019-06-07 腾讯科技(深圳)有限公司 The treating method and apparatus of multi version test data
CN106326100A (en) * 2015-06-30 2017-01-11 中兴通讯股份有限公司 Software automatic testing method and device
CN105608011A (en) * 2016-03-01 2016-05-25 网易(杭州)网络有限公司 Determination method and device for code testing coverage rate statistical results
US11093374B2 (en) 2016-08-09 2021-08-17 SeaLights Technologies LTD System and method for continuous testing and delivery of software
CN107977309B (en) * 2016-10-25 2021-02-12 腾讯科技(北京)有限公司 Data processing method, device and system
CN107688531B (en) * 2017-06-20 2019-02-22 平安科技(深圳)有限公司 Geo-database integration test method, device, computer equipment and storage medium
CN107844300A (en) * 2017-11-03 2018-03-27 中国银行股份有限公司 Script processing method and system
CN108268374B (en) * 2017-11-03 2019-03-05 平安科技(深圳)有限公司 Software version test method, device, terminal device and storage medium
CN109768910B (en) * 2017-11-09 2021-06-25 腾讯科技(深圳)有限公司 Information processing method, related device, equipment and system
CN108108558B (en) * 2017-12-21 2021-10-22 郑州云海信息技术有限公司 Method and system for evaluating random verification quality based on coverage frequency statistics
CN108376113A (en) * 2018-01-10 2018-08-07 链家网(北京)科技有限公司 A kind of software carries mass metering measure and device
CN108197036B (en) * 2018-02-06 2021-05-25 百度在线网络技术(北京)有限公司 Method and apparatus for determining coverage information for incremental codes
CN110471829B (en) * 2018-05-09 2023-07-18 阿里巴巴集团控股有限公司 Method and device for checking software code test coverage rate
US11086759B2 (en) 2018-09-27 2021-08-10 SeaLights Technologies LTD System and method for probe injection for code coverage
CN109857631A (en) * 2018-11-02 2019-06-07 平安科技(深圳)有限公司 Code coverage statistical method, device, equipment and storage medium based on artificial intelligence
CN110006439B (en) * 2019-04-12 2021-01-29 北京百度网讯科技有限公司 Map track data matching method, map track data matching device, server and storage medium
CN110532174B (en) * 2019-07-24 2024-05-31 平安科技(深圳)有限公司 Method, device, computer equipment and storage medium for calculating increment code coverage rate
CN110597710B (en) * 2019-08-13 2024-04-05 平安证券股份有限公司 Test coverage rate statistical method, device, computer equipment and storage medium
US11573885B1 (en) 2019-09-26 2023-02-07 SeaLights Technologies LTD System and method for test selection according to test impact analytics
CN112699011A (en) * 2019-10-23 2021-04-23 上海哔哩哔哩科技有限公司 Method and device for counting incremental code coverage rate, electronic equipment and storage medium
CN111382085A (en) * 2020-05-09 2020-07-07 北京字节跳动网络技术有限公司 Test case generation method, device, equipment and medium
CN111897727A (en) * 2020-07-30 2020-11-06 平安科技(深圳)有限公司 Software testing method and device, computer equipment and storage medium
CN112035358B (en) * 2020-08-31 2024-04-16 中国银行股份有限公司 Method, device and equipment for determining detection information
CN112667515A (en) * 2021-01-06 2021-04-16 杭州当虹科技股份有限公司 Test method for realizing code coverage rate of logic statement
CN113138923A (en) * 2021-04-23 2021-07-20 上海中通吉网络技术有限公司 Method and device for determining test range by analyzing modification code
CN113204350A (en) * 2021-06-07 2021-08-03 中国银行股份有限公司 Code increment coverage rate statistical method and device, electronic equipment and storage medium
CN117112398B (en) * 2023-07-11 2024-04-16 贝壳找房(北京)科技有限公司 Incremental code coverage rate detection method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1873625A (en) * 2005-08-19 2006-12-06 华为技术有限公司 Method for automatic generating random excitation based on percentage of function coverage
CN101814053A (en) * 2010-03-29 2010-08-25 中国人民解放军信息工程大学 Method for discovering binary code vulnerability based on function model
CN102063374A (en) * 2011-01-07 2011-05-18 南京大学 Method for selecting regression test case for clustering with semi-supervised information
CN102103538A (en) * 2011-02-22 2011-06-22 南京航空航天大学 Method for testing palletizing robot control software based on Agent
CN102236600A (en) * 2010-05-06 2011-11-09 无锡中星微电子有限公司 Method and device for obtaining code coverage rate

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101019210B1 (en) * 2007-04-25 2011-03-04 이화여자대학교 산학협력단 Test Device of Embedded Software using the emulator and Method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1873625A (en) * 2005-08-19 2006-12-06 华为技术有限公司 Method for automatic generating random excitation based on percentage of function coverage
CN101814053A (en) * 2010-03-29 2010-08-25 中国人民解放军信息工程大学 Method for discovering binary code vulnerability based on function model
CN102236600A (en) * 2010-05-06 2011-11-09 无锡中星微电子有限公司 Method and device for obtaining code coverage rate
CN102063374A (en) * 2011-01-07 2011-05-18 南京大学 Method for selecting regression test case for clustering with semi-supervised information
CN102103538A (en) * 2011-02-22 2011-06-22 南京航空航天大学 Method for testing palletizing robot control software based on Agent

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
考虑不完美排错的Logistic测试覆盖率软件可靠性模型;***等;《计算机研究与发展》;20101231;第216-222页 *

Also Published As

Publication number Publication date
CN102722436A (en) 2012-10-10

Similar Documents

Publication Publication Date Title
CN102722436B (en) A kind of statistical method of incremental coverage information and device
CN109947746B (en) Data quality control method and system based on ETL flow
US9871815B2 (en) Method and system for automated computer vulnerability tracking
US9354867B2 (en) System and method for identifying, analyzing and integrating risks associated with source code
CN104077217B (en) The compiling dissemination method and system of code file
CN112182588B (en) Threat information-based operating system vulnerability analysis and detection method and system
CN103019933B (en) Test case coverage automatic identifying method and device
US20080201612A1 (en) Defect Resolution Methodology and Data Defects Quality/Risk Metric Model Extension
CN103793315A (en) Software development quality monitoring and improving system and method
EP3511834B1 (en) System and method for tool chain data capture through parser for empirical data analysis
CN103227734A (en) Method for detecting abnormity of OpenStack cloud platform
CN104866580A (en) Method for quickly detecting impact caused by database modification to current service
Mauczka et al. Tracing your maintenance work–a cross-project validation of an automated classification dictionary for commit messages
Islam et al. Coherent clusters in source code
CN105183658A (en) Software code testing method and device
CN107870858A (en) Version contrast test method and system
CN112686773B (en) Electric power metering all-link key business anomaly positioning model construction method based on fusion business topology
Pessoa et al. An eclipse plugin to support code smells detection
CN101673200A (en) Method and device for detecting user input model
CN115576831A (en) Test case recommendation method, device, equipment and storage medium
CN113852417B (en) Optical module fault positioning method, device, equipment and storage medium
CN112766707B (en) Cell full life cycle tracing method, application server, system and storage medium
Suri et al. Investigating the OO characteristics of software using CKJM metrics
JP2012033017A (en) Rule inspection device, rule inspection method and rule inspection program
CN110717032A (en) Method for generating and displaying multi-system method call link diagram

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant