CN110968507B - Coverage rate statistics method and coverage rate statistics device - Google Patents

Coverage rate statistics method and coverage rate statistics device Download PDF

Info

Publication number
CN110968507B
CN110968507B CN201911143693.9A CN201911143693A CN110968507B CN 110968507 B CN110968507 B CN 110968507B CN 201911143693 A CN201911143693 A CN 201911143693A CN 110968507 B CN110968507 B CN 110968507B
Authority
CN
China
Prior art keywords
service
test
test requirements
statistics
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.)
Active
Application number
CN201911143693.9A
Other languages
Chinese (zh)
Other versions
CN110968507A (en
Inventor
代春美
孙海燕
张颖康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Chuangxin Journey Network Technology Co ltd
Original Assignee
Beijing Chuangxin Journey Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Chuangxin Journey Network Technology Co ltd filed Critical Beijing Chuangxin Journey Network Technology Co ltd
Priority to CN201911143693.9A priority Critical patent/CN110968507B/en
Publication of CN110968507A publication Critical patent/CN110968507A/en
Application granted granted Critical
Publication of CN110968507B publication Critical patent/CN110968507B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3676Test management for coverage analysis

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

Aspects of the embodiments of the present invention relate to coverage statistics methods and apparatus. The coverage rate statistical method comprises the following steps: acquiring a plurality of test requirements of concurrent tests, wherein each test requirement in the plurality of test requirements comprises one or more services for executing the test requirement, and the services comprise compiled files of the services; and executing coverage rate statistics on each service in the plurality of test requirements to obtain coverage rate statistics files of each service in the plurality of test requirements, wherein the coverage rate statistics files are statistics files representing that compiled files of the service are tested. By the embodiment of the invention, coverage statistics can be provided for the test requirements of a plurality of parallel tests.

Description

Coverage rate statistics method and coverage rate statistics device
Technical Field
The embodiment of the invention relates to the technical field of Internet, in particular to a coverage rate statistical method and device.
Background
In the manual test process, in order to avoid missing the code of the service, after the service test is completed, the test coverage rate of the service source code needs to be counted for the service so as to master the test coverage rate of the service in the test.
At present, when the test coverage rate of the service source code is counted, the test coverage rate statistics of the service source code is only supported under the single test requirement.
However, as the software iterates faster, in order to improve the efficiency of software testing, it is often necessary to concurrently test multiple test requirements in batches, where each test requirement includes one or more services to be tested. After the concurrent test of the multiple test requirements of the current batch, the multiple test requirements of the next batch are deployed, and the concurrent test of the multiple test requirements of the next batch is performed.
Therefore, the test coverage statistics of the service source code under a single test requirement can not meet the scenario that a plurality of test requirements are tested in parallel.
Disclosure of Invention
In order to overcome the problems in the related art, the embodiment of the invention provides a coverage rate statistical method and a coverage rate statistical device.
In a first aspect, an embodiment of the present invention provides a coverage rate statistical method, where the coverage rate statistical method includes: acquiring a plurality of test requirements of concurrent tests, wherein each test requirement in the plurality of test requirements comprises one or more services for executing the test requirement, and the services comprise compiled files of the services; and executing coverage rate statistics on each service in the plurality of test requirements to obtain coverage rate statistics files of each service in the plurality of test requirements, wherein the coverage rate statistics files are statistics files representing that compiled files of the service are tested.
In one embodiment, performing coverage statistics for each service in a plurality of test requirements includes: and when the service in the plurality of test requirements is redeployed, carrying out coverage statistics on the service in the plurality of test requirements before redeployment to obtain coverage statistics files of each service in the plurality of test requirements before redeployment.
In an embodiment, the coverage statistics method further comprises: acquiring an identifier and a service name of each test requirement in a plurality of test requirements; and downloading and storing the coverage rate statistical file of each service in the plurality of test requirements to a specified catalogue according to the identification of each test requirement and the name of the service in the plurality of test requirements.
In an embodiment, the coverage statistics method further comprises: acquiring a compiling file of each service in each test requirement in a plurality of test requirements; and integrating the compiled files of the services in the plurality of test requirements and the coverage rate statistical files corresponding to the compiled files to obtain coverage rate statistical reports of the services in the plurality of test requirements.
In one embodiment, if the coverage statistics file of each service in the plurality of test requirements with the same name exists in the specified directory, the coverage statistics file of each service in the plurality of test requirements is updated.
In one embodiment, obtaining compiled files for each service in each of a plurality of test requirements includes: and acquiring the compiled file of each service in each test requirement according to the identification of each test requirement and the name of the service in the plurality of test requirements.
In a second aspect, an embodiment of the present invention provides a coverage rate statistics apparatus, where the coverage rate statistics apparatus includes: the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a plurality of test requirements of concurrent test, each test requirement in the plurality of test requirements comprises one or more services for executing the test requirement, and the services comprise compiled files of the services; and the processing unit is used for carrying out coverage rate statistics on each service in the plurality of test requirements to obtain coverage rate statistics files of each service in the plurality of test requirements, wherein the coverage rate statistics files are statistics files representing that compiled files of the service are tested.
In one embodiment, the processing unit performs coverage statistics for each service in the plurality of test requirements in the following manner: and when the service in the plurality of test requirements is redeployed, carrying out coverage statistics on the service in the plurality of test requirements before redeployment to obtain coverage statistics files of each service in the plurality of test requirements before redeployment.
In an embodiment, the acquisition unit is further configured to: acquiring an identifier and a service name of each test requirement in a plurality of test requirements; and downloading and storing the coverage rate statistical file of each service in the plurality of test requirements to a specified catalogue according to the identification of each test requirement and the name of the service in the plurality of test requirements.
In an embodiment, the acquisition unit is further configured to: acquiring a compiling file of each service in each test requirement in a plurality of test requirements; the processing unit is further configured to: and integrating the compiled files of the services in the plurality of test requirements and the coverage rate statistical files corresponding to the compiled files to obtain coverage rate statistical reports of the services in the plurality of test requirements.
In an embodiment, the coverage statistics apparatus further comprises: and the updating unit is used for updating the coverage rate statistical file of each service in the plurality of test requirements if the coverage rate statistical file of each service in the plurality of test requirements with the same name exists in the appointed catalogue.
In one embodiment, the obtaining unit obtains the compiled file of each service in each of the plurality of test requirements in the following manner: and acquiring the compiled file of each service in each test requirement according to the identification of each test requirement and the name of the service in the plurality of test requirements.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory for storing instructions; and a processor for invoking the memory-stored instructions to perform any of the methods described above.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium having stored thereon computer-executable instructions that, when run on a computer, perform any of the methods described above.
According to the coverage rate statistics method and device provided by the embodiment of the invention, through obtaining the multiple test requirements of concurrent test, each test requirement in the multiple test requirements comprises one or more services needing to execute the test requirement, the services comprise compiled files of the services, and coverage rate statistics can be executed on each service in the multiple test requirements to obtain coverage rate statistics files of each service in the multiple test requirements. By the embodiment of the invention, coverage statistics can be provided for the test requirements of a plurality of parallel tests.
Drawings
The above, as well as additional purposes, features, and advantages of embodiments of the present invention will become apparent in the following detailed written description and claims upon reference to the accompanying drawings. Several embodiments of the present invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
FIG. 1 is a flowchart of an implementation of a coverage statistics method provided by an embodiment of the present invention;
FIG. 2 is a flowchart of another implementation of the coverage statistics method provided by the embodiment of the present invention;
FIG. 3 is a flowchart of another implementation of the coverage statistics method provided by the embodiment of the present invention;
FIG. 4 is a flowchart of another implementation of the coverage statistics method provided by the embodiment of the present invention;
fig. 5 is a schematic diagram of a coverage rate statistics device according to an embodiment of the present invention.
Detailed Description
The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are presented merely to enable those skilled in the art to better understand and practice the invention and are not intended to limit the scope of the invention in any way.
It should be noted that, although the terms "first", "second", etc. are used herein to describe various modules, steps, data, etc. of the embodiments of the present invention, the terms "first", "second", etc. are merely used to distinguish between the various modules, steps, data, etc. and do not denote a particular order or importance. Indeed, the expressions "first", "second", etc. may be used entirely interchangeably.
The coverage rate statistical method and the coverage rate statistical device provided by the embodiment of the invention can be applied to the application scene of statistics of coverage rate of each service in multiple test requirements when the concurrent test is conducted aiming at the multiple test requirements. In this scenario, the execution subject of the coverage rate statistics method may be a coverage rate statistics device, and the coverage rate statistics device may be a terminal such as a computer, a mobile terminal, or the like.
Fig. 1 is a flowchart of a coverage statistics method implementation provided in an embodiment of the present invention. As shown in fig. 1, the method includes:
in step S101, a plurality of test requirements for concurrent testing are obtained, each of the plurality of test requirements including one or more services for which the test requirement needs to be executed, the services including compiled files of the services.
In the embodiment of the invention, a plurality of test requirements are tested simultaneously, and each test requirement comprises one or a plurality of different services to be tested. One service may be tested in multiple test requirements. Wherein testing a service is understood to be testing compiled files of the service
For example, there are two test requirements, namely test requirement 1 and test requirement 2, where test requirement 1 has service 1, service 2 and service 3 to be tested, and test requirement 2 has service 1, service 3 and service 5 to be tested. The test requirement 1 and the test requirement 2 are tested concurrently, namely, the test requirement 1 is tested for the service 1, the service 2 and the service 3 in the test requirement 1, and the test requirement 2 is tested for the service 1, the service 3 and the service 5 in the test requirement 2.
In step S102, coverage statistics is performed on each service in the plurality of test requirements, so as to obtain coverage statistics files of each service in the plurality of test requirements, where the coverage statistics files are statistics files representing that compiled files of the service are tested.
In the embodiment of the invention, the concurrent test is performed on a plurality of test requirements, namely after corresponding test is respectively performed on the services in the plurality of test requirements, coverage statistics can be performed on each service after the test is performed in the plurality of test requirements, and coverage statistics files of each service in the plurality of test requirements are obtained. The coverage rate statistical file is a statistical file for representing that the compiled file of the service is tested.
In the embodiment of the invention, by acquiring a plurality of test requirements for concurrent testing, each test requirement in the plurality of test requirements comprises one or more services requiring execution of the test requirement, the services comprise compiled files of the services, and coverage statistics can be executed on each service in the plurality of test requirements to obtain coverage statistics files of each service in the plurality of test requirements. By the embodiment of the invention, coverage statistics can be provided for the test requirements of a plurality of parallel tests.
Fig. 2 is a flowchart of another implementation of the coverage statistics method according to an embodiment of the present invention. As shown in fig. 2, the coverage statistics method includes step S201 and step S202. Step S201 is similar to the execution process of step S101 in fig. 1, and the embodiment of the present invention is not described herein again. The method comprises the following steps:
in step S202: and when the service in the plurality of test requirements is redeployed, carrying out coverage statistics on the service in the plurality of test requirements before redeployment to obtain coverage statistics files of each service in the plurality of test requirements before redeployment.
In one embodiment, after the service in the plurality of test requirements is deployed and tested, when the service in the plurality of test requirements is deployed again and tested, the coverage statistics instruction is triggered, and the coverage statistics is respectively executed for the service in the plurality of test requirements. And after the coverage statistics is carried out on the services in the plurality of test requirements, obtaining coverage statistics files of the services in the plurality of test requirements, wherein the services are tested by the coverage statistics files.
According to the embodiment of the invention, when the service in the plurality of test requirements is redeployed, the coverage rate statistics of the service in the plurality of test requirements before redeployment is triggered, so that the test coverage rate of the test service can be automatically counted and executed when the service in the plurality of test requirements is deployed, and the efficiency of the service coverage rate statistics in the plurality of test requirements is improved.
In the embodiment of the invention, after the coverage statistics is performed on the services in the plurality of test requirements to obtain the coverage statistics file of each service in the plurality of test requirements, the coverage statistics file of the services in the plurality of test requirements can be stored independently.
Fig. 3 is a flowchart of another implementation of the coverage statistics method according to an embodiment of the present invention. As shown in fig. 3, the coverage statistics method includes steps S301 to S303. Steps S301 to S302 are similar to the steps S101 to S102 in fig. 1, and the embodiment of the present invention will not be described herein.
The method comprises the following steps:
in step S303, the identifier of each of the plurality of test requirements and the name of the service are obtained, and the coverage rate statistics file of each of the plurality of test requirements is downloaded and stored to the specified directory according to the identifier of each of the plurality of test requirements and the name of the service.
In one embodiment, in order to facilitate generating a coverage report of a service according to a coverage file of the service and a compiled file of the service, when deploying the service in a plurality of test requirements, an identifier of each test requirement in the plurality of test requirements and a name of the service may be obtained, coverage statistics is performed on the service in the plurality of test requirements, and after obtaining a coverage statistics file of each service in the plurality of test requirements, the coverage statistics file of each service in the plurality of test requirements is downloaded and stored to a specified directory according to the obtained identifier of each test requirement in the plurality of test requirements and the name of the service.
The specified directory in the embodiment of the present invention may be a directory determined according to the identification of the test requirement and the name of the service, for example, may be a directory in the form of "/identification of the test requirement/service".
In practical application, the obtained identifier and the service name of each test requirement in the plurality of test requirements may be the identifier and the service name of the test requirement obtained when the service in the plurality of test requirements is deployed.
And when the service in the plurality of test requirements is deployed, the branch name of the service is also acquired, the acquired identification of the test requirements, the name of the service and the branch name of the service are input into a coverage rate statistics tool as input parameters, a coverage rate statistics interface is called, according to the identification of the test requirements and the name of the service, in the service information of each test requirement in the plurality of test requirements stored in advance, the monitoring ports of the service container IP and the service are inquired, and according to the monitoring ports of the service container IP and the service, the file recording the test coverage rate information in the service container is downloaded. And storing the downloaded test coverage rate file according to the identification of the test requirement and the name of the service. For example, may be stored in a specified directory of "/identification of test requirements/services".
The service information of each test requirement in the plurality of test requirements is stored in advance, the multi-test service data set of the whole quantity of the multi-test requirements can be obtained at regular time, and the multi-test service data set of the whole quantity of the multi-test requirements is analyzed to obtain the identification of the multi-test requirements, the service name in each test requirement, the target container IP of the service and the branch name of the service. And the test requirement identification, the service name, the target container IP of the service and the branch name of the service are stored in a structured way by taking the test requirement identification and the service name as unique indexes. And if the test requirement identification + service name index already exists, updating the target container IP of the service and the branch name of the service. If the test requirement identification plus the service name index does not exist, the test requirement identification, the service name, the target container IP of the service, the monitoring port number of the service and the branch name of the service are stored in a structured mode.
And when the coverage rate statistical file of each service in the plurality of test requirements is stored in the appointed directory, if the coverage rate statistical file of each service in the plurality of test requirements with the same name exists in the appointed directory, updating the coverage rate statistical file of each service in the plurality of test requirements. And if the coverage rate statistical file of each service in the plurality of test requirements with the same name does not exist in the designated directory, storing the test coverage rate file under the designated directory.
For example, the test requirement identifier, the name of the service and the branch name of the service are input into a Java test coverage tool as input parameters, a coverage statistics interface of the Java test coverage tool is called, and the target container IP and the monitoring port number of the service are obtained through the test requirement identifier and the name of the service. And then downloading the test coverage rate files of the service in each test requirement according to the acquired target container IP and the monitoring port number of the service, distinguishing the test coverage rate files of the service A1, the service A2 and the service A3 which are respectively stored by the test requirement identifiers, and respectively storing the test coverage rate files into the storage addresses of the compiling files of the service. Namely under the service A1 directory of the test requirement identifier XQ1, under the service A2 directory of the test requirement identifier XQ2, and under the service A3 directory of the test requirement identifier XQ 3.
In addition, in order to facilitate obtaining a test coverage report of the service according to the test coverage file of the service and the compiled file of the service, the compiled file of the service may be stored in a directory of the service. For example, compiled files of services are stored in a directory of "/identification of test requirements/services".
For example, the multi-test service data set with the full quantity of the multi-test requirements is obtained at regular time, and the multi-test service data set with the full quantity of the multi-test requirements is analyzed to obtain the identification of the multi-test requirements, the service name in each test requirement, the target container IP of the service and the branch name of the service. And taking the test requirement identification and the service name as unique indexes, storing the test requirement identification, the service name, the target container IP of the service and the branch name of the service in a structured way, and storing the compiled file of the service in a directory of the service. And if the test requirement identification + service name index already exists, updating the target container IP of the service and the branch name of the service. If the test requirement identification plus the service name index does not exist, the test requirement identification, the service name, the target container IP of the service, the monitoring port number of the service and the branch name of the service are stored in a structured mode.
According to the embodiment of the invention, the coverage statistics is executed for each service in the plurality of test requirements, after the coverage statistics file of each service in the plurality of test requirements is obtained, the coverage statistics file of each service in the plurality of test requirements is downloaded and stored to the designated directory, so that the coverage statistics report of each service in the plurality of test requirements can be obtained conveniently according to the coverage statistics file of each service in the plurality of test requirements and the compiling file of each service in the plurality of test requirements.
Fig. 4 is a flowchart of another implementation of the coverage statistics method according to an embodiment of the present invention. As shown in fig. 4, the coverage statistics method includes steps S401 to S403. Steps S401 to S402 are similar to the execution process of steps S101 to S102 in fig. 1, and the embodiments of the present invention are not described herein again.
The method comprises the following steps:
in step S403, a compiled file of each service in each of a plurality of test requirements is obtained.
In the embodiment of the invention, the compiling file of each service in each test requirement is obtained, and the compiling file storing instruction of each service is executed after compiling the service in the test requirements based on the preset compiling file storing instruction of each service, so that the compiling files of the service in the test requirements are stored.
In practical application, in order to facilitate statistics of coverage rate of a service, when storing a compiled file of the service, the compiled file of the service may be stored according to an identifier of each test requirement in multiple test requirements and a name of the service.
In step S404, the compiled file of each service in the plurality of test requirements and the coverage statistics file corresponding to the compiled file are integrated to obtain coverage statistics reports of each service in the plurality of test requirements.
Because the coverage rate file is a code file, the tested coverage rate condition of each row of codes of the service compiling file cannot be intuitively obtained according to the coverage rate file. Therefore, compiling files of each service in the plurality of test requirements and coverage rate statistics files corresponding to the compiling files of each service in the plurality of test requirements are integrated, and coverage rate statistics reports of each service in the plurality of test requirements are obtained after integration. The coverage rate condition of each line of code of the service compiling file to be tested can be corresponding to the record in the coverage rate file in the integrated coverage rate report, so that the coverage rate statistical condition of the service can be intuitively mastered.
And when the compiled files of the services in the plurality of test requirements and the coverage rate statistical files corresponding to the compiled files are integrated to obtain coverage rate statistical reports of the services in the plurality of test requirements, whether the coverage rate statistical reports of the services are full coverage rate statistical reports of the services or incremental coverage rate statistical reports of the services can be determined according to the acquired branch names of the services. And if the branch name of the service is the standard branch name, integrating the compiled file of the service and the coverage rate statistical file corresponding to the compiled file to obtain a total coverage rate statistical report of the service. If the branch name of the service is the test branch name, integrating the compiled file of the service and the coverage rate statistical file corresponding to the compiled file to obtain an incremental coverage rate statistical report of the service.
The reference branch of the service may be understood as a branch for testing the service in order to implement the existing function of the service. The test branch of the service can be understood as a branch for testing the service in order to realize the service adding function based on the existing function of the service. The test coverage rate of the existing functions of the service can be checked through the full coverage rate statistical report of the service. The test coverage rate of the newly added function of the service can be checked on the basis of the existing function of the service through the incremental coverage rate statistical report of the service.
In addition, in practical application, a static file mapping mode can be adopted according to the storage path of the coverage rate report of the service to generate a uniform resource locator (Uniform Resource Locator, URL) of the coverage rate statistics report. The URL of the generated coverage statistics report is stored in a structured manner, for example, the stored data is: test requirement identification, service name, coverage statistics report URL, coverage statistics report generation time. Therefore, when a user needs to check the coverage rate statistics report, in the test coverage rate tool, the test coverage rate statistics report can be queried by clicking a URL of the coverage rate statistics report, and the service A1 test coverage rate report of the test requirement XQ1, the service A2 test coverage rate report of the test requirement identification XQ2 and the service A3 test coverage rate report of the test requirement identification XQ3 can be checked respectively.
According to the embodiment of the invention, after coverage statistics is executed for each service in a plurality of test requirements to obtain coverage statistics files of each service in the plurality of test requirements, compiling files of each service in the plurality of test requirements and coverage statistics files corresponding to compiling files of each service in the plurality of test requirements can be integrated to obtain coverage statistics reports of each service in the plurality of test requirements. Therefore, the user can conveniently and clearly check the coverage rate report of the service.
Based on the same inventive concept, the embodiment of the invention also provides a coverage rate statistics device.
As shown in fig. 5, a coverage statistics apparatus 500 provided in an embodiment of the present invention, where the apparatus 500 includes: an acquisition unit 501 and a processing unit 502.
The acquiring unit 501 is configured to acquire a plurality of test requirements for concurrent testing, where each test requirement in the plurality of test requirements includes one or more services that need to execute the test requirement, and the services include compiled files of the services; the processing unit 502 is configured to perform coverage statistics on each service in the plurality of test requirements, and obtain coverage statistics files of each service in the plurality of test requirements, where the coverage statistics files are statistics files representing that compiled files of the service are tested.
In one embodiment, the processing unit 502 performs coverage statistics for each service in the plurality of test requirements in the following manner: and when the service in the plurality of test requirements is redeployed, carrying out coverage statistics on the service in the plurality of test requirements before redeployment to obtain coverage statistics files of each service in the plurality of test requirements before redeployment.
In an embodiment, the obtaining unit 501 is further configured to: acquiring an identifier and a service name of each test requirement in a plurality of test requirements; and downloading and storing the coverage rate statistical file of each service in the plurality of test requirements to a specified catalogue according to the identification of each test requirement and the name of the service in the plurality of test requirements.
In an embodiment, the obtaining unit 501 is further configured to: acquiring a compiling file of each service in each test requirement in a plurality of test requirements; the processing unit 502 is further configured to: and integrating the compiled files of the services in the plurality of test requirements and the coverage rate statistical files corresponding to the compiled files to obtain coverage rate statistical reports of the services in the plurality of test requirements.
In an embodiment, the coverage statistics apparatus further comprises: and the updating unit 503 is configured to update the coverage rate statistics file of each service in the plurality of test requirements if the coverage rate statistics file of each service in the plurality of test requirements with the same name exists in the specified directory.
In one embodiment, the obtaining unit 501 obtains the compiled file of each service in each of the plurality of test requirements in the following manner: and acquiring the compiled file of each service in each test requirement according to the identification of each test requirement and the name of the service in the plurality of test requirements.
The embodiment of the invention also provides electronic equipment, which comprises: a memory for storing instructions; and a processor for invoking the memory-stored instructions to perform the method of any one of the possible embodiments described above.
Embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, perform a method according to any one of the possible embodiments described above.
The methods and apparatus of embodiments of the present invention may be implemented using standard programming techniques with various method steps being performed using rule-based logic or other logic. It should also be noted that the words "apparatus" and "module" as used herein and in the claims are intended to include implementations using one or more lines of software code and/or hardware implementations and/or equipment for receiving inputs.
Any of the steps, operations, or procedures described herein may be performed or implemented using one or more hardware or software modules alone or in combination with other devices. In one embodiment, the software modules are implemented using a computer program product comprising a computer readable medium containing computer program code capable of being executed by a computer processor for performing any or all of the described steps, operations, or programs.
The foregoing description of the implementations of the invention has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed, and modifications and variations are possible in light of the above teachings or may be acquired from practice of the invention. The embodiments were chosen and described in order to explain the principles of the invention and its practical application to enable one skilled in the art to utilize the invention in various embodiments and with various modifications as are suited to the particular use contemplated.

Claims (8)

1. A coverage statistics method, wherein the method comprises:
acquiring a plurality of test requirements of concurrent tests, wherein each test requirement in the plurality of test requirements comprises one or more services for executing the test requirement, and the services comprise compiled files of the services;
and when the service in the plurality of test requirements is redeployed, carrying out coverage rate statistics on the service in the plurality of test requirements before redeployment to obtain coverage rate statistics files of each service in the plurality of test requirements before redeployment, wherein the coverage rate statistics files are statistics files representing that compiled files of the service are tested.
2. The method of claim 1, wherein the method further comprises:
acquiring an identification of each test requirement in the plurality of test requirements and a name of a service;
and downloading and storing the coverage rate statistical file of each service in the plurality of test requirements to a specified directory according to the identification of each test requirement and the name of the service in the plurality of test requirements.
3. The method of any of claims 1-2, wherein the method further comprises:
acquiring a compiling file of each service in each test requirement in the plurality of test requirements;
and integrating the compiled files of the services in the plurality of test requirements and the coverage rate statistical files corresponding to the compiled files to obtain coverage rate statistical reports of the services in the plurality of test requirements.
4. The method of claim 2, wherein if coverage statistics for each service in the plurality of test requirements of the same name exist in the specified directory, updating the coverage statistics for each service in the plurality of test requirements.
5. The method of claim 3, wherein the obtaining compiled files for each service in each of the plurality of test requirements comprises:
and acquiring compiled files of each service in each test requirement according to the identification of each test requirement and the name of the service in the plurality of test requirements.
6. A coverage statistics apparatus, wherein the apparatus comprises:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a plurality of test requirements of concurrent tests, each test requirement in the plurality of test requirements comprises one or more services which need to execute the test requirement, and the services comprise compiled files of the services;
and the processing unit is used for carrying out coverage rate statistics on the services in the plurality of test requirements before redeployment when the services in the plurality of test requirements are redeployed, so as to obtain coverage rate statistics files of the services in the plurality of test requirements before redeployment, wherein the coverage rate statistics files are statistics files for representing that compiled files of the services are tested.
7. An electronic device, wherein the electronic device comprises:
a memory for storing instructions; and
a processor for invoking the instructions stored in the memory to perform the coverage statistics method of any one of claims 1 to 5.
8. A computer readable storage medium storing computer executable instructions which, when run on a computer, perform the coverage statistics method of any of claims 1 to 5.
CN201911143693.9A 2019-11-20 2019-11-20 Coverage rate statistics method and coverage rate statistics device Active CN110968507B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911143693.9A CN110968507B (en) 2019-11-20 2019-11-20 Coverage rate statistics method and coverage rate statistics device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911143693.9A CN110968507B (en) 2019-11-20 2019-11-20 Coverage rate statistics method and coverage rate statistics device

Publications (2)

Publication Number Publication Date
CN110968507A CN110968507A (en) 2020-04-07
CN110968507B true CN110968507B (en) 2023-07-25

Family

ID=70031001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911143693.9A Active CN110968507B (en) 2019-11-20 2019-11-20 Coverage rate statistics method and coverage rate statistics device

Country Status (1)

Country Link
CN (1) CN110968507B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113157574A (en) * 2021-04-19 2021-07-23 上海湃星信息科技有限公司 Software real object test coverage rate collection method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104391795A (en) * 2014-12-03 2015-03-04 北京京东尚科信息技术有限公司 Method and system for automatically testing coverage rate in distributed system
CN107908421A (en) * 2017-09-29 2018-04-13 北京创鑫旅程网络技术有限公司 The method and device of software code versions management and issue
CN109242135A (en) * 2018-07-16 2019-01-18 阿里巴巴集团控股有限公司 A kind of model method for running, device and service server
CN109614341A (en) * 2018-12-29 2019-04-12 微梦创科网络科技(中国)有限公司 A kind of test method and system of code coverage
CN110399287A (en) * 2018-04-24 2019-11-01 阿里巴巴集团控股有限公司 Using the coverage rate collection method and device of test

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679633B (en) * 2015-02-15 2017-05-03 北京空间飞行器总体设计部 Effectiveness evaluation method of multi-aircraft parallel test process
CN105404585B (en) * 2015-12-01 2018-09-04 腾讯科技(深圳)有限公司 Obtain the method and device of code coverage
EP3497574A4 (en) * 2016-08-09 2020-05-13 Sealights Technologies Ltd. System and method for continuous testing and delivery of software
CN108959059B (en) * 2017-05-19 2020-12-25 腾讯科技(深圳)有限公司 Test method and test platform
CN107480066B (en) * 2017-08-18 2020-10-30 网易(杭州)网络有限公司 Code coverage rate statistical method, device, storage medium, processor and terminal
CN109977127A (en) * 2019-02-28 2019-07-05 北京创鑫旅程网络技术有限公司 Data-updating method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104391795A (en) * 2014-12-03 2015-03-04 北京京东尚科信息技术有限公司 Method and system for automatically testing coverage rate in distributed system
CN107908421A (en) * 2017-09-29 2018-04-13 北京创鑫旅程网络技术有限公司 The method and device of software code versions management and issue
CN110399287A (en) * 2018-04-24 2019-11-01 阿里巴巴集团控股有限公司 Using the coverage rate collection method and device of test
CN109242135A (en) * 2018-07-16 2019-01-18 阿里巴巴集团控股有限公司 A kind of model method for running, device and service server
CN109614341A (en) * 2018-12-29 2019-04-12 微梦创科网络科技(中国)有限公司 A kind of test method and system of code coverage

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Code coverage for any kind of test in any kind of transcompiled cross-platform applications;Matthias Hirzel等;《INTUITEST 2016: Proceedings of the 2nd International Workshop on User Interface Test Automation》;第1-10页 *
代码覆盖率驱动的测试用例管理系统的设计与实现;褚悦;《中国优秀硕士学位论文全文数据库 信息科技辑》(第4期);I138-460 *
无线多媒体传感器网络部署控制算法;赵静;曾建潮;;信息与电子工程(第02期);第35-41页 *

Also Published As

Publication number Publication date
CN110968507A (en) 2020-04-07

Similar Documents

Publication Publication Date Title
US20180253373A1 (en) Systems and methods for automated web performance testing for cloud apps in use-case scenarios
CN111124420B (en) Compiling method, compiling device, electronic equipment and readable storage medium
CN105204986A (en) Automated product testing method, server and mobile equipment
CN110543427B (en) Test case storage method and device, electronic equipment and storage medium
CN104991821A (en) Monitor task batch processing method and apparatus
CN112769706B (en) Componentized routing method and system
CN109254765B (en) Timing task management method, device, computer equipment and storage medium
CN112463588A (en) Automatic test system and method, storage medium and computing equipment
CN113076253A (en) Test method and test device
CN111221727A (en) Test method, test device, electronic equipment and computer readable medium
CN110928770A (en) Software testing method, device, system, storage medium and electronic equipment
CN110134583B (en) Software testing and data processing method and device
CN110968507B (en) Coverage rate statistics method and coverage rate statistics device
CN106528551A (en) Memory application method and apparatus
CN109873731B (en) Test method, device and system
CN112612706A (en) Automated testing method, computer device and storage medium
CN111580853A (en) Universal generation method for multi-channel software installation package
CN105912467A (en) Performance test method and device
CN110674024A (en) Electronic equipment integration test system and method thereof
CN106951236B (en) Plug-in development method and device
CN113900937A (en) Script calling method and device, electronic device and storage medium
CN115878443A (en) Interface test script generation method and device, storage medium and electronic device
CN114816984A (en) JAVA program regression test method and test device
US10152466B2 (en) Comparing user interfaces
CN113220586A (en) Automatic interface pressure test execution method, device and system

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