Test case allocation method and device, computer device and storage medium

By clustering test case sets into interface sequences and assigning them to debug accounts, the problem of inaccurate test case allocation was solved, and the efficiency of test script construction was improved.

CN113515440BActive Publication Date: 2026-06-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2020-12-22
Publication Date
2026-06-26

Smart Images

  • Figure CN113515440B_ABST
    Figure CN113515440B_ABST
Patent Text Reader

Abstract

The application relates to a test case allocation method and device, computer equipment and a storage medium, and relates to the field of software testing. The method comprises the following steps: obtaining a test case set; obtaining an interface sequence of each test case in the test case set; clustering the test cases based on the interface sequences of the test cases, to obtain at least two test case subsets; and allocating the at least two test case subsets to respective debugging accounts, so that a debugging personnel corresponding to the debugging account constructs a corresponding test script based on the test cases in the allocated test case subset. Through the above method, when the debugging personnel constructs a test script according to the test case subset, the application program interfaces used by the debugging personnel are relatively similar, the test personnel can reuse the application program interfaces with high similarity to construct a test script, and the construction efficiency of the test script is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of software testing, and in particular to a test case allocation method, apparatus, computer device, and storage medium. Background Technology

[0002] In the current software development process, debugging personnel need to conduct extensive testing on various functional development test scripts of the software.

[0003] In related technologies, test cases are typically used to scientifically organize and manage software testing, aiming to transform testing activities into a manageable model. Test cases also quantify the testing process; different types of software test cases vary. During testing, test cases serve as the standard, and testers must strictly follow the test cases, adhering to each test case item and step. Test results are recorded in test case management software to automatically generate test result documents.

[0004] However, in the above scheme, test cases are manually categorized into similar types and assigned to testers. The accuracy of the types of test cases assigned to testers is low, resulting in low efficiency for debuggers in building test scripts. Summary of the Invention

[0005] This application provides a method, apparatus, computer device, and storage medium for allocating test cases, which can improve testing efficiency. The technical solution is as follows:

[0006] On the one hand, a method for allocating test cases is provided, the method comprising:

[0007] Obtain a test case set; the test case set contains at least two test cases.

[0008] Obtain the interface sequence of each test case in the test case set; the interface sequence is used to indicate the application interface called sequentially by each test step in the corresponding test case;

[0009] Based on the interface sequence of each test case, the test cases are clustered to obtain at least two test case sets;

[0010] The at least two test case sets are assigned to each debugging account, so that the debugging personnel corresponding to the debugging account can build corresponding test scripts based on the test cases in the assigned test case sets.

[0011] On another front, a test case allocation device is provided, the device comprising:

[0012] The test case set acquisition module is used to acquire a test case set; the test case set contains at least two test cases.

[0013] The sequence acquisition module is used to acquire the interface sequence of each test case in the test case set; the interface sequence is used to indicate the application interface called sequentially by each test step in the corresponding test case.

[0014] The clustering module is used to cluster the test cases based on the interface sequence of each test case to obtain at least two test case sets.

[0015] The subset allocation module is used to allocate the at least two test case sets to each debugging account, so that the debugging personnel corresponding to the debugging account can build corresponding test scripts based on the test cases in the allocated test case sets.

[0016] In one possible implementation, the sequence acquisition module includes:

[0017] The description text acquisition unit is used to acquire the description text of each test step in the target test case; the target test case is any one of the at least two test cases;

[0018] The identifier query unit is used to query the identifiers of the application interfaces called by each test step in the target test case based on the description text of each test step in the target test case.

[0019] The identifier arrangement unit is used to arrange the identifiers of the application interfaces called by each test step in the target test case according to the order of the corresponding test steps to obtain the interface sequence of the target test case.

[0020] In one possible implementation, the identifier query unit is used for:

[0021] Feature information is extracted from the description text of the target test step to obtain the feature information of the target test step; the target test step is any one of the test steps in the target test case;

[0022] Query the identifier of the application interface called by the target test step, which corresponds to the stored feature information of the target test step.

[0023] In one possible implementation, the feature information of the target test step includes the hash value of the target test step;

[0024] or,

[0025] The characteristic information of the target test step includes the keyword sequence of the target test step.

[0026] In one possible implementation, the identifier query unit is further used for:

[0027] Based on the feature extraction model, feature information is extracted from the description text of the target test step to obtain the feature information of the target test step; the feature extraction model is a deep learning model trained based on sample test steps.

[0028] In one possible implementation, the identifier query unit is further used for:

[0029] In response to the first keyword in the description text of the target test step not belonging to the specified keyword set, a second keyword is obtained from the specified keyword set; the second keyword is a synonym of the first keyword;

[0030] Replace the first keyword in the description text of the target test step with the second keyword.

[0031] In one possible implementation, the clustering module includes:

[0032] A similarity acquisition unit is used to acquire the similarity between the interface sequences of each test case;

[0033] The example set acquisition unit is used to perform hierarchical clustering on each test case based on the similarity between the interface sequences of each test case, and obtain the at least two test example sets.

[0034] In one possible implementation, the similarity acquisition unit is used for,

[0035] The edit distance between the interface sequences of each test case is obtained and used as the similarity between the interface sequences;

[0036] or,

[0037] The number of differing interfaces among the interface sequences of each test case is used as the similarity between the interface sequences.

[0038] In one possible implementation, the clustering module is used for,

[0039] Obtain the number N of each debugging account, where N is an integer greater than or equal to 2;

[0040] Based on the interface sequence of each test case, the test cases are clustered to obtain N test case sets.

[0041] In one possible implementation, the subset allocation module includes:

[0042] The test case set acquisition unit is used to acquire the assigned test case set for each debugging account;

[0043] The first similarity acquisition unit is used to acquire a first similarity between the allocated test case set of each debugging account and the at least two test case sets; the first similarity is used to indicate the similarity between the interface sequences of test cases in the two sets;

[0044] The second test case set allocation unit is used to allocate the at least two test case sets to each debugging account based on the set sequence similarity between the allocated test case sets of each debugging account and the at least two test case sets.

[0045] In one possible implementation, the set of assigned test cases includes at least one of the test cases that have been processed by the corresponding debug account within a specified time period, and test cases that have been assigned to the corresponding debug account but have not been processed.

[0046] In one possible implementation, the subset allocation module is further configured to:

[0047] In response to a request to reassign test cases assigned to a target debugging account, obtain each reassigned test case; the reassigned test cases are test cases assigned to the target debugging account that have not been processed; the target debugging account is any one of the debugging accounts.

[0048] Obtain the second similarity between each of the reassigned test cases and the set of assigned test cases for each of the other debugging accounts; the second similarity is used to indicate the similarity between the interface sequence of the corresponding reassigned test case and the interface sequence of the test cases in the corresponding set of assigned test cases; each of the other debugging accounts is the account that is excluding the target debugging account.

[0049] Based on the second similarity between each reassigned test case and the set of assigned test cases for each other debugging account, the reassigned test cases are assigned to each other debugging account.

[0050] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the above-described test case allocation method.

[0051] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the above-described test case allocation method.

[0052] In another aspect, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a test case allocation method.

[0053] The technical solution provided in this application may include the following beneficial effects:

[0054] A test case set is obtained, and the test cases are clustered according to their interface sequences. Each test case is then categorized based on the application interface corresponding to its test step. These categorized test cases are then assigned to the corresponding debugging accounts on the server. By classifying test cases based on the application interface corresponding to their test steps, test cases are grouped together. This ensures that the application interfaces of the categorized test cases are similar. Test cases with similar application interfaces are grouped into a test case set, which is then assigned to debuggers. When debuggers build test scripts based on this test case set, the application interfaces used are relatively similar, allowing testers to reuse highly similar application interfaces and improving the efficiency of test script construction.

[0055] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0056] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0057] Figure 1 This is a schematic diagram illustrating the structure of a test case allocation system according to an exemplary embodiment;

[0058] Figure 2 This is a flowchart illustrating a test case allocation method according to an exemplary embodiment;

[0059] Figure 3 This is a flowchart of a test case allocation method provided according to an exemplary embodiment;

[0060] Figure 4 This illustration shows a test case display format according to an embodiment of this application;

[0061] Figure 5 This application illustrates a system architecture diagram based on an embodiment of the present application.

[0062] Figure 6 The diagram illustrates the array of use case steps and their correspondence with the steps in the embodiments of this application.

[0063] Figure 7 This illustration shows a clustering tree diagram according to an embodiment of this application;

[0064] Figure 8 This illustration shows a schematic diagram of the single-link and full-link distance calculation method involved in an embodiment of this application;

[0065] Figure 9 This illustration shows a schematic diagram of a demonstration use case grouping according to an embodiment of this application;

[0066] Figure 10 This is a flowchart illustrating a test case allocation method according to an exemplary embodiment of this application;

[0067] Figure 11 This is a block diagram illustrating a test case allocation device according to an exemplary embodiment of this application;

[0068] Figure 12 This is a structural block diagram of a computer device illustrated according to an exemplary embodiment of this application. Detailed Implementation

[0069] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0070] To facilitate understanding, the following explanations are provided for several terms used in this application.

[0071] 1) Model-Based Testing (MBT)

[0072] Model-based testing (MBT) is a testing methodology in the field of software testing. MBT typically requires the use of tools to automatically generate corresponding test cases and automated scripts as the model is created. The test design philosophy of MBT is based on the functional flow of requirements, which is then modeled; only based on this model can it be considered a test requirement. In other words, a deep understanding of the requirements and business logic is a prerequisite for MBT test design.

[0073] 2) Edit Distance

[0074] Edit distance is a quantitative measure of the difference between two strings (such as English words). It measures the minimum number of operations required to transform one string into another. Edit distance can be used in natural language processing; for example, spell checking can determine which (or several) of the misspelled words is more likely based on their edit distance to other correct words. A commonly used edit distance is the Levenshtein distance, which is a type of edit distance. It refers to the minimum number of edit operations required to transform one string into another. Allowed edit operations include replacing one character with another, inserting a character, and deleting a character.

[0075] 3) Clustering

[0076] The process of dividing a collection of physical or abstract objects into multiple classes composed of similar objects is called clustering. A cluster generated by clustering is a set of data objects that are similar to objects within the same cluster and dissimilar to objects in other clusters. Just as "birds of a feather flock together," classification problems exist extensively in both natural and social sciences. Cluster analysis, also known as group analysis, is a statistical analysis method for studying the classification of (samples or indicators). While cluster analysis originated in taxonomy, clustering is not the same as classification. The difference lies in the fact that the classes to be divided in clustering are unknown. Cluster analysis encompasses a wide range of methods, including hierarchical clustering, ordered sample clustering, dynamic clustering, fuzzy clustering, graph theory clustering, and cluster prediction methods.

[0077] 4) Hierarchical Clustering

[0078] Hierarchical clustering is a type of clustering algorithm that creates a hierarchical nested clustering tree by calculating the similarity between data points from different categories. In the clustering tree, the original data points from different categories form the lowest level, and the top level is the root node of a cluster. There are two methods for creating clustering trees: bottom-up merging and top-down splitting. The merging algorithm in hierarchical clustering calculates the similarity between two classes of data points, combines the two most similar data points among all data points, and iterates this process repeatedly. Simply put, the merging algorithm in hierarchical clustering determines the similarity between data points of each category and all other data points by calculating the distance between them; the smaller the distance, the higher the similarity. It then combines the two closest data points or categories to generate the clustering tree.

[0079] Figure 1 This is a schematic diagram illustrating the structure of a test case allocation system according to an exemplary embodiment. The system includes a backend server 120 and a user terminal 140.

[0080] The backend server 120 may be a single server, or may include several servers, a virtualization platform, or a cloud computing service center, etc., and this application does not impose any restrictions. The backend server 120 also includes a data storage module, which can be used to store data information corresponding to each test case.

[0081] User terminal 140 can be a terminal device with a user interface display function, such as a mobile phone, tablet computer, laptop computer, and desktop computer. The number of user terminals 140 is not limited.

[0082] The user terminal 140 may have a client installed, which may be an office client, an instant messaging client, a browser client, etc. This application embodiment does not limit the type of client software.

[0083] Optionally, users can send data information corresponding to test cases to the server based on the client.

[0084] User terminal 140 and backend server 120 are connected via a communication network. Optionally, the communication network can be a wired network or a wireless network.

[0085] Optionally, the system may also include a management device ( Figure 1 (Not shown), the management device is connected to the backend server 120 via a communication network. Optionally, the communication network can be a wired network or a wireless network.

[0086] Optionally, the aforementioned wireless or wired networks use standard communication technologies and / or protocols. The network is typically the Internet, but can also be any network, including but not limited to Local Area Networks (LANs), Metropolitan Area Networks (MANs), Wide Area Networks (WANs), mobile, wired or wireless networks, private networks, or any combination of virtual private networks. In some embodiments, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network. Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Networks (VPNs), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, custom and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.

[0087] Please refer to Figure 2 This is a flowchart illustrating a test case allocation method according to an exemplary embodiment. The method can be executed by a computer device, which can be a user terminal, wherein the user terminal can be the one described above. Figure 1 User terminal 140 in the illustrated embodiment. For example... Figure 2 As shown, the process of allocating test cases can include the following steps:

[0088] Step 21, obtain the test case set; the test case set contains at least two test cases.

[0089] Test cases are descriptions of the test tasks performed on a specified software product.

[0090] In one possible implementation, the test case includes the test objective, test environment, input data, test steps, expected results, and test script.

[0091] Step 22: Obtain the interface sequence of each test case in the test case set; the interface sequence is used to indicate the application interface called sequentially by each test step in the corresponding test case.

[0092] In one possible implementation, the sequence of interfaces for each test case includes an identifier for the application interface.

[0093] That is, the interface sequence is a sequence of identifiers corresponding to each application interface arranged in order. The interface sequence uses the identifiers corresponding to each application interface to indicate that each test step in the corresponding test case calls the application interface in sequence.

[0094] Step 23: Based on the interface sequence of each test case, cluster each test case to obtain at least two test case sets.

[0095] The at least two test case sets contain at least one test case.

[0096] Step 24: Assign the at least two test case sets to each debugging account so that the debugging personnel corresponding to the debugging account can build the corresponding test scripts based on the test cases in the assigned test case sets.

[0097] When the backend server obtains at least two test case sets based on each test case, it can select and assign the at least two test case sets to each debugging account corresponding to the test case set. The user corresponding to the debugging account can then build a test script corresponding to the test case based on the test case in the assigned test case set.

[0098] In summary, the solution shown in this application embodiment involves obtaining a test case set, clustering each test case based on its interface sequence, and then classifying each test case according to the application interface corresponding to the test step. The classified test cases are then assigned to the corresponding debugging account on the server. By classifying test cases based on the application interface corresponding to the test step, the test cases are grouped into a test case set. This test case set is then assigned to the debugging personnel. When the debugging personnel build test scripts based on this test case set, the application interfaces used are relatively similar, allowing them to reuse highly similar application interfaces, thus improving the efficiency of test script construction.

[0099] Please refer to Figure 3 This is a flowchart illustrating a test case allocation method according to an exemplary embodiment. The method can be executed by a computer device, which can be a backend server, wherein the backend server can be the one described above. Figure 1 Server 140 in the illustrated embodiment. (As shown) Figure 3As shown, the method for allocating test cases may include the following steps:

[0100] Step 301: Obtain the test case set.

[0101] This test case set contains at least two test cases.

[0102] In one possible implementation, at least two test cases in the test case set are sent by the developer to the backend server via the terminal and stored on the backend server.

[0103] In another possible implementation, at least two test cases in the test case set are generated by a test case automatic generation tool.

[0104] The test case automatic generation tool can generate corresponding test case steps (i.e., test steps) based on the system test steps corresponding to the input system test cases, and generate the preconditions of the test cases based on the system test case rules of the system test cases.

[0105] Please refer to Figure 4 This illustration shows a schematic diagram of a test case display format according to an embodiment of this application. Figure 4 As shown, the use cases are displayed in a table format, with each row representing one use case. The header of each column is: Use Case Type 401, Automation 402, Use Case Name 403, Preconditions 404, Use Case Steps 405, and Expected Result 406. Figure 4This document illustrates three test cases for a user account's game point redemption function in a certain game application. Test cases 410 and 420 are of type "Normal Function," meaning they test whether the software's functions are normal. Test case 430 is of type "Parameter Check," meaning it checks whether the software's parameters are normal. Test case 410 is of type "Suitable," indicating it's suitable for automated testing. Test case 410 is named "Redemption, verification requires displaying redemption reminder, displaying the redemption reminder interface, user selects to continue redemption." The phrase "[System]" in the name is invalid and has been removed. For example, test case 410 has the following preconditions: "1. The user is logged in; 2. There is a transaction order in the 'Pending Redemption' state." This means that the script for this test case must assume the user is logged in and there is a transaction order in the 'Pending Redemption' state before the test can be executed. Test case 410's steps are: "1. The user requests redemption; 2. The user chooses to continue redeeming." The debugger can use the script function to call the corresponding API (Application Programming Interface) to implement these steps. Test case 410's expected results are: "1.1 Verify request validity, whether password verification is required, risk interception and risk warning; 1.2 Verify the need to display transaction alerts; 1.3 Display the transaction alert interface." Test case 410 can compare the results of executing the above steps using the script function with the expected results to determine the test outcome and generate test documentation.

[0106] That is, through Figure 4 The test cases shown clearly allow the debugger to obtain the test purpose, test steps, test results, and other data information corresponding to the test case, and to build script functions based on this data information to complete the test corresponding to the test case.

[0107] Step 302: Obtain the description text of each test step in the target test case.

[0108] In one possible implementation, the description text of each test step in the target test case is a standardized description text. When the test case is generated, the language used in the description text has standardized requirements so that the test steps corresponding to the description text are consistent.

[0109] In one possible implementation, the descriptive text is Chinese text; or the descriptive text is English text obtained by machine translation of Chinese text.

[0110] Step 303: Based on the description text of each test step in the target test case, query the identifiers of the application interfaces called by each test step in the target test case.

[0111] In one possible implementation, the server stores the correspondence between the description text of each test step and the application interface called by each test step. Based on the description text of each test step of the target test case, the server can query the application interface called by each test step and obtain the identifier of the corresponding application interface according to the application interface.

[0112] In one possible implementation, feature information is extracted from the description text of the target test step to obtain the feature information of the target test step; the target test step is any one of the test steps in the target test case; the identifier of the application interface called by the target test step is queried and stored corresponding to the feature information of the target test step.

[0113] The server extracts feature information from the description text of the target test step. The extracted feature information is the text feature information corresponding to the description text of the target test step, and the server stores the identifier of the application interface called by the test step in the corresponding text feature information. That is, the server can simultaneously store the description text of the target test step, the feature information of the target test step, the application interface corresponding to the target test step, and the identifier of the application interface corresponding to the target test step.

[0114] In one possible implementation, feature information is extracted from the descriptive text of the target test step based on a feature extraction model to obtain the feature information of the target test step; the feature extraction model is a deep learning model trained based on sample test steps.

[0115] In one possible implementation, the deep learning model could be a BERT (Bidirectional Encoder Representation from Transformers) model used to extract text features.

[0116] In one possible implementation, the characteristic information of the target test step includes the hash value of the target test step; or, the characteristic information of the target test step includes the keyword sequence of the target test step.

[0117] When the feature information of the target test step includes the hash value of the target test step, the feature information of the target test step can be obtained by extracting the hash value of the text information of the target test step using a hash value extraction tool.

[0118] When the feature information of the target test step includes a keyword sequence of the target test step, the feature information of the target test step can be obtained by extracting keywords from the description text of the target test step through a keyword extraction model.

[0119] In one possible implementation, the keyword extraction model is a machine learning model trained based on the sample target test step and the labeled keywords corresponding to the sample target test step.

[0120] In one possible implementation, in response to the fact that the first keyword in the description text of the target test step does not belong to a specified keyword set, a second keyword is obtained from the specified keyword set; the second keyword is a synonym of the first keyword; and the first keyword in the description text of the target test step is replaced with the second keyword.

[0121] The text used in this test case is usually standardized text. That is, when the keyword extraction model is used to extract keywords from the description text of the target test step in this test case, the extracted keywords can be directly matched with a preset set of keywords, where each keyword in the set of keywords is a standardized keyword.

[0122] When the text used in the test case is not standard text, for example, when a developer enters a test case for the server that is not a standard test case, the keywords identified in the target test step of the test case may not be keywords in the preset specified keyword set, that is, they do not belong to the specified keyword set. In this case, a second keyword that is a synonym of the identified first keyword can be obtained from the specified keyword set, and the first keyword in the description text can be replaced with the second keyword. At this time, the semantics of the description text in the target test step remain unchanged, and the server can query the identifier of the application interface corresponding to the target test step based on the keyword.

[0123] In one possible implementation, the semantic features of the first keyword and the semantic features of each keyword in the specified keyword set can be extracted. Based on the semantic features of the first keyword and the semantic features of each keyword in the specified keyword set, a second keyword that is a synonym of the first keyword in the specified keyword set can be determined.

[0124] Step 304: Arrange the identifiers of the application interfaces called by each test step in the target test case according to the order of the corresponding test steps to obtain the interface sequence of the target test case.

[0125] The interface sequence of the target test case contains the identifiers of the application interfaces corresponding to each test step in the target test case, and the identifiers of the application interfaces are arranged in the order in which the application interfaces are called (i.e., the order of the test steps).

[0126] In one possible implementation, when the test step is a test step that has already been run on the server, the server stores the application interface called when the test step is executed, as well as the identifier of that application interface.

[0127] In another possible implementation, when the test step is a test step that has not been run on the server, the server does not store the application interface called by the test step, nor does it have an identifier for that application interface. In this case, the server generates a new application interface identifier for the test step that has not been run.

[0128] When the server receives an instruction from the debugger to call the application interface for this test step, it updates the identifier of the newly generated application interface to the identifier of the application interface called by the debugger.

[0129] Step 305: Based on the interface sequence of each test case, cluster each test case to obtain at least two test case sets.

[0130] In one possible implementation, the similarity between the interface sequences of each test case is obtained; based on the similarity between the interface sequences of each test case, hierarchical clustering is performed on each test case to obtain at least two test case sets.

[0131] In one possible implementation, this hierarchical clustering involves first calculating the similarity between interface sequences in each test case, then merging the test cases with the highest similarity in interface sequences into a test case set; then calculating the similarity between interface sequences among the remaining test cases, and the similarity between the remaining test cases and the interface sequences of the test case set, and merging the test cases or test case sets with the highest similarity; iterating the above process until a specified condition is met and then stopping.

[0132] In one possible implementation, the edit distance between the interface sequences of each test case is obtained as the similarity between the interface sequences; or, the number of differing interfaces between the interface sequences of each test case is obtained as the similarity between the interface sequences.

[0133] The edit distance between the interface sequences of each test case takes into account the order of the interface sequences. For example, if two test cases have identical interfaces in their interface sequences but two interfaces are in reverse order, the edit distance between the two test cases is 2. However, when the number of different interfaces between the interface sequences of each test case is used as the similarity between the interface sequences, the order of the interfaces is not considered. If two test cases have identical interfaces in their interface sequences but two interfaces are in reverse order, the number of different interfaces between the two test cases is 0.

[0134] In one possible implementation, the number of accounts N for each debugging account is obtained, where N is an integer greater than or equal to 2; based on the interface sequence of each test case, each test case is clustered to obtain N test case sets.

[0135] The number of test cases clustered by the server can be determined based on the number of debugging accounts corresponding to the server. That is, when the number of test cases finally classified by the server is exactly the number of debugging accounts, each debugging account can be assigned one set of test cases, ensuring that the processing efficiency of the test cases allocated in this way is high.

[0136] For example, if the number of test cases is greater than the number of debug accounts, a certain number of test cases will remain unprocessed; if the number of test cases is less than the number of debug accounts, a certain number of debug accounts will be unable to process the test cases, resulting in low work efficiency.

[0137] Step 306: Assign the at least two test case sets to each debugging account, so that the debugging personnel corresponding to the debugging account can build the corresponding test scripts based on the test cases in the assigned test case sets.

[0138] In one possible implementation, the assigned test case set of each debugging account is obtained; a first similarity is obtained between the assigned test case set of each debugging account and the at least two test case sets; the first similarity is used to indicate the similarity between the interface sequences of the test cases in the two sets; based on the set sequence similarity between the assigned test case set of each debugging account and the at least two test case sets, the at least two test case sets are respectively assigned to each debugging account.

[0139] The allocation of the test case set can be determined based on the assigned test case set of each debugging account. Specifically, the similarity of the interface sequences of each test case in the test case set and each test case in the assigned test case set is compared to determine the correspondence between each test case set and each assigned test case set. Then, each test case set is assigned to the debugging account of the assigned test case set with the highest first similarity to the test case set.

[0140] At this point, the test cases already assigned to the debugging account are highly similar to the test cases in the set of test cases to be assigned, and the debugging personnel corresponding to the debugging account have high operational efficiency.

[0141] In one possible implementation, the set of assigned test cases includes at least one of the test cases that have been processed by the corresponding debug account within a specified time period, and test cases that have been assigned to the corresponding debug account but have not been processed.

[0142] The allocated test case set includes test cases completed by the corresponding debugging account within a specified time period, which is the historical information completed by the debugging account; the test cases assigned to the corresponding debugging account but not yet completed are the test cases to be completed by the user account; regardless of whether the debugging account has completed the test cases in the allocated test case set, when the user processes the test case set assigned according to the allocated test case set, the user can call the API algorithm that has been used before processing the test cases corresponding to the test case set, which improves the processing efficiency of test cases.

[0143] In one possible implementation, in response to a request to reallocate test cases assigned to a target debugging account, each reallocated test case is obtained; the reallocated test case is a test case assigned to the target debugging account but not yet processed; the target debugging account is any one of the debugging accounts; a second similarity is obtained between each reallocated test case and the set of assigned test cases for each other debugging account; the second similarity is used to indicate the similarity between the interface sequence of the corresponding reallocated test case and the interface sequence of the test cases in the corresponding set of assigned test cases; each other debugging account is an account other than the target debugging account; based on the second similarity between each reallocated test case and the set of assigned test cases for each other debugging account, each reallocated test case is assigned to the other debugging account.

[0144] When the target debug account is unable to process the assigned test cases, the developer can send a reassignment request to the server to reassign the test cases assigned to the target debug account that have not been processed.

[0145] After the server obtains the unprocessed test case, for any one of the unprocessed test cases, it obtains the second similarity between it and the allocated test case set of each other debugging account, and determines the allocation set of the unprocessed test case based on the second similarity.

[0146] In one possible implementation, in response to the number of unprocessed test cases assigned to the first assigned test case set exceeding a first threshold, the assignment of the unprocessed test cases to the first assigned test case set is prohibited; wherein the first assigned test case set is any one of the various assigned test case sets.

[0147] To ensure the even distribution of unprocessed tasks, a first threshold can be set for each assigned test case set. If the number of unprocessed test cases assigned to a certain assigned test case set exceeds the threshold, no more unprocessed test cases will be assigned to that assigned test case set.

[0148] In one possible implementation, the first threshold is obtained based on the number of unprocessed test cases and the number of the allocated test case set.

[0149] The first threshold can be determined based on the tasks to be assigned and the number of already assigned test cases, where the number of already assigned test cases is the same as the number of debug accounts. These debug accounts are those currently active on the server, meaning they can process test cases normally.

[0150] The system involved in this application embodiment is mainly divided into three parts: an automatic test case generation system, a script debugging work order dispatch system, and a test script management system. All systems are background services deployed on a server, and specific parameters are shown in Tables 1 and 2.

[0151] Table 1 Deployment Environment Hardware Parameters

[0152] Hardware parameters value Server models Lenovo SS430 Memory 8G*2 CPU E3-1230v2*1 harddisk 1T*1

[0153] The hardware parameters of the deployment environment shown in Table 1 are merely exemplary. The system involved in the embodiments of this application can also be deployed on other servers with the same or better hardware.

[0154] Table 2 Deployment Environment Software Parameters

[0155]

[0156]

[0157] Table 2 shows the software parameters corresponding to the deployment environment of the embodiments of this application.

[0158] Please refer to Figure 5 This illustrates a system architecture diagram related to an embodiment of this application. Figure 5 As shown, in the backend server, system 501 is first automatically generated through test cases. Then, corresponding test cases are generated through the system test cases in the backend server, and the test cases are sent to the script debugging work order management system 502.

[0159] In the script debugging work order management system 502, when obtaining test cases, similar test cases are first grouped, and then script debugging work orders are assigned to debuggers so that after testing the scripts, the debuggers can put the code into the test script code generation system 503.

[0160] When assigning script debugging work orders, the strategy is to assign similar scripts to the same debugger as much as possible. This reduces the probability of API conflicts, specifically the likelihood of multiple debuggers calling the same API simultaneously, and also improves the efficiency of continuous script debugging. Furthermore, script similarity is quantified by associating each API with an ID. Scripts to be debugged are then clustered, with similar scripts grouped together. The number of cluster groups is adjusted based on the number of debuggers, and groups are then merged to balance the number of scripts (workload) assigned to each debugger.

[0161] The script is implemented by sequentially calling multiple operation APIs. If each operation API is associated with an ID, the script implementation can be mapped to an array of operation API IDs, as shown below:

[0162] [1230,1231,1163,1033,1027,979,993,985,999,1017]

[0163] [1230,1231,1163,1033,1027,962,1007,985,999,1017]

[0164] The two API ID arrays mentioned above are the identifiers of the application interfaces called by each test step in the test management.

[0165] Please refer to Figure 6 This illustrates an array of use case steps and a corresponding step diagram related to embodiments of this application. For example... Figure 6 As shown, the array of steps in this use case includes the identifier 601 corresponding to the operation API. The operation step 602 corresponds one-to-one with the identifier corresponding to the operation API. Different operation steps 602 need to call different identifiers 601 corresponding to the operation API, so the identifiers corresponding to their respective APIs are also different.

[0166] If we use the similarity of operation API sequences as a metric for script similarity:

[0167] The less similar the sequence of script operation APIs assigned to two debuggers, the lower the probability of API conflict. The less similar the sequence of script operation APIs assigned to two debuggers, the less similar the API identifiers of the script operations of the two debuggers are. That is, the APIs that the script operations need to call are also more different. Therefore, the probability of API conflict caused by the script operations of the two debuggers calling the same API at the same time is also lower.

[0168] The greater the similarity of the script operation API sequences assigned to the same debugger, the higher the reuse rate of the operation APIs involved in the script, the more similar the business scenarios, and the less debugging work is required.

[0169] The deductive effect aligns with our goal. Therefore, the script similarity calculation problem can be transformed into the similarity calculation problem between any two ID sequences. In one possible implementation of this application embodiment, the application interface ID has no numerical meaning, but is merely an identifier; and the sequence length corresponding to the script operation is variable, which can be determined based on the number of APIs that need to be called in the test steps corresponding to the script operation; and the identifier of each API is only used to indicate the difference between the API and other APIs, therefore the range of the ID value is variable.

[0170] When it is necessary to calculate the similarity of the interface sequences of the target test cases, the Levenshtein distance can be used. The Levenshtein distance (edit distance) refers to the minimum number of edit operations required to transform one string into another. The allowed edit operations include the following three types:

[0171] a) Replace one character with another character;

[0172] b) Insert a character;

[0173] c) Delete a character;

[0174] For example, changing the string "kitten" to "sitting" only requires three single-character editing operations, as follows:

[0175] sitten(k->s)

[0176] sittin(e->i)

[0177] sitting(_->g)

[0178] Therefore, the Levenshtein distance between "kitten" and "sitting" is 3.

[0179] Levenshtein distance is generally used to calculate the similarity between two strings. Here, it is applied to calculate the similarity of ID sequences, which requires that the ID be treated as a single character.

[0180] For example:

[0181] Modify [1230,1231,1163,1033,1027,979,993,985,999,1017] to

[0182] [1230,1231,1163,1033,1027,962,985,999,1017] hours;

[0183] The sequence [1230,1231,1163,1033,1027,962,993,985,999,1017] underwent a step of modifying 979 to 962, resulting in [1230,1231,1163,1033,1027,962,985,999,1017]. Then, the step of deleting 993 was performed. Therefore, the edit distance between the two sequences is 2.

[0184] In this application embodiment, a hierarchical clustering algorithm can be used when performing clustering calculations on each test case. The process of this hierarchical clustering algorithm is as follows:

[0185] First, each sample point is treated as a cluster, that is, each test case in each test case is treated as a cluster of the terminal of a hierarchical clustering algorithm, that is, each test case is treated as a separate class.

[0186] Next, calculate the distance between each cluster. For example, you can obtain the distance between each cluster by editing the distance as described above, and then aggregate the two closest clusters into a new cluster.

[0187] Repeat the above process until the number of clusters generated matches the target number of groups.

[0188] Please refer to Figure 7 This illustrates a clustering tree diagram related to an embodiment of this application. Figure 7 As shown, Figure 7 In the clustering algorithm, elements 701 to 705 are individual elements X1, X2, X3, X4, and X5. First, the similarity between each element and the other elements is calculated. The two elements with the highest similarity are merged into a single cluster, let's say X4 and X5. Then, the two elements with the highest similarity in the clusters of X1, X2, X3, X4, and X5, or the element with the highest similarity and its cluster, are merged into a new cluster, let's say X2 and X3. At this point, the five elements form three clusters: the cluster containing X1, the cluster containing X2 and X3, and the cluster containing X4 and X5. The similarity between these three clusters is then calculated, and based on the similarity, the cluster containing X1 and the cluster containing X2 and X3 are merged into a single cluster containing X1, X2, and X3. Finally, the cluster containing X1, X2, and X3 is directly merged with the cluster containing X4 and X5.

[0189] Methods for calculating the distance between clusters include:

[0190] Single-link: Uses the distance between the nearest samples in two clusters;

[0191] Complete link: Uses the distance between the furthest samples from the two clusters;

[0192] Average-link: Uses the average distance between all objects in two clusters.

[0193] Please refer to Figure 8 This illustration shows a schematic diagram of the single-link and full-link distance calculation methods involved in embodiments of this application. Figure 8 Figure 801 shows the distance between the closest samples in two clusters, i.e., the distance between single-linked samples; Figure 802 shows the distance between the farthest samples in two clusters, i.e., the distance between fully linked samples.

[0194] In this embodiment of the application, when clustering test cases using hierarchical clustering algorithm, the object distance algorithm can be the Levenshtein distance algorithm, and the cluster distance algorithm can be the average-link algorithm, so that the clusters are as uniform as possible. The number of clusters can be dynamically adjusted according to the number of debuggers.

[0195] Please refer to Figure 9 This illustrates a schematic diagram of a demonstration use case grouping scheme according to an embodiment of this application. For example... Figure 9 As shown, the test case grouping is also displayed in tabular form. Each row represents one test case, with the table headers being: Script ID, Script Name, Operation API ID, and Operation Steps. It can be seen that test cases with similar execution steps have been grouped together.

[0196] In this embodiment of the application, an API interface for exchanging in-game points for payment is implemented through the following code:

[0197] def test_1Receipts_217684(self):

[0198] @CaseID: 40369645d2f1d26a15437263cbf7d215f0

[0199] @Prerequisites: 3.1. [System] Verify that the user feedback result is a confirmed redemption, and request the user to select a redemption method [Step id: 14g] --- ["Is the number of points to be redeemed 0: No", "Is the result of the rule on whether the redemption method is available that all redemption conditions are not met: Yes"]

[0200] 4.1. [System] The user feedback result shows an increase in redemption points, and the user has reached the daily redemption limit [Step ID: 14g2] --- ["Is the number of points redeemed in the current user's account information >= 100,000: Yes"]

[0201] @Test Functionality: Redemption. [System] verifies user feedback as confirmed. [System] Proceeds to step 13 - [System] requests user confirmation of redemption information.

[0202] #Test case initialization, data acquisition and pre-operations

[0203] self.init(“70713”)

[0204] #The system directly connected to the points redemption request retrieves the payment voucher corresponding to the points redemption.

[0205] self.system_request_for_receipt_of_receipts_from_direct_merchant()

[0206] #The system directly connected to the points redemption request is requesting payment.

[0207] self.system_requests_from_direct_business()

[0208] # [System] Requests user confirmation of payment information for the redemption operation. The system verifies that the user's feedback indicates confirmation of payment for points redemption, and requests the user to select the redemption method corresponding to the points: self.confirm_payment_information_and_request_game_users_to_choose_change_method()

[0209] # [System] Requests user to select redemption method_ [System] Verifies user feedback indicates confirmation of redemption method and redemption is completed, and the number of points redeemed in the user's account information has reached the limit.

[0210] self.choose_to_choose_a_change_method_and_the_number_of_game_users_to_ tie_the_point_has_reached_the_limit()

[0211] # [System] Request for user confirmation failed - [System] Verification of user feedback result as confirmation

[0212] self.confirmation_failure_information_confirmation()

[0213] #End of test case, account restoration and follow-up operations

[0214] self.exit()

[0215] In this embodiment, the following code also implements the API function code for the above-mentioned game application's API interface:

[0216] @log_time_opapi

[0217] def confim_payment_information_and_request_wechat_users_to_choose_payment_method(self):

[0218] "[System] Requests user confirmation of redemption information_[System] Verifies user feedback as payment confirmation, and requires user to select redemption method."

[0219] #Wait for the corresponding page to appear#

[0220] aui.WalletPayUI(self.serial).wait_exists()

[0221] #Validate the OCR data information on the page#

[0222] self.check_ocr_content(“confirm_payment_information_and_request_game_use rs_to_choose_change_method”)

[0223] #Specific operations corresponding to this step#

[0224] aui.WalletPayUI(self.serial).wallet_pay_pay.click() # Click to pay immediately

[0225] if aui.WalletPayUI(self.serial).change_way.exists(seconds=1.000): # Do not click on a redemption method when all redemption methods are unavailable.

[0226] aui.WalletPayUI(self.serial).change_way.click() # Click to redeem.

[0227] This solution automatically divides a large set of test cases into multiple sets composed of similar test cases. After grouping similar test cases, they are assigned to debuggers for development. This reduces the cost for debuggers to understand multiple test cases and decreases development workload. In scenarios where a large number of test cases need to be implemented as test scripts, test cases can be grouped by similarity and assigned to a limited number of debuggers, reducing workload. It also improves the accuracy of grouping, utilizing algorithms and computing power to perform precise similarity calculations; enhances the stability of grouping results, eliminating reliance on individual experience as the grouping algorithm is embedded in the system; and saves on the cost of manual grouping.

[0228] In summary, the solution described in this application involves obtaining a test case set, clustering each test case based on its interface sequence, and then classifying each test case according to the application interface corresponding to its steps. The classified test cases are then assigned to the corresponding debugging accounts on the server. By classifying test cases based on the application interfaces corresponding to their steps, the test cases are grouped into a single test case set. This test case set is then assigned to debugging personnel. When building test scripts based on this test case set, the debugging personnel can reuse highly similar application interfaces, improving the efficiency of test script construction.

[0229] Figure 10 This is a flowchart illustrating a test case allocation method according to an exemplary embodiment. The test case allocation method is executed by server 1000, which can be... Figure 1 Server 120 in the illustrated embodiment. (As shown) Figure 10 As shown, the test case set 1001 contains multiple test cases. The server obtains the interface sequence 1002 corresponding to each test case in the test case set 1001, and obtains the similarity 1003 between the interface sequences corresponding to each test case based on the interface sequences corresponding to each test case.

[0230] Multiple test cases in the test case set 1001 are clustered according to the similarity 1003 to obtain the test case set 1004 corresponding to the multiple test cases. Each test case set 1004 contains at least one test case, and the test case set 1004 is aggregated according to the similarity 1003 between interface sequences. Therefore, the API interfaces corresponding to each test case in the test case set 1004 have a high degree of similarity.

[0231] Figure 11 This is a block diagram illustrating a test case allocation device according to an exemplary embodiment of this application. The test case allocation device can be applied to a computer device, which can be a terminal, or a combination of a terminal and a server, wherein the terminal can be... Figure 1 The terminal shown. (As shown in the image.) Figure 11 As shown, the test case allocation device includes:

[0232] The test case set acquisition module 1101 is used to acquire a test case set; the test case set contains at least two test cases.

[0233] The sequence acquisition module 1102 is used to acquire the interface sequence of each test case in the test case set; the interface sequence is used to indicate the application interface called sequentially by each test case step in the corresponding test case.

[0234] Clustering module 1103 is used to cluster the test cases based on the interface sequence of each test case to obtain at least two test case sets;

[0235] The subset allocation module 1104 is used to allocate the at least two test case sets to each debugging account, so that the debugging personnel corresponding to the debugging account can construct corresponding test scripts based on the test cases in the allocated test case sets.

[0236] In one possible implementation, the sequence acquisition module 1102 includes:

[0237] The description text acquisition unit is used to acquire the description text of each test step in the target test case; the target test case is any one of the at least two test cases;

[0238] The identifier query unit is used to query the identifiers of the application interfaces called by each test step in the target test case based on the description text of each test step in the target test case.

[0239] The identifier arrangement unit is used to arrange the identifiers of the application interfaces called by each test step in the target test case according to the order of the corresponding test steps to obtain the interface sequence of the target test case.

[0240] In one possible implementation, the identifier query unit is used for:

[0241] Feature information is extracted from the description text of the target test step to obtain the feature information of the target test step; the target test step is any one of the test steps in the target test case;

[0242] Query the identifier of the application interface called by the target test step, which corresponds to the stored feature information of the target test step.

[0243] In one possible implementation, the feature information of the target test step includes the hash value of the target test step;

[0244] or,

[0245] The characteristic information of the target test step includes the keyword sequence of the target test step.

[0246] In one possible implementation, the identifier query unit is further used for:

[0247] Based on the feature extraction model, feature information is extracted from the description text of the target test step to obtain the feature information of the target test step; the feature extraction model is a deep learning model trained based on sample test steps.

[0248] In one possible implementation, the identifier query unit is further used for:

[0249] In response to the first keyword in the description text of the target test step not belonging to the specified keyword set, a second keyword is obtained from the specified keyword set; the second keyword is a synonym of the first keyword;

[0250] Replace the first keyword in the description text of the target test step with the second keyword.

[0251] In one possible implementation, the clustering module 1103 includes:

[0252] A similarity acquisition unit is used to acquire the similarity between the interface sequences of each test case;

[0253] The example set acquisition unit is used to perform hierarchical clustering on each test case based on the similarity between the interface sequences of each test case, and obtain the at least two test example sets.

[0254] In one possible implementation, the similarity acquisition unit is used for,

[0255] The edit distance between the interface sequences of each test case is obtained and used as the similarity between the interface sequences;

[0256] or,

[0257] The number of differing interfaces among the interface sequences of each test case is used as the similarity between the interface sequences.

[0258] In one possible implementation, the clustering module 1103 is used for,

[0259] Obtain the number N of each debugging account, where N is an integer greater than or equal to 2;

[0260] Based on the interface sequence of each test case, the test cases are clustered to obtain N test case sets.

[0261] In one possible implementation, the subset allocation module 1104 includes:

[0262] The test case set acquisition unit is used to acquire the assigned test case set for each debugging account;

[0263] The first similarity acquisition unit is used to acquire a first similarity between the allocated test case set of each debugging account and the at least two test case sets; the first similarity is used to indicate the similarity between the interface sequences of test cases in the two sets;

[0264] The second test case set allocation unit is used to allocate the at least two test case sets to each debugging account based on the set sequence similarity between the allocated test case sets of each debugging account and the at least two test case sets.

[0265] In one possible implementation, the set of assigned test cases includes at least one of the test cases that have been processed by the corresponding debug account within a specified time period, and test cases that have been assigned to the corresponding debug account but have not been processed.

[0266] In one possible implementation, the subset allocation module 1104 is further configured to:

[0267] In response to a request to reassign test cases assigned to a target debugging account, obtain each reassigned test case; the reassigned test cases are test cases assigned to the target debugging account that have not been processed; the target debugging account is any one of the debugging accounts.

[0268] Obtain the second similarity between each of the reassigned test cases and the set of assigned test cases for each of the other debugging accounts; the second similarity is used to indicate the similarity between the interface sequence of the corresponding reassigned test case and the interface sequence of the test cases in the corresponding set of assigned test cases; each of the other debugging accounts is the account that is excluding the target debugging account.

[0269] Based on the second similarity between each reassigned test case and the set of assigned test cases for each other debugging account, the reassigned test cases are assigned to each other debugging account.

[0270] In summary, the solution described in this application involves obtaining a test case set, clustering each test case based on its interface sequence, and then classifying each test case according to the application interface corresponding to its steps. The classified test cases are then assigned to the corresponding debugging accounts on the server. By classifying test cases based on the application interfaces corresponding to their steps, the test cases are grouped into a single test case set. This test case set is then assigned to debugging personnel. When building test scripts based on this test case set, the debugging personnel can reuse highly similar application interfaces, improving the efficiency of test script construction.

[0271] Figure 12 This is a structural block diagram of a computer device 1200 according to an exemplary embodiment of this application. The computer device 1200 may be... Figure 1 The user terminal or server in the system shown.

[0272] Typically, computer device 1200 includes a processor 1201 and a memory 1202.

[0273] Processor 1201 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1201 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1201 may also include a main processor and a coprocessor. In some embodiments, processor 1201 may integrate a GPU (Graphics Processing Unit), and processor 1201 may further include an AI (Artificial Intelligence) processor for handling computational operations related to machine learning.

[0274] The memory 1202 may include one or more computer-readable storage media, which may be non-transitory. The memory 1202 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1202 are used to store at least one instruction, which is executed by the processor 1201 to implement all or part of the steps in the above-described method embodiments of this application.

[0275] In some embodiments, when the computer device is implemented as a user terminal, the computer device 1200 may optionally include: a peripheral device interface 1203 and at least one peripheral device. The processor 1201, memory 1202, and peripheral device interface 1203 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1203 via a bus, signal line, or circuit board. Optionally, the peripheral device includes at least one of: a radio frequency circuit 1204, a display screen 1205, an image acquisition component 1206, an audio circuit 1207, a positioning component 1208, and a power supply 1209.

[0276] Peripheral interface 1203 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1201 and memory 1202.

[0277] The radio frequency (RF) circuit 1204 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. Optionally, the RF circuit 1204 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1204 can communicate with other computer devices through at least one wireless communication protocol. In some embodiments, the RF circuit 1204 may also include NFC (Near Field Communication) related circuitry, which is not limited in this application.

[0278] Display screen 1205 is used to display UI (User Interface). When display screen 1205 is a touch display screen, display screen 1205 also has the ability to collect touch signals on or above the surface of display screen 1205.

[0279] The image acquisition component 1206 is used to acquire images or videos. In some embodiments, the image acquisition component 1206 may also include a flash.

[0280] The audio circuit 1207 may include a microphone and a speaker. In some embodiments, the audio circuit 1207 may also include a headphone jack.

[0281] The positioning component 1208 is used to locate the current geographical location of the computer device 1200 in order to enable navigation or LBS (Location Based Service).

[0282] The power supply 1209 is used to supply power to the various components in the computer device 1200.

[0283] In some embodiments, the computer device 1200 further includes one or more sensors 1210. The one or more sensors 1210 include, but are not limited to: an accelerometer 1211, a gyroscope 1212, a pressure sensor 1213, a fingerprint sensor 1214, an optical sensor 1215, and a proximity sensor 1216.

[0284] Those skilled in the art will understand that Figure 12 The structure shown does not constitute a limitation on the computer device 1200, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0285] In exemplary embodiments, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory including a computer program (instructions) that can be executed by a processor of a computer device to perform the methods shown in the various embodiments of this application. For example, the non-transitory computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0286] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods shown in the various embodiments described above.

[0287] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.

[0288] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for allocating test cases, characterized in that, The method includes: Obtain a test case set; the test case set contains at least two test cases. Obtain the description text of each test step in the target test case; the target test case is any one of the at least two test cases; In response to the first keyword in the description text of the target test step not belonging to the specified keyword set, the first keyword in the description text of the target test step is replaced with a second keyword from the specified keyword set, where the second keyword is a synonym of the first keyword; the keywords in the specified keyword set are standardized keywords. Feature information is extracted from the description text of the target test step to obtain the feature information of the target test step; the target test step is any one of the various test steps; the identifier of the application interface called by the target test step is queried and stored corresponding to the feature information of the target test step. The identifiers of the application interfaces called by each test step are arranged in the order of the corresponding test steps to obtain the interface sequence of the target test case. Based on the interface sequence of each test case, the test cases are clustered to obtain at least two test case sets; The at least two test case sets are assigned to each debugging account, so that the debugging personnel corresponding to the debugging account can build corresponding test scripts based on the test cases in the assigned test case sets.

2. The method according to claim 1, characterized in that, The characteristic information of the target test step includes the hash value of the target test step; or, The characteristic information of the target test step includes the keyword sequence of the target test step.

3. The method according to claim 1, characterized in that, The step of extracting feature information from the descriptive text of the target test step to obtain the feature information of the target test step includes: Based on the feature extraction model, feature information is extracted from the description text of the target test step to obtain the feature information of the target test step; the feature extraction model is a deep learning model trained based on sample test steps.

4. The method according to claim 1, characterized in that, Based on the interface sequence of each test case, the test cases are clustered to obtain at least two test case sets, including: Obtain the similarity between the interface sequences of each test case; Based on the similarity between the interface sequences of each test case, hierarchical clustering is performed on each test case to obtain at least two test case sets.

5. The method according to claim 4, characterized in that, The process of obtaining the similarity between the interface sequences of each test case includes: The edit distance between the interface sequences of each test case is obtained and used as the similarity between the interface sequences; or, The number of differing interfaces among the interface sequences of each test case is used as the similarity between the interface sequences.

6. The method according to claim 1, characterized in that, Based on the interface sequence of each test case, the test cases are clustered to obtain at least two test case sets, including: Obtain the number N of each debugging account, where N is an integer greater than or equal to 2; Based on the interface sequence of each test case, the test cases are clustered to obtain N test case sets.

7. The method according to claim 1, characterized in that, The step of assigning the at least two test example sets to each debugging account includes: Obtain the set of assigned test cases for each of the debugging accounts; Obtain a first similarity between the assigned test case set of each debugging account and the at least two test case sets; the first similarity is used to indicate the similarity between the interface sequences of test cases in the two sets; Based on the set sequence similarity between the assigned test case set of each debugging account and the at least two test example sets, the at least two test example sets are respectively assigned to each debugging account.

8. The method according to claim 7, characterized in that, The set of assigned test cases includes at least one of the following: test cases that have been processed by the corresponding debugging account within a specified time period, and test cases that have been assigned to the corresponding debugging account but have not been processed.

9. The method according to claim 7, characterized in that, The method further includes: In response to a request to reassign test cases assigned to a target debugging account, obtain each reassigned test case; the reassigned test cases are test cases assigned to the target debugging account that have not been processed; the target debugging account is any one of the debugging accounts. Obtain the second similarity between each of the reassigned test cases and the set of assigned test cases for each of the other debugging accounts; the second similarity is used to indicate the similarity between the interface sequence of the corresponding reassigned test case and the interface sequence of the test cases in the corresponding set of assigned test cases; each of the other debugging accounts is the account that is excluding the target debugging account. Based on the second similarity between each reassigned test case and the set of assigned test cases for each other debugging account, the reassigned test cases are assigned to each other debugging account.

10. A test case allocation device, characterized in that, The device includes: The test case set acquisition module is used to acquire a test case set; the test case set contains at least two test cases. A sequence acquisition module is used to acquire the description text of each test step in a target test case; the target test case is any one of the at least two test cases; in response to a first keyword in the description text of a target test step not belonging to a specified keyword set, the first keyword in the description text of the target test step is replaced with a second keyword from the specified keyword set, the second keyword being a synonym of the first keyword; the keywords in the specified keyword set are standardized keywords; feature information is extracted from the description text of the target test step to obtain the feature information of the target test step; the target test step is any one of the test steps; the identifiers of the application interfaces called by the target test step are queried and stored corresponding to the feature information of the target test step; the identifiers of the application interfaces called by each test step are arranged according to the order of the corresponding test steps to obtain the interface sequence of the target test case; The clustering module is used to cluster the test cases based on the interface sequence of each test case to obtain at least two test case sets. The subset allocation module is used to allocate the at least two test case sets to each debugging account, so that the debugging personnel corresponding to the debugging account can build corresponding test scripts based on the test cases in the allocated test case sets.

11. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, a code set, or an instruction set, the at least one instruction, the at least one program, the code set, or the instruction set being loaded and executed by the processor to implement the test case allocation method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the test case allocation method as described in any one of claims 1 to 9.

13. A computer program product, characterized in that, The computer program product includes computer instructions that are executed by a processor of a computer device to cause the computer device to implement the test case allocation method as described in any one of claims 1 to 9.