Test result generation method and device, equipment and storage medium

By constructing a Markov decision process model to determine the optimal test cases, the problem of not considering execution costs in traditional testing methods is solved, and test resources are optimized and test results are improved. This approach is suitable for large-scale and complex software testing scenarios.

CN120994553APending Publication Date: 2025-11-21AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511101485.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-07
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Traditional testing methods fail to adequately consider the execution cost of test cases, resulting in test cases not being well-matched to the system under test and poor system testing results.

Method used

A Markov decision process model is constructed, and the optimal test cases are determined through calculation. Taking into account the execution cost and time of the test cases, the optimal test cases are used to test the financial system under test.

Benefits of technology

Optimize the use of testing resources, improve testing effectiveness, and are suitable for large-scale and complex software testing scenarios. Avoid local optima and improve software quality and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994553A_ABST
    Figure CN120994553A_ABST
Patent Text Reader

Abstract

The invention discloses a test result generation method and device, equipment and a storage medium, and relates to the technical field of testing. The method comprises the following steps: acquiring a plurality of alternative test cases, and constructing a Markov decision process model according to the alternative test cases; the Markov decision process model is calculated to determine an optimal test case from the alternative test cases, a reward function value of the Markov decision process model is determined according to the execution cost of the test case, and the execution cost is related to the execution time of the test case; and testing the financial system to be tested by using the optimal test case to obtain a test result. According to the technical scheme, the global optimal test case is obtained, the execution cost of the test case is comprehensively considered, the use of test resources is optimized, the test effect is improved, and the method is suitable for large-scale and complex software test scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of testing technology, and in particular to a method, apparatus, device, and storage medium for generating test results. Background Technology

[0002] A test case is an execution specification designed for a specific test objective. It is the smallest unit of execution in software testing and is used to verify whether a specific software requirement is met. In the software testing process, the number of automated test cases is enormous, and how to use test cases effectively with limited time and resources is crucial.

[0003] Currently, traditional testing methods require prioritizing test cases, executing high-priority test cases first, which is crucial for timely discovery of software defects and improving testing efficiency and quality. However, traditional test case determination methods have limitations, failing to fully consider the inherent characteristics of test cases, such as execution costs, leading to test cases not being well-matched to the system under test and resulting in suboptimal system testing outcomes. Summary of the Invention

[0004] This invention provides a method, apparatus, device, and storage medium for generating test results to solve the problem of poor system test results.

[0005] In a first aspect, the present invention provides a method for generating test results, comprising:

[0006] Obtain multiple alternative test cases and construct a Markov decision process model based on the alternative test cases;

[0007] The Markov decision process model is solved to determine the optimal test case from the candidate test cases, wherein the reward function value of the Markov decision process model is determined based on the execution cost of the test case, and the execution cost is related to the execution time of the test case;

[0008] The optimal test cases are used to test the financial system under test to obtain test results.

[0009] Secondly, the present invention provides a test result generation device, comprising:

[0010] The model building module is used to obtain multiple candidate test cases and build a Markov decision process model based on the candidate test cases.

[0011] The optimal test case determination module is used to solve the Markov decision process model to determine the optimal test case from the candidate test cases, wherein the reward function value of the Markov decision process model is determined based on the execution cost of the test case, and the execution cost is related to the execution time of the test case;

[0012] The testing module is used to test the financial system under test using the optimal test cases to obtain test results.

[0013] Thirdly, the present invention provides an electronic device comprising:

[0014] At least one processor;

[0015] and memory that is communicatively connected to at least one processor;

[0016] The memory stores a computer program that can be executed by at least one processor, which enables the at least one processor to perform the test result generation method of the first aspect described above.

[0017] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a processor to execute the test result generation method of the first aspect described above.

[0018] The test result generation scheme provided by this invention obtains multiple candidate test cases, constructs a Markov decision process model based on these candidate test cases, solves the Markov decision process model, and determines the optimal test case from the candidate test cases. The reward function value of the Markov decision process model is determined based on the execution cost of the test case, which is related to the execution time of the test case. The optimal test case is then used to test the financial system under test to obtain test results. By adopting the above technical solution, not only is a globally optimal test case obtained using the constructed Markov decision process model, avoiding local optima, but the reward function of the Markov decision process model is also used to comprehensively consider the execution cost of the test cases, optimize the use of test resources, and improve test effectiveness. This scheme is suitable for large-scale and complex software testing scenarios.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

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

[0021] Figure 1This is a flowchart of a test result generation method provided in Embodiment 1 of the present invention;

[0022] Figure 2 This is a flowchart of a test result generation method provided in Embodiment 2 of the present invention;

[0023] Figure 3 This is a schematic diagram of a test result generation device according to Embodiment 3 of the present invention;

[0024] Figure 4 This is a schematic diagram of the structure of an electronic device provided according to Embodiment 4 of the present invention. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. In the description of this invention, unless otherwise stated, "a plurality of" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0027] Example 1

[0028] Figure 1The flowchart of a test result generation method is provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation of testing financial systems using test cases. The method can be executed by a test result generation device, which can be implemented in hardware and / or software. The test result generation device can be configured in an electronic device, which can be composed of two or more physical entities or a single physical entity.

[0029] like Figure 1 As shown, the test result generation method provided in Embodiment 1 of the present invention specifically includes the following steps:

[0030] S101. Obtain multiple alternative test cases and construct a Markov decision process model based on the alternative test cases.

[0031] In this embodiment, a Markov Decision Process (MDP) model can be constructed based on alternative test cases. The core components of a Markov Decision Process model include: a set of states, a set of actions, transition probabilities, a reward function, and a discount factor.

[0032] Markov Decision Processes (MDPs) are a powerful framework in machine learning and artificial intelligence for solving sequential decision problems. They abstract real-world problems into a series of state-action transitions and can optimize decision strategies using learning algorithms. The value function of an MDP measures the long-term cumulative reward of the strategy and can specifically include state value functions and action value functions. The policy of an MDP is a strategy for choosing actions, which can include deterministic and stochastic policies. The optimal policy in an MDP is the one that maximizes the cumulative reward.

[0033] S102. Solve the Markov decision process model to determine the optimal test case from the candidate test cases, wherein the reward function value of the Markov decision process model is determined based on the execution cost of the test case, and the execution cost is related to the execution time of the test case.

[0034] In this embodiment, the optimal strategy can be obtained by solving the Markov decision process model. This optimal strategy represents the action to be performed under different states; that is, it determines the best test case to execute next based on the current test state of the financial system under test. During the continuous execution of test cases, the Markov decision process model can learn the system's behavioral patterns and predict potential future problems. This makes testing more proactive, allowing for early testing of potential issues. Compared to traditional methods of discovering problems after the fact, this significantly improves software quality and stability.

[0035] S103. Test the financial system under test using the optimal test cases to obtain test results.

[0036] In this embodiment, the financial system under test can be a system of a bank or other financial institution.

[0037] The test result generation method provided in this invention involves obtaining multiple candidate test cases, constructing a Markov decision process model based on these candidate test cases, and solving the Markov decision process model to determine the optimal test case from the candidate test cases. The reward function value of the Markov decision process model is determined based on the execution cost of the test case, which is related to the execution time of the test case. The optimal test case is then used to test the financial system under test to obtain test results. This invention not only utilizes the constructed Markov decision process model to obtain globally optimal test cases, avoiding local optima, but also leverages the reward function of the Markov decision process model to comprehensively consider the execution cost of the test cases, optimizing the use of test resources and improving test effectiveness. It is suitable for large-scale and complex software testing scenarios.

[0038] Optionally, the step of solving the Markov decision process model to determine the optimal test case from the candidate test cases includes: solving the Markov decision process model using a dynamic programming algorithm, a policy iteration algorithm, or a value iteration algorithm to determine the optimal test case from the candidate test cases.

[0039] Specifically, the Monte Carlo method or temporal difference learning method can also be used to solve the Markov decision process model.

[0040] Optionally, the step of solving the Markov decision process model to determine the optimal test case from the candidate test cases includes: solving the Markov decision process model to obtain a priority ranking of each candidate test case, wherein the candidate test case with the highest priority in the priority ranking is the optimal test case; wherein, the step of testing the financial system under test using the optimal test case to obtain test results includes: testing the financial system under test using the candidate test cases according to the priority ranking order to obtain test results.

[0041] Specifically, the core objective of MDP is to find an optimal strategy, that is, to choose the action in the current state to maximize long-term cumulative rewards. In this embodiment, the core objective is to determine the next best test case to execute in the current test state of the financial system under test, in order to maximize long-term cumulative rewards. The candidate test cases can be prioritized based on their cumulative rewards; the higher the cumulative reward, the higher the priority. Then, according to the priority ranking, the candidate test cases are used to test the financial system under test in descending order of priority to obtain the test results.

[0042] Example 2

[0043] Figure 2 This is a flowchart of a test result generation method provided in Embodiment 2 of the present invention. The technical solution of the present invention is further optimized based on the above optional technical solutions, and provides a specific way to test a financial system using test cases.

[0044] Optionally, the step of constructing a Markov decision process model based on the alternative test cases includes: constructing a state set and a reward function for the Markov decision process model based on the alternative test cases, wherein the state set includes the execution state of the alternative test cases, the state of the financial system under test, the execution time of the alternative test cases, and the severity of the defects in the financial system under test detected by the alternative test cases.

[0045] Optionally, the execution cost of a test case is negatively correlated with the reward function value of the Markov decision process model; the reward function value of a test case that has detected a defect is greater than the reward function value of a test case that has not detected a defect.

[0046] Optionally, the severity of the detected defect is positively correlated with the reward function value of the test case for the detected defect.

[0047] Optionally, the reward function value of a test case that detects a new defect is greater than the reward function value of a test case that detects an old defect.

[0048] like Figure 2 As shown in Embodiment 2 of the present invention, a method for generating test results specifically includes the following steps:

[0049] S201. Obtain multiple alternative test cases.

[0050] S202. Construct a state set and reward function for a Markov decision process model based on the candidate test cases. The state set includes the execution state of the candidate test cases, the state of the financial system under test, the execution time of the candidate test cases, and the severity of the defects in the financial system under test detected by the candidate test cases. The execution cost of the test cases is negatively correlated with the reward function value of the Markov decision process model. The reward function value of test cases that have detected defects is greater than the reward function value of test cases that have not detected defects. The severity of the detected defects is positively correlated with the reward function value of the test cases that have detected defects. The reward function value of test cases that have detected new defects is greater than the reward function value of test cases that have detected old defects.

[0051] For example, the state space S of a Markov decision process model can be represented as:

[0052] S=(T1,T2,T3,…,Ti,H,C,D)

[0053] Where Ti represents the execution status of the i-th test case, with 0 indicating no execution, 1 indicating success, and -1 indicating failure. H represents the health status of the financial system under test, with 0 indicating healthy and 1 indicating a defect. C represents the current test time consumed. D represents the severity of the defect, with 0 indicating no defect, 1 indicating low, 2 indicating medium, and 3 indicating high.

[0054] The action space A of a Markov decision process model can be represented as:

[0055] A = {A1, A2, A3, ..., Ai}

[0056] Here, Ai represents the i-th test case to be executed; if this test case is already executed, it cannot be selected again. The action to be selected is a test case chosen from the set of remaining unexecuted test cases.

[0057] The transition probabilities of a Markov decision process model can be determined by considering the frequency with which test cases discover defects in historical periods and the characteristics of the financial system under test. This probability is calculated by executing a test case in the current state and determining the likelihood of transitioning to the next state. For example, if the chosen test case frequently discovers new defects, the probability of transitioning to the state where new defects are discovered is higher. By constructing a state transition probability model for the Markov decision process, the expected benefits and risks of test case execution under different system states can be quantified.

[0058] The reward function R of the Markov decision process model must satisfy the following: the execution cost of a test case is negatively correlated with the reward function value of the Markov decision process model; the reward function value of a test case that has detected a defect is greater than the reward function value of a test case that has not detected a defect; the severity of a detected defect is positively correlated with the reward function value of a test case that has detected a defect; and the reward function value of a test case that detects a new defect is greater than the reward function value of a test case that has detected an old defect. The reward function R can be expressed as:

[0059]

[0060] Where a, b, c, and d are preset coefficients, all greater than 0, a > d > c > b, and 3d > a*d. The reward function R represents: a higher positive reward is given when a new defect is discovered, a lower positive reward is given when no new defect is discovered, and a higher positive reward is given when executing test cases causes serious problems such as system crashes.

[0061] S203. Solve the Markov decision process model using a dynamic programming algorithm, a strategy iteration algorithm, or a value iteration algorithm to obtain a priority ranking for each candidate test case, wherein the candidate test case with the highest priority in the priority ranking is the optimal test case.

[0062] Specifically, during the iterative calculation of the Markov decision process model, the state value function of the Markov decision process model can be continuously updated until convergence to obtain the optimal strategy.

[0063] S204. According to the priority order, the alternative test cases are used to test the financial system under test to obtain the test results.

[0064] Specifically, during the testing process, the state space S can be updated in real time, and a Markov decision process model can be calculated based on the state space before the next test to dynamically adjust the priority of alternative test cases.

[0065] The test result generation method provided in this invention modeles a Markov decision process model in its state space. This allows for the dynamic determination of optimal test cases based on the actual test results, such as the set of historically executed test cases and their execution results. Furthermore, by utilizing the reward function of the Markov decision process model and comprehensively considering indicators such as the defect detection capability and execution time of the test cases, the globally optimal test cases are obtained, thereby maximizing the defect detection rate.

[0066] Example 3

[0067] Figure 3 This is a schematic diagram of a test result generation device provided in Embodiment 3 of the present invention. Figure 3As shown, the device includes: a model building module 301, an optimal use case determination module 302, and a testing module 303, wherein:

[0068] The model building module is used to obtain multiple candidate test cases and build a Markov decision process model based on the candidate test cases.

[0069] The optimal test case determination module is used to solve the Markov decision process model to determine the optimal test case from the candidate test cases, wherein the reward function value of the Markov decision process model is determined based on the execution cost of the test case, and the execution cost is related to the execution time of the test case;

[0070] The testing module is used to test the financial system under test using the optimal test cases to obtain test results.

[0071] The test result generation device provided in this embodiment of the invention not only uses the constructed Markov decision process model to obtain globally optimal test cases and avoid local optima, but also uses the reward function of the Markov decision process model to comprehensively consider the execution cost of test cases, optimize the use of test resources, and improve test results, making it suitable for large-scale and complex software testing scenarios.

[0072] Optionally, the model building modules include:

[0073] The model building unit is used to construct a state set and reward function of a Markov decision process model based on the alternative test cases. The state set includes the execution state of the alternative test cases, the state of the financial system under test, the execution time of the alternative test cases, and the severity of the defects of the financial system under test detected by the alternative test cases.

[0074] Optionally, the execution cost of a test case is negatively correlated with the reward function value of the Markov decision process model; the reward function value of a test case that has detected a defect is greater than the reward function value of a test case that has not detected a defect.

[0075] Optionally, the severity of the detected defect is positively correlated with the reward function value of the test case for the detected defect.

[0076] Optionally, the reward function value of a test case that detects a new defect is greater than the reward function value of a test case that detects an old defect.

[0077] Optionally, the optimal test case determination module is specifically used to solve the Markov decision process model using a dynamic programming algorithm, a strategy iteration algorithm, or a value iteration algorithm, so as to determine the optimal test case from the candidate test cases.

[0078] Optionally, the optimal test case determination module is specifically used to solve the Markov decision process model to obtain the priority ranking of each candidate test case, wherein the candidate test case with the highest priority in the priority ranking is the optimal test case.

[0079] Optionally, the testing module is specifically used to test the financial system under test using alternative test cases according to the priority order, so as to obtain test results.

[0080] The test result generation device provided in the embodiments of the present invention can execute the test result generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0081] Example 4

[0082] Figure 4 A schematic diagram of an electronic device 40 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0083] like Figure 4 As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded into the RAM 43 from storage unit 48. The RAM 43 may also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0084] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0085] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as test result generation methods.

[0086] In some embodiments, the test result generation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the test result generation method described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to execute the test result generation method by any other suitable means (e.g., by means of firmware).

[0087] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoC) systems, complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.

[0088] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0089] The computer equipment provided above can be used to execute the test result generation method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0090] Example 5

[0091] In the context of this invention, the computer-readable storage medium may be a tangible medium, and the computer-executable instructions, when executed by a computer processor, are used to perform a test result generation method, the method comprising:

[0092] Obtain multiple alternative test cases and construct a Markov decision process model based on the alternative test cases;

[0093] The Markov decision process model is solved to determine the optimal test case from the candidate test cases, wherein the reward function value of the Markov decision process model is determined based on the execution cost of the test case, and the execution cost is related to the execution time of the test case;

[0094] The optimal test cases are used to test the financial system under test to obtain test results.

[0095] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by, or in conjunction with, an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0096] The computer equipment provided above can be used to execute the test result generation method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0097] It is worth noting that in the embodiments of the test result generation device described above, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0098] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for generating test results, characterized in that, include: Obtain multiple alternative test cases and construct a Markov decision process model based on the alternative test cases; The Markov decision process model is solved to determine the optimal test case from the candidate test cases, wherein the reward function value of the Markov decision process model is determined based on the execution cost of the test case, and the execution cost is related to the execution time of the test case; The optimal test cases are used to test the financial system under test to obtain test results.

2. The method according to claim 1, characterized in that, The step of constructing a Markov decision process model based on the alternative test cases includes: Based on the alternative test cases, a state set and reward function of a Markov decision process model are constructed. The state set includes the execution state of the alternative test cases, the state of the financial system under test, the execution time of the alternative test cases, and the severity of the defects in the financial system under test detected by the alternative test cases.

3. The method according to claim 1 or 2, characterized in that, The execution cost of test cases is negatively correlated with the reward function value of the Markov decision process model; the reward function value of test cases that have detected defects is greater than the reward function value of test cases that have not detected defects.

4. The method according to claim 3, characterized in that, The severity of the detected defect is positively correlated with the reward function value of the test case for the detected defect.

5. The method according to claim 3, characterized in that, The reward function value of a test case that detects a new defect is greater than the reward function value of a test case that detects an old defect.

6. The method according to claim 1, characterized in that, Solving the Markov decision process model to determine the optimal test case from the candidate test cases includes: The Markov decision process model is solved using dynamic programming, strategy iteration, or value iteration algorithms to determine the optimal test case from the candidate test cases.

7. The method according to claim 1, characterized in that, Solving the Markov decision process model to determine the optimal test case from the candidate test cases includes: The Markov decision process model is solved to obtain the priority ranking of each candidate test case, wherein the candidate test case with the highest priority in the priority ranking is the optimal test case. The step of testing the financial system under test using the optimal test cases to obtain test results includes: Based on the priority ranking, the alternative test cases are used to test the financial system under test in order to obtain test results.

8. A test result generation device, characterized in that, include: The model building module is used to obtain multiple candidate test cases and build a Markov decision process model based on the candidate test cases. The optimal test case determination module is used to solve the Markov decision process model to determine the optimal test case from the candidate test cases, wherein the reward function value of the Markov decision process model is determined based on the execution cost of the test case, and the execution cost is related to the execution time of the test case; The testing module is used to test the financial system under test using the optimal test cases to obtain test results.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the test result generation method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the test result generation method according to any one of claims 1-7.