CN108845951A - A kind of calculation method and system of automatic test coverage rate - Google Patents

A kind of calculation method and system of automatic test coverage rate Download PDF

Info

Publication number
CN108845951A
CN108845951A CN201810923987.2A CN201810923987A CN108845951A CN 108845951 A CN108845951 A CN 108845951A CN 201810923987 A CN201810923987 A CN 201810923987A CN 108845951 A CN108845951 A CN 108845951A
Authority
CN
China
Prior art keywords
effective
automatic test
case
demand
coverage rate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810923987.2A
Other languages
Chinese (zh)
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810923987.2A priority Critical patent/CN108845951A/en
Publication of CN108845951A publication Critical patent/CN108845951A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test 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

The present invention provides the calculation method and system of a kind of automatic test coverage rate, and method includes the following steps:Obtain original testing requirement;The demand for being suitble to automatic test is obtained from original testing requirement, is set as effective demand;Each effective demand is split into several automatic test cases, the automatic test cases of each effective demand is set as effective use-case, obtains the number of effective use-case;The covering use-case number of each effective demand is obtained according to the effective use-case that can actually cover;The sum for calculating effective use-case of all effective demands calculates the sum of the covering use-case of all effective demands;Calculation automation tests Efficient Coverage Rate;System, which includes that original testing requirement obtains module, effective demand obtains module, effective demand automatic test cases split module, covers use-case number, obtains module, effective use-case sum and covering use-case sum computing module and automatic test Efficient Coverage Rate computing module.

Description

A kind of calculation method and system of automatic test coverage rate
Technical field
The invention belongs to software test fields, and in particular to a kind of calculation method and system of automatic test coverage rate.
Background technique
Automatic test emerging in recent years gradually presents distinctive value and efficiency in software test field, but right The evaluation of automatic test work is not often treated correctly.The balancing method one of existing automatic test workload As the coverage rate based on automatic test, and the calculating of coverage rate is often original and direct, for example, directly with covering use-case divided by Manual test always uses number of cases, and such method directly can not effectively react the actual coverage rate of automatically working and workload.
On the other hand, do not stop to change in later release with the demand of trial product to be measured, automatic test script It needs to follow up in real time, the automatic test related work amount of this part is even more not faced.
This is the deficiencies in the prior art, therefore, in view of the above-mentioned drawbacks in the prior art, provides a kind of automatic test and covers The calculation method and system of lid rate, are necessary.
Summary of the invention
It is an object of the present invention to cannot directly react automatically working for above-mentioned existing automatic test coverage rate Actual coverage rate and workload and be not suitable with trial product to be measured update defect, a kind of automatic test coverage rate is provided Calculation method and system, to solve the above technical problems.
To achieve the above object, the present invention provides following technical scheme:
A kind of calculation method of automatic test coverage rate, includes the following steps:
S1. original testing requirement is obtained, it is N that original testing requirement sum, which is arranged,;
S2. the demand for being suitble to automatic test is obtained from original testing requirement, is set as effective demand, and setting effective demand is total Number is M, M<N;
S3. each effective demand is split into several automatic test cases, sets the automatic test of each effective demand Use-case is effective use-case, obtains the number C of effective use-case, is recorded as C1, C2... CM
S4. the covering use-case number D that each effective demand is obtained according to the effective use-case that can actually cover, is recorded as D1, D2... DM
S5. the total C of effective use-case of all effective demands is calculatedAlways, calculate the total D of the covering use-case of all effective demandsAlways
S6. calculation automation tests Efficient Coverage Rate, is equal to DAlways/CAlways
Further, it is obtained from original testing requirement in step S2 according to automatic test extraction standard and is suitble to automation The demand of test.According to whether being suitble to automatic test, effective demand is extracted on the basis of original demands, that is, is collected and be suitble to certainly The demand of dynamicization test is as automatic test extraction standard.
Further, the automatic test extraction standard includes:Automatic test extract non-chart class effective demand, from The non-report class of dynamicization Test extraction effectively needs and automatic test extracts the class effective demand of non-locating element plug-in.Extract mark Standard judges that chart class associated verification demand is excluded except effective demand according to practical automatic test situation;Automation is surveyed Examination can not carry out the plug-in unit of location element, and the plug-in unit correlation function demand of location element is excluded;Report class function is excluded.
Further, if being split into each effective demand according to automatic test mode according to basic function in step S3 Dry automatic test cases.The specific mode that splits can only take manual survey according to traditional manual test case write method The part use-case of automatic test script can be write in example on probation.
The present invention gives following technical solution:
A kind of computing system of automatic test coverage rate, including:
Original testing requirement obtains module, and for obtaining original testing requirement, it is N that original testing requirement sum, which is arranged,;
Effective demand obtains module, for obtaining the demand for being suitble to automatic test from original testing requirement, is set as effective Demand, setting effective demand sum are M;
Effective demand automatic test cases split module, use for each effective demand to be split into several automatic tests Example, sets the automatic test cases of each effective demand as effective use-case, obtains the number C of effective use-case, be recorded as C1, C2... CM
It covers use-case number and obtains module, the covering use-case of each effective demand is obtained according to the effective use-case that can actually cover Number D, is recorded as D1, D2... DM
Effective use-case sum and covering use-case sum computing module, calculate the total C of effective use-case of all effective demandsAlways, meter Calculate the total D of the covering use-case of all effective demandsAlways
Automatic test Efficient Coverage Rate computing module tests Efficient Coverage Rate for calculation automation, is equal to DAlways/CAlways
Further, effective demand, which obtains, obtains from original testing requirement in module according to automatic test extraction standard It is suitble to the demand of automatic test.
Further, the automatic test extraction standard includes:Automatic test extract non-chart class effective demand, from The non-report class of dynamicization Test extraction effectively needs and automatic test extracts the class effective demand of non-locating element plug-in.
Further, effective demand automatic test cases are split in module, according to basic function by each effective demand Several automation validity test use-cases are split into according to automatic test mode.
The beneficial effects of the present invention are:
The present invention proposes the concept of effective demand, effective use-case and Efficient Coverage Rate, is calculated based on effective demand and effective use-case The Efficient Coverage Rate of automatic test no longer directly calculates coverage rate using manual test use-case as denominator, and surveys from automation Examination angle uses effective use-case to calculate as denominator, provides the accurate evaluation of automatic test workload, can be more fair and just The relevant workload of automatic test is evaluated, to effectively motivate the enthusiasm of automatic test relevant staff, is promoted certainly The efficiency of dynamicization test;On the other hand, the more intuitive more effective assessment material of administrative staff can be given, allows automatic test It is more accurate to quantify.
In addition, design principle of the present invention is reliable, structure is simple, has very extensive application prospect.
It can be seen that compared with prior art, the present invention implementing with substantive distinguishing features outstanding and significant progress Beneficial effect be also obvious.
Detailed description of the invention
Fig. 1 is flow chart of the method for the present invention;
Fig. 2 is system schematic of the invention;
Fig. 3 is the schematic diagram of the embodiment of the present invention 2;
Wherein, the original testing requirement of 1- obtains module;2- effective demand obtains module;3- effective demand automatic test cases are torn open Sub-module;4- covers use-case number and obtains module;The effective use-case sum of 5- and covering use-case sum computing module;6- automation is surveyed Try Efficient Coverage Rate computing module.
Specific embodiment:
To enable the purpose of the present invention, feature, advantage more obvious and understandable, it is embodied below in conjunction with the present invention Attached drawing in example, is clearly and completely described the technical solution in the present invention.
Embodiment 1:
As shown in Figure 1, the present invention provides a kind of calculation method of automatic test coverage rate, include the following steps:
S1. original testing requirement is obtained, it is N that original testing requirement sum, which is arranged,;
S2. the demand for being suitble to automatic test is obtained from original testing requirement according to automatic test extraction standard, is set as Effective demand, setting effective demand sum are M, M<N;The automatic test extraction standard includes:Automatic test extracts non- The effective demand of chart class, the non-report class of automatic test extraction effectively need and automatic test extracts non-locating element plug-in Class effective demand;
S3. each effective demand is split into several automatic test cases, sets the automatic test of each effective demand Use-case is effective use-case, obtains the number C of effective use-case, is recorded as C1, C2... CM;According to basic function by each effective demand Several automatic test cases are split into according to automatic test mode;
S4. the covering use-case number D that each effective demand is obtained according to the effective use-case that can actually cover, is recorded as D1, D2... DM
S5. the total C of effective use-case of all effective demands is calculatedAlways, calculate the total D of the covering use-case of all effective demandsAlways
S6. calculation automation tests Efficient Coverage Rate, is equal to DAlways/CAlways
Embodiment 2:
As shown in figure 3, a kind of calculation method of automatic test coverage rate using above-described embodiment 1, includes the following steps:
S1. original testing requirement is obtained, it is N, respectively original testing requirement 1, original test that original testing requirement sum, which is arranged, The original testing requirement N of demand 2 ...;Original testing requirement is provided by research and development, consistent with manual test demand;
S2. the demand for being suitble to automatic test is obtained from original testing requirement according to automatic test extraction standard, is set as Effective demand, setting effective demand sum are M, respectively effective demand 1, effective demand 2 ... effective demand N, M<N;It is described Automatic test extraction standard includes:Automatic test extracts non-chart class effective demand, automatic test extracts non-report class It effectively needs and automatic test extracts the class effective demand of non-locating element plug-in;
S3. each effective demand is split into several automatic test cases, sets the automatic test of each effective demand Use-case is effective use-case, obtains the number C of effective use-case, is recorded as C1, C2... CM;According to basic function by each effective demand Several automatic test cases are split into according to automatic test mode;
S4. the covering use-case number D that each effective demand is obtained according to the effective use-case that can actually cover, is recorded as D1, D2... DM
S5. the total C of effective use-case of all effective demands is calculatedAlways=C1+C2+…CM, calculate the covering use of all effective demands The total D of exampleAlways=D1+D2+…DM
S6. calculation automation tests Efficient Coverage Rate, is equal to DAlways/CAlways
Embodiment 3:
As shown in Fig. 2, a kind of computing system of automatic test coverage rate, including:
Original testing requirement obtains module 1, and for obtaining original testing requirement, it is N that original testing requirement sum, which is arranged,;
Effective demand obtains module 2, is suitble to automatically for being obtained from original testing requirement according to automatic test extraction standard The demand for changing test, is set as effective demand, and setting effective demand sum is M;Automatic test extraction standard includes:Automation The non-chart class effective demand of Test extraction, the non-report class of automatic test extraction effectively need and automatic test extraction is non-fixed Position element plug-in class effective demand;
Effective demand automatic test cases split module 3, for each effective demand to be split into several automatic tests Use-case sets the automatic test cases of each effective demand as effective use-case, obtains the number C of effective use-case, be recorded as C1, C2... CM;Each effective demand is split into several automation validity tests according to automatic test mode according to basic function Use-case;
It covers use-case number and obtains module 4, used according to the covering that the effective use-case that can actually cover obtains each effective demand Number of cases mesh D, is recorded as D1, D2... DM
Effective use-case sum and covering use-case sum computing module 5, calculate the total C of effective use-case of all effective demandsAlways, meter Calculate the total D of the covering use-case of all effective demandsAlways
Automatic test Efficient Coverage Rate computing module 6 tests Efficient Coverage Rate for calculation automation, is equal to DAlways/CAlways
The embodiment of the present invention be it is illustrative and not restrictive, above-described embodiment be only to aid in understanding the present invention, because The present invention is not limited to the embodiments described in specific embodiment for this, all by those skilled in the art's technology according to the present invention Other specific embodiments that scheme obtains, also belong to the scope of protection of the invention.

Claims (8)

1. a kind of calculation method of automatic test coverage rate, which is characterized in that include the following steps
S1. original testing requirement is obtained, it is N that original testing requirement sum, which is arranged,;
S2. the demand for being suitble to automatic test is obtained from original testing requirement, is set as effective demand, and setting effective demand is total Number is M, M<N;
S3. each effective demand is split into several automatic test cases, sets the automatic test of each effective demand Use-case is effective use-case, obtains the number C of effective use-case, is recorded as C1, C2... CM
S4. the covering use-case number D that each effective demand is obtained according to the effective use-case that can actually cover, is recorded as D1, D2,…DM
S5. the total C of effective use-case of all effective demands is calculatedAlways, calculate the total D of the covering use-case of all effective demandsAlways
S6. calculation automation tests Efficient Coverage Rate, is equal to DAlways/CAlways
2. a kind of calculation method of automatic test coverage rate as described in claim 1, which is characterized in that basis in step S2 Automatic test extraction standard obtains the demand for being suitble to automatic test from original testing requirement.
3. a kind of calculation method of automatic test coverage rate as claimed in claim 2, which is characterized in that the automation is surveyed Trying extraction standard includes:Automatic test extracts non-chart class effective demand, automatic test extracts non-report class and effectively needs And automatic test extracts the class effective demand of non-locating element plug-in.
4. a kind of calculation method of automatic test coverage rate as described in claim 1, which is characterized in that basis in step S3 Each effective demand is split into several automatic test cases according to automatic test mode by basic function.
5. a kind of computing system of automatic test coverage rate, which is characterized in that including:
Original testing requirement obtains module(1), for obtaining original testing requirement, it is N that original testing requirement sum, which is arranged,;
Effective demand obtains module(2), for obtaining the demand for being suitble to automatic test from original testing requirement, it is set as having Effect demand, setting effective demand sum are M;
Effective demand automatic test cases split module(3), surveyed for each effective demand to be split into several automations Example on probation, sets the automatic test cases of each effective demand as effective use-case, obtains the number C of effective use-case, be recorded as C1, C2... CM
It covers use-case number and obtains module(4), the covering of each effective demand is obtained according to the effective use-case that can actually cover Use-case number D, is recorded as D1, D2... DM
Effective use-case sum and covering use-case sum computing module(5), calculate the total C of effective use-case of all effective demandsAlways, Calculate the total D of the covering use-case of all effective demandsAlways
Automatic test Efficient Coverage Rate computing module(6), Efficient Coverage Rate is tested for calculation automation, is equal to DAlways/CAlways
6. a kind of computing system of automatic test coverage rate as claimed in claim 5, which is characterized in that effective demand obtains Module(2)It is middle to obtain the demand for being suitble to automatic test from original testing requirement according to automatic test extraction standard.
7. a kind of computing system of automatic test coverage rate as claimed in claim 6, which is characterized in that the automation is surveyed Trying extraction standard includes:Automatic test extracts non-chart class effective demand, automatic test extracts non-report class and effectively needs And automatic test extracts the class effective demand of non-locating element plug-in.
8. a kind of computing system of automatic test coverage rate as claimed in claim 5, which is characterized in that effective demand is automatic Change test case and splits module(3)In, if each effective demand is split into according to automatic test mode according to basic function Dry automation validity test use-case.
CN201810923987.2A 2018-08-14 2018-08-14 A kind of calculation method and system of automatic test coverage rate Pending CN108845951A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810923987.2A CN108845951A (en) 2018-08-14 2018-08-14 A kind of calculation method and system of automatic test coverage rate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810923987.2A CN108845951A (en) 2018-08-14 2018-08-14 A kind of calculation method and system of automatic test coverage rate

Publications (1)

Publication Number Publication Date
CN108845951A true CN108845951A (en) 2018-11-20

Family

ID=64188151

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810923987.2A Pending CN108845951A (en) 2018-08-14 2018-08-14 A kind of calculation method and system of automatic test coverage rate

Country Status (1)

Country Link
CN (1) CN108845951A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110674044A (en) * 2019-09-24 2020-01-10 携程旅游网络技术(上海)有限公司 Method, system, device and medium for acquiring coverage rate of function automation test
CN111694741A (en) * 2020-06-05 2020-09-22 中国工程物理研究院计算机应用研究所 Test case design method based on path depth coverage

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021094A (en) * 2016-04-29 2016-10-12 南京慕测信息科技有限公司 Program static analysis based Java unit test teaching feedback method
CN107729256A (en) * 2017-11-16 2018-02-23 郑州云海信息技术有限公司 The correlating method and system of a kind of project demands and test case
CN107861876A (en) * 2017-11-16 2018-03-30 平安科技(深圳)有限公司 Method of testing, device, computer equipment and readable storage medium storing program for executing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021094A (en) * 2016-04-29 2016-10-12 南京慕测信息科技有限公司 Program static analysis based Java unit test teaching feedback method
CN107729256A (en) * 2017-11-16 2018-02-23 郑州云海信息技术有限公司 The correlating method and system of a kind of project demands and test case
CN107861876A (en) * 2017-11-16 2018-03-30 平安科技(深圳)有限公司 Method of testing, device, computer equipment and readable storage medium storing program for executing

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110674044A (en) * 2019-09-24 2020-01-10 携程旅游网络技术(上海)有限公司 Method, system, device and medium for acquiring coverage rate of function automation test
CN110674044B (en) * 2019-09-24 2023-09-01 携程旅游网络技术(上海)有限公司 Coverage rate acquisition method, system, equipment and medium for function automation test
CN111694741A (en) * 2020-06-05 2020-09-22 中国工程物理研究院计算机应用研究所 Test case design method based on path depth coverage
CN111694741B (en) * 2020-06-05 2023-09-29 中国工程物理研究院计算机应用研究所 Test case design method based on path depth coverage

Similar Documents

Publication Publication Date Title
Hu et al. Assessing the impacts of climate variability and human activities on streamflow in the water source area of Baiyangdian Lake
Lebel et al. From GCM scales to hydrological scales: rainfall variability in West Africa
Chu et al. Spatial and temporal variability of daily precipitation in Haihe River basin, 1958–2007
CN104155580B (en) Voltage sag source positioning method with association analysis and electric power calculation being combined
CN106940439B (en) K mean cluster based on wireless acoustic sensor network weights sound localization method
CN105115873A (en) Non-destructive testing method for concrete anti-permeability
CN109461095A (en) A kind of data processing method and equipment of the load event detection for the identification of non-intrusion type load
CN101865789A (en) Fault detecting device of near field acoustic holography sound image mode identification and detecting method thereof
CN106195646A (en) Leak and be distributed estimating device, deduction system and presumption method
CN107013813B (en) A kind of water supply line leakage rate estimating system and method
CN105425267A (en) System and method for measuring evolution rate of radon
CN108845951A (en) A kind of calculation method and system of automatic test coverage rate
GUO et al. Prediction of future runoff change based on Budyko hypothesis in Yangtze River basin
CN105844038B (en) A kind of highway polymorphic type traffic detector Combinatorial Optimization distribution method
Conan et al. Sand erosion technique applied to wind resource assessment
CN105046046B (en) A kind of Ensemble Kalman Filter localization method
CN104535109A (en) Mine shaft down hole thermal environment evaluation method and device
CN206741554U (en) The house type 3D modeling system of indoor 3D scanning devices based on depth camera
CN103729810B (en) A kind of embedded green building Visual evaluation diagnostic method
CN103995147B (en) A kind of Data Post Processing System being applicable to acoustic Doppler velocimetry and application
CN110377989A (en) Two Variational Design flood calculation method of nonuniformity based on hydrothermal reaction coupling balance
CN108615054B (en) Method for constructing comprehensive index for measuring similarity between drainage pipe network nodes
CN107328416B (en) A kind of smart phone real-time location method based on earth magnetism
CN104091213A (en) Building floor surface temperature prediction method and system
CN202253571U (en) Acoustic monitoring location device for boiler tube leakage

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181120

RJ01 Rejection of invention patent application after publication