CN108959059A - A kind of test method and test platform - Google Patents
A kind of test method and test platform Download PDFInfo
- Publication number
- CN108959059A CN108959059A CN201710355686.XA CN201710355686A CN108959059A CN 108959059 A CN108959059 A CN 108959059A CN 201710355686 A CN201710355686 A CN 201710355686A CN 108959059 A CN108959059 A CN 108959059A
- Authority
- CN
- China
- Prior art keywords
- coverage rate
- code
- file
- rate file
- coverage
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3676—Test management for coverage analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
This application provides a kind of test methods, comprising: receives the first coverage rate file that test terminal is sent;Wherein, the first coverage rate file includes the line number of tested application name, version number and the code for being performed covering;According to received first coverage rate file version number and itself storage coverage rate file version number by received first coverage rate file and itself storage the second coverage rate file carry out Data Integration, update the second coverage rate file;And it is reported according to updated second coverage rate file generated coverage rate.Present invention also provides the test platforms for executing the above method.
Description
Technical field
This application involves information technology field more particularly to a kind of test method and test applied to code tester are flat
Platform.
Background technique
Currently, with the rapid development of mobile Internet, the publication rhythm of more and more mobile Internet products is continuous
It becomes faster and requirement to quality is also higher and higher, then how the publication quality of quantitative evaluation product becomes particularly important;And
As code pitching pile becomes increasingly easy, code coverage is incorporated as important assessment hand by more and more test team
One of section.
Summary of the invention
The example of the application proposes a kind of test method.The test method includes: first for receiving test terminal and sending
Coverage rate file;Wherein, the first coverage rate file includes tested application name, version number and is performed covering
Code line number;According to the version number of received first coverage rate file and the second coverage rate file of itself storage
Second coverage rate file of received first coverage rate file and itself storage is carried out Data Integration by version number, is updated second and is covered
Lid rate file;And it is reported according to updated second coverage rate file generated coverage rate.
The example of the application also proposed a kind of test platform.The test platform includes:
Coverage rate file collection server, the coverage rate file sent for receiving test terminal;Wherein, the coverage rate
File includes tested application name, version number and the line number for being performed covering code;And
Coverage rate report generation server, for according to received first coverage rate file version number and itself deposit
Storage the second coverage rate file version number by received first coverage rate file and itself storage the second coverage rate file into
Row Data Integration updates the second coverage rate file;And it is reported according to updated second coverage rate file generated coverage rate.
The example of the application also proposed a kind of computer readable storage medium, be stored thereon with computer instruction, wherein
The step of above method is realized when the computer instruction is executed by processor.
By above-mentioned testing scheme and test platform, tester can download test bag at any time, be tested at any time, and
The coverage rate file obtained self by test can be fed back into test platform at any time and carry out coverage data integration, and simultaneously
The version for not limiting the test bag that multiple testers are tested must be identical.Such testing process is more bonded at this stage
Application program quickly and the demand of test, and allows more people to be surveyed parallel to the different piece of same application simultaneously
Quickly test is realized in examination.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention without any creative labor, may be used also for those of ordinary skill in the art
To obtain other drawings based on these drawings.
Fig. 1 is the system structure diagram of one example of the application;
Fig. 2 is the flow chart of the test method of one example of the application;
Fig. 3 is covering what is stored from the received coverage rate file of test terminal and test platform itself for one example of the application
The method flow diagram of lid rate file progress Data Integration;
Fig. 4 is the flow chart of the test method of another example of the application;
Fig. 5 is the flow chart of the test method of the application yet another embodiment;
Fig. 6 is the structural schematic diagram of the test platform of one example of the application;
Fig. 7 is the structural schematic diagram of the server of one example of the application.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that the described embodiment is only a part of the embodiment of the present invention, instead of all the embodiments.Based on this
Embodiment in invention, every other reality obtained by those of ordinary skill in the art without making creative efforts
Example is applied, shall fall within the protection scope of the present invention.
It is succinct and intuitive in order to what is described, hereafter by describing several representative embodiments come to the solution of the present invention
It is illustrated.A large amount of details is only used for helping to understand the solution of the present invention in embodiment.However, it will be apparent that technology of the invention
Scheme can be not limited to these details when realizing.In order to avoid unnecessarily having obscured the solution of the present invention, some embodiment party
Formula is not described meticulously, but only gives frame.Hereinafter, " comprising " refers to " including but not limited to ", " root
According to ... " refer to " according at least to ..., but be not limited to according only to ... ".Hereinafter it is not specifically stated the quantity of an ingredient
When, it is meant that the ingredient is either one or more, or can be regarded as at least one.
The present inventor has found in the process of research, most commonly to application program in existing technical solution
Code carries out pitching pile and then generates single test bag, and tests it, while generating corresponding coverage rate file, still
This scheme at present only can be effective to the test very small scale of team (such as 1 people).Once test team's number reaches 2 people
Or 2 is more than people, above scheme will lack adaptibility to response;And when tester needs replacing test bag, can not yet
Realize test in time, it is not strong to the directive significance of actual production.
To solve the above-mentioned problems, the example of the application proposes a kind of test platform, which on the one hand can
It solves the problems, such as more people's concurrent testings, and is adapted to the continuous integrating test bag code development environment constantly updated, and can be with
Mending increasing test case for Test coverage situation prompt tester and supplement testing keeps its code coverage data up to standard.Separately
On the one hand, the test platform can comprehensive fitting processes of research & development, speed-adaptive faster opens with larger application program
Hair ring border.
In some examples of the application, above-mentioned test platform can be uploaded during the test each tester
Coverage rate file is generated to carry out Data Integration and then can determine the code coverage of test process, such as differentiation code coverage
Rate is monitored and manages so as to the test job to application software.Wherein, differentiation code coverage corresponds to and is based on
The Incremental Development Model of version, after concrete meaning refers to that the differentiation code to this version and last time version is tested,
Obtain the ratio for this time testing capped lines of code and the total line number of differentiation code.It can be with by differentiation code coverage
Solve the code tester situation of the update part for tested application program.
Fig. 1 shows system structure diagram applied by test platform described in some examples of the application.Such as Fig. 1 institute
Show, the system of the application includes at least: research and development management server 11, test platform 12, test terminal 13, network 14 and code
Management tool (SVN, the abbreviation of child release Subversion) server 15.
In some examples of the application, above-mentioned SVN server 15 is used for the code text to each version of application program
Part is managed.Specifically, SVN server 15 can receive and save one that research staff is uploaded by SVN client
Or a plurality of code revision record (SVN Log).It wherein, may include one or more by modification code in code revision record
Explanation (explanation for being specifically as follows the explanation for the function of being realized by modification code and/or the demand of solution) and specific quilt
The code file of modification.In addition, SVN server 15 can be tieed up according to research staff by the code file that SVN client uploads
Protect complete code file of some application program under different editions.
In some examples of the application, above-mentioned research and development management server 11 can be continuous integrating server, Ke Yicong
SVN server 15 obtains the code file of tested some version of application program, and is generated by pitching pile operation to be tested application
The title of program and version number are the test bag to be tested of mark.In some examples of the application, above-mentioned research and development management clothes
Being engaged in device 11 can be according to presetting frequency according to the code file obtained from SVN server 15 and generating test bag, for example, grinding
Test bag can be generated according to the code file of acquisition daily or per half a day by sending out management server 11.
In some examples of the application, above-mentioned test terminal 13 can include but is not limited to smart phone, PAD, notes
The intelligent terminals such as this computer and PC.It is fitted with operating system in these test terminals, including but not limited to:
Android operation system, Symbian operating system, Windows mobile operating system and apple iPhone OS operation
System etc..Test terminal 13 is mainly used for obtaining test bag from research and development management server 11, installs and test above-mentioned test bag,
Coverage rate file is generated, and the coverage rate file generated during the test is sent to test platform 12.Wherein, coverage rate text
Part may include being covered in the title for being tested application program, version number and tested application program by this test execution
The line number of code.In some instances, above-mentioned coverage rate file can also include the code segment of this test.
In some examples of the application, following function is may be implemented in above-mentioned test platform 12: will receive from tester
Coverage rate report carry out Data Integration, and according to Data Integration result generate code coverage report.In some instances, on
Stating test platform 12 may include: coverage rate file collection server 101 and coverage rate report generation server 102.Wherein,
Above-mentioned coverage rate file collection server 101 can access external network, and only can be main to use by authorized terminal access
In the coverage rate file by Self -adaptive for collecting different testers from test terminal 13.Coverage rate report generation server
102 can access internal lan, and coverage rate file can be obtained from coverage rate file collection server 101, carries out data
Integration, and coverage rate report is generated according to Data Integration result.Test platform 12 can be with during carrying out Data Integration
When the code file of tested some version of application program is pulled from SVN server 15.
In addition, above-mentioned test platform 12 can also realize the function of test assignment distribution, at this point, test platform 12 is further
Including test and management server 103.The test and management server 103 can access internal lan, can be used for servicing from SVN
The code revision that research staff uploads is obtained in device 15 and records (SVN log), regard above-mentioned code revision record as test assignment
It releases.Meanwhile test platform 12 will also provide test assignment and claim interface, the test for claiming oneself for tester is appointed
Business, and after tester claims test assignment, its corresponding tester is recorded for code revision.In addition, testing tube
Reason server 103 further can also provide test assignment distribution interface for test owner, allow test owner to not having
There is the code revision claimed record to carry out secondary distribution.
It should be noted that above-mentioned test platform 12 include coverage rate file collection server 101, coverage rate report life
It can physically be individually present, also can integrate complete on a server at server 102 and test and management server 103
At it is not limited here.
Above-mentioned network 14 may include cable network and wireless network, put down for realizing research and development management server 11, test
Link and communication between platform 12 and test terminal 13.As shown in Figure 1, netting side in access, test terminal 11 can pass through
Wirelessly or wired mode is linked into network 14;And in core net side, test platform 12 and research and development management service
Device 11 is connected to network 14 generally by wired mode.Certainly, test platform 12 and research and development management server 11 can also be with
Wirelessly it is connected to network 14.
Structure based on above-mentioned system structure shown in FIG. 1 and test platform 12, the example of the application provide one kind
Test method can determine the code coverage of test process.Fig. 2 shows the processes for the test method that present application example provides
Figure.As shown in Fig. 2, this method can be executed by test platform 12, comprising the following steps:
Step 201: receiving the coverage rate file that test terminal 13 is sent.
In the example of the application, test platform 12 will receive respectively one or more from 13 in one or more tests
Coverage rate file.
Wherein, as previously mentioned, the coverage rate file is that test terminal 13 generates after testing some code revision record
's.The coverage rate file may include title and the version number of tested application program, for example, with tested application program
Title and version number be mark, wherein can also include the code covered in tested application program by this test execution
Line number.It can also include tested code segment in above-mentioned coverage rate file in some examples of the application.The application's
It, can be by the line number of the code covered in the tested application program for including in coverage rate file by this test execution in example
Referred to as coverage data.
Under normal conditions, research staff is in order to meet the needs of tested application user is new or in order to repair tested answer
With bugs, a line or multirow in the tested application code file can be modified.Also, it is completed in code revision
Afterwards, above-mentioned research staff can upload the one or more of code revisions modified to SVN server 15 by SVN client and remember
Record and corresponding code file.Wherein, each code revision record includes above-mentioned one or more by the explanation of modification code
Etc. contents.
Tester will record the code revision claimed or distributed after claiming or being assigned code revision record
It is tested, and coverage rate file is generated according to test result after the completion of test, to identify the application program this time tested
The information such as the line number of code of title, version and this time test execution covering.As previously mentioned, usually coverage rate file can be with quilt
The title of the application program of test and version number are mark, can also include being tested in tested application program by this in file
The line number of the code of covering is executed, or even can also include tested code segment.
In some instances, recording the distribution to tester about code revision can also be realized by test platform 12,
Namely test platform 12 will receive code revision to be tested from SVN server 15 and record, and be distributed to one or more tests
Personnel.In order to realize the distribution of test assignment, test platform 12 can provide test assignment and claim interface, claim for tester
The code revision record tested.Specifically, test platform 12 can be from the dematron science and engineering in research and development management server 11
Code revision record is obtained in tool, generates code revision record list;The keyword of tester's input is received, and according to described
The explanation of keyword and code revision record is searched for from code revision record list and is shown relevant to the keyword
Code revision record;And operation is claimed in response to the tester, the survey is added on code revision record
The identity of examination personnel.The code revision is indicated by the operation for recording addition tester's identity for code revision
Record is claimed by the tester, will be tested in terminal by the tester at it and be surveyed to code revision record
Examination.
For example, certain tester is responsible for the test of " broadcasting " module, he can search in the Web page that test platform provides
Rope keyword " broadcasting " after test platform 12 receives " broadcasting " keyword, can be said according to what acquired code revision recorded
It is bright that code revision record relevant to " broadcasting " is searched in code revision record list, and show.Above-mentioned tester
It can click and claim to claim the code revision relevant to " broadcasting " shown record, test platform 12 is recognized in response to above-mentioned
The identity of above-mentioned tester is added in neck operation on the code revision record claimed, and identifies the code revision note
Record is claimed by above-mentioned tester.
Further, since the demand that some code revisions record solves can distribute to different testers, meeting
The leakage choosing of some code revision records is caused, namely is claimed without tester, the secondary distribution of test owner is also just needed.
For this problem, test platform 12 further can also provide test assignment for test owner and distribute interface, negative for testing
It blames people and carries out test assignment distribution.Specifically, test platform 12 is screened and is shown in response to the inquiry operation of test owner
Show the code revision record for not adding tester's identity;Remember in response to the test owner in some code revision
The operation of the identity of the tester added in record, the addition test owner addition on corresponding code revision record
The identity of tester, to complete the distribution of all code revision records.Certainly, test owner can also be by this
The distribution condition of all test assignments is checked at test assignment distribution interface, and test platform 12 should also be as allowing test owner
The tester of some code revision record is changed, to realize the macroscopic view allotment and management of test assignment.
Step 202: according to received coverage rate file version number and itself storage coverage rate file version
Number by received coverage rate file and itself storage coverage rate file carry out Data Integration, update itself storage coverage rate text
Part.
In some examples of the application, in order to integrate the coverage rate file for being directed to different editions test bag Self -adaptive,
Test platform will be stored with coverage rate file corresponding with latest edition code file, for example, the coverage rate file can be with quilt
The title and version number for surveying application program are mark, and including being performed covering in such as code of the edition code file
Line number of code etc..In addition, test platform 12 can also store code text corresponding with the version number of above-mentioned coverage rate file
Part.According to the coverage rate file, test platform 12 can classify the code of the code file of itself storage, can specifically divide
Are as follows: it can be performed the code of covering, the code of covering cannot be performed and be performed the code of covering.It is above-mentioned to cover
Lid rate file can be what test platform 12 was generated and preserved during Data Integration.For example, if it is in new opplication
Before the test of first version of program, then the coverage rate file that test platform 12 is saved may be sky, and can be subsequent
The coverage rate file that itself preservation is constantly updated during carrying out Data Integration to the coverage rate file of the application program, is allowed to
First version of the corresponding new application.In another example test platform 12 is saved before carrying out differentiation code tester
Coverage rate file can be the coverage rate file of corresponding last revision, and can the subsequent coverage rate file to new version into
The coverage rate file that itself preservation is constantly updated during row Data Integration, is allowed to correspond to current version.It needs to illustrate
It is that test platform 12 can not also store code file corresponding with itself storage version number of coverage rate file, and need
When, corresponding code file is obtained from SVN server 15 in real time according to the version number of itself storage coverage rate file.
In some instances, the coverage rate file collection server 101 of test platform 12 will be from one or more test
Terminal 13 is collected one or more coverage rate files and is cached, and coverage rate is then waited to generate server 102 to pull above-mentioned one
A or multiple coverage rate files.It should be noted that in the example of the application, due to being that multiple testers survey parallel
Examination, and since the time of each tester from the test bag of the research and development downloading of management server 11 may be different, it is each
The version for the test bag that tester is downloaded may also be different.That is, coverage rate file collection server 101 is from each
The version possibility of test bag corresponding to the coverage rate file that test terminal 13 is collected is identical may also be different.Therefore, test is flat
The asking firstly the need of consideration version when carrying out Data Integration to coverage rate file and the coverage rate file itself saved of platform 12
Topic.Specifically, test platform 12 first has to carry out data mapping, the coverage rate that will be received according to the version of coverage rate file
Coverage data in file or the coverage rate file itself saved is mapped as in these versions with respect to the code of latest edition
Coverage data.The process of this data mapping can be referred to as data cleansing.The work of this data cleansing can be by coverage rate
Server 102 is generated to complete.
Specifically, coverage rate generates server 102 can be every time from coverage rate file in some examples of the application
It collects and pulls a coverage rate file, referred to as the first coverage rate file on server 101, and by the first coverage rate file
The version number for the second coverage rate file that version number saves with itself is compared, if identical, by the first coverage rate file
It merges with the second coverage rate file, and is saved the coverage rate file after merging as the second coverage rate file;If the
The version number of one coverage rate file less than the second coverage rate file version number, then by the coverage rate number in the first coverage rate file
It is merged according to the version for mapping to the second coverage rate file, then by the first coverage rate file and the second coverage rate file, and will
Coverage rate file after merging is saved as the second coverage rate file;It is covered if the version number of the first coverage rate file is greater than second
Coverage data in second coverage rate file is then mapped to the version of the first coverage rate file by the version number of lid rate file,
The first coverage rate file and the second coverage rate file are merged again, and using the coverage rate file after merging as the second covering
Rate file saves.Coverage rate, which generates server 102, can recycle the execution above process, until coverage rate file collection server
The 101 all coverage rate files collected all are integrated with the coverage rate file of itself.Hereafter, coverage rate generates server
102 can generate coverage rate report according to the coverage data after integration.Above-mentioned entire Data Integration process, which can also recycle, to be held
Row, to periodically generate coverage rate report, the frequency executed can arbitrarily be set according to demand, such as every 5 minutes
It integrates primary etc..
Above-mentioned Data Integration process is described in detail below in conjunction with specific example and attached drawing.Fig. 3 shows the application
The coverage rate file that will be stored from the test received coverage rate file of terminal 13 and test platform 12 itself described in one example
Carry out the method flow diagram of Data Integration.It should be noted that in this example, test platform 12 can be received to from test terminal 13
One or more coverage rate files seriatim with itself storage coverage rate file carry out Data Integration.For convenience,
It will be known as the first coverage rate file from the test received coverage rate file of terminal 13;The coverage rate file that itself is stored is known as the
Two coverage rate files.In addition, in this example, it is simple in order to describe, also by the version number of the corresponding code file of coverage rate file
The referred to as version number of coverage rate file.Moreover, in the present example it is assumed that test platform 12 is stored with the second coverage rate FileVersion
Number corresponding code file.As shown in figure 3, this method may include steps of:
Step 301: the version number of the first coverage rate file is compared with the version number of the second coverage rate file, if
The version number of the first coverage rate file is greater than the version number of the second coverage rate file, thens follow the steps 302;If described
The version number of one coverage rate file thens follow the steps 303 less than the version number of the second coverage rate file;If first covering
The version number of rate file is equal to the version number of the second coverage rate file, thens follow the steps 304.
Step 302: being corresponded to according to the corresponding code file of the first coverage rate file and the second coverage rate file corresponding
The line number of the code for having executed covering recorded in second coverage rate file is updated to the first coverage rate file pair by code file
The line number of code is corresponded in the code file answered, and then executes step 304.
In some instances, it when the version number of the first coverage rate file is greater than the version number of the second coverage rate file, says
The code file of bright test platform 12 itself storage is not latest edition, therefore, it is necessary to carry out the update of code file, because
This, in this case, test platform 12 can according to the version number of the first coverage rate file, from SVN server 15 obtain with
The corresponding code file of version number of first coverage rate file.
In some examples of the application, test platform 12 will execute covering according to what is recorded in the second coverage rate file
The function of code the code segment of corresponding function is found in the code file of acquisition, establish in new, legacy version code file
The mapping relations of corresponding code segment.Next, test platform 12 corresponds to reflecting for code segment according in new, legacy version code file
Penetrate the mapping relations that relationship is established between the line number for corresponding to code segment in new, legacy version code file.To be built according to above-mentioned
Mapping relations between vertical line number, the code for having executed covering that test platform 12 can will record in second coverage rate file
Line number be updated to correspond to the line number of code in acquired code file.By above-mentioned replacement operation, the second coverage rate file
In coverage data by the version of corresponding first coverage rate file namely the first coverage rate file and updated second covering
Rate file is by version newer in corresponding the two.
For example, the case where the version number of the first coverage rate file is greater than the version number of the second coverage rate file
Under namely the first coverage rate file version be higher than the second coverage rate file version in the case where, in first coverage rate
The line number of the code of realization " broadcasting " function of having executed covering of recording in file is 10,11,12, and second coverage rate
The line number of the code of realization " broadcasting " function of having executed covering of recording in file is 21,22,23, then through the above steps
302 can will establish with step 303 test platform 12 and realize " broadcasting " function in the corresponding code file of first coverage rate file
Code segment and self record code file in realize " broadcasting " function code segment mapping relations, to establish two generations
Mapping relations between code file packet line number 10,11,12 and 21,22,23.It establishes after above-mentioned mapping relations, test platform 12
The line number 21,22,23 of the code for having executed covering recorded in the second coverage rate file can be replaced with 10,11,12.
By the above process, test platform 12 may be implemented to map to the coverage data in the second coverage rate file into
The version of one coverage rate file.
Step 303: according to the corresponding code file of the second coverage rate file and the corresponding code of the first coverage rate file
The line number of the code for having executed covering recorded in first coverage rate file is updated to corresponding to the second coverage rate file by file
The line number of code is corresponded in code file, then executes step 304.
The detailed process of above-mentioned replacement operation can refer to the description of step 303.Namely test platform 12 will be according to first
The function that is recorded in coverage rate file executed the code of covering finds corresponding function in the code file that itself is stored
Code segment establishes the mapping relations that code segment is corresponded in new, legacy version code file.Next, test platform 12 further according to
Newly, the mapping relations that code segment is corresponded in the code file of legacy version, which are established in new, legacy version code file, corresponds to code segment
Line number between mapping relations.To which according to the mapping relations between the line number of above-mentioned foundation, test platform 12 can be by the
The line number of the code for having executed covering recorded in one coverage rate file is updated to correspond to code in the code file of itself storage
Line number.By above-mentioned replacement operation, the coverage data in the first coverage rate file will correspond to the version of the second coverage rate file
This namely the first coverage rate file and the second coverage rate file are by version newer in corresponding the two.
For example, the case where the version number of the first coverage rate file is less than the version number of the second coverage rate file
Under namely the first coverage rate file version lower than the second coverage rate file version in the case where, in first coverage rate
The line number of the code of realization " broadcasting " function of having executed covering of recording in file is 10,11,12, and the code itself saved
The line number that the code of " broadcasting " function is realized in file is 21,22,23, then 304 establishes the first coverage rate text through the above steps
It is realized in the corresponding code file of part real in the line number 10,11 and 12 of the code of " broadcasting " function and the code file of itself storage
The corresponding relationship of the line number 21,22 and 23 of the code of existing " broadcasting " function, to will be recorded in the first coverage rate file
The line number 10,11,12 for having executed the code of covering replaces with 21,22,23.
By the above process, test platform 12 may be implemented to map to the coverage data in the first coverage rate file into
The version of two coverage rate files.
Step 304: will be in the line number of the code for having executed covering in the first coverage rate file and the second coverage rate file
The line number for having executed the code of covering merges, the code line number set for having executed covering after being merged.
In some examples of the application, above-mentioned merging can be specially to seek union operation, also i.e. by the first coverage rate text
The line number for the code for having executed covering in the line number of the code for having executed covering in part and the second coverage rate file seeks union.Example
Such as, the line number of the code for having executed covering in the first coverage rate file is 10,11 and 12;It has been executed in second coverage rate file
The line number of the code of covering is 21,22 and 23, then the line number of the code for having executed covering obtained after merging is 10,11,12,
21,22 and 23.
Step 305: with what is recorded in code line number set the second coverage rate file of replacement for having executed covering after merging
The line number of the code of covering is executed, to update the second coverage rate file.
Operation through the above steps, test platform 12 can be whole by the coverage data of the first coverage rate file pulled
It closes into the second coverage rate file, the version for the coverage rate file for storing test platform 12 is newest in the two
, the coverage rate number in the first coverage rate file is contained in the coverage rate file for storing test platform 12
According to.
Further, by repeating above-mentioned steps, test platform 12 can be connect test platform 12 from test terminal 13
All coverage rate files received are integrated into one by one within the coverage rate file of itself storage, and can be guaranteed on test platform 12
The coverage rate file of storage corresponds to the code file of latest edition.Next, test platform 12 can be according to above-mentioned coverage rate text
Part obtains the coverage rate report of corresponding latest edition.
It should be noted that the method for Fig. 3, which is equally applicable to test platform 12, is not stored with the second coverage rate FileVersion
If necessary to use the version of the second coverage rate file in the case where number corresponding code file namely method shown in Fig. 3
Number corresponding code file, then can directly obtain corresponding code file according to version number from SVN server 15.Moreover,
Whether the method for Fig. 3 does not limit in the first coverage rate file comprising tested code yet.In practical applications, if the first covering
Comprising tested code in rate file, then subsequent data cleansing process directly can be carried out according to the code;And if first
Do not include tested code in coverage rate file, then test platform 12 can at any time according to the version number of the first coverage rate file from
SVN server 15 obtains the code file of the version to carry out subsequent data cleansing process.
Fig. 2 will be returned below continues to describe test method described in Fig. 2.
Step 203: being reported according to the coverage rate file generated coverage rate of itself storage.
As previously mentioned, the line number of the code in coverage rate file comprising having executed covering therefore can be according to the line number
Quantity obtains coverage rate report.Coverage rate report may include the code coverage of each code revision record, differentiation generation
Code coverage rate, the code coverage of some functional module and/or overall code coverage rate of entire tested application software etc..This
Code coverages may indicate that under the different demarcation granularity to code a bit, the coverage condition of code tester, for example, code revision
The code coverage of record represents a case where code revision record is performed covering in testing;The code of functional module covers
Lid rate represents the case where some functional module is performed covering in testing;Differentiation code coverage represents current version and upper
The case where part of differentiation is performed covering in testing in the post code that the code of one version is compared;And overall code covers
Rate refers to the entirely tested execution coverage condition of application code in testing.These coverage rates reflect together from different level
The Test coverage situation of one edition code.
In some instances, the code coverage of above-mentioned code revision record can record corresponding code for code revision
Duan Zhongyi is performed the quotient of the line number of the code of covering and total line number of the corresponding code segment of code revision record.Above-mentioned difference
Change be performed in two different editions variance codes that code coverage be tested application program the line number of the code of covering with always
Variance codes line number quotient.The code coverage of above-mentioned functional module is that some functional module of tested application program is corresponding
The quotient of total line number of the line number code segment corresponding with the functional module of the code of covering is performed in code segment.Above-mentioned entirety generation
Code coverage data is that the quotient of total line number of line number and tested application program of the code of covering is performed in tested application program.
Above-mentioned several code coverages can be determined according to the coverage rate file obtained by above-mentioned Data Integration process, to obtain generation
Code coverage rate report.
In some examples of the application, in order to carry out the integrated testability of application program, so that test result is up to standard, may be used also
Test assignment is adjusted further to report according to above-mentioned code coverage.Specifically, test platform 12 can be preset
Code revision record code coverage rate qualification threshold value, block code coverage rate qualification threshold value, differentiation code coverage qualification threshold
Value and/or overall code coverage rate qualification threshold value.The size of above-mentioned threshold value can according to the actual situation or experience is arranged, and
It can be needed to carry out dynamic adjustment according to test, for example be both configured to 70% etc..In this way, generating code coverage in test platform 12
After rate report, each code coverage coverage rate qualification threshold value corresponding with its in the report is compared, if
Coverage rate qualification threshold value corresponding more than or equal to its then illustrates that test passes through.And it is qualified if it is less than its corresponding coverage rate
Threshold value then illustrates that test does not pass through.At this time, it may be necessary to dependence test personnel be prompted, so that it, which is mended, increases coverage rate test use-case again
It is tested.In some instances, above-mentioned relevant tester can claim and/or test assignment point according in test assignment
It is determined with the identity of the tester added is recorded for code revision in the process.For example, if passing through above-mentioned comparison
The code coverage of the certain code revision records of Cheng Faxian is less than the coverage rate qualification rate threshold value of code revision record, then illustrates this
The test job of a little code revision records is not up to standard, needs that these code revisions is notified to record corresponding tester and carry out again
Test or supplement test.And if finding that the code coverage of certain functional modules is less than function mould by above-mentioned comparison procedure
The coverage rate qualification rate threshold value of block, then illustrate that the test job of these functional modules is unqualified, needs to notify these functional modules
Corresponding tester's functional module test code coverage not up to standard, and being recorded according to each code revision, to survey
Examination personnel show the code revision record of low coverage rate, and prompt tester that need to remember for the code revision of the low coverage rate
Record, which is mended, to be increased test case and executes test to regenerate coverage rate until integrated testability is up to standard.Similar, if differentiation generation
Code coverage rate is less than differentiation code coverage qualification threshold value or overall code coverage rate is less than overall code coverage rate qualification threshold
Value then prompts all tester's tests code coverage not up to standard, and can recording according to each code revision, to test
Personnel show the code revision record of low coverage rate, and prompt tester that need to record for the code revision of the low coverage rate
It mends and increases test case and execute test to regenerate coverage rate until integrated testability is up to standard.It should be noted that the above foundation
Code coverage, differentiation code coverage, whole coverage rate and the functional module code coverage that code revision records
Test-based examination method can be with the inspection of alternating iteration in entire test process, can also be according to the habit of different testers
It is used to and emphasis difference can stresses to check, finally realize that various code coverages are up to standard simultaneously, namely both greater than its correspondence
Coverage rate threshold value when, can just think that integrated testability passes through.Moreover, the code revision record of above-mentioned low coverage rate can be
One opposite concept is also possible to an absolute concept.For example, what test platform 12 can record each code revision
Coverage rate is ranked up, and obtains the minimum N number of code revision record of coverage rate, and these code revisions is prompted to record corresponding survey
Examination personnel.At this point, low coverage rate is exactly an opposite concept.In another example test platform 12 can remember each code revision
The coverage rate of record and predetermined threshold value (can it is identical as the qualified threshold value of the code revision record set before or
It is different) it is compared, it obtains recording lower than M code revision of the threshold value, and these code revisions is prompted to record corresponding survey
Examination personnel.At this point, low coverage rate is exactly an absolute concept.
Fig. 4 shows a kind of flow chart of test method of present application example offer.As shown in figure 4, this method can be by
Terminal 13 is tested to execute, comprising the following steps:
Step 401: obtaining test bag to be tested from research and development management server 11.
In some instances, research and development management server 11 obtains what research staff uploaded by code management tools thereon
Code file, and generating with tested application name and version number is the test bag to be tested identified.Therefore, in this example
In, test terminal 13 can will download test bag to be tested from research and development management server 11 and be installed in the system of itself,
So that tester carries out subsequent test.
Step 402: in response to the test operation of tester, it is specific that the test operation being mapped to above-mentioned test bag
It on code, namely covers on specific code, and generates coverage rate file.
In some instances, above-mentioned tester can be according to the test case being pre-designed, in the test terminal 13
Above-mentioned test operation can be mapped on specific code by upper carry out test operation, test terminal 13 by pitching pile code, namely
Above-mentioned test operation is covered on specific code, while coverage rate text is generated according to the specific code of test operation covering
Part, record are performed the line number of the code of covering in testing.
For example, certain bit test personnel be responsible for " homepage " module, the tester can according to pre-designed test case,
Corresponding test operation is carried out on " homepage " page shown in test terminal, for example clicks the login button etc. of " homepage "
Deng being operated in response to above-mentioned click login button, test terminal 13 can execute the related code logged in of clicking to be tested
It whether there is defect, while the operation that user clicks login button can be mapped in tested code by pitching pile code
Code segment associated with login is clicked, determines the line number that the code of covering is performed in aforesaid operations, and be recorded in generation
Coverage rate file in.
Step 403: the coverage rate file is sent to test platform 12.
After tester completes for the either test of a certain function of some code revision record, 13 meeting of terminal is tested
The coverage rate file generated during the test is submitted into test platform 12.
By the above method, test bag can be downloaded from research and development management server 11 at any time by testing terminal 13, be carried out at any time
Test, and the coverage rate file obtained self by test is fed back into test platform 12 at any time and carries out coverage data integration,
And the version for not limiting the test bag that multiple concurrent testing personnel are tested must be identical.Such testing process is more bonded
Rapid Application Development and the demand quickly tested at this stage, and allow more people simultaneously to the difference of same application
Part carries out concurrent testing, realizes quickly test.
Further, interface is claimed since test platform 12 also provides test assignment for tester, tests terminal 13
It can also show that meeting tester inquires item to tester further in response to the test assignment inquiry operation of tester
(for example, passing through keyword query) of part code revision record to be tested, is claimed for tester;And in response to tester
The identity of mark and tester that code revision records is fed back to test platform by the operation of claiming of member, flat by testing
The tester of platform record code modification record.
By the creation of this test assignment and assigning process above, it can be convenient and pipe is carried out to the task of code tester
Reason improves testing efficiency, is allowed to the demand for being more bonded Rapid Application Development at this stage and quickly testing.
The operating process of test platform will be described in detail further combined with attached drawing and a specific example below.
Fig. 5 shows an example of code tester process.As shown in figure 5, the code tester process mainly comprises the steps that
Step 501: test platform 12 obtains code revision record from research and development management server 11, generates code revision record
List.
Step 502: receiving the test assignment inquiry comprising keyword that tester claims interface input in test assignment
Request, and according to the keyword search code revision record list, and show code revision note relevant to the keyword
Record.
Step 503: claiming operation in response to the tester, add the test on code revision record
The identity of personnel, to indicate that the code revision record is claimed by the tester.
Step 504: the test assignment inquiry operation inputted on test assignment distribution interface in response to test owner is shown
Show the code revision record for not adding tester's identity.
Step 505: recording the identity of the tester of addition in code revision in response to the test owner
The identity of the tester is added in operation on code revision record, to complete all code revision records
Distribution.
Step 506: receiving one that one or more test terminals 13 are sent after testing the code revision record
Or multiple first coverage rate files.
Step 507: respectively protecting the version number of one or more of first coverage rate files and test platform 12 itself
The version number for the second coverage rate file deposited compares, if the version number of the first coverage rate file is greater than second covering
The version number of rate file, thens follow the steps 508;If the version number of the first coverage rate file is less than second coverage rate
The version number of file, thens follow the steps 509;If the version number of the first coverage rate file is equal to the second coverage rate text
The version number of part, thens follow the steps 510.
Step 508: code file corresponding with the version number of the first coverage rate file is obtained from SVN server 15, according to
The code file of acquisition and the corresponding code file of the second coverage rate file itself saved, will remember in the second coverage rate file
The line number of the code for having executed covering of record is updated to correspond to the line number of code in acquired code file, then executes step
510。
Step 509: according to the code for having executed covering in the code file of itself storage and the first coverage rate file
Line number corresponding to code, the line number of the code for having executed covering recorded in the first coverage rate file is updated to itself and is deposited
The line number of code is corresponded in code file corresponding to second coverage rate file of storage, then executes step 510.
Step 510: will be in the line number of the code for having executed covering in the first coverage rate file and the second coverage rate file
The line number for having executed the code of covering merges, the code line number set for having executed covering after being merged, and with merge
The code line number set for having executed covering afterwards replaces the line number of the code for having executed covering recorded in the second coverage rate file.
Step 511: being reported according to the second coverage rate file generated coverage rate.
It may include the code of the code coverage of each code revision record, each functional module in coverage rate report
One or a combination set of coverage rate, differentiation code coverage and overall code coverage rate.
Step 512: the code coverage qualification threshold value recorded according to pre-set code revision, by the coverage rate report
The code coverage of code revision record in announcement and the code coverage qualification threshold value of code revision record are compared,
If the code coverage of the code revision record is greater than or equal to the code coverage qualification threshold of code revision record
Corresponding code revision record is then labeled as test and passed through by value;If the code coverage of the code revision record is less than
The code coverage qualification threshold value of the code revision record, thens follow the steps 513.
Step 513: the coverage rate of the record of code revision described in the tester for prompting the code revision to record is unqualified, with
It mends it and increases coverage rate test use-case.
Step 514: according to pre-set functional module/differentiation/overall code coverage rate qualification threshold value;It is covered described
Functional module/differentiation/overall code coverage rate and the functional module/differentiation/overall code covering in the report of lid rate
Rate qualification threshold value is compared, if functional module/differentiation/overall code coverage rate is greater than or equal to the overall code and covers
Lid rate qualification threshold value, then prompt tester's integrated testability up to standard;If functional module/differentiation/overall code coverage rate is small
In the overall code coverage rate qualification threshold value, 515 are thened follow the steps.
Step 515: prompt tester's functional module/differentiation/integrated testability is not up to standard, and is the tester
The code revision record for listing low coverage rate prompts the code revision of the low coverage rate to record corresponding tester and mend and increases survey
Example on probation is simultaneously tested to regenerate coverage rate, until functional module/differentiation/integrated testability is up to standard.
In some examples of the application, test platform 12 can record corresponding code coverage according to each code revision
Rate is ranked up, and is listed the minimum top n code revision record of code coverage for tester, is prompted these code revisions
The tester of record carries out supplement test.Also or, test platform 12 shows that code coverage is less than preset code
M code revision of the code coverage qualification threshold value of modification record records, the dependence test for prompting these code revisions to record
Personnel carry out supplement test.
The corresponding above test method, present invention also provides the test platforms 600 for realizing the above method.
In some examples of the application, above-mentioned realization test platform 600 can structure chart as shown in Figure 6 realize, including
Coverage rate file collection server 601 and coverage rate report generation server 602, wherein the function of each server is as follows:
Coverage rate file collection server 601, the first coverage rate file sent for receiving test terminal 13;
Coverage rate report generation server 602, for according to received first coverage rate file version number and from
The version number of second coverage rate file of body storage carries out the second coverage rate file of the first coverage rate file and itself storage
Data Integration updates the second coverage rate file, and is reported according to the second coverage rate file generated coverage rate.
In some instances, above-mentioned test platform 600 can also realize the function of test assignment distribution, at this time test platform
600 can further include test and management server 603, for will be from the code revision to be tested of research and development management server 11
Record, and it is distributed to one or more testers.
In some instances, above-mentioned test and management server 603 will also provide test assignment and claim interface, for tester
Claim code revision record in need of test.Specifically, test and management server 603 is obtained from research and development management server 11
Code revision record, generates code revision record list;Receive tester test assignment claim interface input comprising close
The test assignment inquiry request of key word, and according to the keyword search code revision record list, and show and the key
The relevant code revision record of word;And operation is claimed in response to the tester, add on code revision record
Add the identity of the tester, to indicate that the code revision record is claimed by the tester.
In some instances, above-mentioned test and management server 603 further provides test assignment distribution for test owner
Interface carries out test assignment distribution for test owner.Specifically, test platform 12 is grasped in response to the inquiry of test owner
Make, screens and be displayed without the code revision record of addition tester's identity;In response to the test owner
The operation of the identity of the tester added on some code revision record, to complete all code revision records
Distribution.
In some instances, coverage rate report generation server 602 may include that data cleansing module and data merge
Module;Wherein, the data cleansing module from the coverage rate file collection server for pulling first coverage rate
File, and the version number for the second coverage rate file that the version number of the first coverage rate file saves with itself is compared
Compared with, if identical, by the first coverage rate file and the second coverage rate file submit to data combiners block carry out data merging;
If the version number of the first coverage rate file is less than the version number of the second coverage rate file, by covering in the first coverage rate file
Lid rate data map to the version of the second coverage rate file, then by the first coverage rate file and the second coverage rate file after mapping
It submits to data combiners block and carries out data merging;If the version number of the first coverage rate file is greater than the second coverage rate file
Coverage data in second coverage rate file is then mapped to the version of the first coverage rate file, then first is covered by version number
The second coverage rate file after lid rate file and mapping submits to data combiners block and carries out data merging.The data merge mould
Block is used to merge the first coverage rate file and the second coverage rate file, and using the coverage rate file after merging as second
Coverage rate file saves.
In some instances, above-mentioned coverage rate report generation server 602 can be according to the quilt recorded in coverage rate file
The quantity for executing the line number of covering obtains coverage rate report.Coverage rate report may include the code of each code revision record
Coverage rate, differentiation code coverage, the code coverage of some functional module and/or the entire whole generation for being tested application software
Code coverage rate.
In some instances, above-mentioned coverage rate report generation server 602 may further include feedback module, for setting
Set the code coverage qualification threshold value of code revision record;And by the code coverage report in code coverage and institute
It states code coverage qualification threshold value to be compared, if the code coverage is greater than or equal to the code coverage qualification threshold
Value, then prompt tester's code tester to pass through;If the code coverage is less than the code coverage qualification threshold value,
Tester's code tester is prompted not pass through.
It should be noted that above-mentioned test platform 600 include coverage rate file collection server 601, coverage rate report
Generating server 602 and test and management server 603 can physically be individually present, and also can integrate on a server
It completes, it is not limited here.
Fig. 7 shows the structural schematic diagram of server provided by one embodiment of the present invention.The server can be test
Server in platform 600.Specifically:
Server 700 includes central processing unit (CPU) 701 including random access memory (RAM) 702 and read-only deposits
The system storage 704 of reservoir (ROM) 703, and the system bus of connection system storage 704 and central processing unit 701
705.Server 700 further includes the basic input/output (I/O that information is transmitted between each device helped in computer
System) 706, and for the mass-memory unit of storage program area 713, application program 714 and other program modules 715
707。
Basic input/output 706 includes display 708 for showing information and inputs information for user
The input equipment 709 of such as mouse, keyboard etc.Wherein display 708 and input equipment 709 are all by being connected to system bus
705 input and output controller 710 is connected to central processing unit 701.Basic input/output 706 can also include defeated
Enter o controller 710 for receiving and handling from the defeated of multiple other equipment such as keyboard, mouse or electronic touch pen
Enter.Similarly, input and output controller 710 also provides output to display screen, printer or other kinds of output equipment.
Mass-memory unit 707 is connected by being connected to the bulk memory controller (not shown) of system bus 705
To central processing unit 701.Mass-memory unit 707 and its associated computer-readable medium are that server 700 provides
Non-volatile memories.That is, mass-memory unit 707 may include such as hard disk or CD-ROM drive etc
Computer-readable medium (not shown).
Without loss of generality, computer-readable medium may include computer storage media and communication media.Computer storage
Medium includes any of the information such as computer readable instructions, data structure, program module or other data for storage
The volatile and non-volatile of method or technique realization, removable and irremovable medium.Computer storage medium include RAM,
ROM, EPROM, EEPROM, flash memory or other solid-state storages its technologies, CD-ROM, DVD or other optical storages, cassette, magnetic
Band, disk storage or other magnetic storage devices.Certainly, skilled person will appreciate that computer storage medium is not limited to
It states several.Above-mentioned system storage 704 and mass-memory unit 707 may be collectively referred to as memory.
According to various embodiments of the present invention, server 700 can also pass through the network connections such as internet to network
On remote computer operation.Namely server 700 can be by the Network Interface Unit 711 that is connected on system bus 705
It is connected to network 712, in other words, Network Interface Unit 711 can be used also to be connected to other kinds of network or long-range meter
Calculation machine system (not shown).
Above-mentioned memory further includes one, and perhaps more than one program one or more than one program are stored in storage
In device, it is configured to be executed by CPU.
In addition, each embodiment of the invention can pass through the data processing by data processing equipment such as computer execution
Program is realized.Obviously, data processor constitutes the present invention.In addition, being commonly stored data in one storage medium
Processing routine is by directly reading out storage medium for program or by installing or copying to data processing equipment for program
It stores in equipment (such as hard disk and/or memory) and executes.Therefore, such storage medium also constitutes the present invention.Storage medium can be with
Use any kind of recording mode, such as paper storage medium (such as paper tape), magnetic storage medium (such as floppy disk, hard disk, flash memory
Deng), optical storage media (such as CD-ROM), magnetic-optical storage medium (such as MO) etc..
Therefore the present invention also provides a kind of storage mediums, wherein it is stored with data processor, the data processor
For executing any embodiment of the above method of the present invention.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.
Claims (15)
1. a kind of differentiation code coverage solution, wherein the described method includes:
Receive the first coverage rate file that test terminal is sent;Wherein, the first coverage rate file includes: tested using journey
The line number of the code of covering is performed in sequence title, version number and tested application program;
According to received first coverage rate file version number and itself storage the second coverage rate file version number will
Received first coverage rate file and the second coverage rate file of itself storage carry out Data Integration, update the second coverage rate text
Part;And
It is reported according to updated second coverage rate file generated coverage rate.
2. according to the method described in claim 1, wherein, it is described according to received first coverage rate file version number and
The second coverage rate that the version number of second coverage rate file of itself storage stores received first coverage rate file with itself
It includes: to execute following processes one by one for the received first coverage rate file of institute that file, which carries out Data Integration:
A, the version number of the first coverage rate file is compared with the version number of the second coverage rate file,
If the version number of the first coverage rate file is greater than the version number of the second coverage rate file, B is executed;
If the version number of the first coverage rate file executes C less than the version number of the second coverage rate file;
If the version number of the first coverage rate file is equal to the version number of the second coverage rate file, D is executed;
B, the version that the coverage data in the second coverage rate file is mapped to the first coverage rate file, then executes D;
C, the version that the coverage data in the first coverage rate file is mapped to the second coverage rate file, then executes D;And
D, the first coverage rate file and the second coverage rate file are merged, and using the coverage rate file after merging as second
Coverage rate file saves.
3. according to the method described in claim 2, wherein,
It includes: according to first that the coverage data by the second coverage rate file, which maps to the version of the first coverage rate file,
The corresponding code file of coverage rate file and the corresponding code file of the second coverage rate file will be remembered in the second coverage rate file
The line number of the code for having executed covering of record is updated to correspond to the line number of code in the corresponding code file of the first coverage rate file;
It includes: according to first that the coverage data by the first coverage rate file, which maps to the version of the second coverage rate file,
The corresponding code file of coverage rate text and the corresponding code file of the second coverage rate file, will record in the first coverage rate file
The line number of the code for having executed covering be updated to correspond to the line number of code in the corresponding code file of the second coverage rate file;With
And
Described merge the first coverage rate file and the second coverage rate file includes: by having held in the first coverage rate file
The line number for the code for having executed covering in the line number of the code of row covering and the second coverage rate file merges, and will be after merging
Line number of the line number set as the code for having executed covering in the second coverage rate file.
4. according to the method described in claim 3, wherein, the generation for having executed covering that will be recorded in the second coverage rate file
The line number of code is updated to correspond to the line number of code in the corresponding code file of the first coverage rate file
The corresponding code file of the first coverage rate file is obtained according to the version number of the first coverage rate file;
Function is found in the code file of acquisition according to the function of the code for having executed covering recorded in the second coverage rate file
The corresponding code segment of energy, establishes in the code file of the first coverage rate file and second two versions of coverage rate file and corresponds to code
Mapping relations between section;
It is established in two edition code files according to the mapping relations between the two of foundation corresponding code segments and corresponds to code segment
Mapping relations between line number;And
According to the mapping relations between the line number for corresponding to code segment in the two of foundation edition code files, by the second coverage rate text
The line number that is recorded in part executed the code of covering is updated to correspond to the line number of code in acquired code file.
5. according to the method described in claim 3, wherein, the generation for having executed covering that will be recorded in the first coverage rate file
The line number of code is updated to correspond to the line number of code in the corresponding code file of the second coverage rate file
According to the function of the code for having executed covering recorded in the first coverage rate file in the second coverage rate text itself stored
The corresponding code segment of function is found in the corresponding code file of part, establishes the first coverage rate file and the second coverage rate file two
The mapping relations between code segment are corresponded in the code file of version;
It is established in two edition code files according to the mapping relations between the two of foundation corresponding code segments and corresponds to code segment
Mapping relations between line number;And
According to the mapping relations between the line number for corresponding to code segment in the two of foundation edition code files, by the first coverage rate text
The line number that is recorded in part executed the code of covering is updated to code file corresponding to the version number of the second coverage rate file
The line number of middle corresponding code.
6. according to the method described in claim 3, wherein, the code for having executed covering by the first coverage rate file
The line number for the code for having executed covering in line number and the second coverage rate file merge include: will be in the first coverage rate file
The line number for having executed the code for having executed covering in the line number and the second coverage rate file of the code of covering seeks union.
7. according to the method described in claim 1, wherein, the method further includes:
Code revision record is obtained, code revision record list is generated;
Tester is received in the keyword of test assignment distribution interface input, according to code revision described in the keyword search
Record list, and show code revision record relevant to the keyword;And
Operation is claimed for some code revision record in response to the tester, is added on code revision record
The identity of the tester.
8. according to the method described in claim 7, wherein, the method further includes:
In response to test owner in the inquiry operation of test assignment distribution interface input, inquires and be displayed without addition tester
The code revision record of member's identity;And
The test owner is received for the identity of the tester of some code revision record addition, in the code
The identity of the tester is added in modification record.
9. according to the method described in claim 1, wherein, the method further includes:
Code coverage qualification threshold value is set;
By the code coverage report in code coverage and the code coverage qualification threshold value be compared, if institute
Code coverage is stated more than or equal to the code coverage qualification threshold value, then tester's code tester is prompted to pass through;If
The code coverage is less than the code coverage qualification threshold value, then tester's code tester is prompted not pass through.
10. a kind of test platform, wherein the test platform includes:
Coverage rate file collection server, the coverage rate file sent for receiving test terminal;Wherein, the coverage rate file
Including being tested application name, version number and the line number for being performed covering code;And
Coverage rate report generation server, for according to received first coverage rate file version number and the second coverage rate
Second coverage rate file of received first coverage rate file and itself storage is carried out Data Integration by the version number of file, is updated
Second coverage rate file;And it is reported according to updated second coverage rate file generated coverage rate.
11. test platform according to claim 10, wherein the coverage rate report generation server includes data cleansing
Module and data combiners block;Wherein,
The data cleansing module is used to pull a first coverage rate file from the coverage rate file collection server, and
The version number for the second coverage rate file that the version number of the first coverage rate file saves with itself is compared, if phase
Together, then the first coverage rate file and the second coverage rate file are submitted into data combiners block and carries out data merging;If first
The version number of coverage rate file less than the second coverage rate file version number, then by the coverage data in the first coverage rate file
Map to the version of the second coverage rate file, then by after mapping the first coverage rate file and the second coverage rate file submit to number
Data merging is carried out according to merging module;If the version number of the first coverage rate file is greater than the version number of the second coverage rate file,
Coverage data in second coverage rate file then maps to the version of the first coverage rate file, then by the first coverage rate file
Data combiners block, which is submitted to, with the second coverage rate file after mapping carries out data merging;
The data combiners block is used to merge the first coverage rate file and the second coverage rate file, and will be after merging
Coverage rate file is saved as the second coverage rate file.
12. test platform according to claim 10, wherein the test platform further comprises:
Test and management server, for obtaining code revision record to be tested, and the code revision record that will acquire is distributed to
Tester;And test assignment is provided and claims interface, the code revision record tested is claimed for tester.
13. test platform according to claim 12, wherein the test and management server is further used for providing test
Task distributes interface, carries out test assignment distribution for test owner.
14. test platform according to claim 10, wherein the coverage rate report generation server further comprises anti-
Module is presented, for the code coverage qualification threshold value of code revision record to be arranged;And it will be in code coverage report
Code coverage and the code coverage qualification threshold value are compared, if the code coverage is greater than or equal to the generation
Code coverage rate qualification threshold value, then prompt tester's code tester to pass through;It is covered if the code coverage is less than the code
Lid rate qualification threshold value, then prompt tester's code tester not pass through.
15. a kind of computer readable storage medium, is stored thereon with computer instruction, wherein the computer instruction is processed
The step of device realizes any one of claims 1 to 10 the method when executing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710355686.XA CN108959059B (en) | 2017-05-19 | 2017-05-19 | Test method and test platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710355686.XA CN108959059B (en) | 2017-05-19 | 2017-05-19 | Test method and test platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108959059A true CN108959059A (en) | 2018-12-07 |
CN108959059B CN108959059B (en) | 2020-12-25 |
Family
ID=64462614
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710355686.XA Active CN108959059B (en) | 2017-05-19 | 2017-05-19 | Test method and test platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108959059B (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110489321A (en) * | 2019-07-08 | 2019-11-22 | 平安科技(深圳)有限公司 | Test case screening technique, device, computer equipment and storage medium |
CN110727602A (en) * | 2019-10-23 | 2020-01-24 | 网易(杭州)网络有限公司 | Coverage rate data processing method and device and storage medium |
CN110968507A (en) * | 2019-11-20 | 2020-04-07 | 北京创鑫旅程网络技术有限公司 | Coverage rate statistical method and device |
CN110990265A (en) * | 2019-11-12 | 2020-04-10 | 苏州洞察云信息技术有限公司 | Coverage rate determining method and device and storage medium |
WO2020199789A1 (en) * | 2019-03-29 | 2020-10-08 | 深圳前海微众银行股份有限公司 | Information processing method and apparatus |
CN111858367A (en) * | 2020-07-24 | 2020-10-30 | 北京达佳互联信息技术有限公司 | Code coverage rate testing method, system, device, electronic equipment and storage medium |
CN113032281A (en) * | 2021-04-29 | 2021-06-25 | 中国工商银行股份有限公司 | Method and device for acquiring code coverage rate in real time |
CN113485908A (en) * | 2021-05-25 | 2021-10-08 | 中国人民财产保险股份有限公司 | Coverage rate obtaining method and device and electronic equipment |
CN113946515A (en) * | 2021-10-19 | 2022-01-18 | 平安普惠企业管理有限公司 | Code coverage rate testing method and device, computer equipment and storage medium |
CN116627974A (en) * | 2023-05-25 | 2023-08-22 | 成都融见软件科技有限公司 | Coverage rate storage system |
CN117331850A (en) * | 2023-12-01 | 2024-01-02 | 云筑信息科技(成都)有限公司 | Test method combining function test and interface automation test |
CN117349150A (en) * | 2023-09-22 | 2024-01-05 | 乾升利信息技术(上海)有限公司 | Coverage rate data processing method and device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090100414A1 (en) * | 2004-03-22 | 2009-04-16 | International Business Machines Corporation | Method and Apparatus for Autonomic Test Case Feedback Using Hardware Assistance for Code Coverage |
CN105988926A (en) * | 2015-02-13 | 2016-10-05 | 腾讯科技(深圳)有限公司 | Method and device for processing multi-version test data |
CN106547698A (en) * | 2016-11-30 | 2017-03-29 | 网易(杭州)网络有限公司 | The processing method of coverage data, device and server |
-
2017
- 2017-05-19 CN CN201710355686.XA patent/CN108959059B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090100414A1 (en) * | 2004-03-22 | 2009-04-16 | International Business Machines Corporation | Method and Apparatus for Autonomic Test Case Feedback Using Hardware Assistance for Code Coverage |
CN105988926A (en) * | 2015-02-13 | 2016-10-05 | 腾讯科技(深圳)有限公司 | Method and device for processing multi-version test data |
CN106547698A (en) * | 2016-11-30 | 2017-03-29 | 网易(杭州)网络有限公司 | The processing method of coverage data, device and server |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020199789A1 (en) * | 2019-03-29 | 2020-10-08 | 深圳前海微众银行股份有限公司 | Information processing method and apparatus |
CN110489321A (en) * | 2019-07-08 | 2019-11-22 | 平安科技(深圳)有限公司 | Test case screening technique, device, computer equipment and storage medium |
CN110727602B (en) * | 2019-10-23 | 2024-02-06 | 网易(杭州)网络有限公司 | Coverage rate data processing method, coverage rate data processing device and storage medium |
CN110727602A (en) * | 2019-10-23 | 2020-01-24 | 网易(杭州)网络有限公司 | Coverage rate data processing method and device and storage medium |
CN110990265A (en) * | 2019-11-12 | 2020-04-10 | 苏州洞察云信息技术有限公司 | Coverage rate determining method and device and storage medium |
CN110990265B (en) * | 2019-11-12 | 2023-10-03 | 苏州洞察云信息技术有限公司 | Coverage rate determining method, coverage rate determining device and storage medium |
CN110968507A (en) * | 2019-11-20 | 2020-04-07 | 北京创鑫旅程网络技术有限公司 | Coverage rate statistical method and device |
CN111858367A (en) * | 2020-07-24 | 2020-10-30 | 北京达佳互联信息技术有限公司 | Code coverage rate testing method, system, device, electronic equipment and storage medium |
CN113032281A (en) * | 2021-04-29 | 2021-06-25 | 中国工商银行股份有限公司 | Method and device for acquiring code coverage rate in real time |
CN113032281B (en) * | 2021-04-29 | 2024-04-19 | 中国工商银行股份有限公司 | Method and device for acquiring code coverage rate in real time |
CN113485908A (en) * | 2021-05-25 | 2021-10-08 | 中国人民财产保险股份有限公司 | Coverage rate obtaining method and device and electronic equipment |
CN113485908B (en) * | 2021-05-25 | 2024-06-18 | 中国人民财产保险股份有限公司 | Coverage rate obtaining method and device and electronic equipment |
CN113946515A (en) * | 2021-10-19 | 2022-01-18 | 平安普惠企业管理有限公司 | Code coverage rate testing method and device, computer equipment and storage medium |
CN116627974B (en) * | 2023-05-25 | 2024-02-09 | 成都融见软件科技有限公司 | Coverage rate storage system |
CN116627974A (en) * | 2023-05-25 | 2023-08-22 | 成都融见软件科技有限公司 | Coverage rate storage system |
CN117349150A (en) * | 2023-09-22 | 2024-01-05 | 乾升利信息技术(上海)有限公司 | Coverage rate data processing method and device, electronic equipment and storage medium |
CN117331850B (en) * | 2023-12-01 | 2024-03-15 | 云筑信息科技(成都)有限公司 | Test method combining function test and interface automation test |
CN117331850A (en) * | 2023-12-01 | 2024-01-02 | 云筑信息科技(成都)有限公司 | Test method combining function test and interface automation test |
Also Published As
Publication number | Publication date |
---|---|
CN108959059B (en) | 2020-12-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108959059A (en) | A kind of test method and test platform | |
US8677320B2 (en) | Software testing supporting high reuse of test data | |
US10872029B1 (en) | System, apparatus and method for deploying infrastructure to the cloud | |
US11233708B1 (en) | System, apparatus and method for deploying infrastructure to the cloud | |
CN102576432B (en) | Automated test execution plan generation | |
CN102693183B (en) | Method and system for realizing automatic software testing | |
US8126768B2 (en) | Application change request to deployment maturity model | |
CN105359102B (en) | Advanced customer support service-advanced support cloud portal | |
EP2778929B1 (en) | Test script generation system | |
US20150178182A1 (en) | Software testing platform and method | |
US20180088929A1 (en) | Software change management | |
CN105095059B (en) | A kind of method and apparatus of automatic test | |
CN105308577B (en) | For providing the method, system and computer-readable memory of load testing service | |
Heinrich | Architectural run-time models for performance and privacy analysis in dynamic cloud applications | |
CN107832207A (en) | Interface performance test method, apparatus, storage medium and computer equipment | |
CN105446868B (en) | System compatibility test method, testing case management and relevant apparatus | |
US20100138268A1 (en) | Progress management platform | |
US10990370B1 (en) | System, apparatus and method for deploying infrastructure to the cloud | |
US9031993B2 (en) | Customizable library for information technology design and management using expert knowledge base | |
CN109327355A (en) | Cloud storage system performance evaluation methodology, device and computer readable storage medium | |
CN105893259A (en) | Code detection system, method and device | |
Alonso et al. | Cloud modernization assessment framework: Analyzing the impact of a potential migration to Cloud | |
CN108763091A (en) | Method, apparatus and system for regression test | |
US20160328264A1 (en) | Network deployment for cellular, backhaul, fiber optic and other network infrastructure | |
US20200082307A1 (en) | Real-time matching of users to enterprise interfaces and artifacts |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |