Test case data processing method and device, computer equipment and medium

By using a tree structure in the automated test case library to traverse the last access moment of the test case and dynamically freeze and thaw the test cases, the complex problems of redundant and expired case scripts occupying resources and deletion in the existing technology are solved, and more flexible is achieved and efficient test case management.

CN119441044APending Publication Date: 2025-02-14CCB FINTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411534797.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, when processing and maintaining an automated test case library, redundant and expired case scripts occupy resources and are complex to delete, resulting in the mistaken deletion of valuable case scripts.

Method used

By obtaining the test case dataset, using a tree structure to traverse the last access moment of the test case, marking the test cases that are not frequently accessed as the frozen state, and unfreezing state when accessed again, dynamically managing the life cycle of the test case.

Benefits of technology

It improves the flexibility of processing test case data that exists for a long time, avoids misdeleting and resource occupation, and simplifies the selection complexity of users when reusing cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441044A_ABST
    Figure CN119441044A_ABST
Patent Text Reader

Abstract

The invention relates to the field of test case data processing and big data processing, and particularly discloses a test case data processing method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring a test case data set; wherein the test case data set comprises a plurality of test cases arranged in a tree structure; selecting at least one test case as a starting node, traversing the last access moment of the test case corresponding to each node according to the tree structure, and obtaining a target node set according to the last access moment; marking the test case corresponding to the target node set as a frozen state; and under the condition that the test case in the frozen state is accessed again, releasing the frozen state of the test case. By adopting the method, the processing flexibility of the test case data which exists for a long time can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of big data processing, and in particular to a test case data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] At present, a large number of automation case scripts are stored in the automation test case library. As time goes by, the number of stock cases increases. Among them, a large part of the case scripts may have expired and abandoned and no longer have maintenance value.

[0003] In the related art, long-term preservation of these case scripts will occupy a large amount of tool resources and increase the complexity of users selecting reused cases in subsequent testing work. To solve this problem, the related art simply deletes these test cases. However, due to the lack of flexibility of the deletion method, valuable case scripts may be accidentally deleted, thereby causing unnecessary losses. Summary of the invention

[0004] Based on this, it is necessary to provide a test case data processing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the processing flexibility of test case data that has existed for a long time in order to address the above technical problems.

[0005] In a first aspect, the present application provides a test case data processing method, comprising:

[0006] Acquire a test case data set; wherein the test case data set includes a plurality of test cases arranged in a tree structure;

[0007] Select at least one of the test cases as a starting node, traverse the last access time of the test cases corresponding to each node according to the tree structure, and obtain a target node set according to the last access time;

[0008] Marking the test case corresponding to the target node set as frozen;

[0009] When the test case in the frozen state is accessed again, the frozen state of the test case is released.

[0010] In one embodiment, selecting at least one of the test cases as a starting node, traversing the last access time of the test cases corresponding to each node according to the tree structure, and obtaining a target node set according to the last access time includes:

[0011] Select at least one of the test cases as a starting node, and obtain access time data corresponding to a child node of the starting node;

[0012] In the case where there is a target node whose transition time from the last access time to the current time exceeds a preset time threshold in the subtree structure corresponding to the current child node indicated by the access time data, the node information of the target node is recorded in the target node set;

[0013] Continue to use the current child node as the starting node, and loop through the step of obtaining access time data corresponding to the child nodes of the starting node to obtain the target node set.

[0014] In one embodiment, the access time data is used to record the node information with the longest transition time in the subtree structure corresponding to the current child node; the step of continuing to use the current child node as the starting node and looping to execute the step of obtaining the access time data corresponding to the child nodes of the starting node to obtain the target node set includes:

[0015] When the transition duration corresponding to the current child node exceeds the preset duration threshold, continue to use the current child node as the starting node and execute the step of obtaining the access time data corresponding to the child nodes of the starting node;

[0016] When the transition duration recorded by the current child node does not exceed the preset duration threshold, or the current child node is a leaf node, stop executing the step of obtaining the access time data corresponding to the child nodes of the starting node to obtain the target node set.

[0017] In one embodiment, the test case includes a test case object and a test case flow; when the test case in a frozen state is accessed again, releasing the frozen state of the test case includes:

[0018] In the case where the use case object in a frozen state is changed, the freeze state of the use case object is unfrozen, and the use case process is marked as an unfrozen state;

[0019] When the use case flow in a frozen state is changed, the frozen state of the use case flow is released, and the use case object is marked as an unfrozen state.

[0020] In one embodiment, the method further comprises:

[0021] When the freezing time of the test case exceeds a preset freezing threshold, the test case is marked as being in a to-be-deleted state.

[0022] In one of the embodiments, when the freezing time of the test case exceeds a preset freezing threshold, after marking the test case as a to-be-deleted state, the method further includes:

[0023] In response to the test case recovery instruction, the test case in the to-be-deleted state is restored to a frozen state or an unfrozen state.

[0024] In a second aspect, the present application also provides a test case data processing device, comprising:

[0025] A data acquisition module, used to acquire a test case data set; wherein the test case data set includes a plurality of test cases arranged in a tree structure;

[0026] A node traversal module, used to select at least one of the test cases as a starting node, traverse the last access time of the test cases corresponding to each node according to the tree structure, and obtain a target node set according to the last access time;

[0027] A test case freezing module, used to mark the test case corresponding to the target node set as a frozen state;

[0028] The test case recovery module is used to release the frozen state of the test case when the test case in the frozen state is accessed again.

[0029] In one embodiment, the node traversal module includes:

[0030] An information extraction unit, used to select at least one of the test cases as a starting node, and obtain access time data corresponding to a subnode of the starting node;

[0031] A node recording unit, configured to record the node information of a target node into a target node set if there is a target node whose transition time from the last access time to the current time exceeds a preset time threshold in the subtree structure corresponding to the current child node indicated by the access time data;

[0032] The traversal processing unit is used to continue to use the current child node as the starting node, and cyclically execute the step of obtaining the access time data corresponding to the child nodes of the starting node to obtain the target node set.

[0033] In one of the embodiments, the access time data is used to record the node information with the longest transition time in the subtree structure corresponding to the current child node; the traversal processing unit is specifically used to: when the transition time corresponding to the current child node exceeds the preset time threshold, continue to use the current child node as the starting node and execute the step of obtaining the access time data corresponding to the child node of the starting node; when the transition time recorded by the current child node does not exceed the preset time threshold, or the current child node is a leaf node, stop executing the step of obtaining the access time data corresponding to the child node of the starting node to obtain the target node set.

[0034] In one embodiment, the test case includes a test case object and a test case flow; the test case recovery module includes:

[0035] A first recovery processing unit, configured to unfreeze the use case object and mark the use case flow as unfrozen when the use case object in the frozen state is changed;

[0036] The second recovery processing unit is used to release the frozen state of the use case process when the frozen use case process changes, and mark the use case object as an unfrozen state.

[0037] In one embodiment, the device further comprises:

[0038] The test case deletion module is used to mark the test case as a to-be-deleted state when the freezing time of the test case exceeds a preset freezing threshold.

[0039] In one embodiment, the device further comprises:

[0040] The state recovery module is used to restore the test case to be deleted to a frozen state or an unfrozen state in response to a test case recovery instruction.

[0041] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0042] Acquire a test case data set; wherein the test case data set includes a plurality of test cases arranged in a tree structure;

[0043] Select at least one of the test cases as a starting node, traverse the last access time of the test cases corresponding to each node according to the tree structure, and obtain a target node set according to the last access time;

[0044] Marking the test case corresponding to the target node set as frozen;

[0045] When the test case in the frozen state is accessed again, the frozen state of the test case is released.

[0046] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0047] Acquire a test case data set; wherein the test case data set includes a plurality of test cases arranged in a tree structure;

[0048] Select at least one of the test cases as a starting node, traverse the last access time of the test cases corresponding to each node according to the tree structure, and obtain a target node set according to the last access time;

[0049] Marking the test case corresponding to the target node set as frozen;

[0050] When the test case in the frozen state is accessed again, the frozen state of the test case is released.

[0051] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0052] Acquire a test case data set; wherein the test case data set includes a plurality of test cases arranged in a tree structure;

[0053] Select at least one of the test cases as a starting node, traverse the last access time of the test cases corresponding to each node according to the tree structure, and obtain a target node set according to the last access time;

[0054] Marking the test case corresponding to the target node set as frozen;

[0055] When the test case in the frozen state is accessed again, the frozen state of the test case is released.

[0056] The above-mentioned test case data processing method, device, computer equipment, computer-readable storage medium and computer program product obtain a plurality of test cases arranged in a tree structure by acquiring a test case data set, select at least one test case as a starting node according to the usage conditions in a specific usage scenario, and traverse the last access time of the test cases corresponding to each node according to the tree structure. Since the last access time can represent whether the test case of the current node has been recently accessed, the target node set is obtained according to the last access time, and the target node set that has not been recently accessed can be obtained. The test cases corresponding to the target node set are marked as frozen, and when the test cases in the frozen state are accessed again, the frozen state of the test cases is released. The test cases can be automatically frozen according to the last access time, but they will not be directly deleted after freezing, but can be automatically unfrozen dynamically according to the user's operation, thereby improving the processing flexibility of test case data that has existed for a long time. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0058] FIG1 is an application environment diagram of a test case data processing method in one embodiment;

[0059] FIG2 is a schematic diagram of a flow chart of a test case data processing method in one embodiment;

[0060] FIG3 is a flow chart of step S204 of a test case data processing method in one embodiment;

[0061] FIG4 is a structural block diagram of a test case data processing device in one embodiment;

[0062] FIG5 is a diagram showing the internal structure of a computer device in one embodiment;

[0063] FIG. 6 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. It should be noted that in the embodiments of the present application, certain software, groups, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0065] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations. The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with relevant provisions of national laws and regulations.

[0066] The test case data processing method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The data storage system can be used to store test case data sets, and can be used to store relevant information such as the current status of each test case. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0067] In an exemplary embodiment, as shown in FIG2 , a test case data processing method is provided, which is described by taking the method applied to the server 104 in FIG1 as an example, and includes the following steps S202 to S208 . Among them:

[0068] Step S202, obtaining a test case data set.

[0069] The test case data set includes multiple test cases arranged in a tree structure.

[0070] Exemplarily, server 104 may classify the case library used for automated testing into a core library and a general library. The cases in the core library may not be evaluated for expiration, and the test cases therein may be permanently retained. For the test cases in the general library, server 104 may obtain the corresponding test case data set to evaluate whether the case is expired.

[0071] In addition, the nodes of the tree structure index can include three categories: directory, process case, and case. Among them, different types of process cases or case nodes can be created under the directory node, and different types of case nodes can also be created under the process case node as the process steps of the process case.

[0072] Step S204, select at least one test case as a starting node, traverse the last access time of the test case corresponding to each node according to the tree structure, and obtain the target node set according to the last access time.

[0073] The last access time refers to the time data corresponding to the end of the latest access.

[0074] Exemplarily, the server 104 may select a test case according to the test case maintenance instruction at the current moment. For example, the server 104 receives a test case maintenance instruction issued by the terminal 102, indicating the maintenance of the test case of the regression function. The server 104 may select the regression case as the starting node. According to the tree structure, the regression case is used as the parent node, which corresponds to N child nodes (N is an integer greater than or equal to 0). The server 104 may traverse the last access time of each child node as the current child node to obtain N last access times. Finally, all nodes whose transition time from the last access time to the current time exceeds a preset time threshold are used as target nodes to form a target node set.

[0075] Step S206: Mark the test case corresponding to the target node set as frozen.

[0076] Exemplarily, the server 104 may mark all test cases in the target node set as frozen, and simultaneously record the "freeze time" of the test cases of the target nodes. If all nodes under a directory are frozen, the server 104 may mark the directory as frozen. Further, the server 104 may send the freeze information to the terminal 102, thereby updating the node identification style on the tree structure to prompt the user of the status of the current test case.

[0077] Step S208: when the test case in the frozen state is accessed again, the frozen state of the test case is released.

[0078] Among them, the test case may include a test case object and a test case flow, and the last access time corresponding to the test case object and the test case flow may be different. In the frozen state, the current test case is still saved in the tree structure, and the user can see the frozen test case through the terminal 102, but cannot execute the frozen test case content. For example, the user can see the frozen case, process case, and directory, but is not allowed to open or execute the corresponding action. Case execution may include manual execution, scheduled execution, remote call execution of the automated test platform, etc.; the administrator can release the frozen state by changing the content of the case.

[0079] Exemplarily, when a use case object in a frozen state changes, server 104 can unfreeze the use case object and mark the use case process as unfrozen; when a use case process in a frozen state changes, server 104 can unfreeze the use case process and mark the use case object as unfrozen.

[0080] Exemplarily, the server 104 may also mark the test case as a pending deletion state when the freezing time of the test case exceeds a preset freezing threshold. Further, the server 104 may also restore the test case in the pending deletion state to a frozen state or an unfrozen state in response to a test case recovery instruction.

[0081] In the above test case data processing method, a plurality of test cases arranged in a tree structure are obtained by acquiring a test case data set, at least one test case is selected as a starting node according to the use conditions in a specific use scenario, and the last access time of the test cases corresponding to each node is traversed according to the tree structure. Since the last access time can represent whether the test case of the current node has been recently accessed, the target node set is obtained according to the last access time, and the target node set that has not been recently accessed can be obtained, and the test cases corresponding to the target node set are marked as frozen, and when the test cases in the frozen state are accessed again, the frozen state of the test cases is released. The test cases can be automatically frozen according to the last access time, but they will not be directly deleted after freezing, but can be automatically unfrozen according to the user's operation, thereby improving the processing flexibility of test case data that has existed for a long time. The server 104 can also delete the test case when the length of time the test case is in the pending deletion state exceeds the preset retention time threshold.

[0082] In an exemplary embodiment, as shown in FIG3 , step S204 includes steps S302 to S306 . Among them:

[0083] Step S302: Select at least one test case as a starting node, and obtain access time data corresponding to the child nodes of the starting node.

[0084] The access time data may be used to record the node information with the longest transition time in the subtree structure corresponding to the current child node.

[0085] Exemplarily, after visiting each node, the change in the last visit time can be recorded in the parent node of the current child node, and the server 104 can compare the last visit time recorded in the parent node itself and its corresponding child nodes to obtain the node with the longest transition time from the last visit time to the current time, and record the last visit time and node index of the node with the parent node, that is, each node records the node information of the longest transition time in the corresponding subtree when it is the parent node.

[0086] Step S304, if there is a target node whose transition time from the last access time to the current time exceeds a preset time threshold in the subtree structure corresponding to the current child node indicated by the access time data, the node information of the target node is recorded in the target node set.

[0087] Exemplarily, the server 104 can, according to the instructions given by the terminal 102, take a node in the tree structure as the starting parent node, and start extracting the access time data recorded by the child nodes corresponding to the node. The access time data can be the node information of the longest transition time in the subtree corresponding to the starting node. The node information includes the last access time and the corresponding node index. If the transition time from the last access time to the current time exceeds a preset time threshold, it can be considered that this node belongs to the target node, and the server 104 can record it in the target node set.

[0088] Step S306, continue to use the current child node as the starting node, and loop through the steps of obtaining access time data corresponding to the child nodes of the starting node to obtain a target node set.

[0089] Exemplarily, when the transition duration corresponding to the current child node exceeds the preset duration threshold, the server 104 may continue to use the current child node as the starting node and execute the step of obtaining the access time data corresponding to the child nodes of the starting node; when the transition duration recorded by the current child node does not exceed the preset duration threshold, or the current child node is a leaf node, stop executing the step of obtaining the access time data corresponding to the child nodes of the starting node to obtain the target node set.

[0090] In the above embodiment, by comparing the child nodes and the parent nodes, each parent node only needs to record the node information of the longest transition time in the corresponding subtree when it is the parent node, thereby reducing the cost of data recording. In addition, during the traversal process, if the transition duration recorded by the traversed node does not exceed the preset duration threshold, there is no need to traverse other nodes in the subtree structure corresponding to the node as the parent node. The traversal time can also be shortened while ensuring the integrity of the traversal, thereby improving the maintenance efficiency of the test case.

[0091] In another exemplary embodiment, the server 104 obtains a test case data set to obtain a plurality of test cases arranged in a tree structure, selects at least one test case as a starting node, and obtains access time data corresponding to a child node of the starting node; when the access time data indicates that there is a target node whose transition time from the last access time to the current time exceeds a preset time threshold in the subtree structure corresponding to the current child node, the node information of the target node is recorded in a target node set, and when the transition time corresponding to the current child node exceeds the preset time threshold, the current child node is continued to be used as the starting node, and the step of obtaining the access time data corresponding to the child node of the starting node is executed; when the transition time recorded by the current child node does not exceed the preset time threshold, or the current child node is a leaf node, the step of obtaining the access time data corresponding to the child node of the starting node is stopped, and the target node set is obtained. The current child node is continued to be used as the starting node, and the step of obtaining the access time data corresponding to the child node of the starting node is cyclically executed to obtain the target node set.

[0092] Next, the test case corresponding to the target node set is marked as frozen. In the frozen state, the current test case is still saved in the tree structure. The user can see the frozen test case through the terminal 102, but cannot use the frozen test case content. The manager can unfreeze the test case by changing the test case content. If the frozen test case object is changed, the server 104 unfreezes the test case object and marks the test case flow as unfrozen; if the frozen test case flow is changed, the server 104 unfreezes the test case flow and marks the test case object as unfrozen.

[0093] In response to the test case recovery instruction, the server 104 recovers the test case in the to-be-deleted state to the frozen state or the unfrozen state. Subsequently, the server 104 marks the test case as to-be-deleted when the freezing time of the test case exceeds a preset freezing threshold.

[0094] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0095] Based on the same inventive concept, the embodiment of the present application also provides a test case data processing device for implementing the test case data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more test case data processing device embodiments provided below can refer to the limitations of the test case data processing method above, and will not be repeated here.

[0096] In an exemplary embodiment, as shown in FIG4 , a test case data processing device is provided, including: a data acquisition module 402, a node traversal module 404, a test case freezing module 406 and a test case recovery module 408, wherein:

[0097] The data acquisition module 402 is used to acquire a test case data set; wherein the test case data set includes a plurality of test cases arranged in a tree structure;

[0098] The node traversal module 404 is used to select at least one test case as a starting node, traverse the last access time of the test case corresponding to each node according to the tree structure, and obtain the target node set according to the last access time;

[0099] A test case freezing module 406 is used to mark the test case corresponding to the target node set as a frozen state;

[0100] The test case recovery module 408 is used to release the frozen state of the test case when the test case in the frozen state is accessed again.

[0101] In one embodiment, the node traversal module 404 includes:

[0102] An information extraction unit, used to select at least one test case as a starting node, and obtain access time data corresponding to a subnode of the starting node;

[0103] A node recording unit, for recording the node information of the target node into a target node set when there is a target node whose transition time from the last access time to the current time exceeds a preset time threshold in the subtree structure corresponding to the current child node indicated by the access time data;

[0104] The traversal processing unit is used to continue to use the current child node as the starting node, and cyclically execute the step of obtaining the access time data corresponding to the child nodes of the starting node to obtain the target node set.

[0105] In one of the embodiments, the access time data is used to record the node information with the longest transition time in the subtree structure corresponding to the current child node; the traversal processing unit is specifically used to: when the transition time corresponding to the current child node exceeds the preset time threshold, continue to use the current child node as the starting node and execute the step of obtaining the access time data corresponding to the child node of the starting node; when the transition time recorded by the current child node does not exceed the preset time threshold, or the current child node is a leaf node, stop executing the step of obtaining the access time data corresponding to the child node of the starting node to obtain the target node set.

[0106] In one embodiment, the test case includes a test case object and a test case flow; and the test case recovery module includes:

[0107] A first recovery processing unit is used to release the frozen state of the use case object when a frozen use case object is changed, and mark the use case process as an unfrozen state;

[0108] The second recovery processing unit is used to release the frozen state of the use case process when the frozen use case process changes, and mark the use case object as an unfrozen state.

[0109] In one embodiment, the device further comprises:

[0110] The test case deletion module is used to mark the test case as a pending deletion state when the freezing time of the test case exceeds a preset freezing threshold.

[0111] In one embodiment, the device further comprises:

[0112] The state recovery module is used to restore the test case to be deleted to a frozen state or an unfrozen state in response to a test case recovery instruction.

[0113] Each module in the above-mentioned test case data processing device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0114] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG5. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store test case data sets, and can be used to store relevant information such as the current state of each test case. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a test case data processing method is implemented.

[0115] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG6. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a test case data processing method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0116] Those skilled in the art will understand that the structure shown in FIG. 6 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0117] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining a test case data set; wherein the test case data set includes multiple test cases arranged in a tree structure; selecting at least one test case as a starting node, traversing the last access time of the test case corresponding to each node according to the tree structure, and obtaining a target node set according to the last access time; marking the test case corresponding to the target node set as a frozen state; and releasing the frozen state of the test case when the test case in the frozen state is accessed again.

[0118] In one embodiment, when the processor executes the computer program, the following steps are also implemented: selecting at least one test case as the starting node, and obtaining the access time data corresponding to the child nodes of the starting node; when the access time data indicates that there is a target node in the subtree structure corresponding to the current child node, the transition time from the last access time to the current time exceeds a preset time threshold, recording the node information of the target node to the target node set; continuing to use the current child node as the starting node, looping to execute the step of obtaining the access time data corresponding to the child nodes of the starting node, to obtain the target node set.

[0119] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the transition duration corresponding to the current child node exceeds the preset duration threshold, continue to use the current child node as the starting node and execute the step of obtaining the access time data corresponding to the child node of the starting node; when the transition duration recorded by the current child node does not exceed the preset duration threshold, or the current child node is a leaf node, stop executing the step of obtaining the access time data corresponding to the child node of the starting node to obtain the target node set.

[0120] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when a use case object in a frozen state changes, the use case object is unfrozen and the use case process is marked as unfrozen; when a use case process in a frozen state changes, the use case process is unfrozen and the use case object is marked as unfrozen.

[0121] In one embodiment, when the processor executes the computer program, the following steps are further implemented: when the freezing time of the test case exceeds a preset freezing threshold, marking the test case as a to-be-deleted state.

[0122] In one embodiment, when the processor executes the computer program, the following steps are further implemented: in response to the test case recovery instruction, the test case in the to-be-deleted state is restored to a frozen state or an unfrozen state.

[0123] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining a test case data set; wherein the test case data set includes multiple test cases arranged in a tree structure; selecting at least one test case as a starting node, traversing the last access time of the test case corresponding to each node according to the tree structure, and obtaining a target node set according to the last access time; marking the test case corresponding to the target node set as a frozen state; and releasing the frozen state of the test case when the test case in the frozen state is accessed again.

[0124] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: selecting at least one test case as the starting node, and obtaining the access time data corresponding to the child nodes of the starting node; when the access time data indicates that there is a target node in the subtree structure corresponding to the current child node, the transition time from the last access time to the current time exceeds a preset time threshold, recording the node information of the target node to the target node set; continuing to use the current child node as the starting node, looping to execute the step of obtaining the access time data corresponding to the child nodes of the starting node, to obtain the target node set.

[0125] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the transition duration corresponding to the current child node exceeds the preset duration threshold, continue to use the current child node as the starting node and execute the step of obtaining the access time data corresponding to the child node of the starting node; when the transition duration recorded by the current child node does not exceed the preset duration threshold, or the current child node is a leaf node, stop executing the step of obtaining the access time data corresponding to the child node of the starting node to obtain the target node set.

[0126] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when a use case object in a frozen state changes, the use case object is unfrozen and the use case process is marked as unfrozen; when a use case process in a frozen state changes, the use case process is unfrozen and the use case object is marked as unfrozen.

[0127] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: when the freezing time of the test case exceeds a preset freezing threshold, marking the test case as being in a to-be-deleted state.

[0128] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: in response to the test case recovery instruction, the test case in the to-be-deleted state is restored to a frozen state or an unfrozen state.

[0129] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: obtaining a test case data set; wherein the test case data set includes multiple test cases arranged in a tree structure; selecting at least one test case as a starting node, traversing the last access time of the test case corresponding to each node according to the tree structure, and obtaining a target node set according to the last access time; marking the test case corresponding to the target node set as a frozen state; and unfreezing the test case when the test case in the frozen state is accessed again.

[0130] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: selecting at least one test case as the starting node, and obtaining the access time data corresponding to the child nodes of the starting node; when the access time data indicates that there is a target node in the subtree structure corresponding to the current child node, the transition time from the last access time to the current time exceeds a preset time threshold, recording the node information of the target node to the target node set; continuing to use the current child node as the starting node, looping to execute the step of obtaining the access time data corresponding to the child nodes of the starting node, to obtain the target node set.

[0131] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the transition duration corresponding to the current child node exceeds the preset duration threshold, continue to use the current child node as the starting node and execute the step of obtaining the access time data corresponding to the child node of the starting node; when the transition duration recorded by the current child node does not exceed the preset duration threshold, or the current child node is a leaf node, stop executing the step of obtaining the access time data corresponding to the child node of the starting node to obtain the target node set.

[0132] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when a use case object in a frozen state changes, the use case object is unfrozen and the use case process is marked as unfrozen; when a use case process in a frozen state changes, the use case process is unfrozen and the use case object is marked as unfrozen.

[0133] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: when the freezing time of the test case exceeds a preset freezing threshold, marking the test case as being in a to-be-deleted state.

[0134] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: in response to the test case recovery instruction, the test case in the to-be-deleted state is restored to a frozen state or an unfrozen state.

[0135] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0136] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0137] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A test case data processing method, characterized in that: The method comprises: Acquire a test case data set; wherein the test case data set includes a plurality of test cases arranged in a tree structure; Select at least one of the test cases as a starting node, traverse the last access time of the test cases corresponding to each node according to the tree structure, and obtain a target node set according to the last access time; Marking the test case corresponding to the target node set as frozen; When the test case in the frozen state is accessed again, the frozen state of the test case is released.

2. The method according to claim 1, characterized in that: The selecting at least one of the test cases as a starting node, traversing the last access time of the test cases corresponding to each node according to the tree structure, and obtaining a target node set according to the last access time, includes: Select at least one of the test cases as a starting node, and obtain access time data corresponding to a child node of the starting node; In the case where there is a target node whose transition time from the last access time to the current time exceeds a preset time threshold in the subtree structure corresponding to the current child node indicated by the access time data, the node information of the target node is recorded in the target node set; Continue to use the current child node as the starting node, and loop through the step of obtaining access time data corresponding to the child nodes of the starting node to obtain the target node set.

3. The method according to claim 2, characterized in that The access time data is used to record the node information with the longest transition time in the subtree structure corresponding to the current child node; the step of continuing to use the current child node as the starting node and cyclically executing the step of obtaining the access time data corresponding to the child nodes of the starting node to obtain the target node set includes: When the transition duration corresponding to the current child node exceeds the preset duration threshold, continue to use the current child node as the starting node and execute the step of obtaining the access time data corresponding to the child nodes of the starting node; When the transition duration recorded by the current child node does not exceed the preset duration threshold, or the current child node is a leaf node, stop executing the step of obtaining the access time data corresponding to the child nodes of the starting node to obtain the target node set.

4. The method according to claim 1, characterized in that: The test case includes a test case object and a test case flow; When the test case in the frozen state is accessed again, releasing the frozen state of the test case comprises: In the case where the use case object in a frozen state is changed, the freeze state of the use case object is unfrozen, and the use case process is marked as an unfrozen state; When the use case flow in a frozen state is changed, the frozen state of the use case flow is released, and the use case object is marked as an unfrozen state.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When the freezing time of the test case exceeds a preset freezing threshold, the test case is marked as being in a to-be-deleted state.

6. The method according to claim 5, characterized in that When the freezing time of the test case exceeds a preset freezing threshold, after marking the test case as a to-be-deleted state, the method further includes: In response to the test case recovery instruction, the test case in the to-be-deleted state is restored to a frozen state or an unfrozen state.

7. A test case data processing device, characterized in that: The device comprises: A data acquisition module, used to acquire a test case data set; wherein the test case data set includes a plurality of test cases arranged in a tree structure; A node traversal module, used to select at least one of the test cases as a starting node, traverse the last access time of the test cases corresponding to each node according to the tree structure, and obtain a target node set according to the last access time; A test case freezing module, used to mark the test case corresponding to the target node set as a frozen state; The test case recovery module is used to release the frozen state of the test case when the test case in the frozen state is accessed again.

8. The device according to claim 7, characterized in that The node traversal module includes: An information extraction unit, used to select at least one of the test cases as a starting node, and obtain access time data corresponding to a subnode of the starting node; A node recording unit, configured to record the node information of a target node into a target node set if there is a target node whose transition time from the last access time to the current time exceeds a preset time threshold in the subtree structure corresponding to the current child node indicated by the access time data; The traversal processing unit is used to continue to use the current child node as the starting node, and cyclically execute the step of obtaining the access time data corresponding to the child nodes of the starting node to obtain the target node set.

9. The device according to claim 8, characterized in that The access time data is used to record the node information with the longest transition time in the subtree structure corresponding to the current child node; the traversal processing unit is specifically used to: when the transition time corresponding to the current child node exceeds the preset time threshold, continue to use the current child node as the starting node and execute the step of obtaining the access time data corresponding to the child node of the starting node; when the transition time recorded by the current child node does not exceed the preset time threshold, or the current child node is a leaf node, stop executing the step of obtaining the access time data corresponding to the child node of the starting node to obtain the target node set.

10. The device according to claim 7, characterized in that The test case includes a test case object and a test case flow; The use case recovery module includes: A first recovery processing unit, configured to unfreeze the use case object and mark the use case flow as unfrozen when the use case object in the frozen state is changed; The second recovery processing unit is used to release the frozen state of the use case process when the frozen use case process changes, and mark the use case object as an unfrozen state.

11. The device according to any one of claims 7 to 10, characterized in that The device also includes: The test case deletion module is used to mark the test case as a to-be-deleted state when the freezing time of the test case exceeds a preset freezing threshold.

12. The device according to claim 11, characterized in that The device also includes: The state recovery module is used to restore the test case to be deleted to a frozen state or an unfrozen state in response to a test case recovery instruction.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.