CN110399287B - Coverage rate collection method and coverage rate collection device for application test - Google Patents

Coverage rate collection method and coverage rate collection device for application test Download PDF

Info

Publication number
CN110399287B
CN110399287B CN201810372399.4A CN201810372399A CN110399287B CN 110399287 B CN110399287 B CN 110399287B CN 201810372399 A CN201810372399 A CN 201810372399A CN 110399287 B CN110399287 B CN 110399287B
Authority
CN
China
Prior art keywords
coverage rate
application
test
coverage
collection
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
CN201810372399.4A
Other languages
Chinese (zh)
Other versions
CN110399287A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810372399.4A priority Critical patent/CN110399287B/en
Publication of CN110399287A publication Critical patent/CN110399287A/en
Application granted granted Critical
Publication of CN110399287B publication Critical patent/CN110399287B/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
    • 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

One or more embodiments of the present disclosure provide a coverage rate collection method and apparatus for application testing, where the method may include: adding coverage rate collection tasks in an application release stage, wherein the release stage is used for testing the application; configuring a starting triggering condition of the coverage rate collection task according to the received conditional configuration instruction; and in the operation process of the release stage, controlling the starting coverage rate collection operation according to the starting trigger condition so as to obtain the test coverage rate when the application is tested.

Description

Coverage rate collection method and coverage rate collection device for application test
Technical Field
One or more embodiments of the present disclosure relate to the field of application testing technologies, and in particular, to a coverage rate collection method and apparatus for application testing.
Background
In the related technology, a processing thought of a release pipeline is provided, and the release flow aiming at the application can be divided into a plurality of release phases connected in series by creating the release pipeline corresponding to the application, so that orderly processing operations such as framework, deployment, test and the like are carried out aiming at each release phase, and the quick and safe deployment of the application into a production environment is facilitated.
By collecting the test coverage rate in the test process, uncovered codes, invalid codes possibly existing, and the like can be effectively analyzed, and the test quality can be effectively ensured.
Disclosure of Invention
In view of this, one or more embodiments of the present disclosure provide a coverage rate collection method and apparatus for application testing.
In order to achieve the above object, one or more embodiments of the present disclosure provide the following technical solutions:
according to a first aspect of one or more embodiments of the present specification, there is provided a coverage rate collection method for application testing, including:
adding coverage rate collection tasks in an application release stage, wherein the release stage is used for testing the application;
configuring a starting triggering condition of the coverage rate collection task according to the received conditional configuration instruction;
and in the operation process of the release stage, controlling the starting coverage rate collection operation according to the starting trigger condition so as to obtain the test coverage rate when the application is tested.
According to a second aspect of one or more embodiments of the present specification, there is provided a coverage collection device for application testing, comprising:
the system comprises an adding unit, a coverage rate collecting task and a coverage rate collecting unit, wherein the coverage rate collecting task is added in an application release stage, and the release stage is used for testing the application;
the first configuration unit configures the starting trigger condition of the coverage rate collection task according to the received conditional configuration instruction;
and the first control unit is used for controlling the starting coverage rate collecting operation according to the starting triggering condition in the running process of the release stage so as to obtain the test coverage rate when the application is tested.
Drawings
FIG. 1 is a schematic architecture diagram of a coverage collection system for application testing, according to an exemplary embodiment.
FIG. 2 is a flow chart of a coverage collection method for application testing, provided in an exemplary embodiment.
FIG. 3 is a schematic diagram of an operation interface of a release pipeline according to an exemplary embodiment.
FIG. 4 is a schematic diagram of an execution state of a publication phase provided by an exemplary embodiment.
FIG. 5 is a schematic diagram of a test coverage report presentation interface provided by an exemplary embodiment.
Fig. 6 is a schematic diagram showing a coverage rate variation trend according to an exemplary embodiment.
Fig. 7 is a schematic diagram of an apparatus according to an exemplary embodiment.
Fig. 8 is a block diagram of a coverage collection device for application testing, provided in an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with aspects of one or more embodiments of the present description as detailed in the accompanying claims.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
In an embodiment, the coverage rate collection scheme of the application test of the present disclosure may be applied to an electronic device, for example, the electronic device may include a mobile phone, a PC, a tablet device, a notebook computer, a palm computer (PDAs, personal Digital Assistants), a wearable device (such as smart glasses, smart watches, etc.), and the present disclosure is not limited thereto. In the operation process, the electronic equipment can operate the coverage rate collection system of the application test to realize the coverage rate collection scheme of the application test in the specification. The coverage rate collection system of the application test can be started and run on the electronic device; of course, when employing techniques such as HTML5, the coverage collection system of the application test can be obtained and run without installing a corresponding application on the electronic device.
In one embodiment, FIG. 1 is a schematic architecture diagram of a coverage collection system for application testing, as provided in one exemplary embodiment. The coverage collection system for application testing may comprise a server 11, a network 12, several electronic devices as shown in fig. 1, such as the electronic devices may comprise a PC13, a PC14. In the running process, the server 11 can run a program on the server side of the coverage rate collection system for application testing so as to realize related functions such as processing; in the running process of the PC13 and the PC14, the program on the client side of the coverage rate collection system of the application test can be run to realize the functions of relevant display, man-machine interaction and the like, so that the coverage rate collection system of the application test is matched between the server 11 and the PC13 and the PC14.
The server 11 may be a physical server including a separate host, or the server 11 may be a virtual server carried by a host cluster. The electronic device may include other types of devices besides the PC13, PC14 described above, such as the following: cell phones, tablet devices, notebook computers, palm top computers (PDAs, personal Digital Assistants), wearable devices (e.g., smart glasses, smart watches, etc.), etc., as one or more embodiments of the present disclosure are not limited in this regard. And the network 12 for interaction between the PC13, the PC14 and the server 11 may include various types of wired or wireless networks. In one embodiment, the network 12 may include a public switched telephone network (Public Switched Telephone Network, PSTN) and the internet. It should be noted that: an application of a client of the coverage rate collection system for application testing may be pre-installed on an electronic device such that the client may be started and run on the electronic device; of course, when an online "client" such as HTML5 technology is employed, the client can be obtained and run without installing a corresponding application on the electronic device.
FIG. 2 is a flow chart of a coverage collection method for application testing, provided in an exemplary embodiment. As shown in fig. 2, the method may include the steps of:
and 202, adding coverage rate collection tasks in an application release stage, wherein the release stage is used for testing the application.
In an embodiment, the application corresponding release pipeline may include a plurality of release phases, and the specification may add a corresponding coverage rate collection task for at least one release phase, so that test coverage rates for the application may be collected during operation of the corresponding release phase.
In an embodiment, the release stage of the application can be displayed in the interface, so that the user can implement man-machine interaction based on the display content, and accordingly, a corresponding coverage rate collection task is conveniently added for the release stage.
In an embodiment, the background may automatically associate a preconfigured coverage collection module to a publication stage based on coverage collection tasks added by a user for the publication stage, such that the coverage collection module can be applied to perform coverage collection operations for applications tested in the publication stage.
In an embodiment, each coverage collection task may be implemented for only a single publication phase, while a user may add a corresponding coverage collection task for each publication phase of interest separately; alternatively, the same coverage collection task may correspond to multiple publication phases at the same time, so that the user may reduce the number of configurations to the coverage collection task.
And 204, configuring the starting triggering condition of the coverage rate collection task according to the received condition configuration instruction.
In an embodiment, by configuring the start trigger condition, the coverage rate collection operation can be automatically triggered based on the start trigger condition without manually starting the coverage rate collection operation by a user, so that the user operation can be simplified on one hand, and on the other hand, the coverage rate collection operation can be ensured to be accurately associated with a test process aiming at an application, and missing collection caused by too late starting time or multiple collection caused by too early starting time can be prevented, thereby being beneficial to improving the accuracy of the finally obtained test coverage rate.
In an embodiment, the start trigger condition may include any of the following: the application is deployed in the release stage, the first test task configured in the release stage is started, the second test task configured in the release stage is ended, and the like, which is not limited in this specification.
And step 206, controlling the starting coverage rate collection operation according to the starting triggering condition in the running process of the release stage so as to obtain the test coverage rate when the application is tested.
In an embodiment, according to the coverage rate collection task added in the above step, the background can automatically complete code instrumentation (or code instrumentation) in the application to be tested, so as to accurately implement coverage rate collection in the coverage rate collection operation.
In one embodiment, the test coverage resulting from the coverage collection operation may comprise any type, and this is not limiting of the present description; for example, the test coverage may include functional coverage (Function coverage), instruction coverage (Statement coverage), judgment coverage (Decision coverage), conditional coverage (Condition coverage), and the like.
In an embodiment, since the coverage collection task is added to a designated issue phase, if the user wishes to collect coverage for all codes tested subsequently to that issue phase after the coverage collection operation is initiated in step 206, the user does not need to actively configure the end trigger condition of the coverage collection task, and the coverage collection operation can be automatically terminated at the end of the issue phase.
In an embodiment, the condition configuration instruction may be further configured to configure an end trigger condition of the coverage collection task, so that the coverage collection operation may be controlled to terminate according to the end trigger condition. In particular, when the user only wants to collect coverage of a portion of the application code tested in the release phase, more precise control can be achieved by configuring the end trigger condition.
In an embodiment, the end trigger condition may include any of the following: the end of the release phase, the start of the third test task configured in the release phase, the end of the fourth test task configured in the release phase, the end of all the test tasks configured in the release phase, and the like, which is not limited in this specification.
In an embodiment, at least one functional module included in the application may be determined according to the received target configuration instruction; the at least one functional module is then configured as a target collection object to perform the coverage collection operation on the target collection object, avoiding performing the coverage collection operation on other functional modules contained by the application. In other words, the application may contain a plurality of function modules for realizing the corresponding one or more functions, and when the user focuses on only a part of the function modules therein, the focused part of the function modules may be configured as the target collection object described above by the target configuration instruction, thereby performing the coverage collection operation only for the target collection object.
In an embodiment, at least one functional module included in the application may be determined according to the received target configuration instruction; the at least one functional module is then configured as a target exclusion object to perform the coverage collection operation on other functional modules contained by the application, avoiding performing the coverage collection operation on the target exclusion object. In other words, the application may contain a plurality of functional modules for implementing the corresponding one or more functions, and when the user focuses on only some of the functional modules, the remaining functional modules not focused on may be configured as target exclusion objects described above by the target configuration instruction, so as to avoid performing a coverage rate collection operation for the target exclusion objects, while performing a coverage rate collection operation for other functional modules contained in the application.
In an embodiment, in the implementation process of the coverage rate collection operation, the information of the application running in the release stage and the information of the coverage rate collection task can be displayed in a correlated manner, so that visual display can be realized for a user between the coverage rate collection task configured in the foreground and the coverage rate collection operation implemented in the background, the user can accurately know the execution condition of the coverage rate collection task, and the problem and adjustment can be found in time conveniently.
In an embodiment, a test coverage rate corresponding to the current version of the application in the release stage may be displayed, so that the user knows the situation of the test. In an embodiment, the test coverage rate corresponding to the increment code in the release stage may be displayed according to the increment code of the current version of the application compared with the specified historical version, so that the user can know the condition of the current test compared with the previous test.
In an embodiment, the coverage rate collection operation respectively implemented in the release stage operation can be performed for a plurality of times according to the application, so as to obtain the test coverage rate respectively; and then, according to the statistical result of the acquired test coverage, displaying the change information of the test coverage, for example, the change information can be displayed in the form of a change curve.
For easy understanding, the technical solutions of one or more embodiments of the present specification will be described with reference to a man-machine interaction interface and an interaction process thereof, taking a release process of a software product as an example. Assuming that the software product is an application xx-app-agent, the code test automatically implemented is involved in the release process of the application, and the test condition can be better evaluated by collecting the test coverage rate in the test process.
FIG. 3 is a schematic diagram of an operation interface of a release pipeline according to an exemplary embodiment. As shown in fig. 3, in the operation interface 300 of the publishing pipeline for the application xx-app-agent, a visualization structure 306 of the publishing pipeline may be shown, where the visualization structure 306 indicates that there are several publishing phases for the application xx-app-agent, such as building, daily, prefire, formal, etc., so that the user a selects the publishing phase of interest.
In one embodiment, assume that user A selects the "prefire" publication phase. Further, the user a may add several tasks under the release phase "prefire" by triggering the "add node" option 304, such as the "prefire deployment" shown in fig. 3, the "coverage collection" represents the coverage collection type, the "test task" represents the test type, and so on. It can be seen that, by triggering the "add node" option 304, the user a can quickly add the coverage rate collection task in the "prefire" publishing stage, without focusing on the processes of association, processing, and the like of the background, which is helpful for simplifying the user operation and improving the configuration efficiency.
The background may associate a preconfigured coverage rate collection module to the "prefire" publishing stage, corresponding to a coverage rate collection task added by the user a in the operation interface 300, so that the coverage rate collection module may be applied to the running process of the publishing stage to collect the test coverage rate of the application code of the application xx-app-agent.
In one embodiment, for the coverage collection task created by user A, a configuration window 306, as shown in FIG. 3, may be presented to facilitate user A configuring the coverage collection task:
by configuring the "trigger collection condition" option, the user a may set the starting time of the coverage collection operation corresponding to the coverage collection task, for example, when the coverage collection operation is set to be "automatic trigger after deployment" in fig. 3, which indicates that the coverage collection operation will be automatically started after the application code of the application xx-app-agent completes deployment (corresponding to the above-mentioned "prefire deployment" task) in the "prefire" release stage. In fact, the test operation and the coverage rate collection operation in the related art belong to parallel events, and the user needs to manually start the test operation and the coverage rate collection operation respectively, so that the operation complexity of the user can be added, and the user needs to implement operations such as interrupt test and repeated start due to the fact that the user forgets to start in time or the synchronism problem of start is easy, so that the efficiency is influenced, and even the accuracy of the test coverage rate is influenced. Of course, besides "automatic triggering after deployment", the user a may configure the "trigger collection condition" option as other options, such as a certain test task start configured in the "prefire" issue phase, a certain test task end configured in the "prefire" issue phase, etc., which is not limited in this specification.
By configuring the "end collection condition" option, the user a may set the termination time of the coverage collection operation corresponding to the coverage collection task, for example, when the "automatic end after the end of the current stage" is set in fig. 3, it indicates that the coverage collection operation will be automatically terminated after the operation of the "prefire" release stage is completed. When a coverage collection task is added to the "prefire" publication phase, the coverage collection task can only occur in the "prefire" publication phase, and thus the coverage collection task can certainly be automatically terminated after the "prefire" publication phase is completed. Of course, besides "automatic end after current stage ends", the user a may configure the "end collection condition" option as other options, such as a certain test task start configured in the "prefire" issue stage, a certain test task end configured in the "prefire" issue stage, etc., which is not limited in this specification.
In the embodiment shown in fig. 3, the "trigger collection condition" option is configured as "automatic trigger after deployment" and the "end collection condition" option is configured as "automatic end after end of current stage", the test process occurring during the whole operation of the "prefire" release stage can be monitored, so as to completely output the collected test coverage rate. By reasonably configuring the option of triggering the collection condition and the option of ending the collection condition, the user A can collect coverage rate for part of the test processes in the release stage of the prefire, such as collecting only for part of the test tasks, thereby realizing more accurate and fine coverage rate collection operation.
In an embodiment, an application xx-app-agent may include a plurality of functional modules for implementing one or more functions. By configuring the option of "including Jar" or "excluding Jar" of the task of "coverage rate collection", the user a can select the functional module of interest in the application xx-app-agent, so that coverage rate collection is only performed on the testing process of the functional module of interest, and thus more accurate and fine coverage rate collection operation is realized. For example, by configuring the "include Jar" option to "11347-userA/userA. Git", the coverage collection operation may be performed only on the functional module corresponding to this "11347-userA/userA. Git" without performing coverage collection operations on other functional modules. For another example, by configuring the "exclude Jar" option, a functional module that is not of interest to the user may be selected, so that the coverage collection operation is not performed on the functional module that is not of interest, but only on other functional modules.
After the configuration is completed, the background can carry out code instrumentation on the application of the application xx-app-agent through a pre-configured coverage rate collection module, so that the code after the instrumentation can output corresponding feedback to reflect the test coverage rate of the code of the application in the test process. After the user A creates a 'coverage rate collection' task and configures task options in the foreground, code instrumentation operation can be automatically completed in the background without manual processing of the user A.
FIG. 4 is a schematic diagram of an execution state of a publication phase provided by an exemplary embodiment. After the above configuration is completed, the "prefire" publication phase may be triggered to run, and user a may view the relevant information in the execution state presentation interface 400 as shown in fig. 4. The operation of the 'prefire' release stage can be triggered independently, and the operation of the whole release pipeline can also be triggered; for example, in the embodiment shown in fig. 4, the "prefire" issue phase is triggered to run alone, which specifically includes sub-phases of build, deploy, integrate test, verify, etc., and is currently running in the integrate test sub-phase.
In the execution state presentation interface 400 shown in fig. 4, information of the running application and information of the coverage rate collection task may be presented in association at the same time, for example, the information of the application may include: the application name is xx-app-agent, the code version is 82e098403617, the initiating artificial user A, the operation time is 2018-03-15:14:45:23, and the like, and the information of the coverage rate collection task can comprise: start-up time 2018.3.15:00, etc. Through the above-mentioned association display operation, the user A can determine that the implementation object of the coverage rate collection task is really the application concerned by the user A and the application of the corresponding version of the application, and errors or other problems in the background operation process are avoided.
In the execution state presentation interface 400, several operation options may be provided to the user a, such as a view option 402, a coverage clear option 404, a report generation option 406, etc. shown in fig. 4, for satisfying the operation requirements of the user a. For example, by triggering view option 402, user a can view the collection for test coverage; by triggering the coverage clear option 404, user a may manually clear the collected coverage information; by triggering report generation option 406, user A may manually end the current coverage collection operation and generate a corresponding test coverage report.
FIG. 5 is a schematic diagram of a test coverage report presentation interface provided by an exemplary embodiment. After the coverage collection task is completed (either automatically based on the end collection condition or manually triggered by user a), a corresponding test coverage report may be generated and presented via a test coverage report presentation interface 500 as shown in fig. 5.
The test coverage report presentation interface 500 may include a test object information presentation area 502 and a test coverage report presentation area 504. When the user A selects 'latest operation', the tested object information display area 502 is used for displaying information such as a latest operated test set, tested application, tested environment, code version and the like, so that the user A can conveniently know the related information of the collected objects of coverage rate; and, the test coverage report displaying area 504 is configured to display a test coverage report corresponding to the coverage collecting operation performed last time, where the test coverage report may include a total test coverage corresponding to the coverage collecting operation performed last time, such as row coverage 41.31% and branch coverage 29.47% shown in fig. 5, and the test coverage report may further include an incremental test coverage, that is, a test coverage corresponding to the application running last time (a code difference exists between the application running last time and the application running last time) with respect to the incremental code of the application running last time, such as row incremental coverage 41.64% and method incremental coverage 41.94% shown in fig. 5.
When the user a selects "history running", a test coverage report corresponding to the coverage collection task configured in history may also be shown on the test coverage report display interface 500, and the content of the test coverage report is similar to the case of "recent running", and will not be described here again.
Fig. 6 is a schematic diagram showing a coverage rate variation trend according to an exemplary embodiment. As shown in FIG. 6, a region 602 and a region 604 may be included in the presentation interface 600, where the region 602 is configured to present coverage records corresponding to coverage collection operations that have been historically performed, and the region 604 is configured to graphically present test coverage corresponding to coverage records included in the region 602.
Taking the application xx-app-agent described above as an example, the presentation interface 600 may provide multiple alternative publishing phases, such as "prefire", "daily", "formal", etc., to the user a. Assuming that the user a selects the "prefire" release phase, the area 602 may intensively display the corresponding coverage records for the coverage collection task and the coverage collection operation configured in the "prefire" release phase, so as to facilitate the user a to view. Meanwhile, for the coverage rate record displayed in the area 602, the data of the corresponding test coverage rate can be generated into graphic data, for example, in a coverage rate trend chart shown in fig. 6, the numerical change of the test coverage rate is dynamically aggregated and displayed in a change curve mode, so that a user a can more intuitively determine the data of each test coverage rate and the change condition among coverage rate collection operations implemented for multiple times.
Fig. 7 is a schematic block diagram of an apparatus according to an exemplary embodiment. Referring to fig. 7, at the hardware level, the device includes a processor 702, an internal bus 704, a network interface 706, a memory 708, and a non-volatile storage 710, although other hardware required by the service is possible. The processor 702 reads the corresponding computer program from the non-volatile memory 710 into the memory 708 and then runs, forming a coverage collection means for application testing at the logic level. Of course, in addition to software implementation, one or more embodiments of the present disclosure do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or a logic device.
Referring to fig. 8, in a software implementation, the coverage rate collection device for application testing may include:
an adding unit 801, configured to add a coverage rate collection task in a release stage of an application, where the release stage is used to test the application;
a first configuration unit 802, configured to configure a start trigger condition of the coverage rate collection task according to the received conditional configuration instruction;
and the first control unit 803 is used for controlling the starting coverage rate collecting operation according to the starting triggering condition in the running process of the release stage so as to obtain the test coverage rate when the application is tested.
Optionally, the start trigger condition includes any one of the following:
the application is deployed in the release stage, a first test task configured in the release stage is started, and a second test task configured in the release stage is ended.
Optionally, the method further comprises: a second control unit 804 or a third control unit 805;
the second control unit 804 terminates the coverage rate collection operation at the end of the issue phase;
the third control unit 805 is further configured to control, when the condition configuration instruction is further configured to configure an end trigger condition of the coverage rate collection task, to terminate the coverage rate collection operation according to the end trigger condition.
Optionally, the end trigger condition includes any one of the following:
ending the release phase, starting a third test task configured in the release phase, ending a fourth test task configured in the release phase, and ending all test tasks configured in the release phase.
Optionally, the method further comprises:
a determining unit 806, configured to determine at least one functional module included in the application according to the received target configuration instruction;
a second configuration unit 807 that configures the at least one functional module as a target collection object to perform the coverage collection operation on the target collection object, avoiding performing the coverage collection operation on other functional modules included in the application; or configuring the at least one functional module as a target exclusion object to perform the coverage rate collection operation on other functional modules included in the application, and avoiding performing the coverage rate collection operation on the target exclusion object.
Optionally, the method further comprises:
and the first display unit 808 is used for performing association display on the information of the application running in the release stage and the information of the coverage rate collection task in the implementation process of the coverage rate collection operation.
Optionally, the method further comprises:
and a second display unit 809 displays the test coverage rate corresponding to the current version of the application in the release stage.
Optionally, the method further comprises:
and the third display unit 810 displays the test coverage rate corresponding to the increment code in the release stage according to the increment code of the current version of the application compared with the appointed historical version.
Optionally, the method further comprises:
an obtaining unit 811, configured to obtain test coverage rates obtained respectively according to coverage rate collection operations performed by the application during the release phase for a plurality of times, respectively;
and a fourth display unit 812 for displaying the variation information of the test coverage according to the statistical result of the acquired test coverage.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, read only compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by the computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The foregoing description of the preferred embodiment(s) is (are) merely intended to illustrate the embodiment(s) of the present invention, and it is not intended to limit the embodiment(s) of the present invention to the particular embodiment(s) described.

Claims (16)

1. A coverage rate collection method for application testing, comprising:
adding coverage rate collection tasks in at least one release stage of a release pipeline corresponding to an application, wherein the release stage is used for testing the application;
configuring a starting triggering condition of the coverage rate collection task according to the received conditional configuration instruction;
in the operation process of the release stage, controlling a start coverage rate collection operation according to the start triggering condition so as to obtain a test coverage rate when the application is tested;
when the condition configuration instruction is further used for configuring an end trigger condition of the coverage rate collection task, controlling and terminating the coverage rate collection operation according to the end trigger condition; wherein the end trigger condition includes the end of the publication phase.
2. The method of claim 1, wherein the start trigger condition comprises any one of:
the application is deployed in the release stage, a first test task configured in the release stage is started, and a second test task configured in the release stage is ended.
3. The method of claim 1, wherein the end trigger condition comprises any of:
ending the release phase, starting a third test task configured in the release phase, ending a fourth test task configured in the release phase, and ending all test tasks configured in the release phase.
4. The method as recited in claim 1, further comprising:
determining at least one functional module contained in the application according to the received target configuration instruction;
configuring the at least one functional module as a target collection object to perform the coverage collection operation on the target collection object, avoiding performing the coverage collection operation on other functional modules included in the application; or configuring the at least one functional module as a target exclusion object to perform the coverage rate collection operation on other functional modules included in the application, and avoiding performing the coverage rate collection operation on the target exclusion object.
5. The method as recited in claim 1, further comprising:
and in the implementation process of the coverage rate collection operation, carrying out association display on the information of the application running in the release stage and the information of the coverage rate collection task.
6. The method as recited in claim 1, further comprising:
and displaying the test coverage rate corresponding to the current version of the application in the release stage.
7. The method as recited in claim 1, further comprising:
and according to the increment code of the current version of the application compared with the appointed historical version, displaying the corresponding test coverage rate of the increment code in the release stage.
8. The method as recited in claim 1, further comprising:
acquiring test coverage rates respectively obtained according to coverage rate collection operations respectively implemented by the application for a plurality of times in the release stage operation;
and displaying the change information of the test coverage according to the statistical result of the acquired test coverage.
9. A coverage rate collection device for application testing, comprising:
the system comprises an adding unit, a coverage rate collecting unit and a coverage rate collecting unit, wherein the adding unit is used for adding coverage rate collecting tasks in at least one release stage of a release pipeline corresponding to an application, and the release stage is used for testing the application;
the first configuration unit configures the starting trigger condition of the coverage rate collection task according to the received conditional configuration instruction;
the first control unit is used for controlling the starting coverage rate collection operation according to the starting triggering condition in the running process of the release stage so as to obtain the test coverage rate when the application is tested;
the third control unit is used for controlling and terminating the coverage rate collection operation according to the ending triggering condition when the condition configuration instruction is also used for configuring the ending triggering condition of the coverage rate collection task; wherein the end trigger condition includes the end of the publication phase.
10. The apparatus of claim 9, wherein the start trigger condition comprises any one of:
the application is deployed in the release stage, a first test task configured in the release stage is started, and a second test task configured in the release stage is ended.
11. The apparatus of claim 9, wherein the end trigger condition comprises any of:
ending the release phase, starting a third test task configured in the release phase, ending a fourth test task configured in the release phase, and ending all test tasks configured in the release phase.
12. The apparatus as recited in claim 9, further comprising:
the determining unit is used for determining at least one functional module contained in the application according to the received target configuration instruction;
a second configuration unit, configured to configure the at least one functional module as a target collection object, to implement the coverage rate collection operation on the target collection object, and avoid implementing the coverage rate collection operation on other functional modules included in the application; or configuring the at least one functional module as a target exclusion object to perform the coverage rate collection operation on other functional modules included in the application, and avoiding performing the coverage rate collection operation on the target exclusion object.
13. The apparatus as recited in claim 9, further comprising:
and the first display unit is used for carrying out association display on the information of the application running in the release stage and the information of the coverage rate collection task in the implementation process of the coverage rate collection operation.
14. The apparatus as recited in claim 9, further comprising:
and the second display unit displays the test coverage rate corresponding to the current version of the application in the release stage.
15. The apparatus as recited in claim 9, further comprising:
and the third display unit displays the test coverage rate corresponding to the increment code in the release stage according to the increment code of the current version of the application compared with the appointed historical version.
16. The apparatus as recited in claim 9, further comprising:
the acquisition unit is used for acquiring the test coverage rate respectively according to coverage rate collection operations respectively implemented by the application for a plurality of times in the release stage operation;
and the fourth display unit displays the change information of the test coverage according to the statistical result of the acquired test coverage.
CN201810372399.4A 2018-04-24 2018-04-24 Coverage rate collection method and coverage rate collection device for application test Active CN110399287B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810372399.4A CN110399287B (en) 2018-04-24 2018-04-24 Coverage rate collection method and coverage rate collection device for application test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810372399.4A CN110399287B (en) 2018-04-24 2018-04-24 Coverage rate collection method and coverage rate collection device for application test

Publications (2)

Publication Number Publication Date
CN110399287A CN110399287A (en) 2019-11-01
CN110399287B true CN110399287B (en) 2024-03-01

Family

ID=68320109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810372399.4A Active CN110399287B (en) 2018-04-24 2018-04-24 Coverage rate collection method and coverage rate collection device for application test

Country Status (1)

Country Link
CN (1) CN110399287B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968507B (en) * 2019-11-20 2023-07-25 北京创鑫旅程网络技术有限公司 Coverage rate statistics method and coverage rate statistics device
CN111897737B (en) * 2020-08-21 2024-03-26 中国工商银行股份有限公司 Missing detection method and device for program test of micro-service system
CN112100073A (en) * 2020-09-16 2020-12-18 京东数字科技控股股份有限公司 Online development method and device of application program, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030093716A1 (en) * 2001-11-13 2003-05-15 International Business Machines Corporation Method and apparatus for collecting persistent coverage data across software versions
CN105630671A (en) * 2015-12-16 2016-06-01 北京奇虎科技有限公司 Code coverage rate report generation method and device
CN107480066A (en) * 2017-08-18 2017-12-15 网易(杭州)网络有限公司 Code coverage statistical method, device, storage medium, processor and terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030093716A1 (en) * 2001-11-13 2003-05-15 International Business Machines Corporation Method and apparatus for collecting persistent coverage data across software versions
CN105630671A (en) * 2015-12-16 2016-06-01 北京奇虎科技有限公司 Code coverage rate report generation method and device
CN107480066A (en) * 2017-08-18 2017-12-15 网易(杭州)网络有限公司 Code coverage statistical method, device, storage medium, processor and terminal

Also Published As

Publication number Publication date
CN110399287A (en) 2019-11-01

Similar Documents

Publication Publication Date Title
JP6952058B2 (en) Memory usage judgment technology
CN110399287B (en) Coverage rate collection method and coverage rate collection device for application test
US9280451B2 (en) Testing device
CN108459792B (en) Flow switching method and device and computer equipment
CN110502415B (en) Buried point setting method, device and equipment
EP3113020A1 (en) Data processing device and method for processing serial tasks
JP6117760B2 (en) System and method for facilitating user interface enabled review of static analysis alerts
CN109426415B (en) Method and device for generating cascade selector
US10193989B2 (en) Visualization of user behavior
US10430802B2 (en) Screen-image based classification
CN112364074B (en) Time sequence data visualization method, equipment and medium
CN104571916A (en) Method and device for executing terminal operating information
CN105824422A (en) Information processing method and electronic equipment
CN109284115A (en) A kind of method and device generating tracker script
CN110647459A (en) Application testing method and device
CN106648839A (en) Method and device for processing data
US20160342581A1 (en) Digital tagging specification generation
CN109240678B (en) Code generation method and device
CN110659406A (en) Searching method and device
CN112564996B (en) Pressure test flow scheduling, control method, equipment and computer readable medium
US11093041B2 (en) Computer system gesture-based graphical user interface control
CN109063645B (en) Filtering method, filtering device and storage medium
US10222858B2 (en) Thumbnail generation for digital images
CN109144809B (en) Focus change monitoring method, storage medium, electronic device and system
CN111679924B (en) Reliability simulation method and device for componentized software system and electronic equipment

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