Movatterモバイル変換


[0]ホーム

URL:


CN108829593A - Code coverage calculation and analysis methods, device, equipment and storage medium - Google Patents

Code coverage calculation and analysis methods, device, equipment and storage medium
Download PDF

Info

Publication number
CN108829593A
CN108829593ACN201810569232.7ACN201810569232ACN108829593ACN 108829593 ACN108829593 ACN 108829593ACN 201810569232 ACN201810569232 ACN 201810569232ACN 108829593 ACN108829593 ACN 108829593A
Authority
CN
China
Prior art keywords
code
coverage
file
report
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810569232.7A
Other languages
Chinese (zh)
Other versions
CN108829593B (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.)
Ping An E Wallet Electronic Commerce Co Ltd
Original Assignee
Ping An E Wallet Electronic Commerce 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 Ping An E Wallet Electronic Commerce Co LtdfiledCriticalPing An E Wallet Electronic Commerce Co Ltd
Priority to CN201810569232.7ApriorityCriticalpatent/CN108829593B/en
Publication of CN108829593ApublicationCriticalpatent/CN108829593A/en
Application grantedgrantedCritical
Publication of CN108829593BpublicationCriticalpatent/CN108829593B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention discloses a kind of code coverage calculation and analysis methods, device, equipment and storage mediums, belong to field of computer technology.This approach includes the following steps:The code commit id corresponding with the code of current version is obtained from code library by git order;The code is packaged and is compiled, is saved into the file of the corresponding commit id name of the code;It receives and is saved with the coverage rate file that the commit id of code is named into the file named with the commit id;The test coverage report of current code is generated by code coverage tool;The coverage rate report of full dose is generated by merging algorithm;The coverage rate report of increment is generated by git diff order.After support code of the present invention frequently changes, the merging of coverage rate situation between different code, so as to obtain the accurate coverage rate file of certain version.

Description

Code coverage calculation and analysis methods, device, equipment and storage medium
Technical field
The present invention relates to field of computer technology, it is related to a kind of code coverage calculation and analysis methods, device, equipment and depositsStorage media.
Background technique
Coverage rate is to measure a means of test completeness, is a measurement of test validity.By having executed generationCode expression, the evaluation and test for reliability, stability and performance.
Test coverage is the evaluation and test to test completeness.Test coverage be covering by testing requirement and test case orThe covering expression of code is executed.It establishes in the assessment to test result and the change request determined in test process (is lackedFall into) analysis on the basis of.
Currently, coverage rate tool only in the case where code does not change, could calculate coverage data.But mobile phoneSystem development can change code because of demand change or defect repair in test phase, so that a version has multiple surveysExamination packet;Moreover, it is the same also not can guarantee the test bag installed on each tester's testing mobile phone in the same time, so as to causeThe coverage data inaccuracy collected, can not obtain the correct coverage rate of this current version.
Summary of the invention
The technical problem to be solved by the present invention is in order to overcome in the prior art be directed to cell phone system code coverage numberAccording to the problem for calculating inaccuracy, a kind of code coverage calculation and analysis methods, device, equipment and storage medium are proposed, is passed throughCalculating is merged to the coverage rate file below all commit id under some version, certain version is obtained and accurately coversRate file.
The present invention is to solve above-mentioned technical problem by following technical proposals:
A kind of code coverage calculation and analysis methods, include the following steps:
S1, the code for obtaining current version from code library by git order and the corresponding commit id of the code;
S2, the code is packaged to generate corresponding test bag, while after compiling the code to generate compilingFile, then test bag is saved with the file after compiling to the file of the code corresponding commit id nameIn;
S3, the covering that the commit id with code generated after the test bag that test man uploads is tested is named is receivedRate file, and the coverage rate file is saved into the file named with the commit id;
S4, the file in the commit id file is calculated to generate and work as former generation by code coverage toolThe test coverage report of code;
S5, the test coverage report of current version code and the test of a preceding edition code are covered by merging algorithmThe report of lid rate merges, and generates the coverage rate report of full dose;
S6, show that current version code changes the generation of part compared with a preceding edition code by git diff orderCode takes out code coverage corresponding with the change code of part from full dose coverage rate report, generates incrementCoverage rate report.
Preferably, this method is further comprising the steps of:
S7, the coverage rate report of the increment and the coverage rate report of full dose are sent to and are surveyed to current version codeThe test man of examination.
Preferably, the code includes applied to the installation procedure on the end IOS and applied to the installation procedure on Android end.
Preferably, when the code is applied to installation procedure on the end IOS, the file after the compiling is gcno textPart, the coverage rate file are gcda file.
Preferably, when the code is applied to installation procedure on Android end, the file after the compiling includes classFile and source file, the coverage rate file are ec file.
Preferably, the generating process of the coverage rate report of the full dose is as follows:
S51, show that current version code changes the generation of part compared with a preceding edition code by git diff orderCode, to calculate the offset of code;
S52, the offset according to code close the code coverage in the test coverage report of a preceding edition codeAnd into the report of the test coverage of current version code.
Preferably, the coverage rate file is installed after test bag is tested on mobile phone terminal by test man and is given birth to automaticallyAt.
A kind of electronic device is stored with code coverage on the electronic device and calculates analysis system, the code coverageRate calculates analysis system:
Code obtaining module, the code for obtaining current version from code library by git order are corresponding with the codeCommit id;
Be packaged collector, the code is packaged to generate corresponding test bag, at the same compile the code withThen file after generating compiling saves the file after test bag and compiling to the code corresponding commit id nameFile in;
Coverage rate file reception module, the test bag for receiving test man's upload generate after testing with codeThe coverage rate file of commit id name, and the coverage rate file is saved to the file named with the commit idIn;
Current report generation module, for by code coverage tool to the file in the commit id file intoRow is calculated to generate the report of the test coverage of current code;
Full dose report generation module, for by merge algorithm by the report of the test coverage of current version code with it is previousThe test coverage report of secondary edition code merges, and generates the coverage rate report of full dose;
Increment report generation module, for obtaining current version code and a preceding edition code by git diff orderCompared to the code of change part, code corresponding with the change code of part is taken out from full dose coverage rate reportCoverage rate generates the coverage rate report of increment.
A kind of computer equipment, including memory and processor are stored with and can be held by the processor on the memoryCapable code coverage calculates analysis system, realizes as described in any one of aforementioned when the system is executed by the processorThe step of code coverage calculation and analysis methods.
A kind of computer readable storage medium is stored with code coverage in the computer readable storage medium and calculates pointAnalysis system, the code coverage calculates analysis system can be performed by least one processor, so that described at least oneManage the step of device executes the code coverage calculation and analysis methods as described in any one of aforementioned.
The positive effect of the present invention is that:In the case where operational trials unaware, coverage rate situation is collected;It supportsAfter code frequently changes, the merging of coverage rate situation between different code, so as to obtain the accurate coverage rate text of certain versionPart;The unlapped test point of test phase is automatically analyzed according to current coverage rate report, tester is notified automatically, guarantees to surveyThe coverage rate of examination.
Detailed description of the invention
Fig. 1 shows the flow chart of code coverage calculation and analysis methods embodiment one of the present invention;
Fig. 2 shows the flow charts of code coverage calculation and analysis methods embodiment two of the present invention;
Fig. 3 shows the program module that code coverage calculates analysis system first embodiment in electronic device of the present invention and showsIt is intended to;
Fig. 4 shows the hardware structure schematic diagram of one embodiment of computer equipment of the present invention.
Specific embodiment
The present invention is further illustrated below by the mode of embodiment, but does not therefore limit the present invention to the realityIt applies among a range.
Firstly, the present invention proposes a kind of code coverage calculation and analysis methods.
In example 1, as shown in Figure 1, for the installation procedure being applied on the end IOS, the code coverage meterAnalysis method is calculated to include the following steps:
S1, the code for obtaining current version from code library by git order and the corresponding commit id of the code.
After usual programmer has write a program, which can all be uploaded to a specific code library (such as sandBox) in, it include corresponding commit id in the program of upload.
Id in the commit id refers to that cryptographic Hash, the cryptographic Hash are passed through according to the data of the content of fileThe numerical value that logical operation obtains, the cryptographic Hash that different file (even identical filename) obtains also are different, soCryptographic Hash can be used as the identity card for identifying each file.
When needing to test code, newest code (i.e. current version is just pulled by git order from code libraryThis code) because the installation procedure of same version can all may give birth to by repeatedly modification, each modification in the process of developmentAt a new code, current version described here does not refer to the version number of code, but refers to the cryptographic Hash of code, in the applicationWhat alleged current version and previous version were distinguished by cryptographic Hash.
Specifically, Jenkins tool can be used by code being obtained from code library.The Jenkins be one open source,Continuous integrating (CI) tool at friendliness interface is provided, originates from Hudson (Hudson is commercial), is mainly used for holdingContinuous, automatic building/test software project, the operation for monitoring external tasks.The concrete operations of Jenkins tool refer to its explanationBook.
S2, the code is packaged to generate corresponding test bag, while after compiling the code to generate compilingGcno file, then test bag is saved with the gcno file after compiling to the code corresponding commit id nameIn file.
For the installation procedure being applied on the end IOS, being packaged for test bag can be used by the way of Apple recommendationThe archive function of xcode (xcode is the Integrated Development Tool operated on operating system Mac OS X) is packaged (suitableFor personal development), by the way of secondly being dragged in using iTunes (iTunes be professional apple equipment management tool),The compiling that a full-automatic compilation script realizes code can also be write.
Wherein first two has used existing tool xcode and iTunes, and specific packing process is shown in its specification.Below forLower explanation is done by writing full-automatic compilation script progress code compilation:
The first step:New folder is named as " distribute ", distribute.sh script file is created, with reference to such asLower content (wherein the appName is the title of code, such as some title for the app on IOS):
rm-rf appName
mkdir appName
mkdir appName/Payload
cp-r appName.app appName/Payload/appName.app
cp Icon.png appName/iTunesArtwork
cd appName
zip-r appName.ipa Payload iTunesArtworkexit 0
Above-mentioned code completes following steps:
Delete file appName;
Create a file appName;
A sub-folder payload is created at file appName;
File appName.app is copied in the sub-folder payload under file appName;
Icon Icon.png is copied in the sub-folder iTunesArtwork under file appName;
It is switched to file appName;
Two sub-folders payload and iTunesArtwork under file appName are compressed into a file,And the suffix of compressed file is changed to .ipa;
Normally exit.
Second step:The .app file that will be converted is put under distribute/ file, with reference to as follows:
distribute/distribute.sh
distribute/appName.app
Third step:Run distribute.sh script.Terminal is opened, under cd to distribute file,Distribute.sh drawing is executed into terminal.If prompting permission denied, " chmod is usedAfter 777distribute.sh " order assigns permission, then execute a distribute.sh.
4th step:After running several seconds, appName/ file can be generated under distribute/ file, the insideAppName.ipa is exactly the test bag that we want.
Gcno file after the compiling is by obtaining after carrying out pitching pile to original code, this process is known as program and insertsStake, described program pitching pile are the methods by by the insertion operation into tested program, to realize test purpose, i.e., in guarantee quiltSome probes (also known as " survey meter ") is inserted on the basis of the original logic integrality of ranging sequence in a program.These probes essenceOn be exactly the code segment for carrying out information collection, can be assignment statement or acquire coverage information function call.Pass through probeExecute the operation characteristic data of simultaneously output program.Based on the analysis to these characteristics, internal act and the spy of program are disclosedSign.
S3, the covering that the commit id with code generated after the test bag that test man uploads is tested is named is receivedRate gcda file, and the coverage rate gcda file is saved into the file named with the commit id.
The gcda file refers to that suffix is the file of gcda, is obtained by gcov command tools, the gcov order isThe tool of the code coverage of a test program.After the code is tested by the tool, a suffix is finally obtainedFor the coverage rate file of gcda, and the title of this document is named with the commit id of tested code.
After coverage rate gcda file generated, test man also needs to be uploaded in aforementioned specific code library, and savesInto with the file of commit id name.
The coverage rate gcda file is below for generating the basis of coverage rate report.
S4, the file in the commit id file is calculated to generate and work as former generation by code coverage toolThe test coverage report of code;
The code coverage tool still can use gcov command tools, will by executing order gcov * .cppThe coverage rate of test is printed on the screen, and generates file " * cpp.gcov " simultaneously, which then can see with vi openingRow is capped, that is, sees which code tester arrives, which, which is not tested, arrives.
S5, the test coverage report of current version code and the test of a preceding edition code are covered by merging algorithmThe report of lid rate merges, and generates the coverage rate report of full dose.
The step S5 specifically may include following steps:
S51, show that current version code changes the generation of part compared with a preceding edition code by git diff orderCode, to calculate the offset of code;
S52, the offset according to code close the code coverage in the test coverage report of a preceding edition codeAnd into the report of the test coverage of current version code.
Using above-mentioned merging method, can be by the way that test coverage report be gradually merged two-by-two after, ultimately generateThe coverage rate of full dose is reported.
S6, show that current version code changes the generation of part compared with a preceding edition code by git diff orderCode takes out code coverage corresponding with the change code of part from full dose coverage rate report, generates incrementCoverage rate report.
The report of test coverage described in the present embodiment is exactly that the coverage rate file being previously obtained is presented with report formOut.Including but not limited to the following contents:Coverage rate, method coverage rate, sentence covering rate, statement block coverage rate and the branch of classCoverage rate.
In the present embodiment, the test man obtains test bag and can be obtained by way of barcode scanning, as long as completing to testAfter the packing of packet, increasing the step of automatically generating two dimensional code or bar code etc be can be realized.
In example 2, as shown in Fig. 2, for the installation procedure being applied on the end IOS, the code coverage meterAnalysis method is calculated to include the following steps:
S1, the code commit id corresponding with the code for obtaining current version from code library by git order.
Step S1 is as in the first embodiment, details are not described herein again.
S2, the code is packaged to generate corresponding test bag, while after compiling the code to generate compilingClass file and source file, then by test bag and compiling after class file and source file save to thisIn the file of the corresponding commit id name of code.
The test bag of code applied to Android system refers specifically to be inserted into the peace after the code for generating coverage dataProgram is filled, after test man installs program operation, automatically generating corresponding code tester rate ec file, (suffix is the text of .ecPart).
The packing of test bag usually completed by writing the included strapping tool of the tool of code, such as Eclipse includedStrapping tool Ant, also some, which are write in the tool of code, has specific be packaged to order, and input is specific to be packaged order, and meeting is certainlyIt is dynamic to generate test bag.
The complete entitled Java class file of the class file, the source file write with java language (code) warpCrossing compiling will become corresponding * .class file.Compiling described here is general all to carry out reality by the compilation facility that developing instrument carriesMyEclipse that is existing, such as developing for Java, Java EE and mobile application saves file by the code that it is developedAfter can be compiled into class file automatically.
Different from the code of IOS system is applied to, the code applied to Android system can also generate one after compilingSource file, this file is for saving source code.
S3, the covering that the commit id with code generated after the test bag that test man uploads is tested is named is receivedRate ec file, and the coverage rate ec file is saved into the file named with the commit id;
The ec file refers to that suffix is the file of ec, and this document can be automatically generated by the operation of test bag, this documentTitle is still with the commit id name of tested code.
The coverage rate ec file is below for generating the basis of coverage rate report.
S4, the file in the commit id file is calculated to generate and work as former generation by code coverage toolThe test coverage report of code;
The code coverage tool can use Jacoco (abbreviation of Java Code Coverage) tool, the toolApplication method referring to its specification.
S5, the test coverage report of current version code and the test of a preceding edition code are covered by merging algorithmThe report of lid rate merges, and generates the coverage rate report of full dose.
The step S5 specifically may include following steps:
S51, show that current version code changes the generation of part compared with a preceding edition code by git diff orderCode, to calculate the offset of code;
S52, the offset according to code close the code coverage in the test coverage report of a preceding edition codeAnd into the report of the test coverage of current version code.
Using above-mentioned merging method, can be by the way that test coverage report be gradually merged two-by-two after, ultimately generateThe coverage rate of full dose is reported.
S6, show that current version code changes the generation of part compared with a preceding edition code by git diff orderCode takes out code coverage corresponding with the change code of part from full dose coverage rate report, generates incrementCoverage rate report.
The report of test coverage described in the present embodiment is exactly that the coverage rate file being previously obtained is presented with report formOut.Including but not limited to the following contents:Coverage rate, method coverage rate, sentence covering rate, statement block coverage rate and the branch of classCoverage rate.
The difference of the present embodiment two and embodiment one is only in S2-S4, remaining step is the same as embodiment one.
In the third embodiment, based on the basis of embodiment one or two, the code coverage calculation and analysis methods are alsoInclude the following steps:
S7, the coverage rate report of the increment and the coverage rate report of full dose are sent to and are surveyed to current version codeThe test man of examination.
Here it can specifically send report in the mailbox of test man, so that it reads in detail.
If it is desired, this report can also be automatically transmitted to all relevant personnel, as long as presetting relevant people in systemsThe mailbox of member.
It is sent and is reported by mailbox, test man can be allowed to learn test result in time, removed its active from and initiate to obtain reportOperation.
Secondly, being stored with code coverage on the electronic device the invention proposes a kind of electronic device and calculating analysisSystem 20, the system 20 can be divided into one or more program module.
For example, Fig. 3 shows the program module schematic diagram that the code coverage calculates 20 first embodiment of analysis system,In the embodiment, the system 20 can be divided into Code obtaining module 201, packing collector 202, coverage rate file and connectReceive module 203, current report generation module 204, full dose report generation module 205 and increment report generation module 206.Wherein,The so-called program module of the present invention is the series of computation machine program instruction for referring to complete specific function.Being described below will be specificIntroduce the concrete function of the program module 201-206.
The Code obtaining module 201 is used to obtain code and generation of current version from code library by git orderThe corresponding commit id of code.
Id in the commit id refers to that cryptographic Hash, the cryptographic Hash are passed through according to the data of the content of fileThe numerical value that logical operation obtains, the cryptographic Hash that different file (even identical filename) obtains also are different, soCryptographic Hash can be used as the identity card for identifying each file.
When needing to test code, it is (i.e. current that newest code is just pulled by git order from code libraryThe code of version) because the installation procedure of same version can may be modified every time and all can by repeatedly modification in the process of developmentA new code is generated, current version described here does not refer to the version number of code, but refers to the cryptographic Hash of code, the applicationIn alleged current version and previous version distinguished by cryptographic Hash.
Specifically, Jenkins tool can be used by code being obtained from code library.The Jenkins be one open source,Continuous integrating (CI) tool at friendliness interface is provided, originates from Hudson (Hudson is commercial), is mainly used for holdingContinuous, automatic building/test software project, the operation for monitoring external tasks.The concrete operations of Jenkins tool refer to its explanationBook.
The packing collector 202 is packaged the code to generate corresponding test bag, while described in compilingCode is to generate the file after compiling, and then the file by test bag and after compiling is saved to the corresponding commit of the codeIn the file of id name.
For the installation procedure for being applied to the end IOS, what is generated after code compilation is gcno file.
Being packaged for test bag can be by the way of Apple recommendation, i.e., with xcode, (xcode is to operate in operating systemIntegrated Development Tool on Mac OS X) archive function be packaged (be suitable for personal development), secondly can useThe mode that iTunes (the apple equipment management tool that iTunes is profession) is dragged in can also write a full-automatic compiling footThe compiling of this realization code (with reference to described in embodiment of the method one).
Gcno file after the compiling is by obtaining after carrying out pitching pile to original code, this process is known as program and insertsStake, described program pitching pile are the methods by by the insertion operation into tested program, to realize test purpose, i.e., in guarantee quiltSome probes (also known as " survey meter ") is inserted on the basis of the original logic integrality of ranging sequence in a program.These probes essenceOn be exactly the code segment for carrying out information collection, can be assignment statement or acquire coverage information function call.Pass through probeExecute the operation characteristic data of simultaneously output program.Based on the analysis to these characteristics, internal act and the spy of program are disclosedSign.
For the installation procedure for being applied to Android system, the class file and source file that are generated after code compilation.
The test bag of code refers specifically to be inserted into the installation procedure after the code for generating coverage data, test man's installationAfter program operation, corresponding code tester rate ec file (file that suffix is .ec) can be automatically generated.
The packing of test bag usually completed by writing the included strapping tool of the tool of code, such as Eclipse includedStrapping tool Ant, also some, which are write in the tool of code, has specific be packaged to order, and input is specific to be packaged order, and meeting is certainlyIt is dynamic to generate test bag.
The complete entitled Java class file of the class file, the source file write with java language (code) warpCrossing compiling will become corresponding * .class file.Compiling described here is general all to carry out reality by the compilation facility that developing instrument carriesMyEclipse that is existing, such as developing for Java, Java EE and mobile application saves file by the code that it is developedAfter can be compiled into class file automatically.
Different from the code of IOS system is applied to, the code applied to Android system can also generate one after compilingSource file, this file is for saving source code.
The coverage rate file reception module 203 be used for receive test man upload test bag test after generate withThe coverage rate file of the commit id name of code, and the coverage rate file is saved to being named with the commit idIn file.
For the installation procedure for being applied to the end IOS, the coverage rate file of generation is gcda file, passes through gcov order workWhat tool obtained, the gcov order is the tool of the code coverage of a test program.The code is carried out by the toolIt is final to obtain the coverage rate file that a suffix is gcda after test, and the title of this document is with tested codeCommit id name.
For the installation procedure for being applied to Android system, the coverage rate file of generation is ec file, and this document passes through testThe operation of packet can automatically generate, and the title of this document is still with the commit id name of tested code.
The coverage rate file is below for generating the basis of coverage rate report.
The current report generation module 204 is used for through code coverage tool in the commit id fileFile is calculated to generate the report of the test coverage of current code.
The generating process of report is as follows:Firstly, obtaining current version code and a preceding version by git diff orderCode is compared to the code for changing part, to calculate the offset of code;Then according to the offset of code, by preceding primary versionCode coverage in the test coverage report of this code is merged into the test coverage report of current version code.
After gradually being merged test coverage report two-by-two, the coverage rate report of full dose is ultimately generated.
The full dose report generation module 205 is used to report the test coverage of current version code by merging algorithmTest coverage report with a preceding edition code merges, and generates the coverage rate report of full dose;
Increment report generation module, for obtaining current version code and a preceding edition code by git diff orderCompared to the code of change part, code corresponding with the change code of part is taken out from full dose coverage rate reportCoverage rate generates the coverage rate report of increment.
The report of test coverage described in the present embodiment is exactly that the coverage rate file being previously obtained is presented with report formOut.Including but not limited to the following contents:Coverage rate, method coverage rate, sentence covering rate, statement block coverage rate and the branch of classCoverage rate.
Again, the present invention also puts forward a kind of computer equipment.
As shown in fig.4, being the hardware structure schematic diagram of one embodiment of computer equipment of the present invention.In the present embodiment, instituteStating computer equipment 2 is that one kind can be automatic to carry out at numerical value calculating and/or information according to the instruction for being previously set or storingThe equipment of reason.For example, it may be smart phone, tablet computer, laptop, desktop computer, rack-mount server, bladeFormula server, (including the service composed by independent server or multiple servers of tower server or Cabinet-type serverDevice cluster) etc..As shown, the computer equipment 2 includes at least, but it is not limited to, company can be in communication with each other by system busIt connects memory 21, processor 22, network interface 23 and code coverage and calculates analysis system 20.Wherein:
The memory 21 includes at least a type of computer readable storage medium, and the readable storage medium storing program for executing includesFlash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), it is static withMachine accesses memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmableRead memory (PROM), magnetic storage, disk, CD etc..In some embodiments, the memory 21 can be describedThe internal storage unit of computer equipment 2, such as the hard disk or memory of the computer equipment 2.In further embodiments, describedMemory 21 is also possible to the plug-in type being equipped on the External memory equipment of the computer equipment 2, such as the computer equipment 2Hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card(Flash Card) etc..Certainly, the memory 21 can also both include the internal storage unit of the computer equipment 2 or wrapInclude its External memory equipment.In the present embodiment, the memory 21 is installed on the behaviour of the computer equipment 2 commonly used in storageMake system and types of applications software, such as the code coverage calculates the program code etc. of analysis system 20.In addition, described depositReservoir 21 can be also used for temporarily storing the Various types of data that has exported or will export.
The processor 22 can be in some embodiments central processing unit (Central Processing Unit,CPU), controller, microcontroller, microprocessor or other data processing chips.The processor 22 is commonly used in the control meterCalculate machine equipment 2 overall operation, such as execute with the computer equipment 2 carry out data interaction or communication it is relevant control andProcessing etc..In the present embodiment, the processor 22 is for running the program code stored in the memory 21 or processing numberAccording to, such as run the code coverage and calculate analysis system 20 etc..
The network interface 23 may include radio network interface or wired network interface, which is commonly used inCommunication connection is established between the computer equipment 2 and other computer equipments.For example, the network interface 23 is for passing throughThe computer equipment 2 is connected by network with exterior terminal, establishes data between the computer equipment 2 and exterior terminalTransmission channel and communication connection etc..The network can be intranet (Intranet), internet (Internet), the whole worldMobile communcations system (Global System of Mobile communication, GSM), wideband code division multiple access(Wideband Code Division Multiple Access, WCDMA), 4G network, 5G network, bluetooth (Bluetooth),The wirelessly or non-wirelessly network such as Wi-Fi.
It should be pointed out that Fig. 4 illustrates only the computer equipment 2 with component 21-23, it should be understood that simultaneouslyAll components shown realistic are not applied, the implementation that can be substituted is more or less component.
In the present embodiment, the code coverage being stored in memory 21 calculates analysis system 20 can be by oneA or multiple processors (the present embodiment is processor 22) are performed, to complete the behaviour of above-mentioned code coverage calculation and analysis methodsMake.
In addition, a kind of computer readable storage medium of the present invention, code is stored in the computer readable storage medium and is coveredLid rate calculates analysis system 20 and realizes when code coverage calculating analysis system 20 can be executed by one or more processorsThe operation of above-mentioned code coverage calculation and analysis methods or electronic device.
Although specific embodiments of the present invention have been described above, it will be appreciated by those of skill in the art that this is onlyFor example, protection scope of the present invention is to be defined by the appended claims.Those skilled in the art without departing substantially fromUnder the premise of the principle and substance of the present invention, many changes and modifications may be made, but these change andModification each falls within protection scope of the present invention.

Claims (10)

CN201810569232.7A2018-06-052018-06-05Code coverage rate calculation and analysis method, device, equipment and storage mediumActiveCN108829593B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201810569232.7ACN108829593B (en)2018-06-052018-06-05Code coverage rate calculation and analysis method, device, equipment and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201810569232.7ACN108829593B (en)2018-06-052018-06-05Code coverage rate calculation and analysis method, device, equipment and storage medium

Publications (2)

Publication NumberPublication Date
CN108829593Atrue CN108829593A (en)2018-11-16
CN108829593B CN108829593B (en)2023-12-05

Family

ID=64143800

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201810569232.7AActiveCN108829593B (en)2018-06-052018-06-05Code coverage rate calculation and analysis method, device, equipment and storage medium

Country Status (1)

CountryLink
CN (1)CN108829593B (en)

Cited By (24)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109766261A (en)*2018-12-142019-05-17中国平安财产保险股份有限公司Coverage test method, device, computer equipment and storage medium
CN110188048A (en)*2019-06-052019-08-30北京科摩仕捷科技有限公司A method of realizing accurate monitor code coverage rate
CN110245073A (en)*2019-05-212019-09-17北京字节跳动网络技术有限公司Client code coverage rate monitoring method, system, medium and electronic equipment
CN110413532A (en)*2019-08-082019-11-05上海新炬网络技术有限公司More process version change code coverage acquisition methods suitable for agility test
CN110597710A (en)*2019-08-132019-12-20平安证券股份有限公司Test coverage rate statistical method and device, computer equipment and storage medium
CN110618935A (en)*2019-08-272019-12-27绿漫科技有限公司Code change coverage rate statistics realization method for manual test
CN110928776A (en)*2019-11-152020-03-27武汉极意网络科技有限公司Detection method, device and equipment for realizing incremental code coverage rate based on lcov
CN111008143A (en)*2019-12-172020-04-14上海品顺信息科技有限公司Coverage rate scheduling test method, terminal device and computer readable storage medium
CN111078563A (en)*2019-12-182020-04-28上海品顺信息科技有限公司Coverage rate data processing method, terminal device and computer readable storage medium
CN111090583A (en)*2019-11-252020-05-01广州品唯软件有限公司Method and device for generating code coverage rate report and computer equipment
CN111290943A (en)*2020-01-132020-06-16北京三快在线科技有限公司Code coverage rate processing method, device, server and storage medium
CN111427771A (en)*2020-02-292020-07-17平安科技(深圳)有限公司 A code coverage analysis method, device, server and readable storage medium
CN111930619A (en)*2020-08-062020-11-13杭州有赞科技有限公司Real-time coverage rate statistical method, computer equipment and readable storage medium
CN112463620A (en)*2020-12-032021-03-09广州品唯软件有限公司Coverage rate testing method and device in android software integration test
CN112597041A (en)*2020-12-282021-04-02上海品顺信息科技有限公司Cross-branch merging method, system, equipment and storage medium for code coverage rate
CN112612716A (en)*2020-12-282021-04-06上海品顺信息科技有限公司Method, system, equipment and storage medium for enhancing marking of coverage rate of difference line codes
CN113051181A (en)*2021-04-302021-06-29腾讯科技(深圳)有限公司Method, device, equipment and storage medium for determining incremental test coverage information
CN113806227A (en)*2021-09-262021-12-17五八同城信息技术有限公司Information processing method and device, electronic equipment and storage medium
CN113806231A (en)*2021-09-292021-12-17锐捷网络股份有限公司Code coverage rate analysis method, device, equipment and medium
CN113934627A (en)*2021-09-262022-01-14五八同城信息技术有限公司Code execution coverage rate statistical method and device, electronic equipment and readable medium
CN114003513A (en)*2021-12-302022-02-01云账户技术(天津)有限公司Code coverage rate processing method and device, electronic equipment and readable storage medium
CN114090013A (en)*2021-11-242022-02-25中国银行股份有限公司Method and device for determining change set of executable code file
CN114647570A (en)*2020-12-212022-06-21顺丰科技有限公司Code increment coverage rate statistical method, device, computer equipment and storage medium
CN115129602A (en)*2022-07-072022-09-30上海农村商业银行股份有限公司Full-automatic test coverage rate control method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20030093716A1 (en)*2001-11-132003-05-15International Business Machines CorporationMethod and apparatus for collecting persistent coverage data across software versions
CN105988926A (en)*2015-02-132016-10-05腾讯科技(深圳)有限公司Method and device for processing multi-version test data
CN106126430A (en)*2016-08-192016-11-16浪潮(北京)电子信息产业有限公司The method of testing of a kind of code coverage and device
CN106681912A (en)*2016-12-082017-05-17武汉斗鱼网络科技有限公司Method and device for automatic testing of code coverage rate, applied to Android system
CN107729239A (en)*2017-10-102018-02-23郑州云海信息技术有限公司A kind of code coverage statistical method, system, device and computer-readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20030093716A1 (en)*2001-11-132003-05-15International Business Machines CorporationMethod and apparatus for collecting persistent coverage data across software versions
CN105988926A (en)*2015-02-132016-10-05腾讯科技(深圳)有限公司Method and device for processing multi-version test data
CN106126430A (en)*2016-08-192016-11-16浪潮(北京)电子信息产业有限公司The method of testing of a kind of code coverage and device
CN106681912A (en)*2016-12-082017-05-17武汉斗鱼网络科技有限公司Method and device for automatic testing of code coverage rate, applied to Android system
CN107729239A (en)*2017-10-102018-02-23郑州云海信息技术有限公司A kind of code coverage statistical method, system, device and computer-readable storage medium

Cited By (35)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109766261B (en)*2018-12-142024-05-24中国平安财产保险股份有限公司Coverage test method, coverage test device, computer equipment and storage medium
CN109766261A (en)*2018-12-142019-05-17中国平安财产保险股份有限公司Coverage test method, device, computer equipment and storage medium
CN110245073A (en)*2019-05-212019-09-17北京字节跳动网络技术有限公司Client code coverage rate monitoring method, system, medium and electronic equipment
CN110188048A (en)*2019-06-052019-08-30北京科摩仕捷科技有限公司A method of realizing accurate monitor code coverage rate
CN110413532A (en)*2019-08-082019-11-05上海新炬网络技术有限公司More process version change code coverage acquisition methods suitable for agility test
CN110597710A (en)*2019-08-132019-12-20平安证券股份有限公司Test coverage rate statistical method and device, computer equipment and storage medium
CN110597710B (en)*2019-08-132024-04-05平安证券股份有限公司Test coverage rate statistical method, device, computer equipment and storage medium
CN110618935A (en)*2019-08-272019-12-27绿漫科技有限公司Code change coverage rate statistics realization method for manual test
CN110928776A (en)*2019-11-152020-03-27武汉极意网络科技有限公司Detection method, device and equipment for realizing incremental code coverage rate based on lcov
CN111090583A (en)*2019-11-252020-05-01广州品唯软件有限公司Method and device for generating code coverage rate report and computer equipment
CN111090583B (en)*2019-11-252023-04-07广州品唯软件有限公司Method and device for generating code coverage rate report and computer equipment
CN111008143A (en)*2019-12-172020-04-14上海品顺信息科技有限公司Coverage rate scheduling test method, terminal device and computer readable storage medium
CN111008143B (en)*2019-12-172023-06-13上海品顺信息科技有限公司Coverage rate scheduling test method, terminal equipment and computer readable storage medium
CN111078563A (en)*2019-12-182020-04-28上海品顺信息科技有限公司Coverage rate data processing method, terminal device and computer readable storage medium
CN111290943A (en)*2020-01-132020-06-16北京三快在线科技有限公司Code coverage rate processing method, device, server and storage medium
CN111427771A (en)*2020-02-292020-07-17平安科技(深圳)有限公司 A code coverage analysis method, device, server and readable storage medium
CN111930619B (en)*2020-08-062024-04-16杭州有赞科技有限公司Real-time coverage rate statistical method, computer equipment and readable storage medium
CN111930619A (en)*2020-08-062020-11-13杭州有赞科技有限公司Real-time coverage rate statistical method, computer equipment and readable storage medium
CN112463620B (en)*2020-12-032024-09-17广州品唯软件有限公司Coverage rate test method and device in android software integration test
CN112463620A (en)*2020-12-032021-03-09广州品唯软件有限公司Coverage rate testing method and device in android software integration test
CN114647570A (en)*2020-12-212022-06-21顺丰科技有限公司Code increment coverage rate statistical method, device, computer equipment and storage medium
CN112597041B (en)*2020-12-282023-01-20上海品顺信息科技有限公司Cross-branch merging method, system, equipment and storage medium for code coverage rate
CN112612716B (en)*2020-12-282023-01-20上海品顺信息科技有限公司Method, system, equipment and storage medium for enhancing marking of coverage rate of difference line codes
CN112597041A (en)*2020-12-282021-04-02上海品顺信息科技有限公司Cross-branch merging method, system, equipment and storage medium for code coverage rate
CN112612716A (en)*2020-12-282021-04-06上海品顺信息科技有限公司Method, system, equipment and storage medium for enhancing marking of coverage rate of difference line codes
CN113051181A (en)*2021-04-302021-06-29腾讯科技(深圳)有限公司Method, device, equipment and storage medium for determining incremental test coverage information
CN113051181B (en)*2021-04-302025-06-27腾讯科技(深圳)有限公司 Method, device, equipment and storage medium for determining incremental test coverage information
CN113934627A (en)*2021-09-262022-01-14五八同城信息技术有限公司Code execution coverage rate statistical method and device, electronic equipment and readable medium
CN113806227B (en)*2021-09-262023-12-12五八同城信息技术有限公司Information processing method, device, electronic equipment and storage medium
CN113806227A (en)*2021-09-262021-12-17五八同城信息技术有限公司Information processing method and device, electronic equipment and storage medium
CN113806231A (en)*2021-09-292021-12-17锐捷网络股份有限公司Code coverage rate analysis method, device, equipment and medium
CN113806231B (en)*2021-09-292024-03-19锐捷网络股份有限公司Code coverage rate analysis method, device, equipment and medium
CN114090013A (en)*2021-11-242022-02-25中国银行股份有限公司Method and device for determining change set of executable code file
CN114003513A (en)*2021-12-302022-02-01云账户技术(天津)有限公司Code coverage rate processing method and device, electronic equipment and readable storage medium
CN115129602A (en)*2022-07-072022-09-30上海农村商业银行股份有限公司Full-automatic test coverage rate control method and system

Also Published As

Publication numberPublication date
CN108829593B (en)2023-12-05

Similar Documents

PublicationPublication DateTitle
CN108829593A (en)Code coverage calculation and analysis methods, device, equipment and storage medium
US11704115B2 (en)Software pipeline configuration
US9342273B1 (en)Automatic communications graphing for a source application
US9367305B1 (en)Automatic container definition
CN107896244B (en)Version file distribution method, client and server
CN108229112A (en)A kind of operation method and device for protecting application program, application program
US10606586B2 (en)Application architecture generation
CN106294113B (en)creation method and device based on programmable test service
CN106201861A (en)The detection method of a kind of code quality and device
CN107704238A (en)A kind of method and device packed to project
CN112965731A (en)Method, device, equipment and storage medium for Flutter hot update based on Tinker
CN109902005A (en) A method and system for automated testing
CN106873960A (en)The update method and equipment of a kind of application software
CN106095415A (en)Exploitation file packing method, Apparatus and system
CN114398293A (en)Interface test case generation method, electronic device and storage medium
CN103186463B (en)Determine the method and system of the test specification of software
CN115658496A (en)Extensible Web automatic test method, system, equipment and storage medium
CN107273298B (en) A kind of testing method, device and system for packing tool
CN104036193B (en)Local cross-domain vulnerability detection method and device for application program
CN111240987A (en)Migration program detection method and device, electronic equipment and computer readable storage medium
CN109815682A (en)A kind of pair of permission is tracked the method, apparatus and computer readable medium of management
CN114138646B (en) CAD resource verification method and device, storage medium and processor
CN109656825A (en)The method and device of fine arts resource processing, electronic equipment, storage medium
CN112579530B (en)Data resource organization method and device of automatic test system
CN112819621B (en)Intelligent contract resource loss testing method and system

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp