Software testing method and device, electronic equipment and computer storage medium
By performing environment verification before software testing to ensure that the test environment meets preset requirements before executing test cases, the problem of low test effectiveness and efficiency in existing technologies is solved, and the accuracy and efficiency of test results are improved without increasing test case execution time.
Patent Information
- Application Number
- CN202511272537.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2025-12-16
AI Technical Summary
Existing technologies struggle to guarantee the validity and efficiency of test case results in software testing, especially in agile development processes where software iterations are frequent, making it difficult for the testing process to meet testing requirements and efficiency needs.
By determining the match between the test case set and the test environment, environment verification is performed first to ensure that the test environment meets the preset requirements. Then, the remaining test cases in the test case set are executed, realizing the step-by-step execution of environment verification and test cases, and ensuring the stability and efficiency of the test environment.
Without increasing the total test case execution time, the effectiveness and efficiency of test results are improved, the risk of test interruption and failure is reduced, and the stability and accuracy of the test environment are ensured.
Smart Images

Figure CN121144196A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software testing technology, and in particular to a software testing method, testing apparatus, electronic device, and computer storage medium. Background Technology
[0002] With the widespread application of agile development processes in automotive software development, the development cycle of in-vehicle software is gradually shortening, the software iteration frequency is constantly increasing, and the demand for testing is also gradually increasing.
[0003] In related technologies, before conducting software testing, a full set of test cases is first established. Then, relevant test cases are automatically selected and executed based on the changes, and finally, a test report is generated. However, this testing process only focuses on the execution and results of the tests and aims to improve efficiency. It is difficult to guarantee the validity and efficiency of the test case results obtained after the tests. Summary of the Invention
[0004] This application provides a software testing method, testing apparatus, electronic device, and computer storage medium, aiming to improve the problem of difficulty in guaranteeing the effectiveness of test case results and testing efficiency after testing.
[0005] To achieve the above objectives, the first aspect of this application proposes a software testing method, which includes: in response to software testing requirements, determining a set of test cases and at least one test environment corresponding to the software testing; matching the at least one test environment with the set of test cases to determine environment test cases corresponding to each test environment; performing environment verification on the corresponding test environment based on the environment test cases; and, if the environment verification results determine that at least one test environment meets the preset test requirements, testing the remaining test cases in the set of test cases based on at least one test environment until the software testing is completed.
[0006] According to the software testing method of this application embodiment, upon receiving a software testing requirement, a set of test cases and at least one test environment corresponding to the software test are determined. Then, the at least one test environment is matched with the set of test cases to determine the environment test cases corresponding to each test environment. Based on the environment test cases, the corresponding test environments are verified. If, based on the environment verification results, at least one test environment meets the preset test requirements, the remaining test cases in the set of test cases are tested based on at least one test environment until the software test is completed. Therefore, this method pre-verifies the test environment using a portion of the test cases in the set of test cases, and only executes the remaining test cases in the set after all test environments meet the preset test requirements. Thus, without changing the total execution time of the test cases, both test case execution and environment verification are completed, ensuring the validity of the software test results and the testing efficiency.
[0007] According to one embodiment of this application, determining a set of test cases corresponding to software testing requirements includes: obtaining a test case library, wherein the test case library includes multiple test cases; determining at least one software change module according to the software testing requirements, and matching the at least one software change module with the test case library to determine test cases corresponding to each software change module; and determining a set of test cases based on the test cases corresponding to each software change module.
[0008] In some embodiments of this application, matching at least one test environment with a set of test cases to determine the environment test case corresponding to each test environment includes: matching at least one test environment with a set of test cases to determine at least one test case corresponding to each test environment; and using one of the at least one test cases corresponding to the test environment as the environment test case of the test environment.
[0009] According to one embodiment of this application, using one of the at least one test cases corresponding to the test environment as the environment test case of the test environment includes: obtaining the execution time level of each test case in the at least one test case corresponding to the test environment; and using the test case with the lowest execution time level as the environment test case of the test environment, wherein the execution time level is positively correlated with the total execution time.
[0010] According to one embodiment of this application, the software testing method further includes: if, based on the environment verification results, at least one test environment exists that does not meet the preset test requirements, then the test environment that does not meet the preset test requirements is repaired based on the environment verification results, and the repaired test environment is then re-verified based on the environment test cases.
[0011] According to one embodiment of this application, the software testing method further includes: determining that the test environment meets the preset testing requirements when the environment test cases are determined to have been executed in the test environment and the execution results meet the preset evaluation requirements based on the environment verification results; and determining that the test environment does not meet the preset testing requirements when the environment test cases are determined not to have been executed in the test environment based on the environment verification results, or when the environment test cases are determined to have been executed in the test environment and the execution results do not meet the preset evaluation requirements based on the environment verification results.
[0012] According to one embodiment of this application, when it is determined that the test environment does not meet the preset test requirements, the software testing method further includes: obtaining the abnormal triggering frequency of the test environment within a preset time period, and generating a corresponding hardware fault warning based on the environment verification results when the abnormal triggering frequency reaches a preset threshold.
[0013] To achieve the above objectives, a second aspect of this application provides an electronic device including a processor and a memory, wherein the memory is used to store computer programs; and the processor is used to execute the programs stored in the memory to implement the aforementioned software testing method.
[0014] According to the embodiments of this application, when the processor executes the program stored in the memory, the aforementioned software testing method is implemented. Based on the aforementioned software testing method, under the premise that the total execution time of the test cases remains unchanged, both the execution of the test cases and the environmental verification are completed, thus ensuring the validity of the software test results and the testing efficiency.
[0015] To achieve the above objectives, a third aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned software testing method.
[0016] According to the embodiments of this application, a computer-readable storage medium stores a computer program that, when executed by a processor, implements the aforementioned software testing method. Based on the aforementioned software testing method, under the premise that the total execution time of test cases remains unchanged, both the execution of test cases and environmental verification are completed, thus ensuring the validity of software test results and testing efficiency.
[0017] To achieve the above objectives, a fourth aspect of this application provides a software testing apparatus, comprising: a receiving module, configured to, in response to software testing requirements, determine a set of test cases and at least one test environment corresponding to the software testing requirements; a matching module, configured to match at least one test environment with the set of test cases to determine environment test cases corresponding to each test environment; an environment verification module, configured to perform environment verification on the corresponding test environment based on the environment test cases; and a software testing module, configured to, if the environment verification results determine that at least one test environment meets preset testing requirements, test the remaining test cases in the set of test cases based on at least one test environment until the current software test is completed.
[0018] According to the software testing apparatus of this application embodiment, a receiving module responds to software testing requirements, determines a set of test cases and at least one test environment corresponding to the software test, and a matching module matches the at least one test environment with the set of test cases to determine the environment test cases corresponding to each test environment. An environment verification module verifies the corresponding test environment based on the environment test cases. If the software testing module determines that at least one test environment meets the preset test requirements based on the environment verification results, it tests the remaining test cases in the set of test cases based on at least one test environment until the software test is completed. Therefore, this apparatus pre-verifies the test environment using a portion of the test cases in the set of test cases, and only executes the remaining test cases in the set after all test environments meet the preset test requirements. Thus, without changing the total execution time of the test cases, it completes both the execution of the test cases and the environment verification, ensuring the validity of the software test results and the testing efficiency. Attached Figure Description
[0019] Figure 1 This is a flowchart of a software testing method according to an embodiment of this application.
[0020] Figure 2 This is a schematic diagram illustrating the execution of a test case according to a specific embodiment of this application.
[0021] Figure 3 This is a flowchart of a software testing method according to a specific embodiment of this application.
[0022] Figure 4 This is a block diagram of an electronic device according to an embodiment of the present application.
[0023] Figure 5 This is a connection diagram of a software testing apparatus according to an embodiment of this application. Detailed Implementation
[0024] To make the technical problems, technical solutions, and beneficial effects solved by this application clearer, the following detailed description is provided in conjunction with embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0025] The software testing method, testing apparatus, electronic device, and computer storage medium of the present application are described in detail below with reference to the accompanying drawings.
[0026] Figure 1 This is a flowchart of a software testing method according to an embodiment of this application. (Refer to...) Figure 1 The software testing methods may include: S1, in response to software testing requirements, determines the set of test cases and at least one test environment corresponding to the software testing requirements; Specifically, software testing requirements can be automatically triggered by user input of software change modules. Identifying the software testing requirements reveals the corresponding software change modules and the corresponding testing environment. The test case set should contain test cases for all software change modules within the specified testing requirements to ensure that the software testing process meets these requirements. The test case set can be created by technical personnel constructing test cases for each software change module, or by matching and selecting from an existing test case library; the specific method is not limited.
[0027] S2, match at least one test environment with a set of test cases to determine the environment test cases corresponding to each test environment; Specifically, the test case set includes multiple test cases. Each test case depends on a specific software and hardware environment. The test environment is then matched against these environments, and at least one test case is selected from the test cases corresponding to each environment as the environment test case. For example, if the test environment includes test environment 'a', and the test case set includes three test cases that match test environment 'a', then one of these test cases is selected as the environment test case for test environment 'a'.
[0028] S3, based on the environment test cases, performs environment verification on the corresponding test environment, and if it is determined from the environment verification results that at least one test environment meets the preset test requirements, tests are performed on the remaining test cases in the test case set based on at least one test environment until the software test is completed.
[0029] Specifically, the preset test requirements are used to characterize the verification of the test environment, and the conditions can be set according to the actual situation.
[0030] Before officially starting the test, the environment test cases are executed first to verify the test environment required for this software test. After the environment test verification is confirmed to be successful based on the preset test requirements, other test cases in the test case set are executed. This allows for the early identification of potential problems in the test environment, reducing test interruptions or batch test case failures caused by environmental problems during the formal test execution, thereby improving the test success rate and efficiency.
[0031] This embodiment incorporates the verification of the test environment into the formal testing process, improving the accuracy and reliability of the test results. Furthermore, the test environment verification cases are set as a subset of the test case set, eliminating the need for repeated case design and reducing testing time. Thus, the verification of the test environment is taken into account without affecting the overall testing efficiency. This approach balances testing efficiency and test environment effectiveness, ensuring that the test environment is fully verified before each software test without reducing testing efficiency.
[0032] In some embodiments of this application, determining the test case set corresponding to software testing requirements includes: obtaining a test case library, wherein the test case library includes multiple test cases; determining at least one software change module according to the software testing requirements, and matching the at least one software change module with the test case library to determine the test cases corresponding to each software change module; and determining the test case set based on the test cases corresponding to each software change module.
[0033] Specifically, the test case library can be pre-built according to actual needs, including multiple test cases and clearly labeled attributes such as associated modules, dependent environment information, and execution time levels for each test case. The associated modules are used to accurately filter and generate subsequent test case sets, avoiding omissions; the environment information represents the prerequisites for the correct execution of the test case; and the execution time level characterizes the time consumption of the test case, which can be used to select the most efficient test case for environment verification. Figure 2 For example, the test case library includes 7 test cases, which are represented as Case1, Case2, Case3, Case4, Case5, Case6, and Case7, and are labeled with information such as the associated module, dependent environment, and time consumption level of each test case.
[0034] Based on the testing requirements, identify the software change modules involved in this software test, and then query the test case library for test cases associated with the change modules to obtain the test cases corresponding to each software change module, so as to ensure that the test case set contains all test cases associated with the software change modules in the test case library.
[0035] Assuming the software changes involved in this test include modules A, B, and C, and the test cases associated with module A found in the test case library are Case 1 and Case 2, then the test cases corresponding to software change module A are Case 1 and Case 2. Similarly, the test cases corresponding to software change module B are Case 3 and Case 4, and the test cases corresponding to software change module B are Case 5 and Case 6. Therefore, the test case set can be obtained as {Case 1, Case 2, Case 3, Case 4, Case 5, Case 6}.
[0036] This embodiment improves the efficiency of test case set construction and ensures the effectiveness of software testing by matching the software change module with a preset test case library.
[0037] In some embodiments of this application, matching at least one test environment with a set of test cases to determine the environment test case corresponding to each test environment includes: matching at least one test environment with a set of test cases to determine at least one test case corresponding to each test environment; and using one of the at least one test cases corresponding to the test environment as the environment test case of the test environment.
[0038] In other words, continue with Figure 2 For example, let's define the test case set as {Case1, Case2, Case3, Case4, Case5, Case6}. Identify the dependent environments for each test case and determine the corresponding test cases for each environment within the test case set. That is, in the test case set, test cases dependent on environment a include Case1 and Case5. Therefore, the test cases corresponding to test environment a are Case1 and Case5. Similarly, the test cases corresponding to test environment b include Case2 and Case3, and the test cases corresponding to test environment c include Case4 and Case6.
[0039] Then, select one of the at least one test cases corresponding to each test environment as the environment test case. For example, the test cases corresponding to test environment a are Case 1 and Case 5. Select Case 1 as the environment test case corresponding to test environment a according to the test case sorting. And so on, determine the environment test case corresponding to test environment b as Case 2 and the environment test case corresponding to test environment c as Case 4.
[0040] This embodiment uses one test case from each test environment matching test case as the environment test case. Under the premise of fully verifying the test environment, the environment verification time is controlled, thereby improving the efficiency of environment verification.
[0041] In some embodiments of this application, using one of the at least one test cases corresponding to the test environment as the environment test case of the test environment includes: obtaining the execution time level of each test case in the at least one test case corresponding to the test environment; and using the test case with the lowest execution time level as the environment test case of the test environment, wherein the execution time level is positively correlated with the total execution time.
[0042] Specifically, before the formal execution of the test, the test environment is thoroughly verified using environmental test cases to ensure its stability and compliance with test requirements. Otherwise, there is a risk of batch false positives or test execution interruptions, reducing test efficiency. However, if the verification process for the test environment is too lengthy or time-consuming, it will also lead to reduced test efficiency. Therefore, this embodiment selects environmental test cases based on the execution time level of the test cases, as follows: The execution time level of each test case can be pre-determined based on the experiment and stored in the test case library to characterize the total execution time required by the test case during the testing process. The higher the execution time level of the test case, the longer the total execution time; the lower the execution time level, the shorter the total execution time.
[0043] Continue with Figure 2 For example, let's define the test case set as {Case1, Case2, Case3, Case4, Case5, Case6}. Based on the dependent environment of each test case, determine the test cases corresponding to each test environment. That is, in the test case set, the test cases dependent on environment a include Case1 and Case5. Therefore, the test cases corresponding to test environment a are Case1 and Case5. Similarly, the test cases corresponding to test environment b include Case2 and Case3, and the test cases corresponding to test environment c include Case4 and Case6.
[0044] Then, the test case with the lowest time consumption level among at least one test case corresponding to each test environment is selected as the environment test case. For example, the test cases corresponding to test environment a are Case 1 and Case 5, where Case 1 has a low time consumption level and Case 5 has a mid time consumption level. Therefore, Case 1, which has a lower time consumption level, is selected as the environment test case for test environment a. Similarly, the environment test case for test environment b can be determined as Case 3, and the environment test case for test environment c can be determined as Case 6.
[0045] Under the premise of meeting the test environment coverage, this embodiment can select only the test cases with low execution time as environment test cases for test cases with the same environment dependency information, so as to avoid spending too much time on environment verification and improve the efficiency of environment verification.
[0046] In some embodiments of this application, the software testing method further includes: if, based on the environment verification results, at least one test environment exists that does not meet the preset test requirements, the test environment that does not meet the preset test requirements is repaired based on the environment verification results, and the repaired test environment is then re-verified based on the environment test cases.
[0047] In other words, if the test environment verification fails, the environment must be repaired and the test subset executed repeatedly until it passes. In this software testing process, the successful execution of the environment test case set is a prerequisite for the formal execution of the remaining test cases; testing is not allowed if the environment verification fails, thus ensuring test quality.
[0048] In some embodiments of this application, the software testing method further includes: determining that the test environment meets the preset testing requirements when the test cases are determined to have been executed in the test environment and the execution results meet the preset evaluation requirements based on the environment verification results; and determining that the test environment does not meet the preset testing requirements when the test cases are determined not to have been executed in the test environment based on the environment verification results, or when the test cases are determined to have been executed in the test environment and the execution results do not meet the preset evaluation requirements based on the environment verification results.
[0049] In other words, the accuracy of environment verification is determined by the completeness of the execution of test cases within the test environment and the accuracy of the execution results. If the environment test cases are executed successfully and the execution results meet the preset evaluation requirements, the test cases are considered to have executed successfully, the test environment meets the testing requirements, and the verification is considered passed. Otherwise, the environment test cases are considered to have failed verification. The preset evaluation requirements can be set according to the test cases and are used to evaluate whether the execution results are correct.
[0050] In some embodiments of this application, when it is determined that the test environment does not meet the preset test requirements, the software testing method further includes: obtaining the abnormal triggering frequency of the test environment within a preset time period, and generating a corresponding hardware fault warning based on the environment verification results when the abnormal triggering frequency reaches a preset threshold.
[0051] In other words, the status of the current testing environment is determined based on the environmental verification results. For example, if a certain hardware peripheral frequently fails the test, it can be considered whether the peripheral is aging or has other faults, triggering the corresponding hardware fault warning in a timely manner so that technicians can repair or replace it promptly based on the warning signal. For instance, if the frequency of verification failures or the frequency of the same fault (such as high-frequency message errors on two channels, such as no message or message error) in a certain testing environment reaches a preset threshold within a certain period of time, then the possibility of a hardware fault should be considered first, rather than modifying the software code first, thus triggering the corresponding hardware fault warning.
[0052] As a specific embodiment of this application, such as Figure 3 As shown, this software testing method may include the following steps: S101, establish a test case library, and label the software and hardware environment information that each test case depends on, and classify the execution time level of the test cases.
[0053] S102, in response to software testing requirements, generates a test case set by selecting test cases from the test case library based on the software change module of the software testing requirements.
[0054] S103 captures the software and hardware environments and execution time levels of each test case in the test case set to determine the environment test cases corresponding to each test environment and generate a test subset.
[0055] Among them, the environment test cases are used for environment verification. This set of environment test cases must cover all the software and hardware environments required for this test, while also considering environment verification efficiency; only test cases with low execution time can be selected. S104. Execute the test subset: If the test subset passes, execute the remaining test cases in the test case set; otherwise, the environment needs to be repaired and the test subset needs to be executed repeatedly until it passes before the remaining test cases are executed.
[0056] The software testing method of this application embodiment, in development scenarios with continuous integration testing or high-frequency transfer testing requirements, first executes a subset of test cases that depend on the test environment (including software and hardware) before formally starting testing. After passing the subset, the remaining test cases are then formally executed. This approach takes into account test environment verification without reducing testing efficiency. For continuous testing environments, each transfer test version can be automatically verified. It also allows the current test environment status to be determined based on the environment verification results. For example, if a certain hardware peripheral frequently fails the test, it can be considered whether the peripheral has aging or other faults, and repair or replace it in a timely manner.
[0057] This application also provides an electronic device, please refer to... Figure 4The electronic device 100 includes a processor 110 and a memory 120, wherein the memory 110 is used to store computer programs; and the processor 120 is used to execute the programs stored in the memory 110 to implement the software testing method described in any embodiment of this application.
[0058] Corresponding to the above embodiments, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the software testing method described in any embodiment of this application.
[0059] This application also provides a software testing apparatus. (Refer to...) Figure 5 The software testing device 200 includes: a receiving module 210, a matching module 220, an environment verification module 230, and a software testing module 240.
[0060] The receiving module 210 is used to respond to software testing requirements and determine the test case set and at least one test environment corresponding to the software testing requirements; the matching module 220 is used to match at least one test environment with the test case set to determine the environment test cases corresponding to each test environment; the environment verification module 230 is used to perform environment verification on the corresponding test environment based on the environment test cases; and the software testing module 240 is used to test the remaining test cases in the test case set based on at least one test environment, after determining that at least one test environment meets the preset test requirements according to the environment verification results, until the software test is completed.
[0061] According to one embodiment of this application, the receiving module 210 is specifically configured to: obtain a test case library, wherein the test case library includes multiple test cases; determine at least one software change module according to software testing requirements, and match the at least one software change module with the test case library to determine the test cases corresponding to each software change module; and determine a set of test cases based on the test cases corresponding to each software change module.
[0062] According to one embodiment of this application, the matching module 220 is specifically configured to: match at least one test environment with a set of test cases to determine at least one test case corresponding to each test environment; and use one of the at least one test cases corresponding to the test environment as the environment test case of the test environment.
[0063] According to one embodiment of this application, the matching module 220 is specifically used to: obtain the execution time level of each test case in at least one test case corresponding to the test environment; and use the test case with the lowest execution time level as the environment test case of the test environment, wherein the execution time level is positively correlated with the total execution time.
[0064] According to one embodiment of this application, the software testing module 240 is further configured to: further include: when it is determined from the environment verification results that there is a test environment in at least one test environment that does not meet the preset test requirements, perform environment repair on the test environment that does not meet the preset test requirements based on the environment verification results, and perform environment verification again on the repaired test environment based on the environment test cases.
[0065] According to one embodiment of this application, the software testing module 240 is specifically used to: determine that the test environment meets the preset test requirements when the environment test cases are determined to have been executed in the test environment and the execution results meet the preset evaluation requirements based on the environment verification results; and determine that the test environment does not meet the preset test requirements when the environment test cases are determined not to have been executed in the test environment based on the environment verification results, or when the environment test cases are determined to have been executed in the test environment and the execution results do not meet the preset evaluation requirements based on the environment verification results.
[0066] According to one embodiment of this application, when the software testing module 240 determines that the test environment does not meet the preset test requirements, it is further configured to: obtain the abnormal triggering frequency of the test environment within a preset time period, and generate a corresponding hardware fault warning based on the environment verification results when the abnormal triggering frequency reaches a preset threshold.
[0067] In this application, "multiple" refers to two or more.
[0068] In this application, unless otherwise expressly defined, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0069] The terms “first,” “second,” “third,” “fourth,” etc., in this application (if present) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0070] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, in this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0071] Unless otherwise specified, all steps in this application may be performed sequentially or randomly. For example, if the method includes steps A and B, it means that the method may include steps A and B performed sequentially, or it may include steps B and A performed sequentially. For example, if the method may also include step C, it means that step C may be added to the method in any order. For example, the method may include steps A, B, and C, or it may include steps A, C, and B, or it may include steps C, A, and B, etc.
[0072] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A software testing method, characterized in that, The method includes: In response to software testing requirements, determine a set of test cases and at least one test environment corresponding to the software testing requirements; The at least one test environment is matched with the set of test cases to determine the environment test cases corresponding to each test environment; Based on the environmental test cases, the corresponding test environment is verified. If the environmental verification results determine that at least one test environment meets the preset test requirements, the remaining test cases in the test case set are tested based on at least one test environment until the software test is completed.
2. The software testing method according to claim 1, characterized in that, Determine the set of test cases corresponding to the software testing requirements, including: Obtain a test case library, wherein the test case library includes multiple test cases; Based on the software testing requirements, at least one software change module is determined, and the at least one software change module is matched with the test case library to determine the test cases corresponding to each software change module. The test case set is determined based on the test cases corresponding to each software change module.
3. The software testing method according to claim 1, characterized in that, Matching the at least one test environment with the set of test cases to determine the environment test cases corresponding to each test environment includes: The at least one test environment is matched with the set of test cases to determine at least one test case corresponding to each test environment; Obtain the execution time level of each test case in at least one test case corresponding to the test environment; The test case with the lowest execution time level is used as the environment test case for the test environment, wherein the execution time level is positively correlated with the total execution time.
4. The software testing method according to claim 1, characterized in that, Also includes: If, based on the environmental verification results, it is determined that there is a test environment in at least one test environment that does not meet the preset test requirements, the test environment that does not meet the preset test requirements is repaired according to the environmental verification results, and the repaired test environment is then verified again based on the environmental test cases.
5. The software testing method according to claim 4, characterized in that, Also includes: If, based on the environment verification results, it is determined that the environment test cases have been executed successfully in the test environment and the execution results meet the preset evaluation requirements, then the test environment is determined to meet the preset test requirements. If, based on the environment verification results, it is determined that the environment test cases have not been completed in the test environment, or if, based on the environment verification results, it is determined that the environment test cases have been completed in the test environment but the execution results do not meet the preset evaluation requirements, then the test environment does not meet the preset test requirements.
6. The software testing method according to claim 5, characterized in that, If it is determined that the test environment does not meet the preset test requirements, the method further includes: The abnormal triggering frequency of the test environment within a preset time period is obtained. When the abnormal triggering frequency reaches a preset threshold, a corresponding hardware fault warning is generated based on the environment verification results.
7. An electronic device, characterized in that, Including processor and memory, among which Memory, used to store computer programs; A processor for executing a program stored in memory to implement the software testing method according to any one of claims 1-6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the software testing method according to any one of claims 1-6.
9. A software testing device, characterized in that, include: A receiving module is used to determine, in response to software testing requirements, a set of test cases and at least one test environment corresponding to the software testing requirements; A matching module is used to match the at least one test environment with the set of test cases to determine the environment test cases corresponding to each test environment. The environment verification module is used to perform environment verification on the corresponding test environment based on the environment test cases. The software testing module is used to test the remaining test cases in the test case set based on the at least one test environment, after determining that the at least one test environment meets the preset test requirements according to the environment verification results, until the current software test is completed.
Citation Information
Cited By
Test script generation method and device based on artificial intelligence
CN121434105A