Software testing method and device, computer equipment and storage medium

By setting specified test case identifiers and baseline test case sets in the test plan, the problem of chaotic software testing asset management is solved, the efficiency of test case construction and reuse rate are improved, and intelligent management of test assets is realized.

CN122045052APending Publication Date: 2026-05-15SHENZHEN LEXIN SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN LEXIN SOFTWARE TECH CO LTD
Filing Date
2026-02-03
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In existing technologies, software testing asset management is chaotic, and the reuse rate of testing assets is low, resulting in low efficiency and high repetition in test case writing, making it difficult to reuse effectively.

Method used

By setting specified test case identifiers in the test plan and managing test assets using the baseline test case set, users can choose to reuse baseline test cases or build new test cases, and update the baseline test case set when the test passes, and perform deduplication processing in conjunction with test case vectors.

Benefits of technology

It improves the efficiency of test case construction and asset reuse rate, ensures that the baseline test case set maintains the latest version of test cases, facilitates the reuse of subsequent software testing, and realizes intelligent management of test assets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122045052A_ABST
    Figure CN122045052A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a software testing method and device, computer equipment and a storage medium. The method comprises the steps of obtaining a test scheme of target software; for each specified case identifier in the test scheme, determining whether to multiplex a baseline test case of the application case identifier from a preset baseline case set according to a selection operation of a user; constructing a corresponding target test case according to a corresponding target baseline test case in the baseline test case set for a specified case identifier for determining the reuse baseline test case; constructing a new test case as a corresponding target test case according to the case construction operation of the user for the specified case identifier of the non-multiplexing baseline test case; performing test operation on the target software according to the target test cases respectively corresponding to the plurality of specified case identifiers to obtain a test result; and when the test result is that the test is passed, updating the baseline case set according to the new test case. Through the scheme, the test assets can be intelligently managed, and the reuse rate of the test assets is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to software testing methods, apparatus, computer equipment and storage media. Background Technology

[0002] Software testing, as a primary means of quality assurance, can promptly identify errors in a system and reduce system maintenance costs. In actual testing, a significant portion of the time is spent writing test cases; test cases are the core of software testing.

[0003] Test plans and test cases generated during the testing process are important testing assets. Test plans and test cases for the same software product have a high degree of redundancy in different testing phases. Moreover, the functions of various software products developed in the same domain can be borrowed from each other. Therefore, test plans and test cases of different software products also have the same or similar aspects. However, due to the current chaotic management of test assets, the reuse rate of test assets is low. Summary of the Invention

[0004] This application provides software testing methods, apparatus, computer equipment, and storage media, which can intelligently manage test assets and improve the reusability of test assets.

[0005] In a first aspect, embodiments of this application provide a software testing method, which includes: Obtain the test plan for the target software, wherein the test plan includes multiple specified test case identifiers; For each specified use case identifier, the user's selection operation determines whether to reuse the baseline test case with the corresponding use case identifier from the preset baseline use case set. The baseline use case set includes multiple baseline test cases with different use case identifiers and use case vectors corresponding to each baseline test case. For the specified test case identifier that determines the reuse of baseline test cases, construct the corresponding target test cases based on the target baseline test cases in the baseline test case set; For the specified test case identifier that does not reuse the baseline test case, a new test case is constructed based on the user's test case construction operation as the corresponding target test case; The target software is tested according to the target test cases corresponding to the multiple specified test case identifiers, and the test results are obtained. When the test result is a pass, a test case vector corresponding to the new test case is generated, and the baseline test case set is updated according to the new test case and the corresponding test case vector. When the preset test case collection time is reached, the test cases in the baseline test case set are deduplicated based on the test case vectors in the baseline test case set.

[0006] Secondly, embodiments of this application also provide a software testing apparatus, which includes: The transceiver unit is used to acquire the test plan of the target software, wherein the test plan includes multiple specified test case identifiers; The processing unit is configured to, for each specified test case identifier, determine, based on the user's selection operation, whether to reuse the baseline test case corresponding to the specified test case identifier from a preset baseline test case set, wherein the baseline test case set includes multiple baseline test cases corresponding to different test case identifiers and test case vectors corresponding to each baseline test case; for the specified test case identifier for which the baseline test case is determined to be reused, construct a corresponding target test case based on the target baseline test case corresponding to the baseline test case set; for the specified test case identifier for which the baseline test case is not reused, construct a new test case as the corresponding target test case based on the user's test case construction operation; perform test operations on the target software based on the target test cases corresponding to the multiple specified test case identifiers to obtain test results; when the test result is a pass, generate a test case vector corresponding to the new test case, and update the baseline test case set based on the new test case and the corresponding test case vector; when a preset test case cleanup time is reached, perform deduplication processing on the test cases in the baseline test case set based on the test case vectors in the baseline test case set.

[0007] Thirdly, embodiments of this application also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0008] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, can implement the above-described method.

[0009] This application provides software testing methods, apparatus, computer equipment, and storage media. In this application, multiple baseline test cases with different test case identifiers are maintained in a baseline test case set. By setting specified test case identifiers in the test plan, test cases corresponding to the test plan are constructed. Users can reuse baseline test cases corresponding to the baseline test case set based on the specified test case identifiers. Reusing baseline test cases improves the efficiency of test case construction and the reusability of test assets. Furthermore, when the target software passes testing, if new test cases are added, the new test cases will be updated to the baseline test case set, automatically updating the baseline test case set and ensuring that the baseline test case set maintains the latest version of test cases, facilitating the reuse of test cases in subsequent new software. Moreover, this application stores test case vectors for each baseline test case. These test case vectors can be used to deduplicate baseline test cases in the baseline test case set, automatically optimizing the baseline test case set and achieving intelligent management of test assets. Attached Figure Description

[0010] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A flowchart illustrating the software testing method provided in this application embodiment; Figure 2 A schematic diagram of a sub-process of the software testing method provided in the embodiments of this application; Figure 3 This is another schematic diagram of a sub-process of the software testing method provided in the embodiments of this application; Figure 4 This is another schematic diagram of a sub-process of the software testing method provided in the embodiments of this application; Figure 5 A schematic block diagram of a software testing apparatus provided in the embodiments of this application; Figure 6 A schematic block diagram of a computer device provided in an embodiment of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0013] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0014] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0015] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0016] This application provides software testing methods, apparatus, computer equipment, and storage media.

[0017] The execution subject of the software testing method can be the software testing device provided in the embodiments of this application, or a computer device that integrates the software testing device. The software testing device can be implemented in hardware or software, and the computer device can be a terminal or a server. The terminal can be a smartphone, tablet computer, handheld computer, or laptop computer, etc.

[0018] Figure 1 This is a flowchart illustrating the software testing method provided in an embodiment of this application. Figure 1 As shown, the method includes the following steps S110-S170.

[0019] S110. Obtain the test plan for the target software, wherein the test plan includes multiple specified test case identifiers.

[0020] In this embodiment, the target software is the software that needs to be tested. Generally, the same software needs to be tested multiple times before it goes live. The test plans for the same software at different test stages may be the same or different. When testing the target software, one test plan corresponds to multiple test cases.

[0021] In this embodiment, the test plan is constructed by setting multiple different designated test case identifiers in the test plan. For example, the designated test case identifiers in the test plan corresponding to test plan V1 include test case 1, test case 2 and test case 3, and the designated test case identifiers in the test plan corresponding to test plan V2 include test case 1, test case 2, test case 3 and test case 4. The test case identifier can specifically be the test case name.

[0022] Specifically, please refer to Figure 2 Step S110 includes: S1101. Determine whether to reuse a baseline scheme from the preset baseline scheme library based on the user's selection operation; S1102. If it is determined that a baseline scheme will be reused from the baseline scheme library, then the target baseline scheme selected by the user in the baseline scheme library will be determined as the test scheme for the target software. S1103. If it is determined that a baseline scheme will not be reused from the baseline scheme library, a new test scheme is constructed based on the user's test scheme construction operation as the test scheme for the target software.

[0023] In this embodiment, an asset library is provided, which includes a baseline scheme library and a baseline test case set. The baseline scheme library includes multiple different baseline schemes, and each baseline scheme includes different test case identifiers. The different test case identifiers are associated with the test cases in the baseline test case set.

[0024] Test plans can be written manually (without reusing baseline plans from the baseline plan library), or the efficiency of test plan construction can be improved by reusing test plans (by reusing baseline plans from the baseline plan library).

[0025] Furthermore, to maintain test assets, after constructing a new test plan as the test plan for the target software based on the user's test plan construction operation, the method further includes: Obtain the user's review results for the new test plan; when the review result is "approved", add the new test plan to the baseline plan library.

[0026] Specifically, when a user chooses to manually write a test plan, after the test plan is completed and a new test plan is obtained, it will automatically enter the review stage. During the review stage, the computer will automatically compare the new test plan with each baseline plan in the baseline plan library to obtain the baseline plan similarity score. If there is a baseline plan in the library whose similarity score with the new test plan is greater than a preset value (e.g., 90%), the review user will be prompted. When the review user needs further details, the differences between the baseline plan similarity score and the new test plan will be highlighted on the screen, allowing the review user to make informed decisions based on the baseline plan similarity score. The system uses the value of the new test plan and the highlighted differences between the old and new test plans to determine whether to add the new test plan to the baseline plan library. The review result is then determined. If the review is successful, the new test plan is added to the baseline plan library. Generally, if there is a baseline plan similarity score greater than the preset score, and the differences are identical or very minor, the new baseline plan does not need to be added to the baseline plan library to avoid redundancy. If the review fails, the user can directly use the new test plan to build corresponding test cases without needing to add the test plan to the library.

[0027] If a baseline scheme is determined to be reused from the baseline scheme library, the user can adjust the target baseline scheme selected from the baseline scheme library to obtain the test scheme corresponding to the target software. There is no need to start writing from scratch; only adjustments are needed to obtain a test scheme that meets the current test requirements, which improves the efficiency of test scheme generation. In addition, for test schemes that can be fully reused, the user can directly use the selected target baseline scheme as the current test scheme for the target software.

[0028] Furthermore, since the same software needs to be tested multiple times, this embodiment will automatically add a test version number to the corresponding test plan when testing the same software, so as to facilitate users' subsequent review.

[0029] It should be noted that after testing based on the test plan, the test case instance is bound to the test plan, not the test case (test case object). Test cases with the same test case identifier will continue to iterate with the test case updates, while the test case instance remains unchanged. This makes the software testing of different test plans traceable and reviewable, which solves the contradiction between test asset iteration and historical traceability. It ensures that no matter how the test cases change in the future, every test execution record in the past can be accurately and truthfully reviewed and audited, thus achieving true traceability.

[0030] In this embodiment, the asset library includes a baseline solution library and a baseline use case set. The baseline solution library and the baseline use case set are mapped through a directory hierarchy based on the relationship between baseline solutions and their corresponding use case identifiers. Specifically, the directory rules in the asset library are as follows: the directory of baseline solutions in the baseline solution library serves as the parent directory structure; the solution directory precedes the use case directory; the use case directory can only be created under the leaf nodes of the solution directory; and the solution and use case directories can be directly converted to each other. The asset storage rules are as follows: baseline solutions can only be placed in the leaf nodes of the solution directory and are not allowed to be stored across levels; test cases (specifically, use case identifiers that are associated with the corresponding test cases in the baseline use case set, meaning that the baseline test cases corresponding to the baseline use case set can be extracted through the use case identifier) ​​are allowed to be stored in the leaf nodes of the solution directory (at the same level as the solutions) and in the use case directory. The page interaction uses different icons to distinguish the solution and use case directories, making the logical structure clear at a glance.

[0031] S120. For each specified use case identifier, determine whether to reuse the baseline test case with the corresponding use case identifier from the preset baseline use case set based on the user's selection operation. The baseline use case set includes multiple baseline test cases with different use case identifiers and use case vectors corresponding to each baseline test case.

[0032] In this embodiment, the user can preview the corresponding baseline test case based on the specified test case identifier and determine whether the baseline test case conforms to the current situation of the corresponding test path in the target software. If it does not conform (for example, there are major changes), the user can choose not to reuse the baseline test case; otherwise, the user can choose to reuse the baseline test case.

[0033] In addition, users can reuse baseline test cases that are known to be fully reusable (e.g., functions that have not changed from the previous test to the current test) with one click. For test cases that are known to be non-reusable, users can write them directly.

[0034] S130. For the specified test case identifier that determines the reuse of the baseline test case, construct the corresponding target test case according to the target baseline test case in the baseline test case set.

[0035] In this embodiment, users can completely reuse the target baseline test cases as target test cases (i.e., no adjustment is needed), or they can adjust the target test cases based on the target baseline test cases to obtain the target test cases.

[0036] In some embodiments, please refer to Figure 3 Specifically, the target baseline test cases are adjusted through the following steps: S1301. Display the target baseline test cases; S1302. Based on the user's modification operation on the displayed target baseline test cases, determine the adjustment information of the target baseline test cases; S1303. Determine the target test cases based on the target baseline test cases and the adjustment information.

[0037] Specifically, after the user selects to reuse the target baseline test case based on the preview interface, the computer device jumps to the editing interface, which displays the target baseline test case. Then, the user adjusts the target baseline test case based on the displayed target baseline test case. For example, if the button name of the function corresponding to the target baseline test case changes, the button name in the target baseline test case is adjusted to the current button name of the corresponding function.

[0038] S140. For the specified test case identifier that does not reuse the baseline test case, construct a new test case as the corresponding target test case based on the user's test case construction operation.

[0039] In this embodiment, if the function corresponding to the specified test case identifier is a new function, or if the function has undergone significant adjustments in the target software, the user needs to manually construct a new test case as the target test case.

[0040] S150. Perform test operations on the target software according to the target test cases corresponding to the multiple specified test case identifiers, and obtain test results.

[0041] In this embodiment, after obtaining all target test cases with specified test case identifiers in the test plan, test case instances corresponding to each target test case are generated to test the target software and obtain the test results.

[0042] When the test result is abnormal, the checkpoint is not allowed to be exited, and the cause of the test abnormality needs to be found manually.

[0043] When the test result is "test passed", the test is completed, and the test assets will be automatically archived.

[0044] S160. When the test result is that the test is passed, generate the test case vector corresponding to the new test case, and update the baseline test case set according to the new test case and the corresponding test case vector.

[0045] In some embodiments, please refer to Figure 4 Specifically, the baseline use case set is updated through the following steps: S1601. When it is determined that there is a baseline test case to be replaced in the baseline test case set that corresponds to the specified test case identifier of the new test case, the test case similarity value between the new test case and the baseline test case to be replaced is determined, and the difference information between the new test case and the baseline test case to be replaced is determined, so that the user can review the new test case based on the test case similarity value and the difference information. S1602. When it is determined that the new test case has passed the review, generate the test case vector corresponding to the new test case, and replace the baseline test case to be replaced in the baseline test case set with the new test case.

[0046] S1603. When it is determined that there is no baseline test case to be replaced in the baseline test case set that corresponds to the specified test case identifier of the new test case, a test case vector corresponding to the new test case is generated, and the new test case is added to the baseline test case set.

[0047] Specifically, the process first determines whether a replacement baseline test case exists in the baseline test case set corresponding to the specified test case identifier of the new test case. If not, the new test case is directly added to the baseline test case set. If a replacement baseline test case exists, the similarity value between the new test case and the replacement baseline test case is calculated, and the differences between the new test case and the replacement baseline test case are highlighted. The user reviews the new test case based on the similarity value and the highlighted differences to determine whether to replace the corresponding replacement baseline test case. If the review is successful, the new test case is replaced; otherwise, it is not replaced. For example, if the similarity is too high and the highlighted differences are minor, there is no need to replace it; otherwise, replacement is performed. This ensures that the baseline test case set stores the latest baseline test cases, which are updated synchronously with updates to the target software or corresponding technology, thus facilitating test case reuse.

[0048] In some embodiments, determining the test case similarity value between the new test case and the baseline test case to be replaced includes: The new test case and the baseline test case to be replaced are respectively processed by test case content splitting to obtain the first title content, first step content, and first result content corresponding to the new test case, and the second title content, second step content, and second result content corresponding to the baseline test case to be replaced; a first similarity value between the first title content and the second title content, a second similarity value between the first step content and the second step content, and a third similarity value between the first result content and the second result content are determined; the test case similarity value is determined according to the preset title weight, preset step weight, preset result weight, first similarity value, second similarity value, and third similarity value.

[0049] Specifically, when performing test case content splitting on the new test case and the baseline test case to be replaced, data preprocessing is performed on both: including test case content splitting (splitting into three parts: title, steps, and result), then performing standardized text cleaning and word segmentation on each part to obtain the first title content, first step content, and first result content corresponding to the new test case, and the second title content, second step content, and second result content corresponding to the baseline test case to be replaced. When calculating similarity, text vectorization processing is required for the first title content, first step content, first result content, second title content, second step content, and second result content to obtain text vectors for each part. Then, cosine similarity is calculated based on the corresponding text vectors to obtain the similarity value for each part. Finally, combined with the preset weights of each part (for example, setting the preset title weight to 0.5, the preset step weight to 0.3, and the preset result weight to 0.2), a weighted sum is performed based on the weights of each part and the similarity value to output the corresponding test case similarity value.

[0050] As can be seen, this embodiment can accurately determine the similarity between use cases and highlight detailed difference comparison charts, thereby improving the efficiency of use case review.

[0051] In some embodiments, this embodiment also introduces a nearest neighbor search algorithm (ANN algorithm), which automatically triggers scanning through a timed task to identify test cases in the test case library with a similarity higher than a preset similarity threshold (such as 95%), and then intelligently deletes invalid test cases. This scheme can ensure that the baseline test cases in the baseline test case library are always fully valid and unique, avoid test case redundancy, and have high test case maintenance efficiency.

[0052] S170. When the preset test case collection time is reached, the test cases in the baseline test case set are deduplicated based on the test case vectors in the baseline test case set.

[0053] The test cases involved in the deduplication process include all test cases in the baseline test case set.

[0054] Specifically, intelligent maintenance of use cases is performed through the following steps: When the preset test case processing time is reached, based on the preset approximate nearest neighbor search algorithm and the test case vectors corresponding to each baseline test case, it is determined whether there is a set of baseline test cases to be processed in the set of baseline test cases. The set of baseline test cases to be processed includes at least two candidate baseline test cases with a similarity greater than a preset similarity threshold. If the set of baseline test cases to be processed exists, the valid baseline test cases in the set of baseline test cases to be processed are determined according to the preset deduplication rule, the invalid baseline test cases in the set of baseline test cases to be processed are deleted except for the valid baseline test cases, and the association relationship between the test case identifier of the invalid baseline test cases and the test case identifier of the valid baseline test cases is established.

[0055] The preset test case processing time can be a specific time each day, such as 1:00 AM. Deduplication rules include retaining the candidate baseline test case with the most reuses as the valid baseline test case, or selecting the candidate baseline test case whose most recent reuse time is closest to the current time as the valid baseline test case. Establishing the association between the test case identifiers of invalid baseline test cases and the test case identifiers of valid baseline test cases ensures that when searching based on the test case identifiers of invalid baseline test cases, the associated invalid baseline test cases will be displayed.

[0056] The use case vectors mentioned above are calculated when the use cases are added to the baseline use case set. The steps for calculating the use case vectors are as follows: The baseline test cases undergo text preprocessing, including text cleaning (e.g., removing punctuation, special characters, and case conversion), word segmentation (dividing the text into independent units), and stop word removal (removing words without semantic meaning, such as "ah," "ma," and "de"). After text preprocessing, text vectors are calculated, including calculating word vectors (using a pre-trained model to calculate the word vector matrix) and calculating text vectors (aggregating word vectors to calculate text vectors). These text vectors correspond to the test case vectors. After obtaining the test case vectors of all baseline test cases in the baseline test case set, a vector index is constructed. Subsequently, the similarity between test cases is queried using the index. This embodiment improves the computational efficiency of calculating the similarity of all test cases by pre-constructing a vector index.

[0057] As can be seen, this embodiment will periodically clean up invalid use cases to ensure the validity and uniqueness of the baseline use case set assets. For example, use cases with a similarity of more than 95% will be intelligently deleted when the use case library is scanned.

[0058] In summary, this embodiment maintains multiple baseline test cases with different test case identifiers in the baseline test case set. By setting a specified test case identifier in the test plan to construct the test cases corresponding to the test plan, users can reuse the corresponding baseline test cases in the baseline test case set based on the specified test case identifier. Reusing baseline test cases can improve the efficiency of test case construction and the reusability of test assets. In addition, when the target software passes the test, if there are new test cases, the new test cases will be updated to the baseline test case set, automatically updating the baseline test case set so that the baseline test case set maintains the latest version of test cases, which is convenient for the reuse of test cases in subsequent new software. Moreover, this embodiment stores the test case vector of each baseline test case. Through the test case vector, the baseline test cases in the baseline test case set can be deduplicated, automatically optimizing the baseline test case set and realizing intelligent management of test assets.

[0059] Figure 5 This is a schematic block diagram of a software testing apparatus provided in an embodiment of this application. Figure 5 As shown, corresponding to the above software testing methods, this application also provides a software testing apparatus. This software testing apparatus includes a unit for executing the above software testing methods, and can be configured in a terminal or server. Specifically, please refer to... Figure 5 The software testing device 500 includes a transceiver unit 501 and a processing unit 502, wherein: The transceiver unit 501 is used to acquire the test plan of the target software, wherein the test plan includes multiple specified test case identifiers; Processing unit 502 is configured to, for each specified test case identifier, determine, based on the user's selection operation, whether to reuse the baseline test case corresponding to the specified test case identifier from a preset baseline test case set, wherein the baseline test case set includes multiple baseline test cases corresponding to different test case identifiers and test case vectors corresponding to each baseline test case; for the specified test case identifier for which the baseline test case is determined to be reused, construct a corresponding target test case based on the target baseline test case corresponding to the baseline test case set; for the specified test case identifier for which the baseline test case is not reused, construct a new test case as the corresponding target test case based on the user's test case construction operation; perform test operations on the target software based on the target test cases corresponding to the multiple specified test case identifiers to obtain test results; when the test result is a pass, generate a test case vector corresponding to the new test case, and update the baseline test case set based on the new test case and the corresponding test case vector; when a preset test case cleanup time is reached, perform deduplication processing on the test cases in the baseline test case set based on the test case vectors in the baseline test case set.

[0060] In some embodiments, when the processing unit 502 performs the step of constructing a corresponding target test case based on the target baseline test case in the baseline test case set, it is specifically used for: Display the target baseline test cases; determine the adjustment information of the target baseline test cases based on the user's modification operations on the displayed target baseline test cases; determine the target test cases based on the target baseline test cases and the adjustment information.

[0061] In some embodiments, when the processing unit 502 performs the step of generating the test case vector corresponding to the new test case and updating the baseline test case set according to the new test case and the corresponding test case vector, it is specifically used for: When it is determined that there is a baseline test case in the baseline test case set that corresponds to the specified test case identifier of the new test case, the test case similarity value between the new test case and the baseline test case to be replaced is determined, and the difference information between the new test case and the baseline test case to be replaced is determined, so that the user can review the new test case based on the test case similarity value and the difference information; when it is determined that the review of the new test case is passed, a test case vector corresponding to the new test case is generated, and the baseline test case to be replaced in the baseline test case set is replaced with the new test case; when it is determined that there is no baseline test case in the baseline test case set that corresponds to the specified test case identifier of the new test case, a test case vector corresponding to the new test case is generated, and the new test case is added to the baseline test case set.

[0062] In some embodiments, when performing the step of determining the test case similarity value between the new test case and the baseline test case to be replaced, the processing unit 502 is specifically used for: The new test case and the baseline test case to be replaced are respectively processed by test case content splitting to obtain the first title content, first step content, and first result content corresponding to the new test case, and the second title content, second step content, and second result content corresponding to the baseline test case to be replaced; a first similarity value between the first title content and the second title content, a second similarity value between the first step content and the second step content, and a third similarity value between the first result content and the second result content are determined; the test case similarity value is determined according to the preset title weight, preset step weight, preset result weight, first similarity value, second similarity value, and third similarity value.

[0063] In some embodiments, when executing the step of acquiring the test plan for the target software, the transceiver unit 501 is specifically used for: The processing unit 502 determines whether to reuse a baseline scheme from a preset baseline scheme library based on the user's selection operation. If it determines to reuse the baseline scheme from the baseline scheme library, the target baseline scheme selected by the user in the baseline scheme library is determined as the test scheme for the target software. If it determines not to reuse the baseline scheme from the baseline scheme library, a new test scheme is constructed based on the user's test scheme construction operation as the test scheme for the target software.

[0064] In some embodiments, after performing the step of constructing a new test plan as the test plan for the target software based on the user's test plan construction operation, the processing unit 502 is further configured to: The transceiver unit 501 obtains the user's review result for the new test plan; when the review result is "approved", the new test plan is added to the baseline plan library.

[0065] In some embodiments, when the processing unit 502 performs the step of deduplicating test cases in the baseline test case set based on the test case vector in the baseline test case set, it is specifically used for: Based on a preset approximate nearest neighbor search algorithm and the test case vectors corresponding to each baseline test case, it is determined whether there is a set of baseline test cases to be processed in the set of baseline test cases. The set of baseline test cases to be processed includes at least two candidate baseline test cases with a similarity greater than a preset similarity threshold. If the set of baseline test cases to be processed exists, the valid baseline test cases in the set of baseline test cases to be processed are determined according to a preset deduplication rule. Invalid baseline test cases other than the valid baseline test cases are deleted from the set of baseline test cases to be processed. The association between the test case identifier of the invalid baseline test cases and the test case identifier of the valid baseline test cases is established.

[0066] In summary, this embodiment maintains multiple baseline test cases with different test case identifiers in the baseline test case set. By setting a specified test case identifier in the test plan to construct the test cases corresponding to the test plan, users can reuse the corresponding baseline test cases in the baseline test case set based on the specified test case identifier. Reusing baseline test cases can improve the efficiency of test case construction and the reusability of test assets. In addition, when the target software passes the test, if there are new test cases, the new test cases will be updated to the baseline test case set, automatically updating the baseline test case set so that the baseline test case set maintains the latest version of test cases, which is convenient for the reuse of test cases in subsequent new software. Moreover, this embodiment stores the test case vector of each baseline test case. Through the test case vector, the baseline test cases in the baseline test case set can be deduplicated, automatically optimizing the baseline test case set and realizing intelligent management of test assets.

[0067] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned software testing device and each unit can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.

[0068] The aforementioned software testing device can be implemented as a computer program, which can perform tests such as... Figure 6 It runs on the computer device shown.

[0069] Please see Figure 6 , Figure 6 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 600 can be a terminal or a server.

[0070] See Figure 6 The computer device 600 includes a processor 602, a memory, and a network interface 605 connected via a system bus 601. The memory may include a non-volatile storage medium 603 and internal memory 604.

[0071] The non-volatile storage medium 603 may store an operating system 6031 and a computer program 6032. The computer program 6032 includes program instructions that, when executed, cause the processor 602 to perform a software testing method.

[0072] The processor 602 provides computing and control capabilities to support the operation of the entire computer device 600.

[0073] The internal memory 604 provides an environment for the execution of the computer program 6032 in the non-volatile storage medium 603. When the computer program 6032 is executed by the processor 602, the processor 602 can execute a software testing method.

[0074] This network interface 605 is used for network communication with other devices. Those skilled in the art will understand that... Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 600 to which the present application is applied. The specific computer device 600 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0075] The processor 602 is used to run a computer program 6032 stored in the memory to perform the following steps: Obtain the test plan for the target software, wherein the test plan includes multiple specified test case identifiers; For each specified use case identifier, the user's selection operation determines whether to reuse the baseline test case with the corresponding use case identifier from the preset baseline use case set. The baseline use case set includes multiple baseline test cases with different use case identifiers and use case vectors corresponding to each baseline test case. For the specified test case identifier that determines the reuse of baseline test cases, construct the corresponding target test cases based on the target baseline test cases in the baseline test case set; For the specified test case identifier that does not reuse the baseline test case, a new test case is constructed based on the user's test case construction operation as the corresponding target test case; The target software is tested according to the target test cases corresponding to the multiple specified test case identifiers, and the test results are obtained. When the test result is a pass, a test case vector corresponding to the new test case is generated, and the baseline test case set is updated according to the new test case and the corresponding test case vector.

[0076] It should be understood that, in the embodiments of this application, the processor 602 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0077] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0078] Therefore, this application also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When executed by a processor, the program instructions cause the processor to perform the following steps: Obtain the test plan for the target software, wherein the test plan includes multiple specified test case identifiers; For each specified use case identifier, the user's selection operation determines whether to reuse the baseline test case with the corresponding use case identifier from the preset baseline use case set. The baseline use case set includes multiple baseline test cases with different use case identifiers and use case vectors corresponding to each baseline test case. For the specified test case identifier that determines the reuse of baseline test cases, construct the corresponding target test cases based on the target baseline test cases in the baseline test case set; For the specified test case identifier that does not reuse the baseline test case, a new test case is constructed based on the user's test case construction operation as the corresponding target test case; The target software is tested according to the target test cases corresponding to the multiple specified test case identifiers, and the test results are obtained. When the test result is a pass, a test case vector corresponding to the new test case is generated, and the baseline test case set is updated according to the new test case and the corresponding test case vector.

[0079] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.

[0080] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0081] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0082] The steps in the methods of this application embodiment can be adjusted, merged, or deleted according to actual needs. The units in the apparatus of this application embodiment can be merged, divided, or deleted according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0083] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0084] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A software testing method, characterized in that, include: Obtain the test plan for the target software, wherein the test plan includes multiple specified test case identifiers; For each specified use case identifier, the user's selection operation determines whether to reuse the baseline test case with the corresponding use case identifier from the preset baseline use case set. The baseline use case set includes multiple baseline test cases with different use case identifiers and use case vectors corresponding to each baseline test case. For the specified test case identifier that determines the reuse of baseline test cases, construct the corresponding target test cases based on the target baseline test cases in the baseline test case set; For the specified test case identifier that does not reuse the baseline test case, a new test case is constructed based on the user's test case construction operation as the corresponding target test case; The target software is tested according to the target test cases corresponding to the multiple specified test case identifiers, and the test results are obtained. When the test result is a pass, a test case vector corresponding to the new test case is generated, and the baseline test case set is updated according to the new test case and the corresponding test case vector. When the preset test case collection time is reached, the test cases in the baseline test case set are deduplicated based on the test case vectors in the baseline test case set.

2. The method according to claim 1, characterized in that, The step of constructing corresponding target test cases based on the target baseline test cases in the baseline test case set includes: Display the target baseline test cases; Based on the user's modification actions on the displayed target baseline test cases, determine the adjustment information for the target baseline test cases; The target test cases are determined based on the target baseline test cases and the adjustment information.

3. The method according to claim 1, characterized in that, The step of generating the test case vector corresponding to the new test case and updating the baseline test case set based on the new test case and the corresponding test case vector includes: When it is determined that there is a baseline test case to be replaced in the baseline test case set that corresponds to the specified test case identifier of the new test case, the test case similarity value between the new test case and the baseline test case to be replaced is determined, and the difference information between the new test case and the baseline test case to be replaced is determined, so that the user can review the new test case based on the test case similarity value and the difference information. When the new test case is approved, a test case vector corresponding to the new test case is generated, and the baseline test case to be replaced in the baseline test case set is replaced with the new test case. When it is determined that there is no baseline test case to be replaced in the baseline test case set that corresponds to the specified test case identifier of the new test case, a test case vector corresponding to the new test case is generated, and the new test case is added to the baseline test case set.

4. The method according to claim 3, characterized in that, Determining the test case similarity value between the new test case and the baseline test case to be replaced includes: The new test case and the baseline test case to be replaced are respectively processed by splitting the test case content to obtain the first title content, the first step content and the first result content corresponding to the new test case, and the second title content, the second step content and the second result content corresponding to the baseline test case to be replaced; Determine the first similarity value between the first title content and the second title content, the second similarity value between the first step content and the second step content, and the third similarity value between the first result content and the second result content; The use case similarity value is determined based on the preset title weight, preset step weight, preset result weight, the first similarity value, the second similarity value, and the third similarity value.

5. The method according to claim 1, characterized in that, The test plan for acquiring the target software includes: Determine whether to reuse a baseline scheme from a preset baseline scheme library based on the user's selected action; If it is determined that a baseline scheme will be reused from the baseline scheme library, then the target baseline scheme selected by the user in the baseline scheme library will be determined as the test scheme for the target software. If it is determined that a baseline scheme will not be reused from the baseline scheme library, a new test scheme is constructed based on the user's test scheme construction operation as the test scheme for the target software.

6. The method according to claim 5, characterized in that, After constructing a new test plan based on the user's test plan construction operation as the test plan for the target software, the method further includes: Obtain user review results for the new testing plan; When the review result is "review passed", the new test plan is added to the baseline plan library.

7. The method according to claim 1, characterized in that, The process of deduplicating test cases in the baseline test case set based on the test case vectors in the baseline test case set includes: Based on the preset approximate nearest neighbor search algorithm and the test case vectors corresponding to each baseline test case, it is determined whether there is a set of baseline test cases to be processed in the set of baseline test cases. The set of baseline test cases to be processed includes at least two candidate baseline test cases with a similarity greater than a preset similarity threshold. If the pending baseline test case group exists, then the valid baseline test cases in the pending baseline test case group are determined according to the preset deduplication rules, the invalid baseline test cases in the pending baseline test case group other than the valid baseline test cases are deleted, and the association relationship between the test case identifier of the invalid baseline test cases and the test case identifier of the valid baseline test cases is established.

8. A software testing apparatus, characterized in that, include: The transceiver unit is used to acquire the test plan of the target software, wherein the test plan includes multiple specified test case identifiers; The processing unit is configured to determine, based on the user's selection operation, whether to reuse the baseline test case corresponding to the specified test case identifier from a preset baseline test case set, wherein the baseline test case set includes multiple baseline test cases corresponding to different test case identifiers and test case vectors corresponding to each baseline test case; for the specified test case identifier for which the baseline test case is determined to be reused, a corresponding target test case is constructed based on the target baseline test case corresponding to the baseline test case set. For the specified test case identifier that does not reuse the baseline test case, a new test case is constructed as the corresponding target test case based on the user's test case construction operation; the target software is tested according to the target test cases corresponding to the multiple specified test case identifiers to obtain test results; when the test result is a pass, a test case vector corresponding to the new test case is generated, and the baseline test case set is updated according to the new test case and the corresponding test case vector; when the preset test case cleanup time is reached, the test cases in the baseline test case set are deduplicated based on the test case vector in the baseline test case set.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the software testing method as described in any one of claims 1-7.

10. A storage medium, characterized in that, The storage medium stores a computer program, which includes program instructions that, when executed by a processor, cause the processor to perform the software testing method as described in any one of claims 1-7.