Test case management method, readable storage medium, program product and electronic equipment
By automatically detecting sub-requirement set updates in the requirement data and generating a new test case set, the problem of low test case management efficiency in the existing technology is solved, and efficient and accurate test case management is achieved.
Patent Information
- Application Number
- CN202411624851.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-01-21
AI Technical Summary
In the prior art, test case management relies on manual labor, is inefficient and is susceptible to subjective factors, resulting in inefficient and insufficient accuracy of test case management.
By detecting sub-requirement set updates in the requirement data, automatically determine the associated test case set from the test case library, add a status identifier to it, generate a new test case set based on the updated requirement data, and update the test case library.
It improves the efficiency of test case generation and management, reduces manual intervention, ensures the accuracy and efficiency of the test case library, and is suitable for the process of updating various test requirements.
Smart Images

Figure CN119336648A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software testing technology, and in particular to a test case management method, a readable storage medium, a program product, and an electronic device. Background Art
[0002] In the process of software development, in order to ensure the quality and stability of the software, it is necessary to test the software based on test cases (used to describe the test steps, expected results and actual results of the software or system under specific conditions). Test cases are the basis for measuring the effectiveness of test results and software quality. Through the execution of test cases, we can count indicators such as test pass rate and error rate to quantify the quality level of the software. Therefore, the management of test cases (such as screening, modifying and updating test cases) is particularly important.
[0003] At present, the test case management process mainly relies on manual management. The process of manually screening, modifying and updating test cases relies on the experience and judgment of testers. Therefore, the test case management process is inefficient and easily affected by subjective factors. Summary of the invention
[0004] Embodiments of the present application provide a test case management method, a readable storage medium, a program product, and an electronic device.
[0005] In a first aspect, an embodiment of the present application provides a test case management method, which is applied to an electronic device, comprising: detecting that a first sub-requirement set in first requirement data is updated to a second sub-requirement set; determining a first test case set associated with the first sub-requirement set from a first test case library corresponding to the first requirement data, and adding a first status identifier to the first test case set; wherein the first status identifier is used to indicate that the corresponding test case is a failed test case; generating a second test case set based on the second sub-requirement set; and using the second test case set and a third test case set in the first test case library except the first test case set as test cases in the second test case library.
[0006] Exemplarily, in some embodiments of the present application, when an electronic device generates a test case based on requirement data, it can first determine whether the requirement data is new requirement data. If it is not new requirement data, it is not necessary to generate a test case based on the entire requirement data, thereby improving the efficiency of generating test cases.
[0007] It can be understood that in some embodiments of the present application, the electronic device can divide the demand data into multiple sub-requirements, generate test cases corresponding to each sub-requirement, and associate the sub-requirements with the test cases. When updating the demand data, the first sub-requirement set that needs to be updated can be determined. Then, based on the first sub-requirement set, the corresponding test case is determined, and the test case is marked as an invalid test case. The electronic device can determine a new second sub-requirement set from the demand data, and then the electronic device generates a new test case based on the second sub-requirement set, thereby completing the test case generation process. The process of generating test cases does not require manual search for invalid test cases, thereby improving the efficiency of generating test cases and facilitating the management of test cases.
[0008] It can be understood that the test cases marked as invalid can be directly deleted or retained for subsequent viewing and management of the requirement data of each version.
[0009] In a possible implementation of the first aspect above, the above-mentioned first requirement data has a first version identifier, and the first version identifier corresponds to the first test case library; the first requirement data includes at least one sub-requirement, and each sub-requirement in the at least one sub-requirement has a sub-number; each sub-test case in the first test case library is generated based on at least one sub-requirement, and each sub-test case in the first test case library has a sub-test identifier; the sub-test identifier and the sub-number have a first association relationship.
[0010] For example, in some embodiments of the present application, when receiving a new requirement data, the electronic device may add a version identifier to the requirement data. Furthermore, the electronic device may segment the requirement data based on a corresponding model (such as a large language model described below) to generate various sub-requirements, and add a sub-number to the sub-requirement.
[0011] The electronic device can then generate corresponding sub-test cases based on the sub-requirements, and generate sub-test identifiers for the sub-test cases. Each sub-test identifier is associated with the sub-number of the corresponding sub-requirement. It can be understood that since one sub-requirement can generate multiple sub-test cases, one sub-number can be associated with multiple sub-test identifiers, thereby generating a first association relationship.
[0012] It can be understood that, through the first association relationship, a sub-test case can be determined based on a sub-requirement, or a sub-requirement can be determined based on a sub-test case, so that after detecting that the requirement data is updated, the electronic device can accurately find the sub-test case that needs to be discarded based on the discarded sub-requirement.
[0013] In a possible implementation of the first aspect above, the above-mentioned determining the first test case set associated with the first sub-requirement set from the first test case library corresponding to the first requirement data includes: determining a first number corresponding to the first sub-requirement set, the first number including sub-numbers corresponding to each sub-requirement in the first sub-requirement set; determining a first sub-test identifier corresponding to each sub-number in the first number based on the first association relationship; and determining the first test case set corresponding to the first sub-test identifier from the first test case library.
[0014] Illustratively, in some embodiments of the present application, after the electronic device determines that the first demand data is old demand data, it can divide the first demand data into individual sub-requirements, and then compare each sub-requirement with the old version of the sub-requirement to determine the first sub-requirement set that needs to be discarded and the second sub-requirement set that needs to be newly added.
[0015] After determining the first sub-requirement set, the electronic device can determine the first number according to the sub-numbers of each sub-requirement in the first sub-requirement set. The electronic device can determine the corresponding sub-test identifier according to each sub-number in the first number and the first association relationship to obtain the first sub-test identifier, that is, the first sub-test identifier includes each sub-test identifier corresponding to each sub-number in the first number. Then, the electronic device can determine the corresponding first test case set according to the first test identifier. It can be understood that since the sub-number and the sub-test identifier have a first association relationship, the electronic device can accurately determine the first test case set corresponding to the first sub-requirement set. In other words, the process of detecting the first test case set corresponding to the first sub-requirement set does not require manual participation, which can improve the speed of generating test cases, and since the sub-requirements and sub-test cases are associated through the first association relationship, the determined first test case set is also more accurate.
[0016] In a possible implementation of the first aspect, the method further includes updating the first version identifier to a second version identifier; the second version identifier corresponds to the second test case library.
[0017] Exemplarily, in some embodiments of the present application, after the electronic device detects that the first requirement data is old requirement data, it can update the version identifier for the first requirement data, and after generating a second test case library for the first requirement data, it can associate the updated second version identifier of the first requirement data with the second test case library.
[0018] In a possible implementation of the first aspect above, the method also includes: adding a first status identifier to all test cases in the first test case library; adding a second status identifier to the corresponding third test case set in the second test case library; and adding a third status identifier to the corresponding second test case set in the second test case library.
[0019] Exemplarily, in some embodiments of the present application, when generating the test cases in the second test case library, the electronic device can copy the third test case set that has not changed in the first test case library to the second test case library, and then update the state identifiers of all sub-test cases in the first test case library to the first state identifier (e.g., identifier 0) for indicating invalid test cases. Then the electronic device adds a second state identifier (e.g., identifier 1) to the sub-test cases in the third test case set, the second state identifier is used to indicate an unupdated test case, or an old test case, and adds a third state identifier (e.g., identifier 2) to the second test case set, the third state identifier is used to indicate a newly added test case. In this way, the new test case can be distinguished from the old test case, and when testing the software based on the test case, the new test case, i.e., the test case indicated by the third state identifier, can be processed emphatically. In this way, the workload of verifying and optimizing the test case can be reduced.
[0020] In a possible implementation of the first aspect above, the above method also includes adding a sub-number to each sub-requirement in the second sub-requirement set to generate a second number, and adding a second sub-test identifier to each sub-test case in the second test case set to generate a second test identifier; each sub-number in the second number has a second association relationship with each second sub-test identifier in the second test identifier.
[0021] Exemplarily, after determining each sub-requirement in the second sub-requirement set, the electronic device may add a corresponding sub-number to the corresponding sub-requirement to generate a second number. After generating a sub-test case for the second sub-requirement set, a corresponding sub-test identifier may be added to the corresponding sub-test case to generate a second sub-test identifier. Each sub-test identifier in the second sub-test identifier is associated with each sub-requirement corresponding to the second number to generate a second association relationship, so that when the first requirement data is subsequently updated, the corresponding sub-test case can be determined based on each sub-requirement in the first requirement data.
[0022] In a possible implementation of the first aspect, the corresponding software is tested based on the second test case library to obtain a first test result; based on the first test result, the test case corresponding to the third state identifier is adjusted.
[0023] It can be understood that the test cases indicated by the third state identifier are all newly added test cases. Therefore, when testing software based on test cases, the test cases indicated by the third state identifier can be adjusted based on the test results without adjusting all test cases. This can reduce the amount of data of the adjusted test cases and improve the optimization speed of the test cases.
[0024] In a second aspect, the present application provides an electronic device, comprising: a memory for storing instructions; and at least one processor for executing instructions so that the device implements the first aspect and any possible implementation method of the first aspect. The beneficial effects that can be achieved in the second aspect can refer to the beneficial effects of the method provided in any implementation of the first aspect, and will not be repeated here.
[0025] In a third aspect, the present application provides a computer-readable storage medium, in which instructions are stored, and when the instructions are executed by a device, the computer implements the method provided in the first aspect and any possible implementation of the first aspect. The beneficial effects that can be achieved in the third aspect can refer to the beneficial effects of the method provided in any implementation of the first aspect, and will not be repeated here.
[0026] In a fourth aspect, the present application provides a computer program product, which, when running on a device, enables the device to implement the method provided in the first aspect and any possible implementation of the first aspect. The beneficial effects that can be achieved in the fourth aspect can refer to the beneficial effects of the method provided in any implementation of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1A A schematic diagram of testing software is shown;
[0028] Figure 1B A schematic diagram of testing software based on test cases is shown;
[0029] Figure 1C A schematic diagram of an update test case is shown;
[0030] Figure 2 According to some embodiments of the present application, a flowchart for implementing an update test case is shown;
[0031] Figure 3 According to some embodiments of the present application, a flow chart for implementing generating a test case is shown;
[0032] Figure 4 According to some embodiments of the present application, a schematic structural diagram of an electronic device 100 is shown. DETAILED DESCRIPTION
[0033] The illustrative embodiments of the present application include, but are not limited to, a test case management method, a readable storage medium, a program product, and an electronic device.
[0034] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0035] To facilitate understanding, some of the terms and related technologies involved in this application are explained below.
[0036] As described in the background art, the process of manually screening, modifying and updating test cases relies on the experience and judgment of testers. Therefore, the test case management process is inefficient and easily affected by subjective factors.
[0037] The following is a schematic diagram of the development process of a software program.
[0038] For example, Figure 1A A schematic diagram of testing software is shown.
[0039] like Figure 1A As shown, a software testing platform is configured in the electronic device 10, and the developer can test the developed software based on the test case in the electronic device 10, thereby determining the quality of the software according to the test pass rate, error rate and other indicators of the test case, and optimizing the software. For example, Figure 1B A schematic diagram of testing software based on test cases is shown.
[0040] like Figure 1B As shown, software 1 can be tested on the software testing platform, and the tester can input different test cases into the software testing platform according to different test requirements, so as to obtain different test results.
[0041] For example, according to test requirement 1, the developer can edit the corresponding test case 1, and then input the test case 1 into the software testing platform to test software 1, thereby obtaining test result 1. Then the tester can judge whether software 1 meets test requirement 1 according to test result 1, so as to optimize the software. Similarly, by testing software 1 with test case 2 edited by test requirement 2, the obtained test result 2 can be used to judge whether the software meets test requirement 2.
[0042] For example, in some embodiments, software 1 may be a payment system, and test requirement 1 includes: selecting payment method as application A, payment amount as RMB 100, and submitting a payment request and jumping to a payment interface.
[0043] The test case 1 generated based on the test requirement 1 may include, for example:
[0044] 1. Select the payment method, enter the payment method as application A, and execute the operation of opening application A on the payment interface. The expected result is that the payment option of application A should be displayed on the payment page.
[0045] 2. Enter the payment amount. The payment amount entered is 100 yuan. Enter the payment amount as 100 yuan on the payment page. The expected result is that the payment amount should be displayed as 100 yuan on the payment page.
[0046] 3. Submit the payment request, enter the data for immediate payment, select the "Pay Now" button, and the expected result is to jump to the corresponding payment page and display the payment amount as 100.
[0047] The payment system can be tested through test case 1. If the actual result is consistent with the expected result, the test passes; otherwise, the test fails. After the test fails, the user login system can be debugged and optimized.
[0048] It is understandable that when testing software, different test cases need to be edited according to different test requirements, and the same test requirements also need to edit corresponding test cases for testing different software. Therefore, software testing requires a large number of different types of test cases. Therefore, if the test cases are manually selected by testers according to the test requirements when testing the software, it will take a lot of time to screen out the test cases that meet the test requirements. The manual screening process is cumbersome, inefficient, and requires experience judgment. For testers with little experience, more useless test cases may be screened out, resulting in inaccurate software testing results.
[0049] In some scenarios, if new test requirements arise, testers need to edit new test cases if they cannot find test cases that match the test requirements, which takes a lot of time. Figure 1B Corresponding to the newly added test requirement 3, a new test case 3 needs to be edited, and then the test case 3 is input into the software testing platform to test the software 1. If the test case 3 is edited manually, it will take a long time, and when testing the software, it is often necessary to add a new test case.
[0050] In some scenarios, if some test requirements need to be changed, in order to reduce the time of editing the test cases corresponding to the test requirements, the test cases corresponding to the changed parts of the test requirements are generally re-edited to update the test cases.
[0051] Next, taking the change of test requirement 1 as an example, the process of updating test case 1 corresponding to test requirement 1 is introduced.
[0052] For example, Figure 1C A schematic diagram of an update test case is shown.
[0053] For example, Figure 1CAs shown, test requirement 1 corresponds to test case 1. Among them, test requirement 1 includes different test purposes, such as purpose a, purpose b, etc. In some cases, part of purpose b needs to be modified. For example, purpose b is changed to purpose b'. Therefore, the corresponding test case 1 also needs to be modified. The developer needs to find the test cases related to purpose b in test case 1, and then update the test cases of this part. For example, test case 1 includes sub-case 01, sub-case 02, etc. Exemplarily, after manual analysis, the tester determines that sub-case 02 in test case 1 is related to purpose b, then the tester needs to edit the corresponding sub-case 02' based on the modified purpose b', and then modify sub-case 02 in test case 1 to sub-case 02', thereby completing the modification of test case 1.
[0054] It can be understood that the process of modifying the test case 1 above requires the tester to analyze the related test cases in the test case 1, then determine the sub-case 02 related to the purpose b, and then modify the sub-case 02. This process is cumbersome and manual processing takes a lot of time, so the efficiency of modifying the test case is relatively low.
[0055] In summary, manual management of test cases is inefficient and easily affected by subjective factors, which reduces the accuracy of test cases.
[0056] In some embodiments of the present application, after detecting the requirement data, the electronic device for generating the test case may add a version number to the requirement data so as to associate the requirement data with the corresponding test case. For example, the version number of the new requirement data is MODEL1_V1.0.0. When the requirement data is modified, the version number of the requirement data may be updated. For example, after the requirement data is updated once, MODEL1_V1.0.0 may be updated to MODEL1_V1.0.1.
[0057] In some embodiments of the present application, the electronic device is also configured with a corresponding model for processing the demand data, and the demand data is divided into a plurality of sub-demands. For example, taking the demand data as text as an example, after the electronic device detects that a new test case has been input, the demand text can be converted into a paragraph suitable for machine learning through natural language processing technology (such as embedding technology), and a paragraph number is generated for each paragraph, such as the paragraph number of the first paragraph is Paragraph_1. Then a test case is generated based on the converted paragraph through a large language model (LLM). Exemplarily, after the test case is generated, an identifier can be added to the test case, and the identifier of the test case is used to associate the test case with the paragraph number of each text paragraph corresponding to the demand data. For example, the test case can be represented by adding a suffix after the module name. For example, the module of the test case 1 corresponding to the test requirement 1 is MODEL1, and the version corresponding to the demand data associated with MODEL1 is MODEL1_V1.0.0. The number of the first test case corresponding to the first paragraph in the test case 1 can be set to MODEL_NO1. That is to say, the paragraph with the paragraph number Paragraph_1 corresponds to the identification of the test case MODEL_NO1. It can be understood that in some embodiments of the present application, a paragraph can correspond to multiple test cases, that is, a paragraph number can correspond to the identification of multiple test cases. In this way, a test case library can be obtained, in which the module name based on the test case corresponds to the version number of the corresponding requirement data. The corresponding paragraph number in the requirement data corresponds to the identification corresponding to the test case. For example, Table 1 shows a test case library.
[0058] Table 1
[0059]
[0060] Among them, the status is used to indicate the validity of the test case. For example, the newly edited (newly added) test case can be added with the mark 2. After the version of the requirement data is updated, the status of the unchanged test case can be marked as 1, the status of the replaced test case can be marked as 0, and the status of the newly added test case can be marked as 2. In other words, the corresponding test cases with the status marks 1 and 2 can be used normally. Only when the status mark is 0, the corresponding test case is an invalid test case.
[0061] It can be understood that the above-mentioned version of the requirement data, identification of the test case, paragraph number and status, etc. can also be identified in other ways, and the embodiments of the present application do not limit the above-mentioned identification.
[0062] In order to solve the problem of low efficiency in manually managing test cases, the present application proposes a test case management method, which detects that the first sub-requirement set in the requirement data is updated to the second sub-requirement set, determines the first test case set associated with the first sub-requirement set from the test case library corresponding to the requirement data, and adds a first state identifier to the first test case set (for example, the state identifier becomes 0), generates a second test case set based on the second sub-requirement set, and adds a third state identifier to the second test case set (for example, the added state identifier is 2), and adds the second test case set and the third state identifier to the test case library. Among them, the first state identifier is used to indicate that the corresponding test case is a failed test case.
[0063] Through the above scheme, after modifying the demand data, there is no need to manually search for test cases related to the modified part from the test cases corresponding to the demand data, thereby improving the efficiency of updating test cases. In addition, through this scheme, it is possible to cope with the modification of demand data of different complexity levels and improve the applicability of generating test cases. In addition, the test case management method in the embodiment of the present application can manage test cases. After the demand data is updated, the electronic device can automatically update the old test cases and add new test cases to prevent a large number of historical invalid test cases from existing in the case library and interfering with testers.
[0064] In some embodiments of the present application, a second state identifier (for example, the state identifier becomes 1) may be added to the third test case set corresponding to the third sub-requirement set other than the first sub-requirement set in the requirement data, and the second state identifier is used to indicate that the test case is an old test case that is being used, so that the old test case can be distinguished from the newly added test case. When testing the software based on the test case library, the test results of the newly added test case can be viewed, so as to further manage the newly added test case, such as removing invalid test cases.
[0065] It can be understood that the management of test cases in the embodiments of the present application can be, for example, screening, modifying, updating and generating a test case library, etc. The test case library includes requirement data (such as each sub-requirement and the sub-number corresponding to each sub-requirement), test cases (such as each sub-test case and the sub-test identifier corresponding to the sub-test case), the corresponding relationship between the test case and the requirement data (such as the relationship between the version identifier of the requirement data, the sub-number, the sub-test identifier, etc.), etc.
[0066] The following is an introduction to the test case management method in the embodiment of the present application.
[0067] For example, Figure 2 According to some embodiments of the present application, a flowchart for implementing updating a test case is shown.
[0068] It should be noted that the electronic device in the embodiment of the present application can also be referred to as a terminal (termina1), a user terminal, a mobile terminal, a user equipment (UE), a terminal device, a mobile station, a mobile terminal (mobile terminal, MT), etc. The terminal device can be a mobile phone, a wearable device, a tablet computer (Pad), a computer with a wireless transceiver function, a virtual reality (virtual reality, VR) terminal device, an augmented reality (augmentedreality, AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in self-driving (selfdriving), a wireless terminal in a smart grid (smart grid), a wireless terminal in transportation safety (transportationsafety), a wireless terminal in a smart city (smart city), and a wireless terminal in a smart home (smart home) that can generate a terminal device for a test case. It can be understood that the execution subjects of the following processes are all electronic devices. When introducing the following processes, the execution subjects of each process are not limited.
[0069] like Figure 2 As shown, the process includes:
[0070] S201, detecting that a first sub-requirement set in first requirement data is updated to a second sub-requirement set.
[0071] In some embodiments of the present application, the first requirement data has a first version identifier, and the first version identifier corresponds to the first test case library; the first requirement data includes at least one sub-requirement, and each sub-requirement in the at least one sub-requirement has a sub-number; each sub-test case in the first test case library is generated based on at least one sub-requirement, and each sub-test case in the first test case library has a sub-test identifier; the sub-test identifier and the sub-number have a first association relationship.
[0072] For example, in some embodiments of the present application, when the electronic device detects the input of new demand data, a version number (eg, also referred to as a version identifier) may be assigned to the demand data. Therefore, each demand data has a version identifier.
[0073] In some embodiments of the present application, when updating the demand data, the input demand data may be used as the first demand data, and the version identifier corresponding to the first demand data may be called the first version identifier. Exemplarily, the first version identifier may be MODEL1_V1.0.0.
[0074] The electronic device can be configured with a corresponding model to analyze and process the corresponding requirement data. For example, the electronic device can convert the requirement data into multiple sub-requirements based on natural language processing technology, and each sub-requirement can be assigned a sub-number. For example, the sub-number corresponding to the first sub-requirement is Paragraph_1. Then, the electronic device can encode each sub-requirement based on the LLM model to obtain the corresponding test case library MODEL1, and the electronic device can also add identifiers to each sub-test case in the test case library MODEL1. For example, the sub-test identifier of the first sub-test case is MODEL_NO1.
[0075] It can be understood that in some embodiments of the present application, the test case library corresponding to the first requirement data is the first test case library, and the first requirement data includes at least one sub-requirement and a sub-number corresponding to the sub-requirement. The first test case library includes sub-test cases generated according to each sub-requirement in the first requirement data, and a sub-test identifier corresponding to each sub-test case, and the sub-test identifier has a first association relationship with the sub-number of the sub-requirement corresponding to the indicated sub-test case. For example, referring to Table 1, in Table 1, the sub-number of the sub-requirement corresponding to the version number of the requirement data MODEL1_V1.0.0 includes Paragraph_1 and Paragraph_2. Among them, the sub-test identifier of the sub-test case corresponding to Paragraph_1 can include MODEL_NO1 and MODEL_NO2, that is, there are two sub-test cases corresponding to the sub-requirement with the sub-number Paragraph_1, and the identifiers of these two sub-test cases are MODEL_NO1 and MODEL_NO2, that is, Paragraph_1 has a first association relationship with MODEL_NO1 and MODEL_NO2. The identifier of the test case corresponding to Paragraph_2 is MODEL_NO3. That is, the subtest identifier of the subtest case corresponding to the subrequirement with subnumber Paragraph_2 is MODEL_NO3, and Paragraph_2 has a first association relationship with MODEL_NO3. It can be understood that in other embodiments, the relationship between the subnumber and the corresponding subtest identifier can also be expressed in other ways, and the embodiments of the present application do not limit the way of expressing the relationship between the subnumber and the corresponding subtest identifier.
[0076] Therefore, if the demand data received by the electronic device already has a version identifier, it means that the demand data is old demand data and the demand data may change. The electronic device can also update the version identifier of the demand data and then continue to convert the demand data into multiple sub-demands based on natural language processing technology.
[0077] For example, for the first requirement data, the first version identifier MODEL1_V1.0.0 of the first requirement data can be updated to the second version identifier MODEL1_V1.0.1. Then, the electronic device can compare the sub-requirements corresponding to the first version identifier with the sub-requirements corresponding to the second version identifier, and take the sub-requirements that exist in the sub-requirements corresponding to the first version identifier but not in the sub-requirements corresponding to the second version identifier as the first sub-requirement set. And take the sub-requirements that exist in the sub-requirements corresponding to the second version identifier but not in the sub-requirements corresponding to the first version identifier as the second sub-requirement set.
[0078] In this way, the electronic device can detect that the first sub-requirement set is updated to the second sub-requirement set in the first requirement data. It can be understood that there may be no sub-requirements in the first sub-requirement set and the second sub-requirement set. For example, if the update of the corresponding first requirement data is to increase some sub-requirements, there may be no sub-requirements in the first sub-requirement set. If the update of the corresponding first requirement data is to reduce some sub-requirements, there may be no sub-requirements in the second requirement set.
[0079] The first version identifier MODEL1_V1.0.0 and the second version identifier MODEL1_V1.0.1 are merely exemplary, and do not limit the first version identifier and the second version identifier.
[0080] In some embodiments of the present application, the electronic device may also record the largest sub-number and the largest sub-test identifier.
[0081] In some embodiments of the present application, after the electronic device determines the second sub-requirement set, it can add sub-numbers to each sub-requirement in the second sub-requirement set, and the sub-numbers can be arranged downward from the sequence of the largest sub-number. For example, if the largest sub-number is Paragraph_max, then the sub-numbers corresponding to the second sub-requirement can be arranged downward from Paragraph_max+1. Among them, max represents the largest number, and max+1 represents the next digit of the max number. For example, if max is 10, then max+1 is 11.
[0082] S202, determining a first test case set associated with the first sub-requirement set from a first test case library corresponding to the first requirement data, and adding a first status identifier to the first test case set, wherein the first status identifier is used to indicate that the corresponding test case is a failed test case.
[0083] Exemplarily, in some embodiments of the present application, determining a first test case set associated with a first sub-requirement set from a first test case library corresponding to the first requirement data includes: determining a first number corresponding to the first sub-requirement set, the first number including sub-numbers corresponding to each sub-requirement in the first sub-requirement set; determining a first sub-test identifier corresponding to each sub-number in the first number based on a first association relationship; and determining a first test case set corresponding to the first sub-test identifier from the first test case library.
[0084] For example, in some embodiments of the present application, after determining that the first sub-requirement set is updated to the second sub-requirement set, the electronic device can determine the first sub-test identifiers corresponding to the sub-numbers in the first number through the first number corresponding to the first sub-requirement set, that is, the sub-numbers corresponding to the sub-requirements in the first sub-requirement set, and the first association relationship, and then determine the sub-test cases corresponding to the sub-requirements in the first sub-requirement set through the first sub-test identifiers to obtain the first test case set. The electronic device can then add a first status identifier to the test cases in the first test case set, and the first status identifier is used to indicate that the sub-test cases in the first test case set are failed test cases.
[0085] For example, if the sub-number of the sub-requirement in the first sub-requirement set includes Paragraph_1, the sub-test identifiers MODEL_NO1 and MODEL_NO2 corresponding to the sub-number can be determined through the first association relationship. In other words, the sub-test cases corresponding to the sub-test identifiers MODEL_NO1 and MODEL_NO2 are the first test case set. Then, a first state identifier is added to the sub-test cases corresponding to the electronic device sub-test identifiers MODEL_NO1 and MODEL_NO2. For example, the first state identifier can be 0. A state identifier of 0 indicates that the sub-test case is invalid.
[0086] It can be understood that since the first sub-requirement set is the requirement data corresponding to version number MODEL1_V1.0.0, when the version number of the requirement data is updated to MODEL1_V1.0.1, the test cases in the first sub-requirement set are already useless test cases. Therefore, the failure of the test cases in the first sub-requirement set can be indicated by the status mark.
[0087] S203, generating a second test case set based on the second sub-requirement set.
[0088] In some embodiments of the present application, after the electronic device obtains the second sub-requirement set, it can convert the sub-requirements in the second sub-requirement set into corresponding sub-test cases according to the corresponding large model, thereby generating a second test case set.
[0089] In some embodiments of the present application, after determining the second sub-requirement set, the electronic device can also add a sub-number to each sub-requirement in the second sub-requirement set to generate a second number, and add a second sub-test identifier to each sub-test case in the second test case set to generate a second test identifier; each sub-number in the second number has a second association relationship with each second sub-test identifier in the second test identifier.
[0090] It can be understood that after the electronic device determines the second sub-requirement set, it can continue to add sub-numbers for each sub-requirement in the second sub-requirement set. The sub-numbers of the second sub-requirements can continue to be numbered downward from the sequence of the largest sub-number. It can be understood that the sub-numbers corresponding to each sub-requirement in the second sub-requirement set can be used as the second number. The electronic device can generate corresponding sub-test cases based on the LLM model for each sub-requirement in the newly added second sub-requirement set, thereby obtaining a second test case set. The electronic device can add sub-test identifiers to the sub-test cases in the second test case set, and the sub-test identifiers of each sub-test case in the second test case set can be used as the second test identifier, and the second test identifier has a second association relationship with the second number. In other words, for the sub-number in the second sub-requirement set, the sub-test identifier corresponding to the sub-number can be determined based on the second association relationship, and then the sub-test case indicated by the sub-test identifier can be determined.
[0091] In some embodiments of the present application, the electronic device records the largest sub-test identifier. When encoding each test case in the second test case set, it can be arranged downward from the code of the largest sub-test identifier. For example, the largest sub-test code is MODEL_NOmax, then the first sub-test identifier in the second sub-test identifier can be MODEL_NOmax+1. Among them, max represents the largest number, and max+1 represents the next digit of the max number. For example, if max is 10, then max+1 is 11. Then, the electronic device can establish a second association relationship between the second test identifier and each sub-number in the second number.
[0092] S204: Use the second test case set and a third test case set in the first test case library except the first test case set as test cases in the second test case library.
[0093] It is understandable that after generating the second test case set, the electronic device can generate a new test case library for the updated requirement data. For example, the third test case set in the first test case library, except for the first test case set, and the second test case set just generated by the electronic device are used as the newly generated second test case library.
[0094] In some embodiments of the present application, after determining to update the first requirement data, the electronic device may update the first version identifier corresponding to the first requirement data to a second version identifier; the second version identifier corresponds to the second test case library.
[0095] That is to say, after the electronic device generates the second test case library, it can associate the second test case library with the second version identifier of the first requirement data. When testing the software based on the first requirement data, the software can be tested according to the latest version identifier of the first requirement data, that is, the sub-test case in the second test case library corresponding to the second version identifier.
[0096] In some embodiments of the present application, a first status identifier may be added to all test cases in the first test case library; a second status identifier may be added to the corresponding third test case set in the second test case library; and a third status identifier may be added to the corresponding second test case set in the second test case library.
[0097] For example, in some embodiments, after the electronic device updates the version number MODEL1_V1.0.0 of the first requirement data to MODEL1_V1.0.1 and determines the first test case set, the electronic device can copy all sub-test cases in the third test case set in the test case library except the first test case set, and associate the third test case set with the second version identifier MODEL1_V1.0.1.
[0098] Then the electronic device marks all the status identifiers corresponding to the sub-test cases corresponding to the version number MODEL1_V1.0.0 as invalid test cases, that is, adds the first status identifier to all the test cases in the first test case library, for example, the status identifier is 0. In other words, the test case library corresponding to the version number MODEL1_V1.0.0 is still there, but the sub-test cases corresponding to the version number are marked as invalid test cases, so that in subsequent development or adjustment, the test cases of the previous version of the requirement data can be traced back to adjust the test cases.
[0099] Then, the electronic device may add a second state identifier for the third test case set in the second test case library, and add a third state identifier for the second test case set. The second state identifier may be represented as 1, for example, and the third state identifier may be represented as 2, for example. The newly added test case (i.e., the second test case set) may be distinguished from the old test case (i.e., the third test case set) by the second state identifier and the third state identifier.
[0100] In some embodiments, the corresponding software may be tested based on the second test case library to obtain a first test result; and based on the first test result, the test case corresponding to the third state identifier may be adjusted.
[0101] It can be understood that after testing the software based on each sub-test case in the second test case library to obtain the first test result, you can focus on checking the sub-test case identified by the status identifier indicating a newly added test case, and then adjust the newly added sub-test case based on the first test result.
[0102] For example, Table 2 shows a table of update requirement data.
[0103] Table 2
[0104]
[0105] It can be understood that in Table 2, the status identifiers of the sub-test cases corresponding to the version number MODEL1_V1.0.0 are all marked as 0, indicating that the corresponding sub-test cases are subordinate to invalid test cases. The status identifiers of the sub-test cases corresponding to the version number MODEL1_V1.0.1 include 1 and 2, where the status identifier 1 is used to indicate the old sub-test cases, that is, the sub-test cases that have not been updated in the version number MODEL1_V1.0.0. The status identifier 2 is used to indicate the newly added test cases, that is, the test cases in the second sub-test case set.
[0106] Continuing to refer to Table 2, the sub-number corresponding to the sub-requirement in the newly added second sub-requirement set is Paragraph_3. It can be understood that in the first test case library, the sub-number with the largest sub-number is Paragraph_2. Therefore, the sub-numbers corresponding to the sub-requirements in the newly added second sub-requirement set are numbered from Paragraph_3 onwards. In other words, there is only one sub-requirement in the second sub-requirement set, and the sub-number corresponding to the sub-requirement is Paragraph_3. In the first test case library, the sub-test identifier with the largest sub-test identifier is MODEL_NO3. Therefore, the sub-test identifiers corresponding to the sub-test cases in the newly added second sub-test case set are numbered from MODEL_NO4 onwards. In other words, there are two sub-test cases in the second sub-test case set, and the sub-test identifiers corresponding to the two sub-test cases are MODEL_NO4 and MODEL_NO5, respectively. MODEL_NO4 and MODEL_NO5 have a second association relationship with Paragraph_3.
[0107] In other embodiments, when adding a sub-test case to the first test case library, the version number corresponding to the sub-test case that has not been updated can be updated to the version number of the new requirement data, so that the sub-test case that has not been updated can be not copied. For example, Table 3 shows a table of a second test case library.
[0108] Table 3
[0109]
[0110] It can be understood that, compared with Table 2, Table 3 cannot obtain the sub-test cases corresponding to the previous version of the requirement data, but it can reduce the storage space occupied by the second test case library, and when generating the second test case library, it is necessary to perform the operation of copying the sub-test cases that have not been updated, thereby increasing the speed of generating the second test case library.
[0111] It is understandable that each identifier in the test case library may also have other representation methods, and the embodiments of the present application do not limit the representation methods of various identifiers.
[0112] It can be understood that through the above method, the electronic device can split the demand data into multiple sub-requirements, and then associate the multiple sub-requirements with corresponding sub-test cases. When updating the demand data, the electronic device can identify the sub-requirements in the demand data that need to be discarded, as well as the sub-requirements to be updated. The electronic device can then determine the sub-test case corresponding to the discarded sub-requirement based on the association relationship, and mark the test case as an invalid test case. And the electronic device can generate a new sub-test case based on the new sub-requirement, and then add the new sub-test case to the test case library to complete the update of the test case. Therefore, in the process of updating the test case, there is no need to manually manage the test case (for example, find discarded test cases, add test cases according to new demand data, etc.), thereby improving the management efficiency of the test case.
[0113] In some embodiments, simple statistical analysis or screening based on specific algorithms can be used, such as removing duplicate test cases, or predicting the effectiveness of test cases based on historical data. Although these solutions can improve the quality of test cases to a certain extent, multiple test runs are required to screen the test cases. For some large-scale, complex and changeable test case libraries, the management of test cases still has problems such as low efficiency, insufficient accuracy, and poor adaptability.
[0114] However, through this solution, when the demand data is updated, the electronic device can accurately identify the test cases that need to be discarded based on the association between the sub-demands and the sub-test cases. Therefore, the update process of the test cases is more accurate. In addition, the embodiments of the present application are applicable to various test demand update processes and have high applicability.
[0115] It can be understood that through some embodiments of the present application, manual maintenance can be reduced, the maintenance efficiency of test cases can be improved, the accumulation of useless test cases can be reduced, and outdated, repeated or invalid test cases can be discovered and processed in a timely manner. In addition, the test cases can be automatically screened, optimized and updated to ensure that the test case library always remains efficient and streamlined, providing strong support for software testing. This reduces the workload of the test team and allows them to focus more on the core part of the test strategy.
[0116] In other words, through some embodiments of the present application, the efficiency and quality of test case management can be comprehensively improved, bringing more efficient and reliable solutions to the field of software testing.
[0117] Next, we introduce the process of updating test cases.
[0118] For example, Figure 3 According to some embodiments of the present application, a flowchart for implementing test case generation is shown.
[0119] It should be noted that the execution subjects of the following processes are all electronic devices. When introducing the following processes, the execution subjects of each process will not be described in detail.
[0120] like Figure 3 As shown, the process includes:
[0121] S301, input product demand data.
[0122] Illustratively, in some embodiments of the present application, when generating test cases based on product requirements, the product requirement data may be entered into an electronic device, and the electronic device may generate corresponding test cases based on the requirement data.
[0123] S302, determining whether the product demand data is new demand data.
[0124] For example, in some embodiments of the present application, after receiving the demand data, the electronic device may determine whether the demand data is newly entered demand data.
[0125] If the judgment result is yes, then S303 is executed to convert the demand data into various sub-requirements based on natural language processing technology, and add a sub-number to each sub-requirement.
[0126] If the judgment result is no, then S307 is executed to convert the demand data into various sub-demands based on natural language processing technology.
[0127] For example, in some embodiments of the present application, if the electronic device detects that new demand data has been entered, a version identifier may be added to the demand data, for example, the added version identifier is MODEL1_V1.0.0. Therefore, the electronic device can determine whether the entered demand data is new demand data according to whether the entered demand data has a version identifier.
[0128] If the input demand data is old demand data, the version identifier of the demand data can be obtained and then updated. For example, if the obtained version identifier is MODEL1_V1.0.0, the version identifier of the demand data can be updated to MODEL1_V1.0.1.
[0129] For example, take the payment function of the payment software as an example. The currently entered demand data is: "Select payment method A as application, payment amount is 100 yuan, submit payment request and jump to payment interface". If the demand data does not have a version identifier, the version identifier MODEL1_V1.0.0 can be added to the demand data. If the demand data has a version identifier MODEL1_V1.0.0, the version identifier MODEL1_V1.0.1 can be updated for the current demand data.
[0130] S303: Convert the demand data into sub-demands based on natural language processing technology, and add a sub-number to each sub-demand.
[0131] For example, in some embodiments of the present application, after the electronic device determines that the currently entered demand data is new demand data, the demand data may be processed based on natural language processing technology.
[0132] For example, the electronic device may convert the requirement data into multiple sub-requirements based on natural language processing technology (such as embedding technology), and each sub-requirement may be assigned a sub-number. For example, the sub-number corresponding to the first sub-requirement is Paragraph_1.
[0133] For example, the requirement data "select payment method A as application, payment amount is 100 yuan, submit payment request and jump to payment interface" can be divided into three sub-requirements. For example, Table 4 shows a correspondence table between sub-requirements and sub-numbers.
[0134] Table 4
[0135] Sub-requirements Sub-number Select payment method as A app Paragraph_1 The payment amount is 100 yuan Paragraph_2 Submit the payment request and jump to the payment interface Paragraph_3
[0136] S304, encoding the sub-requirements based on the LLM model, generating each sub-test case, and adding a sub-test identifier to each sub-test case.
[0137] Illustratively, in some embodiments of the present application, after determining each sub-requirement, the electronic device may generate a corresponding test case according to each sub-requirement.
[0138] For example, the electronic device can generate a corresponding test case library based on the sub-requirements through the LLM model, and the first test case library includes sub-test cases corresponding to each sub-requirement. The electronic device can also add a sub-test identifier for each sub-test case. For example, the sub-test identifier of the first sub-test case in the test case library can be set to MODEL_NO1.
[0139] For example, the sub-test cases generated based on the sub-requirements in Table 4 correspond to Table 5.
[0140] Table 5
[0141]
[0142] S305: associate the sub-test identifier with the sub-number, and add a third state identifier to the sub-test case.
[0143] Exemplarily, in some embodiments of the present application, after the electronic device generates each sub-test case, the sub-test identifier of each sub-test case can be associated with the sub-number of each sub-requirement. It can be understood that a sub-requirement can generate multiple sub-test cases, and therefore, a sub-number can be associated with multiple sub-test identifiers. In this way, the sub-test case corresponding to the sub-test identifier associated with the sub-number can be determined by the sub-number corresponding to the sub-requirement. Or after the sub-test case is determined, the corresponding sub-requirement can be determined based on the association relationship between the sub-test case and the sub-number.
[0144] For example, Paragraph_1 in Table 4 is associated with MODEL_NO1 in Table 5, Paragraph_2 in Table 4 is associated with MODEL_NO2 in Table 5, and Paragraph_3 in Table 4 is associated with MODEL_NO3 in Table 5.
[0145] Then, the electronic device can add a third state identifier to each sub-test case in the test case library, the third state identifier indicates the newly added sub-test case, and when testing the software based on the test case library, the sub-test case with the third state identifier can be mainly analyzed according to the test results, so as to adjust the newly added test case, for example, to remove invalid test cases.
[0146] Exemplarily, after the electronic device associates the sub-number with the sub-test identifier, a test case library can be obtained. For example, the test case library can refer to Table 1.
[0147] S306, determining the number of the maximum sub-number and the number of the maximum sub-test identifier.
[0148] In some embodiments of the present application, the electronic device may record the sub-number with the largest number in the current sub-number, such as Paragraph_max. For example, corresponding to Table 4, Paragraph_max is Paragraph_3 and the sub-test identifier with the largest identifier in the current sub-test identifier, such as MODEL_NOmax. For example, corresponding to Table 5, MODEL_NOmax is MODEL_NO3. In this way, it is convenient to adjust the sub-requirements and sub-test cases in the case of modifying the requirement data later.
[0149] S307, converting the demand data into various sub-demands based on natural language processing technology.
[0150] For example, in some embodiments of the present application, after the electronic device determines that the currently entered demand data is old demand data, it can update the version identifier for the old demand data, and then, it can still convert the current demand data into multiple sub-demands based on natural language processing technology, so as to subsequently determine new sub-demands.
[0151] S308, analyzing sub-demands corresponding to the new demand data and the old demand data based on the LLM model.
[0152] Illustratively, in some embodiments of the present application, the electronic device may analyze new sub-requirements based on the LLM model so as to update the test case library based on the updated requirement data.
[0153] S309: Determine the third sub-requirement set that has not been updated.
[0154] Illustratively, in some embodiments of the present application, the electronic device may compare the currently determined sub-requirements with the sub-requirements in the test case library, and the repeated sub-requirements are the non-updated sub-requirements, so that the third sub-requirement set can be determined.
[0155] For example, take the requirement data "Select payment method as application A, payment amount as RMB 100, submit payment request and jump to payment interface". If the previous requirement data is "Select payment method as application B, payment amount as RMB 100, submit payment request and jump to payment interface", then it can be determined that the sub-requirements identified by Paragraph_2 and Paragraph_3 in Table 4 are the third sub-requirement set.
[0156] S310, adding a second state identifier to the sub-test identifier corresponding to the third sub-requirement set, and associating the new version of the requirement data.
[0157] Exemplarily, in some embodiments of the present application, after the electronic device determines that a sub-requirement has not been updated, a second status identifier can be added to the non-updated sub-requirement, and the second status identifier is used to indicate that the corresponding test case (or the corresponding sub-requirement) is an old test case. The old test case is a test case that has been tested and verified. Therefore, when testing the software based on the old test case, there is no need to test and adjust the old test case.
[0158] After the electronic device determines the third sub-requirement set, the third sub-requirement set can be bound to the updated version identifier. For example, the electronic device can copy the sub-number, sub-test identifier, and sub-test case corresponding to the third sub-requirement set, and then update the version identifier corresponding to the copied third sub-requirement set to the new version identifier. In this way, the data corresponding to the old version identifier can also be retained in the test case library, so that each version of the requirement data can be viewed and managed. For example, the method of copying the third sub-requirement set to determine a new test case library can refer to Table 2.
[0159] Alternatively, in some other embodiments, the electronic device may directly update the version identifier corresponding to each sub-requirement in the third sub-requirement set to a new version identifier in the test case library.
[0160] S311, determine the discarded first sub-requirement set.
[0161] Illustratively, in some embodiments of the present application, the electronic device may compare the currently determined sub-requirements with the sub-requirements in the test case library, and the sub-requirements that exist in the test case library but do not exist in the current requirement data are sub-requirements that need to be discarded.
[0162] For example, take the requirement data "Select payment method as application A, payment amount as RMB 100, submit payment request and jump to payment interface" as an example. If the previous requirement data is "Select payment method as application B, payment amount as RMB 100, submit payment request and jump to payment interface", then it can be determined that the sub-requirement identified by Paragraph_1 in Table 4 is the first sub-requirement set.
[0163] S312: Add a first state identifier to the sub-test identifier corresponding to the first sub-requirement set.
[0164] For example, in some embodiments of the present application, after the electronic device determines the first sub-requirement set, it can add a first state identifier to the first sub-requirement set, and the first state identifier is used to indicate that the sub-test case corresponding to the sub-requirement is an invalid test case, thereby identifying unnecessary test cases.
[0165] S313: Determine an updated second sub-requirement set.
[0166] Exemplarily, in some embodiments of the present application, the electronic device may compare the currently determined sub-requirements with the sub-requirements in the test case library. The sub-requirements that do not exist in the test case library but exist in the current requirement data are updated sub-requirements, so that the corresponding second sub-requirement set can be determined.
[0167] For example, take the requirement data "Select payment method as application A, payment amount as RMB 100, submit payment request and jump to payment interface". If the previous requirement data is "Select payment method as application B, payment amount as RMB 100, submit payment request and jump to payment interface", then "Select payment method as application B" can be determined as the second sub-requirement set.
[0168] S314, generating a corresponding sub-test case based on the second sub-requirement set, and adding a third state identifier to the second sub-requirement set.
[0169] Exemplarily, in some embodiments of the present application, after the electronic device determines the second sub-requirement set, it can generate a corresponding sub-test case based on the second sub-requirement set through LLM, and associate the sub-test case with the corresponding sub-requirement in the second sub-requirement set.
[0170] Exemplarily, the numbering of each sub-requirement in the second sub-requirement set may be incremented from Paragraph_max. For example, the first sub-requirement in the second sub-requirement set may be numbered Paragraph_max+1. Similarly, the sub-test identifiers of each sub-test case corresponding to the second sub-requirement set may be incremented from MODEL_NOmax, for example, the sub-test identifier of the first sub-test case in the newly added sub-test case may be MODEL_NOmax+1. The electronic device may associate the newly added sub-test identifier with each sub-requirement in the second sub-requirement set.
[0171] For example, the sub-number corresponding to "Select payment method as B application" is Paragraph_4, and the corresponding sub-test case and sub-test identifier are:
[0172]
[0173] It can be understood that after the electronic device determines the second sub-requirement set, it can use the sub-test cases corresponding to the second sub-requirement set and the third sub-requirement set as a new test case library.
[0174] S315, updating the number of the maximum sub-number and the number of the maximum sub-test identifier.
[0175] Exemplarily, in some embodiments of the present application, after the electronic device updates the new test case library, it can again record the number of the largest sub-number and the number of the largest sub-test identifier in the new test case library so that the new test cases can be numbered the next time the test cases are updated.
[0176] It can be understood that, through the above solution, no matter whether new requirement data or modified requirement data is entered into the electronic device, the electronic device can generate corresponding test cases according to the entered requirement data. Therefore, there is no need to manually manage test cases, thereby improving the efficiency of managing test cases.
[0177] The electronic devices involved in the above embodiments are introduced below.
[0178] For example, Figure 4 According to some embodiments of the present application, a schematic structural diagram of an electronic device 100 is shown.
[0179] The electronic device 100 can be used to implement the test case management methods provided in the aforementioned embodiments.
[0180] like Figure 4 As shown, the electronic device 100 includes one or more processors 101, a system memory 102, a non-volatile memory (NVM) 103, a communication interface 104, an input / output device 105, and a system control logic 106 for coupling the processor 101, the system memory 102, the non-volatile memory 103, the communication interface 104 and the input / output (I / O) device 105. Among them:
[0181] The processor 101 may include one or more processing units, for example, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a microprocessor (MCU), an artificial intelligence (AI) processor or a programmable logic device (field programmable gate array, FPGA), a neural network processor (neural-network processing unit, NPU), etc. The processing module or processing circuit may include one or more single-core or multi-core processors. In some embodiments, the CPU can be used to optimize the neural network model to be run, and the NPU can be used to run the neural network model to be run.
[0182] The system memory 102 is a volatile memory, such as a random-access memory (RAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), etc. The system memory is used to temporarily store data and / or instructions. For example, in some embodiments, the system memory 102 can be used to store the aforementioned object code, executable files, executable instructions, etc., and can also be used to store instructions of the test case management method provided in the aforementioned embodiments, etc.
[0183] The non-volatile memory 103 may include one or more tangible, non-temporary computer-readable media for storing data and / or instructions. In some embodiments, the non-volatile memory 103 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), a compact disc (CD), a digital versatile disc (DVD), a solid-state drive (SSD), etc. In some embodiments, the non-volatile memory 103 may also be a removable storage medium, such as a secure digital (SD) memory card, etc. In other embodiments, the non-volatile memory 103 may be used to store instructions of the test case management method provided in the aforementioned embodiments, etc.
[0184] In particular, the system memory 102 and the non-volatile memory 103 may respectively include: a temporary copy and a permanent copy of the instruction 107. The instruction 107 may include: when executed by at least one of the processors 101, the electronic device 100 implements the test case management method provided by each embodiment of the present application.
[0185] The communication interface 104 may include a transceiver for providing a wired or wireless communication interface for the electronic device 100, and then communicating with any other suitable device through one or more networks. In some embodiments, the communication interface 104 may be integrated into other components of the electronic device 100, for example, the communication interface 104 may be integrated into the processor 101. In some embodiments, the electronic device 100 may communicate with other devices through the communication interface 104, for example, the electronic device 100 may obtain demand data from other electronic devices through the communication interface 104.
[0186] The input / output (I / O) device 105 may include input devices such as a keyboard, a mouse, etc., and output devices such as a display, etc. A user may interact with the electronic device 100 through the input / output (I / O) device 105 .
[0187] System control logic 106 may include any suitable interface controller to provide any suitable interface with other modules of electronic device 100. For example, in some embodiments, system control logic 106 may include one or more memory controllers to provide interfaces to system memory 102 and non-volatile memory 103.
[0188] In some embodiments, at least one of the processors 101 may be packaged together with the logic of one or more controllers for the system control logic 106 to form a system in package (SiP). In other embodiments, at least one of the processors 101 may also be integrated with the logic of one or more controllers for the system control logic 106 on the same chip to form a system-on-chip (SoC).
[0189] Understandably, Figure 4 The structure of the electronic device 100 shown is only an example. In other embodiments, the electronic device 100 may include more or fewer components than shown, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0190] It is understandable that the electronic device 100 can be any electronic device, including but not limited to a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, etc., and the embodiments of the present application are not limited thereto.
[0191] The embodiments of the present application also provide a program product, which, when executed on an electronic device, can enable the electronic device to implement the methods provided in the aforementioned embodiments.
[0192] An embodiment of the present application further provides a readable storage medium, in which one or more programs are stored. When the one or more programs are executed by an electronic device, the electronic device implements the methods provided in the aforementioned embodiments.
[0193] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.
[0194] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application specific integrated circuit, or a microprocessor.
[0195] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0196] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried by or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer-readable media. Therefore, the machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including but not limited to floppy disks, optical disks, optical discs, compact disc-read only memory (CD-ROMs), magneto-optical disks, read-only memory (ROM), random-access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic or optical cards, flash memory, or tangible machine-readable storage for transmitting information using the Internet in electrical, optical, acoustic or other forms of propagation signals (e.g., carrier waves, infrared signals, digital signals, etc.). Therefore, the machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).
[0197] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0198] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.
[0199] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0200] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.
Claims
1. A test case management method, applied to electronic equipment, characterized in that: include: It is detected that the first sub-requirement set in the first requirement data is updated to the second sub-requirement set; Determine a first test case set associated with the first sub-requirement set from a first test case library corresponding to the first requirement data, and add a first status identifier to the first test case set; wherein the first status identifier is used to indicate that the corresponding test case is a failed test case; Generate a second test case set based on the second sub-requirement set; The second test case set and a third test case set in the first test case library except the first test case set are used as test cases in the second test case library.
2. The method according to claim 1, characterized in that The first requirement data has a first version identifier, and the first version identifier corresponds to the first test case library; The first requirement data includes at least one sub-requirement, and each sub-requirement in the at least one sub-requirement has a sub-number; Each sub-test case in the first test case library is generated based on the at least one sub-requirement, and each sub-test case in the first test case library has a sub-test identifier; The sub-test identifier has a first association relationship with the sub-number.
3. The method according to claim 2, characterized in that The determining, from a first test case library corresponding to the first requirement data, a first test case set associated with the first sub-requirement set comprises: Determine a first number corresponding to the first sub-requirement set, where the first number includes a sub-number corresponding to each sub-requirement in the first sub-requirement set; Determine, based on the first association relationship, a first sub-test identifier corresponding to each of the sub-numbers in the first number; A first test case set corresponding to the first sub-test identifier is determined from the first test case library.
4. The method according to claim 2, characterized in that: The method further includes updating the first version identifier to a second version identifier; The second version identifier corresponds to the second test case library.
5. The method according to claim 4, characterized in that The method further comprises: Adding a first status identifier to all test cases in the first test case library; Adding a second status identifier to the corresponding third test case set in the second test case library; A third status identifier is added to the corresponding second test case set in the second test case library.
6. The method according to claim 5, characterized in that The method further includes adding a sub-number to each sub-requirement in the second sub-requirement set to generate a second number, and adding a second sub-test identifier to each sub-test case in the second test case set to generate a second test identifier; Each sub-number in the second number has a second association relationship with each second sub-test identifier in the second test identifier.
7. The method according to claim 5, characterized in that Testing the corresponding software based on the second test case library to obtain a first test result; Based on the first test result, the test case corresponding to the third state identifier is adjusted.
8. An electronic device, characterized in that: include: A memory for storing instructions; At least one processor is used to execute the instructions so that the electronic device implements the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The readable storage medium stores instructions, and when the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that When the computer program product is executed on a device, the device is caused to perform the method according to any one of claims 1 to 7.