CN114201410A - Method, device, equipment and medium for monitoring executed degree of test case - Google Patents

Method, device, equipment and medium for monitoring executed degree of test case Download PDF

Info

Publication number
CN114201410A
CN114201410A CN202111624978.1A CN202111624978A CN114201410A CN 114201410 A CN114201410 A CN 114201410A CN 202111624978 A CN202111624978 A CN 202111624978A CN 114201410 A CN114201410 A CN 114201410A
Authority
CN
China
Prior art keywords
information
test case
operation step
executed
step information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111624978.1A
Other languages
Chinese (zh)
Inventor
侯文龙
刘孟昕
林科锵
陈溪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202111624978.1A priority Critical patent/CN114201410A/en
Publication of CN114201410A publication Critical patent/CN114201410A/en
Pending legal-status Critical Current

Links

Images

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/3692Test management for test results 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/368Test management for test version control, e.g. updating test cases to a new software version
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Abstract

The disclosure provides a method, a device, equipment and a medium for monitoring the executed degree of a test case, which can be applied to the technical field of software testing and the technical field of finance. The method for monitoring the executed degree of the test case comprises the following steps: determining first operation step information, wherein the first operation step information is used for representing operation step information actually implemented in the process of executing the target test case; acquiring second operation step information, wherein the second operation step information is used for representing preset operation step information of the target test case; calculating the text similarity of the first operation step information and the second operation step information to obtain a first text similarity; and determining monitoring result information for representing the executed degree of the target test case according to the first text similarity.

Description

Method, device, equipment and medium for monitoring executed degree of test case
Technical Field
The present disclosure relates to the field of software testing technologies, and in particular, to a method, an apparatus, a device, a medium, and a program product for monitoring the executed degree of a test case.
Background
With continuous introduction and development maturity of ideas such as agility, iteration and lean in the field of software research and development, the research and development rhythm of software becomes faster and faster, the requirements for version acceptance test work quality are higher and higher in the face of acceleration of continuous optimization and update iteration speed of requirements, design and codes, and the accuracy of a version quality control team on version acceptance quality evaluation depends on the comprehensiveness of information collection in the test execution process of a tester and the objectivity degree of a test execution result fed back by the tester to a great extent.
In the related art, the feedback of the result information of the regression test verification of the tested system is usually performed by the manual blending mark of the test case execution state, but in the process of marking the test case execution state by the manual blending, the situation of mistaken blending or missed blending of the test result is easy to occur, and the situation of mistaken blending or missed blending is difficult to be found.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a method, an apparatus, a device, a medium, and a program product for monitoring the executed degree of a test case.
According to a first aspect of the present disclosure, a method for monitoring the executed degree of a test case is provided, including:
determining first operation step information, wherein the first operation step information is used for representing operation step information actually implemented in the process of executing the target test case;
acquiring second operation step information, wherein the second operation step information is used for representing preset operation step information of the target test case;
calculating the text similarity of the first operation step information and the second operation step information to obtain a first text similarity;
and determining monitoring result information for representing the executed degree of the target test case according to the first text similarity.
According to an embodiment of the present disclosure, determining first operation step information includes:
acquiring a plurality of pieces of operation record information from a test case execution record information base;
calculating the second text similarity of each piece of operation record information and the second operation step information;
and under the condition that the similarity of the second text is greater than a preset threshold value, sequencing the operation record information according to the operation time to obtain first operation step information.
According to the embodiment of the disclosure, the method further comprises the steps of obtaining test result information of the target test case;
and determining state information for representing the executed target test case according to the monitoring result information and the test result information.
According to the embodiment of the present disclosure, the determining the state information used for representing the executed target test case according to the monitoring result information and the test result information includes:
determining the state information as in-doubt state information under the condition that the operation steps with the monitoring result information as the target test case are all executed and the test result is that the test is not passed;
and under the condition that the operation steps with the monitoring result information as the target test case are not all executed and the test result is that the test is passed, determining the state information as the in-doubt state information.
According to the embodiment of the present disclosure, the determining the state information used for representing the executed target test case according to the monitoring result information and the test result information of the target test case includes:
determining the state information as a state to be confirmed under the condition that the operation steps with the monitoring result information as the target test case are not all executed and the test result is that the test is not passed;
and determining the state information to be a state to be confirmed under the condition that the operation steps with the monitoring result information as the target test case are all executed and the test result is lacked.
According to the embodiment of the present disclosure, calculating the text similarity between the first operation step information and the second operation step information to obtain the first text similarity includes:
and inputting the first operation step information and the second operation step information into a text matching model, and outputting the first text similarity.
According to an embodiment of the present disclosure, the method further includes:
acquiring a test case operation step data set, wherein the test case operation step data set comprises a plurality of pieces of historical test case operation step data, and each piece of historical test case operation step data comprises: the first text data is used for representing operation step information implemented in the process that the historical test case is executed; the second text data is used for representing preset operation step information of the historical test case;
and training a preset model by using the first text information and the second text information to obtain a text matching model.
A second aspect of the present disclosure provides a device for monitoring the executed degree of a test case, including: the device comprises a first determining module, a first obtaining module, a calculating module and a second determining module. The first determining module is used for determining first operation step information, wherein the first operation step information is used for representing operation step information implemented in the process that the target test case is executed. The first obtaining module is used for obtaining second operation step information, wherein the second operation step information is used for representing operation step information preset in the target test case. And the calculation module is used for calculating the text similarity of the first operation step information and the second operation step information to obtain the first text similarity. And the second determining module is used for determining monitoring result information used for representing the executed degree of the target test case according to the first text similarity.
According to an embodiment of the present disclosure, a first determination module includes a first acquisition unit, an output unit, and a sorting unit. The first acquisition unit is used for acquiring a plurality of pieces of operation record information from the test case execution record information base. And the output unit is used for inputting the plurality of pieces of operation record information and the second operation step information into the text matching model and outputting the second text similarity of each piece of operation record information and the second operation step information. And the sorting unit is used for sorting the operation record information according to the operation time under the condition that the similarity of the second text is greater than a preset threshold value to obtain the first operation step information.
According to the embodiment of the disclosure, the device further comprises a second obtaining module and a third determining module. And the second acquisition module is used for acquiring the test result information of the target test case. And the third determining module is used for determining state information used for representing the executed target test case according to the monitoring result information and the test result information.
According to an embodiment of the present disclosure, the third determination module includes a first determination unit and a second determination unit. And the first determining unit is used for determining the state information as the in-doubt state information under the condition that the operation steps with the monitoring result information as the target test case are all executed and the test result is that the test does not pass. And the second determining unit is used for determining the state information as the in-doubt state information under the condition that the operation steps of which the monitoring result information is the target test case are not all executed and the test result is that the test is passed.
According to an embodiment of the present disclosure, the third determination module includes a third determination unit and a fourth determination unit. And the third determining unit is used for determining the state information as the state to be confirmed under the condition that the operation steps with the monitoring result information as the target test case are not all executed and the test result is that the test fails. And the fourth determining unit is used for determining the state information as the state to be confirmed under the condition that the operation steps of which the monitoring result information is the target test case are all executed and the test result is lacked.
According to an embodiment of the present disclosure, a computing module includes a computing unit. And the calculation unit is used for inputting the first operation step information and the second operation step information into the text matching model and outputting the first text similarity.
According to the embodiment of the disclosure, the device further comprises a third acquisition module and a training module. The third obtaining module is configured to obtain a test case operation step data set, where the test case operation step data set includes multiple pieces of historical test case operation step data, and each piece of historical test case operation step data includes: the first text data is used for representing operation step information implemented in the process that the historical test case is executed; the second text data is used for representing preset operation step information of the historical test case. And the training module is used for training a preset model by utilizing the first text information and the second text information to obtain a text matching model.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and the memory is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method for monitoring the execution degree of the test case.
The fourth aspect of the present disclosure also provides a computer-readable storage medium, on which executable instructions are stored, and when executed by a processor, the instructions cause the processor to execute the method for monitoring the executed degree of the test case.
The fifth aspect of the present disclosure also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for monitoring the execution degree of the test case is implemented.
According to the embodiment of the disclosure, the monitoring result of the executed degree of the target test case is determined by calculating the text similarity between the operation step information actually implemented in the process of executing the target test case and the preset operation step information of the target test case. The method can monitor the actual execution degree of the target test case by the tester so as to find the condition that the tester wrongly exchanges or neglects exchanging the test result in time.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
FIG. 1 is a diagram schematically illustrating an application scenario of a method, apparatus, device, medium, and program product for monitoring the execution level of test cases according to an embodiment of the present disclosure;
FIG. 2 is a flow chart schematically illustrating a method for monitoring the execution degree of test cases according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a method of determining first operational step information according to an embodiment of the present disclosure;
FIG. 4 is a flow diagram schematically illustrating monitoring of the extent to which test cases are executed according to an embodiment of the present disclosure;
FIG. 5 is a diagram that schematically illustrates results of monitoring the extent to which test cases are executed, in accordance with an embodiment of the present disclosure;
FIG. 6 schematically illustrates an exemplary system framework diagram of a method for monitoring the extent to which test cases are executed, according to an embodiment of the present disclosure;
FIG. 7 is a block diagram schematically illustrating an exemplary embodiment of a device for monitoring the execution level of test cases according to the present disclosure; and
fig. 8 schematically shows a block diagram of an electronic device suitable for implementing the method for monitoring the execution degree of the test cases according to the embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
It should be noted that the method and the device for monitoring the executed degree of the test case disclosed by the present disclosure can be used in the financial field and the software testing technical field, and can also be used in any field except the financial field and the software testing technical field, and the application fields of the method and the device for monitoring the executed degree of the test case disclosed by the present disclosure are not limited.
The embodiment of the disclosure provides a method for monitoring the executed degree of a test case, which includes: determining first operation step information, wherein the first operation step information is used for representing operation step information actually implemented in the process of executing the target test case; acquiring second operation step information, wherein the second operation step information is used for representing preset operation step information of the target test case; calculating the text similarity of the first operation step information and the second operation step information to obtain a first text similarity; and determining monitoring result information for representing the executed degree of the target test case according to the first text similarity. And determining a monitoring result of the executed degree of the target test case by calculating the text similarity of the operation step information actually implemented in the executed process of the target test case and the preset operation step information of the target test case. The method can monitor the actual execution degree of the target test case by the tester so as to find the condition that the tester wrongly exchanges or neglects exchanging the test result in time.
Fig. 1 schematically illustrates an application scenario diagram of a method, an apparatus, a device, a medium, and a program product for monitoring the execution degree of a test case according to an embodiment of the present disclosure.
As shown in fig. 1, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and test a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the method for monitoring the execution degree of the test case provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the device for monitoring the execution degree of the test case provided by the embodiment of the present disclosure may be generally disposed in the server 105. The method for monitoring the executed degree of the test case provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the device for monitoring the execution degree of the test case provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The following describes in detail a method for monitoring the execution degree of the test case of the disclosed embodiment with reference to fig. 2 to 6 based on the scenario described in fig. 1.
Fig. 2 schematically shows a flowchart of a method for monitoring the execution degree of a test case according to an embodiment of the present disclosure.
As shown in FIG. 2, the monitoring of the executed degree of the test case of the embodiment includes operations S210 to S240.
In operation S210, first operation step information is determined, where the first operation step information is used to characterize operation step information actually implemented in the process of executing the target test case.
According to an embodiment of the present disclosure, the first operation step information may include operation step information of an actual implementation of the target test case a by a tester. For example: the actual operation step information of the target test case a is shown in table 1:
TABLE 1 operating step information for the actual implementation of the target test case A
Figure BDA0003438401500000081
Figure BDA0003438401500000091
In operation S220, second operation step information is obtained, where the second operation step information is used to represent preset operation step information of the target test case.
According to an embodiment of the present disclosure, the second operation step information may include operation step information preset by the definition module for the target test case a, for example: the second operation step information is shown in table 2:
TABLE 2 Preset operation step information for target test case A
Figure BDA0003438401500000092
Figure BDA0003438401500000101
In operation S230, the text similarity between the first operation step information and the second operation step information is calculated to obtain a first text similarity.
According to the embodiment of the disclosure, even if a tester actually executes each operation according to the preset operation steps, the obtained actually executed operation step information and the preset operation step information have a certain difference. For example: in the steps 2 and 4 in the preset operation step information in table 2, the design parameters of the target test case a are input in the preset operation step information by the fund account and the product code. When the target test case a is actually executed, the fund account and the product code corresponding to the operation step information actually implemented in table 1 are parameters actually input when the test case is executed, for example: the input parameter of the fund account is a bank card, and the input parameter of the product code is XX 001. But the difference of the parameters does not influence the monitoring result of the executed degree of the test case.
According to an embodiment of the present disclosure, for example: at step 11 in the operation step information preset in table 2, the checking mode is to check the displayed item in the page, and in the actual implementation process, the checking mode is generally determined by human eye observation of a tester, so that the checking step does not exist in the operation step information actually implemented in table 1.
According to an embodiment of the present disclosure, for example: the 10 th step in the operation step information is preset in the table 2, which indicates that a certain output parameter on the page is obtained, and in the actual implementation process, the process corresponds to the 10 th to 13 th steps in the operation step information which is actually implemented in the table 1.
According to the embodiment of the present disclosure, as can be seen from the above three examples, even if all the operation steps of the target test case a are completely executed, the actually implemented operation step information is different from the preset operation step information to some extent. Therefore, the similarity between the operation steps actually implemented by the target test case a and the preset operation steps can be determined by calculating the text similarity between the first operation step information and the second operation step information.
In operation S240, monitoring result information for characterizing the executed degree of the target test case is determined according to the first text similarity.
According to an embodiment of the present disclosure, for example: the text similarity between the actually implemented operation step information of the target test case a in table 1 and the preset operation step information of the target test case a in table 2 is 98%, and it can be determined that the monitoring result information of the executed degree of the target test case a is that the executed degree of the target test case a is 98%.
According to the embodiment of the disclosure, the monitoring result of the executed degree of the target test case is determined by calculating the text similarity between the operation step information actually implemented in the process of executing the target test case and the preset operation step information of the target test case. The method can monitor the actual execution degree of the target test case by the tester so as to find the condition that the tester wrongly exchanges or neglects exchanging the test result in time.
Fig. 3 schematically shows a flow chart of a method of determining first operational step information according to an embodiment of the present disclosure.
As shown in fig. 3, this embodiment includes S310 to S330.
In operation S31O, a plurality of pieces of operation record information are acquired from the test case execution record information library.
According to the embodiment of the disclosure, operation information of other works can be temporarily inserted in the process of executing the test case by the tester. All operation record information of a tester in the process of executing the test case can be acquired from the test case execution record information base. For example: 100 operation records A1-A100 are obtained.
In operation S320, a second text similarity of each piece of operation record information to the second operation step information is calculated.
According to an embodiment of the present disclosure, for example: the second operation step information includes B1-B20. The second text similarity of each of the operation records A1 through a100 to each of the operation step information of the second operation step information B1 through B20, respectively, may be calculated.
In operation S330, in a case that the second text similarity is greater than the preset threshold, the operation record information is sorted according to the operation time to obtain the first operation step information.
According to an embodiment of the present disclosure, for example: and if the operation records with the second text similarity larger than the preset threshold value comprise A15-A30, the obtained first operation step information is the operation records A15-A30.
According to the embodiment of the disclosure, by calculating the text similarity between each operation record in the test case execution record information base and the preset operation step information of the target test case, the operation step information actually implemented by the target test case is determined first, so that the determined operation step information actually implemented by the target test case is further analyzed in a targeted manner, and the accuracy of the monitoring result of the executed degree of the test case is improved.
Fig. 4 schematically shows a monitoring flow diagram of the executed degree of the test case according to the embodiment of the disclosure.
As shown in fig. 4, for example: 200 operation records are obtained from the test case execution record information base, and the text similarity of each operation record and the preset operation step of the target test case is calculated.
For example: the text similarity of the operation records A3-A17 and the preset operation steps of the X1 part of the target test case A exceeds a preset threshold, and the text similarity of the operation records A40-A62 and the preset operation steps of the X2 part of the target test case A exceeds a preset threshold, so that the operation records A3-A17 and the operation records A40-A62 can be sorted according to time to obtain the actually implemented operation step information corresponding to the target test case A. And determining the executed degree of the target test case A by calculating the text similarity of the operation step information after the operation records A3-A17 and the operation records A40-A62 are sequenced and the preset operation step information of the target test case A.
For example: the similarity of the texts of the operation records A20-A35 and the operation steps of the Y1 part of the target test case B exceeds a preset threshold, and the similarity of the texts of the operation records A89-A115 and the operation steps of the Y2 part of the target test case B exceeds a preset threshold, so that the operation records A20-A35 and A89-A115 can be sorted in time to obtain the actually implemented operation step information corresponding to the target test case B. And determining the executed degree of the target test case B by calculating the text similarity of the operation step information after the operation records A20-A35 and A89-A115 are sequenced and the preset operation step information of the target test case B.
According to an embodiment of the present disclosure, the method further includes:
acquiring test result information of a target test case;
and determining state information for representing the executed target test case according to the monitoring result information and the test result information.
According to the embodiment of the disclosure, the test result information of the target test case may include test pass and test fail.
According to an embodiment of the present disclosure, for example: the monitoring result information indicates that the executed degree of the target test case is 10%, but the test result information indicates that the target test case is not completely executed by the tester according to the preset operation steps, but the test result which is concocted by the tester fails, so that the executed degree of the target test case and the test result which is concocted by the tester can be determined to be contradictory, and the executed state of the target test case can be marked as being in doubt, so that relevant personnel can check in time.
According to the embodiment of the disclosure, the monitoring result of the executed degree of the test case is combined with the test result to reflect the executed state of the test case, so that related personnel can know the executed states of different test cases in time, track the executed process and result of the test case and discover misoperation or missing operation in the process of manually blending the test result.
According to the embodiment of the present disclosure, the determining the state information used for representing the executed target test case according to the monitoring result information and the test result information includes:
determining the state information as in-doubt state information under the condition that the operation steps with the monitoring result information as the target test case are all executed and the test result is that the test is not passed;
and under the condition that the operation steps with the monitoring result information as the target test case are not all executed and the test result is that the test is passed, determining the state information as the in-doubt state information.
According to the embodiment of the present disclosure, the determining the state information used for representing the executed target test case according to the monitoring result information and the test result information of the target test case includes:
determining the state information as a state to be confirmed under the condition that the operation steps with the monitoring result information as the target test case are not all executed and the test result is that the test is not passed;
and determining the state information to be a state to be confirmed under the condition that the operation steps with the monitoring result information as the target test case are all executed and the test result is lacked.
According to the embodiment of the disclosure, the executed state of the test case is comprehensively determined according to the monitoring result and the test result of the executed degree of the test case, so that relevant personnel can find the test case in the in-doubt state and the test case in the state to be confirmed in time, and can deploy the next step of work in time.
FIG. 5 is a diagram schematically illustrating a result of monitoring the degree to which test cases are executed according to an embodiment of the present disclosure.
As shown in fig. 5, the monitoring result of the executed degree of the test case of this embodiment can be displayed by the test case monitoring flag. Taking the monitoring procedure of the executed degree of the test case shown in fig. 4 as an example, the test case monitoring marks corresponding to the operation records A3-a 17 are a-X1, and the test case monitoring marks corresponding to the operation records a 40-a 62 are a-X2. The test case monitoring marks corresponding to the operation records A20-A35 are B-Y1, and the test case monitoring marks corresponding to the operation records A89-A115 are B-Y2. The monitoring result of the executed degree of the test case can be used for comparing with the test result actually submitted by the tester to determine the executed state of the target test case.
For example: the executed degree of the target test case a is 98%, but the test result of the target test case is failed, the test state of the target test case a may be marked as an in-doubt state. The executed degree of the target test case B is 20%, but the test result of the target test case is failed, the test state of the target test case B may be marked as a to-be-confirmed state, and it may be that the tester has not completely executed the target test case B.
Fig. 6 schematically illustrates an exemplary system framework diagram of a method for monitoring the execution degree of a test case according to an embodiment of the present disclosure.
As shown in fig. 6, the exemplary system framework of this embodiment includes a test case definition module 601, a test execution information capture module 602, a test case execution degree analysis module 603, a test case test result analysis module 604, and a test case execution state presentation module 605. The test case definition module 601 may be configured to define preset operation step information of each test case. The test execution information capturing module 602 may be configured to obtain operation step information of actual implementation of each test case being executed. The test case execution degree analysis module 603 may be configured to calculate text similarity between preset operation step information of the test case and actually implemented operation step information, and determine a monitoring result of the executed degree of the test case. The test case test result analysis module 604 may be configured to analyze the test result of the test case submitted by the tester and the monitoring result of the executed degree of the test case, and determine the executed state of the test case. The test case execution state display module 605 may be configured to display the executed state of the test case, so that relevant personnel can know the execution condition and the execution result of each test case in time.
According to the embodiment of the present disclosure, calculating the text similarity between the first operation step information and the second operation step information to obtain the first text similarity includes:
and inputting the first operation step information and the second operation step information into a text matching model, and outputting the first text similarity.
According to the embodiment of the present disclosure, the text similarity of the first operation step information and the second operation step information may be calculated by applying an ESIM text matching model. The local inference modeling can be completed by encoding the test case preset steps. And calculating the similarity between the operation step information actually implemented by the test case and the preset operation step information in the information used for actually implementing the test through semantic matching of the layered fragments.
According to the embodiment of the disclosure, the similarity between the actual implementation operation step information of the test case and the preset operation step information is calculated by applying the text matching model, so that the speed of the accuracy of similarity calculation can be improved.
According to an embodiment of the present disclosure, the method further includes:
acquiring a test case operation step data set, wherein the test case operation step data set comprises a plurality of pieces of historical test case operation step data, and each piece of historical test case operation step data comprises: the first text data is used for representing operation step information implemented in the process that the historical test case is executed; the second text data is used for representing preset operation step information of the historical test case;
and training a preset model by using the first text information and the second text information to obtain a text matching model.
According to the embodiment of the disclosure, the preset model is trained through the historical test case operation step data set, so that the matching accuracy of the text matching model is improved, and the accuracy of the monitoring result of the executed degree of the final test case is improved.
Based on the method for monitoring the executed degree of the test case, the disclosure also provides a device for monitoring the executed degree of the test case. The apparatus will be described in detail below with reference to fig. 7.
Fig. 7 is a block diagram schematically illustrating a structure of a device for monitoring the execution degree of test cases according to an embodiment of the present disclosure.
As shown in fig. 7, the device 700 for monitoring the executed degree of the test case in this embodiment includes a first determining module 701, a first obtaining module 702, a calculating module 703, and a second determining module 704.
The first determining module 701 is configured to determine first operation step information, where the first operation step information is used to characterize operation step information implemented in a process in which the target test case is executed.
The first obtaining module 702 is configured to obtain second operation step information, where the second operation step information is used to represent operation step information preset in the target test case.
The calculating module 703 is configured to calculate a text similarity between the first operation step information and the second operation step information, so as to obtain a first text similarity.
A second determining module 704, configured to determine, according to the first text similarity, monitoring result information used for characterizing the executed degree of the target test case.
According to an embodiment of the present disclosure, a first determination module includes a first acquisition unit, an output unit, and a sorting unit. The first acquisition unit is used for acquiring a plurality of pieces of operation record information from the test case execution record information base. And the output unit is used for inputting the plurality of pieces of operation record information and the second operation step information into the text matching model and outputting the second text similarity of each piece of operation record information and the second operation step information. And the sorting unit is used for sorting the operation record information according to the operation time under the condition that the similarity of the second text is greater than a preset threshold value to obtain the first operation step information.
According to the embodiment of the disclosure, the device further comprises a second obtaining module and a third determining module. And the second acquisition module is used for acquiring the test result information of the target test case. And the third determining module is used for determining state information used for representing the executed target test case according to the monitoring result information and the test result information.
According to an embodiment of the present disclosure, the third determination module includes a first determination unit and a second determination unit. And the first determining unit is used for determining the state information as the in-doubt state information under the condition that the operation steps with the monitoring result information as the target test case are all executed and the test result is that the test does not pass. And the second determining unit is used for determining the state information as the in-doubt state information under the condition that the operation steps of which the monitoring result information is the target test case are not all executed and the test result is that the test is passed.
According to an embodiment of the present disclosure, the third determination module includes a third determination unit and a fourth determination unit. And the third determining unit is used for determining the state information as the state to be confirmed under the condition that the operation steps with the monitoring result information as the target test case are not all executed and the test result is that the test fails. And the fourth determining unit is used for determining the state information as the state to be confirmed under the condition that the operation steps of which the monitoring result information is the target test case are all executed and the test result is lacked.
According to an embodiment of the present disclosure, a computing module includes a computing unit. And the calculation unit is used for inputting the first operation step information and the second operation step information into the text matching model and outputting the first text similarity.
According to the embodiment of the disclosure, the device further comprises a third acquisition module and a training module. The third obtaining module is configured to obtain a test case operation step data set, where the test case operation step data set includes multiple pieces of historical test case operation step data, and each piece of historical test case operation step data includes: the first text data is used for representing operation step information implemented in the process that the historical test case is executed; the second text data is used for representing preset operation step information of the historical test case. And the training module is used for training a preset model by utilizing the first text information and the second text information to obtain a text matching model.
According to the embodiment of the present disclosure, any plurality of the first determining module 701, the first obtaining module 702, the calculating module 703 and the second determining module 704 may be combined and implemented in one module, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first determining module 701, the first obtaining module 702, the calculating module 703 and the second determining module 704 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware and firmware, or implemented by a suitable combination of any of them. Alternatively, at least one of the first determining module 701, the first obtaining module 702, the calculating module 703 and the second determining module 704 may be at least partly implemented as a computer program module, which when executed may perform a corresponding function.
Fig. 8 schematically shows a block diagram of an electronic device suitable for implementing the method for monitoring the execution degree of the test cases according to the embodiment of the disclosure.
As shown in fig. 8, an electronic device 800 according to an embodiment of the present disclosure includes a processor 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. The processor 801 may include, for example, a general purpose microprocessor (e.g., CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., Application Specific Integrated Circuit (ASIC)), among others. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flows according to embodiments of the present disclosure.
In the RAM 803, various programs and data necessary for the operation of the electronic apparatus 800 are stored. The processor 801, the ROM802, and the RAM 803 are connected to each other by a bus 804. The processor 801 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM802 and/or RAM 803. Note that the programs may also be stored in one or more memories other than the ROM802 and RAM 803. The processor 801 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 800 may also include input/output (I/O) interface 805, input/output (I/O) interface 805 also connected to bus 804, according to an embodiment of the present disclosure. Electronic device 800 may also include one or more of the following components connected to I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM802 and/or RAM 803 described above and/or one or more memories other than the ROM802 and RAM 803.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for enabling the computer system to realize the method for monitoring the execution degree of the test case provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 801. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of a signal on a network medium, distributed, downloaded and installed via communication section 809, and/or installed from removable media 811. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program, when executed by the processor 801, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (11)

1. A method for monitoring the executed degree of a test case comprises the following steps:
determining first operation step information, wherein the first operation step information is used for representing operation step information actually implemented in the process of executing the target test case;
acquiring second operation step information, wherein the second operation step information is used for representing preset operation step information of the target test case;
calculating the text similarity of the first operation step information and the second operation step information to obtain a first text similarity;
and determining monitoring result information for representing the executed degree of the target test case according to the first text similarity.
2. The method of claim 1, wherein the determining first operational step information comprises:
acquiring a plurality of pieces of operation record information from a test case execution record information base;
calculating the second text similarity of each piece of operation record information and the second operation step information;
and under the condition that the similarity of the second text is greater than a preset threshold value, sequencing the operation record information according to operation time to obtain the first operation step information.
3. The method of claim 1, further comprising:
acquiring test result information of the target test case;
and determining state information for representing the executed target test case according to the monitoring result information and the test result information.
4. The method of claim 3, wherein the status information includes in-doubt status information, and determining, according to the monitoring result information and the test result information, status information for characterizing that the target test case is executed includes:
determining the state information as in-doubt state information under the condition that the operation steps of the monitoring result information being the target test case are all executed and the test result is that the test is not passed;
and determining the state information as in-doubt state information under the condition that the operation steps of the monitoring result information being the target test case are not all executed and the test result is that the test is passed.
5. The method of claim 3, wherein the status information includes status information to be confirmed, and determining, according to the monitoring result information and the test result information of the target test case, status information for characterizing that the target test case is executed includes:
determining the state information to be a state to be confirmed under the condition that the operation steps of the monitoring result information, which are the target test cases, are not all executed and the test result is that the test is not passed;
and determining the state information to be a state to be confirmed under the condition that the monitoring result information is that the operation steps of the target test case are all executed and the test result is lacked.
6. The method according to claim 1, wherein the calculating the text similarity of the first operation step information and the second operation step information to obtain a first text similarity comprises:
and inputting the first operation step information and the second operation step information into a text matching model, and outputting first text similarity.
7. The method of claim 6, further comprising:
acquiring a test case operation step data set, wherein the test case operation step data set comprises a plurality of pieces of historical test case operation step data, and each piece of the historical test case operation step data comprises: the first text data is used for representing operation step information implemented in the process of executing the historical test case; the second text data is used for representing the preset operation step information of the historical test case;
and training a preset model by using the first text information and the second text information to obtain the text matching model.
8. A device for monitoring the executed degree of a test case comprises:
the device comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for determining first operation step information, and the first operation step information is used for representing operation step information implemented in the process that a target test case is executed;
the first obtaining module is used for obtaining second operation step information, wherein the second operation step information is used for representing operation step information preset in the target test case;
the calculation module is used for calculating the text similarity of the first operation step information and the second operation step information to obtain a first text similarity;
and the second determining module is used for determining monitoring result information used for representing the executed degree of the target test case according to the first text similarity.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 7.
11. A computer program product comprising a computer program which, when executed by a processor, implements a method according to any one of claims 1 to 7.
CN202111624978.1A 2021-12-28 2021-12-28 Method, device, equipment and medium for monitoring executed degree of test case Pending CN114201410A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111624978.1A CN114201410A (en) 2021-12-28 2021-12-28 Method, device, equipment and medium for monitoring executed degree of test case

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111624978.1A CN114201410A (en) 2021-12-28 2021-12-28 Method, device, equipment and medium for monitoring executed degree of test case

Publications (1)

Publication Number Publication Date
CN114201410A true CN114201410A (en) 2022-03-18

Family

ID=80656976

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111624978.1A Pending CN114201410A (en) 2021-12-28 2021-12-28 Method, device, equipment and medium for monitoring executed degree of test case

Country Status (1)

Country Link
CN (1) CN114201410A (en)

Similar Documents

Publication Publication Date Title
US10120783B2 (en) Determining test case efficiency
US10346294B2 (en) Comparing software projects having been analyzed using different criteria
WO2020096665A2 (en) System error detection
CN112860556B (en) Coverage rate statistics method, coverage rate statistics device, computer system and readable storage medium
Feitosa et al. The evolution of design pattern grime: An industrial case study
CN110647523B (en) Data quality analysis method and device, storage medium and electronic equipment
CN113535577B (en) Application testing method and device based on knowledge graph, electronic equipment and medium
CN111897723A (en) Method and device for testing application
US11645192B2 (en) Graph-based method for inductive bug localization
CN113918864A (en) Website page testing method, testing system, testing device, electronic equipment and medium
US20160292067A1 (en) System and method for keyword based testing of custom components
CN115757075A (en) Task abnormity detection method and device, computer equipment and storage medium
CN111858377B (en) Quality evaluation method and device for test script, electronic equipment and storage medium
CN114968821A (en) Test data generation method and device based on reinforcement learning
CN114416422A (en) Problem locating method, apparatus, device, medium and program product
CN115203178A (en) Data quality inspection method and device, electronic equipment and storage medium
CN114201410A (en) Method, device, equipment and medium for monitoring executed degree of test case
CN114218283A (en) Abnormality detection method, apparatus, device, and medium
CN114301713A (en) Risk access detection model training method, risk access detection method and risk access detection device
CN113127362A (en) Object testing method, object testing device, electronic device, and readable storage medium
CN113656314A (en) Pressure test processing method and device
CN113495498A (en) Simulation method, simulator, device, and medium for hardware device
CN112328473A (en) Code automation integration test method and device and electronic equipment
CN114116519A (en) Interface test method and device, electronic equipment and storage medium
CN114817074A (en) Pressure test evaluation method, apparatus, device, medium, and program product

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