Test case generation method and device based on process modeling analysis
Through the method based on process modeling and analysis, a frequency model of the use of various scenarios of the financial business system is constructed, high-frequency scenarios are determined and test case combinations are generated, which solves the problem of priority sorting of test cases in the existing technology, realizes automatic sorting and execution, and improves Test efficiency and coverage.
Patent Information
- Application Number
- CN202310947485.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2025-02-21
AI Technical Summary
In the testing of financial business systems, it is difficult for the existing technology to effectively prioritize routine test cases, resulting in the inability to complete the test of all important functions within a limited time.
Through the method based on process modeling and analysis, a frequency model of usage of each scenario is constructed, high-frequency scenarios are determined, and a test case combination is generated, including basic case combinations and cross case combinations, to realize the automatic sorting and execution of test cases.
It realizes automatic sorting and execution of business test cases, ensuring that the test of important functions is completed within a limited time, and improving testing efficiency and coverage.
Smart Images

Figure CN119493722A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of artificial intelligence and software testing, and can be used in the financial field. Specifically, it is a test case generation method and device based on process modeling analysis. Background Art
[0002] At present, financial business systems are complex and the coupling between applications is high. In the actual testing work for these financial business systems, the test of the transformation points may make the mistake of generalizing. Therefore, routine testing, as an important means to check and make up for the system gaps, plays an important role in testing work. However, for the precious metal agency gold exchange business, the routine cases involved can reach dozens, and the business process is long, involves many branches, and is affected by the gold exchange environment. In the limited testing time, it is impossible to complete all routine scenario tests. At this time, it is particularly important to prioritize routine scenarios and complete the testing of important functions as much as possible within the limited time.
[0003] The existing routine case design priority ranking is based on the understanding of each business scenario by testers of various professions, as well as subjective judgments on whether accounting and other reference standards are involved. The shortcomings of this method include: first, the selection of cases is based on a single business scenario, and the impact of the entire business process is not considered; second, there is a lack of business data support, and when business hotspots shift, historical experience may lead to misjudgment. For example, due to changes in the market environment, the number of liquidated customers has increased rapidly, and the originally uncommon arrears recovery scenario needs to increase the priority of routine testing for key testing. Summary of the invention
[0004] In response to the problems in the prior art, the present application provides a test case generation method and device based on process modeling analysis, which can build a usage frequency model for each scenario by analyzing the business architecture, thereby determining high-frequency scenarios and realizing automatic sorting and execution of business test cases.
[0005] In order to solve the above technical problems, this application provides the following technical solutions:
[0006] In a first aspect, the present application provides a test case generation method based on process modeling analysis, comprising:
[0007] Determine the global scenario, global scenario interface and global parameters according to the preset business process;
[0008] Selecting a corresponding high-frequency scene according to the global scene, the global scene interface and the global parameters;
[0009] Generate a test case combination for the high-frequency scenario; wherein the test case combination includes a basic case combination and a cross-case combination.
[0010] Furthermore, determining the global scenario, the global scenario interface and the global parameters according to the preset business process includes:
[0011] Splitting the preset business process to obtain business activities in the business process;
[0012] Determining the global scenario according to the business activity;
[0013] Analyze the business products and functions included in the global scenario, and determine the corresponding global scenario interface and global parameters.
[0014] Further, selecting a corresponding high-frequency scene according to the global scene, the global scene interface and the global parameters includes:
[0015] Determine the number of accounts opened and the transaction volume of the product according to the global scenario, the global scenario interface and the global parameters;
[0016] Determine the calling frequency of each global scenario interface according to the number of accounts opened and the transaction volume of the product;
[0017] The high-frequency scenario is determined according to the calling frequency of each global scenario interface.
[0018] Furthermore, generating a test case combination for the high-frequency scenario includes:
[0019] Selecting a first basic parameter from the global parameters according to the calling frequency of each global scene interface;
[0020] determining whether the first basic parameter has a first derived parameter;
[0021] If yes, the basic case combination is generated according to the first basic parameter and the first derived parameter; wherein the calling frequency corresponds to the number of the basic case combinations.
[0022] Furthermore, generating a test case combination for the high-frequency scenario includes:
[0023] The cases that failed to be executed in the basic case combination are retained to obtain seed cases;
[0024] Selecting a second basic parameter from the global parameters and determining a corresponding second derived parameter;
[0025] The cross-case combination is generated according to the seed case, the second basic parameter and the second derived parameter.
[0026] Furthermore, the test case generation method based on process modeling analysis also includes:
[0027] Determine the test order of the high-frequency scenarios according to the calling frequency of each global scenario interface;
[0028] According to the test sequence, the corresponding global scenario interface is called to preferentially execute the corresponding test case combination.
[0029] In a second aspect, the present application provides a test case generation device based on process modeling analysis, comprising:
[0030] A scene parameter determination unit, used to determine a global scene, a global scene interface and global parameters according to a preset business process;
[0031] A high-frequency scene selection unit, used to select a corresponding high-frequency scene according to the global scene, the global scene interface and the global parameters;
[0032] A case combination generating unit is used to generate a test case combination for the high-frequency scenario; wherein the test case combination includes a basic case combination and a cross case combination.
[0033] Furthermore, the scene parameter determination unit includes:
[0034] A business activity determination module is used to split the preset business process to obtain the business activities in the business process;
[0035] A global scenario determination module, used to determine the global scenario according to the business activity;
[0036] The global interface parameter determination module is used to analyze the business products and functions included in the global scenario and determine the corresponding global scenario interface and global parameters.
[0037] Furthermore, the high-frequency scene selection unit includes:
[0038] An account opening and transaction determination module, used to determine the number of accounts opened and the transaction volume of a product according to the global scenario, the global scenario interface and the global parameters;
[0039] A call frequency determination module, used to determine the call frequency of each global scenario interface according to the number of accounts opened and the transaction volume of the product;
[0040] The high-frequency scene determination module is used to determine the high-frequency scene according to the calling frequency of each global scene interface.
[0041] Furthermore, the high-frequency scene selection unit includes:
[0042] A first basic parameter selection module, used to select a first basic parameter from the global parameters according to the calling frequency of each global scene interface;
[0043] A first derived parameter determination module, used to determine whether the first basic parameter has a first derived parameter;
[0044] A basic case combination generating module is used to generate the basic case combination according to the first basic parameter and the first derived parameter, if any; wherein the calling frequency corresponds to the number of the basic case combinations.
[0045] Furthermore, the case combination generating unit comprises:
[0046] A seed case retaining module, used for retaining cases that failed to be executed in the basic case combination to obtain seed cases;
[0047] A second derived parameter determination module, used to select a second basic parameter from the global parameter and determine a corresponding second derived parameter;
[0048] A cross-case combination generating module is used to generate the cross-case combination according to the seed case, the second basic parameter and the second derived parameter.
[0049] Furthermore, the test case generation device based on process modeling analysis further includes:
[0050] A test sequence determination unit, used to determine the test sequence of the high-frequency scenarios according to the calling frequency of each global scenario interface;
[0051] The test case execution unit is used to call the corresponding global scenario interface to preferentially execute the corresponding test case combination according to the test sequence.
[0052] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the test case generation method based on process modeling analysis when executing the program.
[0053] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the test case generation method based on process modeling analysis.
[0054] In a fifth aspect, the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the test case generation method based on process modeling analysis.
[0055] In response to the problems in the prior art, the test case generation method and device based on process modeling analysis provided in the present application can build a scenario parameter structure model according to the business scenario and process modeling, thereby building an iterative algorithm to lock high-frequency scenarios, find out key test parameter combinations, and finally update the test parameter combinations through the result feedback mechanism. In this way, high-frequency scenarios can be changed according to scenario changes, and a preset number of high-quality test case combinations can be generated. Combined with the automated testing process, automatic updating of test cases can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0057] Figure 1 This is one of the flow charts of the test case generation method based on process modeling analysis in an embodiment of the present application;
[0058] Figure 2 A flowchart for determining a global scene, a global scene interface, and global parameters in an embodiment of the present application;
[0059] Figure 3 A flowchart for selecting a high-frequency scenario in an embodiment of the present application;
[0060] Figure 4 One of the flow charts for generating a test case combination in an embodiment of the present application;
[0061] Figure 5 The second flowchart of generating a test case combination in an embodiment of the present application;
[0062] Figure 6 This is the second flowchart of the test case generation method based on process modeling analysis in an embodiment of the present application;
[0063] Figure 7 This is one of the structural diagrams of a test case generation device based on process modeling analysis in an embodiment of the present application;
[0064] Figure 8 This is a structural diagram of a scene parameter determination unit in an embodiment of the present application;
[0065] Fig. 9 This is a structural diagram of a high-frequency scene selection unit in an embodiment of the present application;
[0066] Fig.10 This is a structural diagram of a high-frequency scene selection unit in an embodiment of the present application;
[0067] Fig.11 This is a structural diagram of a case combination generation unit in an embodiment of the present application;
[0068] Fig.12 This is the second structural diagram of the test case generation device based on process modeling analysis in the embodiment of the present application;
[0069] Fig.13 A schematic diagram of the structure of an electronic device in an embodiment of the present application;
[0070] Fig.14 This is one of the schematic diagrams of the activity parameter structure in the embodiment of the present application;
[0071] Fig.15 This is the second schematic diagram of the activity parameter structure in the embodiment of the present application;
[0072] Fig.16 This is one of the schematic diagrams of the test case combination in the embodiment of the present application;
[0073] Fig.17 This is the second schematic diagram of the test case combination in the embodiment of the present application;
[0074] Fig.18 This is the third schematic diagram of the test case combination in the embodiment of the present application;
[0075] Fig.19 This is a fourth schematic diagram of a test case combination in an embodiment of the present application;
[0076] Fig. 20 This is a fifth schematic diagram of the test case combination in the embodiment of the present application;
[0077] Fig.21 This is the sixth schematic diagram of the test case combination in the embodiment of the present application;
[0078] Fig. 22 This is the seventh schematic diagram of the test case combination in the embodiment of the present application;
[0079] Fig.23 This is the eighth schematic diagram of the test case combination in the embodiment of the present application;
[0080] Fig.24 This is a general flow chart of a test case generation method based on process modeling analysis in an embodiment of the present application. DETAILED DESCRIPTION
[0081] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0082] It should be noted that the test case generation method and device based on process modeling analysis provided in the present application can be used in the financial field, and can also be used in any field other than the financial field. The application field of the test case generation method and device based on process modeling analysis provided in the present application is not limited.
[0083] The acquisition, storage, use and processing of data in the technical solution of this application comply with the relevant provisions of laws and regulations.
[0084] In one embodiment, see Figure 1 In order to build a usage frequency model of each scenario by analyzing the business architecture, thereby determining high-frequency scenarios and realizing automatic sorting and execution of business test cases, the present application provides a test case generation method based on process modeling analysis, including:
[0085] S101: Determine a global scenario, a global scenario interface, and global parameters according to a preset business process;
[0086] S102: Selecting a corresponding high-frequency scene according to the global scene, the global scene interface and the global parameters;
[0087] S103: Generate a test case combination for the high-frequency scenario; wherein the test case combination includes a basic case combination and a cross-case combination.
[0088] It is understandable that in financial transactions, changes in environmental factors often lead to changes in transaction processes. For business servers that support these financial transactions, the corresponding business scenarios, scenario interfaces, and business parameters may change. Business servers also need to be retested based on the changed scenario interfaces and business parameters. The corresponding test cases need to be regenerated and arranged based on the changed scenarios, interfaces, and parameters to ensure the security and efficiency of financial business processing.
[0089] For example, as the market environment changes and the number of liquidated customers increases rapidly, scenarios for collecting overdue fees that were not commonly used need to be prioritized for routine testing and focused testing. In other words, business scenarios that originally occurred less frequently may no longer be the focus of testing due to changes in the market environment. Therefore, in the face of a financial trading environment that may change at any time, it is necessary to use technical methods to find high-frequency business scenarios (referred to as high-frequency scenarios), and then generate a specified number of test cases for high-frequency scenarios. Based on the execution results of these test cases, the case generation strategy is dynamically adjusted to generate new test cases, and the business servers of financial transactions, especially the scenario interfaces, are continuously tested to minimize risks.
[0090] See also Fig.24 The embodiment of the present application overcomes the shortcomings of the prior art. By combing the business architecture, a usage frequency model corresponding to each scenario is constructed, and high-frequency scenarios are dynamically locked at any time to achieve automatic generation, sorting and execution of test case combinations.
[0091] From the above description, it can be seen that the test case generation method based on process modeling analysis provided by the present application can build a scenario parameter structure model according to the business scenario and process modeling, thereby building an iterative algorithm to lock high-frequency scenarios, find out key test parameter combinations, and finally update the test parameter combinations through the result feedback mechanism. In this way, high-frequency scenarios can be changed according to scenario changes, and a preset number of high-quality test case combinations can be generated. Combined with the automated testing process, automatic updating of test cases can be realized.
[0092] Steps S101 to S103 are described in detail below.
[0093] Step S101: Determine the global scenario, global scenario interface and global parameters according to a preset business process.
[0094] Figure 2 The present invention provides a specific embodiment of a test case generation method based on process modeling analysis.
[0095] In one embodiment, see Figure 2 , the determining of the global scenario, the global scenario interface and the global parameters according to the preset business process includes:
[0096] S201: Split a preset business process to obtain business activities in the business process;
[0097] S202: Determine the global scenario according to the business activity;
[0098] S203: Analyze the business products and functions included in the global scenario, and determine the corresponding global scenario interface and global parameters.
[0099] It is understandable that in order to determine high-frequency scenarios, the first step is to select (financial) products, model the business processes, and split the various process links of the product.
[0100] Specifically, business process modeling is a process of abstracting business processes based on object-oriented design thinking. Through business process modeling, business processes can be transformed into specific executable modules, and the mapping relationship between business modules and system interfaces can be established. We can complete this step through existing business modeling methods such as IBM Enterprise Architecture and obtain multiple activities in the product process.
[0101] Take the agency gold exchange product as an example: the agency gold exchange business refers to the transaction, delivery and clearing services of physical precious metal spot and physical precious metal deferred delivery carried out by the bank through the banking system in accordance with the customer's entrustment. It introduces a margin mechanism for deferred business and allows two-way transactions, so that customers can seize profit opportunities at any time in the fluctuation of precious metal prices, and the investment means are more flexible, achieving the purpose of diversified investment and enriching investment and financial management channels.
[0102] According to the methodology proposed by IBM, the product process can be divided into: account opening, quotation, order placement, delivery and settlement activities. Each activity is a functional unit that can be implemented by the user individually, and is implemented by multiple program functions at the system level. To this end, we designed a standardized representation paradigm for test data based on business process modeling.
[0103] Take the order activity of agency gold business as an example:
[0104] Step 1-1, scene interface identification:
[0105] The agent order placement activity includes the following two main scenarios:
[0106] S1: Identify individual customer identities, query customer agent account information, customer entrusts spot orders, and customer withdraws spot orders
[0107] S2: Identify individual customer identities, query customer agency account information, customer entrusts deferred orders, and customers withdraw deferred orders.
[0108] In the two scenarios, customers place orders for different products, corresponding to different system functions, but need to call the same customer identification related functions. Therefore, the scenarios under this activity can be divided into global scenarios G and global scenario interfaces GI. Among them, the parameters entered in the global scenario interface are global parameters. For different parallel scenarios, they are recorded as S1 and S2, corresponding to the scenario interfaces S1Ii and S2Ii, and the corresponding parameters are SiP, as shown in the table below.
[0109]
[0110] Step 1-2: Scene parameter identification:
[0111] In the process of global parameter identification, there is a unique relationship between parameters such as agent account information, customer number, customer name, etc., that is, after confirming one information, the other information is confirmed, so it can be optimized into one parameter - agent account.
[0112] The parameters of the spot and deferred order functions, such as the entrustment direction, entrustment quantity parameter type and input range, are the same and can be regarded as global parameters. The contract variety dictionary items are different and are regarded as different parameters. In addition, the deferred order has added the "opening direction" parameter, and the entrustment method parameter has added the "smart entrustment" option compared to the spot order. When "smart entrustment" is selected, the "stop loss trigger price, take profit trigger price" parameters are added. In the embodiment of the present application, the same parameters are refined into global parameters, and the dependency relationship between the parameters is represented in the form of a one-way linked list to obtain the activity parameter structure. Fig.14 shown.
[0113] From the above description, it can be seen that the test case generation method based on process modeling analysis provided in the present application can determine the global scenario, global scenario interface and global parameters according to the preset business process.
[0114] Step S102: selecting a corresponding high-frequency scene according to the global scene, the global scene interface and the global parameters.
[0115] Figure 3 The present invention provides a specific embodiment of a test case generation method based on process modeling analysis.
[0116] In one embodiment, see Figure 3 , selecting a corresponding high-frequency scene according to the global scene, the global scene interface and the global parameters, including:
[0117] S301: Determine the number of accounts opened and the transaction volume of the product according to the global scenario, the global scenario interface and the global parameters;
[0118] S302: Determine the calling frequency of each global scenario interface according to the number of accounts opened and the transaction volume of the product;
[0119] S303: Determine the high-frequency scenario according to the calling frequency of each global scenario interface.
[0120] It can be understood that step S301 to step S303 describe the process of selecting high-frequency scenes, which determines the high-frequency scenes through the frequency of interface calls.
[0121] First of all, how to define whether a scenario is high frequency is the first problem to be solved. In the embodiment of the present application, the number of accounts opened and the transaction volume are the main criteria for measuring the frequency of product use from a business perspective. Traditional quantitative methods often analyze the frequency of the transaction by analyzing business reports. This analysis method is based on a business perspective, considering the total number of account openings and product transaction numbers, and can identify the transaction status of major product categories, but the specific selection of which product to use as a routine case also requires quantitative analysis based on the first step, combined with the order data in the data lake.
[0122] Therefore, it is preferred to dynamically select high-frequency scenarios according to specific strategies based on the recent interface call frequency and specific parameters. In practical applications, the call frequency can be processed through various standardized algorithms and outlier processing methods. For the convenience of explanation, the percentage of the number of system interface and parameter calls to the total number of times the interface or parameter is called can be directly used as an importance measurement indicator, see Fig.15 shown.
[0123] From the above description, it can be seen that the test case generation method based on process modeling analysis provided in the present application can select corresponding high-frequency scenarios according to the global scenarios, global scenario interfaces and global parameters.
[0124] Step S103: Generate a test case combination for the high-frequency scenario.
[0125] Figure 4 The present invention provides a specific embodiment of a test case generation method based on process modeling analysis.
[0126] In one embodiment, see Figure 4 , the generating a test case combination for the high-frequency scenario includes:
[0127] S401: Selecting a first basic parameter from the global parameters according to the calling frequency of each global scene interface;
[0128] S402: Determine whether the first basic parameter has a first derived parameter;
[0129] S403: If yes, generate the basic case combination according to the first basic parameter and the first derived parameter; wherein the calling frequency corresponds to the number of the basic case combinations.
[0130] It is understandable that the high-frequency scenario analysis is performed next. Specifically, the element composition of the high-frequency scenario is further analyzed, a suitable routine case combination is generated, and the element combination is updated through the case execution results. Traditionally, when generating test cases based on parameter values, a Cartesian product is adopted, different parameters have the same weights, and the number of generated cases is determined by the number of parameter dictionaries. The embodiment of the present application provides a new test case generation method, which can generate a specified number of test cases according to the parameter weights, which is more in line with actual use requirements.
[0131] Taking the above scenario as an example, the specific steps are as follows:
[0132] Step 3-1: Generate basic case.
[0133] Assume that the number of test cases is 5, and 5 case combinations are generated, each of which contains the global parameter Golbal_P and the parallel parameters corresponding to the scene proportion. Fig.16 , taking the above case as an example, the proportion of S1P is 20%, and the proportion of S2P is 80%. Therefore, see Fig.16 , 1 S1P in 5 cases and 4 S2P.
[0134] For each i in Golbal_P:
[0135] According to the parameter call ratio, the parameter value is set according to the corresponding probability. Fig.16 See the generated results for Fig.17 shown.
[0136] If the parameter value has derived parameters:
[0137] Set the parameter value according to the derived parameter ratio, see Fig.18 After the above generation steps, we can generate a specified number of test cases according to the parameter weights.
[0138] It can be seen from the above description that the test case generation method based on process modeling analysis provided in the present application can generate a test case combination for the high-frequency scenario.
[0139] In one embodiment, see Figure 5 , the generating a test case combination for the high-frequency scenario includes:
[0140] S501: retaining the cases that failed to be executed in the basic case combination to obtain seed cases;
[0141] S502: Selecting a second basic parameter from the global parameters, and determining a corresponding second derived parameter;
[0142] S503: Generate the cross case combination according to the seed case, the second basic parameter and the second derived parameter. Specifically, generating the cross case combination according to the seed case, the second basic parameter and the second derived parameter includes: determining a first proportion of the seed case in the basic case combination; determining a second proportion of the test case combination to be generated according to the first proportion; generating the cross case combination according to the second proportion, the second basic parameter and the second derived parameter.
[0143] For example, if the first ratio is 20%, then the second ratio should be 100%-20%=80%. Therefore, in the cross-case combination, the proportion of case combinations generated by the second basic parameter and the second derived parameter should account for 80% of the total case combinations generated in this round.
[0144] It is understandable that, continuing with the above example.
[0145] Step 3-2: Generate cross-cases.
[0146] The primary task of testing is to discover problems in version transformation, which may be caused by changes in the trading environment. In the above steps, test cases have been generated based on the actual parameter usage. However, in fact, the execution results of most cases may be passed. Therefore, it is necessary to design a step-by-step method to iteratively evolve the test cases in a direction that is easier to find problems. That is, what is more needed should be those test cases that fail to execute (also called seed cases).
[0147] Therefore, for case Ni, if Ni fails in the previous round of testing, then Ni is retained, and if it succeeds, then it is discarded. After discarding, new cases can be generated by parameter distribution, or by retaining case combinations until the total number of cases = n.
[0148] In this round of testing, the execution results are shown in Fig.19 For reserved cases, see Fig. 20 shown.
[0149] Additional case:
[0150] Probability of regeneration, see Fig.21 shown.
[0151] Combination generation, see Fig. 22 shown.
[0152] New test case groups (also called cross-case combinations), see Fig.23 shown.
[0153] It can be seen from the above description that the test case generation method based on process modeling analysis provided in the present application can generate a test case combination for the high-frequency scenario.
[0154] In one embodiment, see Figure 6 , the test case generation method based on process modeling analysis also includes:
[0155] S601: Determine the test order of the high-frequency scenarios according to the calling frequency of each global scenario interface;
[0156] S602: According to the test sequence, the corresponding global scenario interface is called to preferentially execute the corresponding test case combination.
[0157] It is understandable that in the aforementioned steps, each global scenario interface has a corresponding calling frequency. The high-frequency scenarios corresponding to the global scenario interfaces with high calling frequencies are more valuable to test and can be placed at the front in the test sequence, so that the test sequence of the high-frequency scenarios can be determined according to the calling frequencies of each global scenario interface, and then according to the test sequence, the corresponding global scenario interfaces are called to preferentially execute the corresponding test case combinations.
[0158] From the above description, it can be seen that the test case generation method based on process modeling analysis provided in the present application can call the corresponding global scenario interface in accordance with the test sequence to preferentially execute the corresponding test case combination.
[0159] Based on the same inventive concept, the embodiment of the present application also provides a test case generation device based on process modeling analysis, which can be used to implement the method described in the above embodiment, as described in the following embodiment. Since the principle of solving the problem by the test case generation device based on process modeling analysis is similar to the test case generation method based on process modeling analysis, the implementation of the test case generation device based on process modeling analysis can refer to the implementation of the method based on software performance benchmark determination, and the repetitions will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0160] In one embodiment, see Figure 7 In order to build a usage frequency model of each scenario by analyzing the business architecture, thereby determining high-frequency scenarios and realizing automatic sorting and execution of business test cases, the present application provides a test case generation device based on process modeling analysis, including: a scenario parameter determination unit 701, a high-frequency scenario selection unit 702 and a case combination generation unit 703.
[0161] A scene parameter determination unit 701 is used to determine a global scene, a global scene interface and global parameters according to a preset business process;
[0162] A high frequency scene selection unit 702, configured to select a corresponding high frequency scene according to the global scene, the global scene interface and the global parameters;
[0163] The case combination generating unit 703 is used to generate a test case combination for the high-frequency scenario; wherein the test case combination includes a basic case combination and a cross case combination.
[0164] In one embodiment, see Figure 8 The scenario parameter determination unit 701 includes: a business activity determination module 801, a global scenario determination module 802 and a global interface parameter determination module 803.
[0165] The business activity determination module 801 is used to split the preset business process to obtain the business activities in the business process;
[0166] A global scenario determination module 802, configured to determine the global scenario according to the business activity;
[0167] The global interface parameter determination module 803 is used to analyze the business products and functions included in the global scenario and determine the corresponding global scenario interface and global parameters.
[0168] In one embodiment, see Fig. 9 The high-frequency scenario selection unit 702 includes: an account opening transaction determination module 901, a call frequency determination module 902 and a high-frequency scenario determination module 903.
[0169] An account opening and transaction determination module 901 is used to determine the number of accounts opened and the transaction volume of a product according to the global scenario, the global scenario interface and the global parameters;
[0170] A call frequency determination module 902, used to determine the call frequency of each global scenario interface according to the number of accounts opened and the transaction volume of the product;
[0171] The high frequency scene determination module 903 is used to determine the high frequency scene according to the calling frequency of each global scene interface.
[0172] In one embodiment, see Fig.10 The high-frequency scene selection unit 702 includes: a first basic parameter selection module 1001, a first derivative parameter determination module 1002 and a basic case combination generation module 1003.
[0173] A first basic parameter selection module 1001 is used to select a first basic parameter from the global parameters according to the calling frequency of each global scene interface;
[0174] A first derived parameter determination module 1002, configured to determine whether the first basic parameter has a first derived parameter;
[0175] The basic case combination generating module 1003 is used to generate the basic case combination according to the first basic parameter and the first derived parameter, if any; wherein the calling frequency corresponds to the number of the basic case combinations.
[0176] In one embodiment, see Fig.11 The case combination generating unit 703 includes: a seed case retaining module 1101, a second derivative parameter determining module 1102 and a cross-case combination generating module 1103.
[0177] A seed case retaining module 1101 is used to retain the cases that failed to be executed in the basic case combination to obtain seed cases;
[0178] A second derived parameter determination module 1102, configured to select a second basic parameter from the global parameter and determine a corresponding second derived parameter;
[0179] The cross-case combination generating module 1103 is used to generate the cross-case combination according to the seed case, the second basic parameter and the second derived parameter.
[0180] In one embodiment, see Fig.12 The test case generation device based on process modeling analysis also includes: a test sequence determination unit 1201 and a test case execution unit 1202.
[0181] A test sequence determining unit 1201 is used to determine the test sequence of the high-frequency scenarios according to the calling frequency of each global scenario interface;
[0182] The test case execution unit 1202 is used to call the corresponding global scenario interface to preferentially execute the corresponding test case combination according to the test sequence.
[0183] From the hardware level, in order to be able to build a usage frequency model of each scenario by analyzing the business architecture, thereby determining high-frequency scenarios and realizing automatic sorting and execution of business test cases, the present application provides an embodiment of an electronic device for implementing all or part of the contents of the test case generation method based on process modeling analysis, and the electronic device specifically includes the following contents:
[0184] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between the test case generation device based on process modeling analysis and related devices such as core business systems, user terminals and related databases; the logic controller can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the logic controller can be implemented with reference to the embodiment of the test case generation method based on process modeling analysis and the embodiment of the test case generation device based on process modeling analysis in the embodiment, and the contents thereof are incorporated herein, and the repeated parts are not repeated.
[0185] It is understandable that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Among them, the smart wearable device may include smart glasses, a smart watch, a smart bracelet, etc.
[0186] In practical applications, part of the test case generation method based on process modeling analysis can be executed on the electronic device side as described above, or all operations can be completed in the client device. The specific selection can be based on the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor.
[0187] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.
[0188] Fig.13 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Fig.13 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Fig.13 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0189] In one embodiment, the test case generation method function based on process modeling analysis can be integrated into the central processing unit 9100. The central processing unit 9100 can be configured to perform the following control:
[0190] S101: Determine a global scenario, a global scenario interface, and global parameters according to a preset business process;
[0191] S102: Selecting a corresponding high-frequency scene according to the global scene, the global scene interface and the global parameters;
[0192] S103: Generate a test case combination for the high-frequency scenario; wherein the test case combination includes a basic case combination and a cross-case combination.
[0193] From the above description, it can be seen that the test case generation method based on process modeling analysis provided by the present application can build a scenario parameter structure model according to the business scenario and process modeling, thereby building an iterative algorithm to lock high-frequency scenarios, find out key test parameter combinations, and finally update the test parameter combinations through the result feedback mechanism. In this way, high-frequency scenarios can be changed according to scenario changes, and a preset number of high-quality test case combinations can be generated. Combined with the automated testing process, automatic updating of test cases can be realized.
[0194] In another embodiment, the test case generation device based on process modeling and analysis can be configured separately from the central processing unit 9100. For example, the test case generation device based on process modeling and analysis of the data composite transmission device can be configured as a chip connected to the central processing unit 9100, and the function of the test case generation method based on process modeling and analysis can be realized through the control of the central processing unit.
[0195] like Fig.13 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Fig.13 In addition, the electronic device 9600 may also include Fig.13 For components not shown, reference may be made to the prior art.
[0196] like Fig.13 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.
[0197] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.
[0198] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.
[0199] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.
[0200] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0201] The communication module 9110 is a transmitter / receiver 9110 that sends and receives signals via an antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0202] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.
[0203] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps in the test case generation method based on process modeling analysis in the above embodiment, where the execution subject is a server or a client. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, all the steps in the test case generation method based on process modeling analysis in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0204] S101: Determine a global scenario, a global scenario interface, and global parameters according to a preset business process;
[0205] S102: Selecting a corresponding high-frequency scene according to the global scene, the global scene interface and the global parameters;
[0206] S103: Generate a test case combination for the high-frequency scenario; wherein the test case combination includes a basic case combination and a cross-case combination.
[0207] From the above description, it can be seen that the test case generation method based on process modeling analysis provided by the present application can build a scenario parameter structure model according to the business scenario and process modeling, thereby building an iterative algorithm to lock high-frequency scenarios, find out key test parameter combinations, and finally update the test parameter combinations through the result feedback mechanism. In this way, high-frequency scenarios can be changed according to scenario changes, and a preset number of high-quality test case combinations can be generated. Combined with the automated testing process, automatic updating of test cases can be realized.
[0208] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0209] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0210] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0211] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0212] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A test case generation method based on process modeling analysis, characterized in that: include: Determine the global scenario, global scenario interface and global parameters according to the preset business process; Selecting a corresponding high-frequency scene according to the global scene, the global scene interface and the global parameters; Generate a test case combination for the high-frequency scenario; wherein the test case combination includes a basic case combination and a cross-case combination.
2. The test case generation method based on process modeling analysis according to claim 1 is characterized in that: Determining the global scenario, the global scenario interface and the global parameters according to the preset business process includes: Splitting the preset business process to obtain the business activities in the business process; Determining the global scenario according to the business activity; Analyze the business products and functions included in the global scenario, and determine the corresponding global scenario interface and global parameters.
3. The test case generation method based on process modeling analysis according to claim 1 is characterized in that: The selecting a corresponding high-frequency scene according to the global scene, the global scene interface and the global parameters includes: Determine the number of accounts opened and the transaction volume of the product according to the global scenario, the global scenario interface and the global parameters; Determine the calling frequency of each global scenario interface according to the number of accounts opened and the transaction volume of the product; The high-frequency scenario is determined according to the calling frequency of each global scenario interface.
4. The test case generation method based on process modeling analysis according to claim 3 is characterized in that: The generating a test case combination for the high-frequency scenario includes: Selecting a first basic parameter from the global parameters according to the calling frequency of each global scene interface; determining whether the first basic parameter has a first derived parameter; If yes, the basic case combination is generated according to the first basic parameter and the first derived parameter; wherein the calling frequency corresponds to the number of the basic case combinations.
5. The test case generation method based on process modeling analysis according to claim 3 is characterized in that: The generating a test case combination for the high-frequency scenario includes: The cases that failed to be executed in the basic case combination are retained to obtain seed cases; Selecting a second basic parameter from the global parameters and determining a corresponding second derived parameter; The cross-case combination is generated according to the seed case, the second basic parameter and the second derived parameter.
6. The test case generation method based on process modeling analysis according to claim 1 is characterized in that: Also includes: Determine the test order of the high-frequency scenarios according to the calling frequency of each global scenario interface; According to the test sequence, the corresponding global scenario interface is called to preferentially execute the corresponding test case combination.
7. The test case generation method based on process modeling analysis according to claim 5 is characterized in that: The generating the cross case combination according to the seed case, the second basic parameter and the second derived parameter comprises: Determining a first proportion of the seed case in the base case combination; Determining a second ratio of test case combinations to be generated according to the first ratio; The cross-case combination is generated according to the second ratio, the second basic parameter and the second derived parameter.
8. A test case generation device based on process modeling analysis, characterized in that: include: A scene parameter determination unit, used to determine a global scene, a global scene interface and global parameters according to a preset business process; A high-frequency scene selection unit, used to select a corresponding high-frequency scene according to the global scene, the global scene interface and the global parameters; A case combination generating unit is used to generate a test case combination for the high-frequency scenario; wherein the test case combination includes a basic case combination and a cross case combination.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the test case generation method based on process modeling analysis described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the test case generation method based on process modeling analysis described in any one of claims 1 to 7 are implemented.