Automatic testing method and device for batch processing system and electronic equipment
By analyzing the data processing links of the batch processing system and generating test cases with the fuzz testing algorithm, the high cost and low coverage problems caused by manual writing of traditional tests are solved, automated testing and high coverage are achieved, and the risk of defect escape is reduced.
Patent Information
- Application Number
- CN202410959501.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-09-20
AI Technical Summary
Traditional batch system testing requires manual writing and execution of test cases, which results in high labor costs and narrow coverage, and is prone to unexpected defect escape problems.
By analyzing the data processing links of the batch processing system, a multi-dimensional impact analysis data set is generated, and the fuzzy testing algorithm is used to automatically generate test cases to achieve automatic testing, reduce labor costs and improve test coverage.
Automated testing is realized, labor costs are saved, test coverage is improved, a large number of unknown defects can be discovered during the testing process, and the risk of defect escape is reduced.
Smart Images

Figure CN118672928A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to an automatic testing method, device and electronic equipment for a batch processing system. Background Art
[0002] Batch processing systems exist in the technical systems of most financial institutions and are generally used to perform system status changes, online business data processing, data extraction and input, and report generation at specified times (such as the beginning, middle, and end of a working day).
[0003] In the process of batch system testing, analysis and testing are generally carried out from the business function, non-functional level and technical logic branch. The business function level mainly focuses on whether the final processing result of the front end meets the expectations after the batch execution is completed. The non-functional level focuses on the statement execution efficiency and the performance of the business system. The technical logic branch level conducts coverage testing on the branches of batch key processes.
[0004] Traditional batch system testing and analysis requires manual writing of test cases, manual execution of batch tests, and monitoring of execution progress. The labor cost is high, and the business systems associated with batches are usually complex. Service decoupling leads to increasingly complex call links. Manually written test cases usually have a narrow coverage, which may cause unforeseen defects to escape. Summary of the invention
[0005] The present invention provides a batch processing system automatic testing method, device and electronic device, which are used to solve the problems of high labor cost caused by manually writing test cases and executing and monitoring tests and defect escape caused by narrow test case coverage in the prior art, realize automatic generation of test cases and automatic testing of batch processing systems, reduce labor costs and generate test cases with high coverage, which can reduce the problem of defect escape.
[0006] The present invention provides a batch processing system automatic testing method, comprising the following steps.
[0007] Determine at least one test level corresponding to the batch processing system based on the test target in the test task, wherein the test level indicates that the test task is targeted at a business market level, a business branch level, or a business node level in the batch processing system; For each test level, by analyzing the data processing link of the batch processing system, a multidimensional impact analysis data set of the test target corresponding to the test level is determined, wherein the multidimensional impact analysis data set represents the processing characteristics of the test target in the data processing link; Based on the multi-dimensional impact analysis data set of each of the test targets, a plurality of test cases corresponding to each of the test targets are generated respectively by a fuzzy testing algorithm; Based on the multi-dimensional impact analysis data set of each test target and the test cases corresponding to each test target, each test target is tested to obtain a test result.
[0008] According to an automatic testing method for a batch processing system provided by the present invention, for each test level, by analyzing the data processing link of the batch processing system, a multi-dimensional impact analysis data set of the test target corresponding to the test level is determined, including: For each test level, analyzing the data processing link of the batch processing system, determining the influence and business processing information of the test target corresponding to the test level in the data processing link, wherein the influence represents the correlation between the test target and other test targets or non-test targets; A multidimensional impact analysis data set of the test target is determined based on the impact and business processing information corresponding to the test target, and the multidimensional impact analysis data set includes whether the test target supports repeated business processing, the single business execution duration of the test target, the input data set type of the test target, the expected output result of the test target, the business processing type of the test target and the directly associated targets of the test target.
[0009] According to an automatic testing method for a batch processing system provided by the present invention, the multi-dimensional impact analysis data set based on each of the test targets is used to generate multiple test cases corresponding to each of the test targets through a fuzzy testing algorithm, including: For each of the test targets, generating a test case generation rule corresponding to the test target based on the multi-dimensional impact analysis data set of the test target; Based on the test case generation rule, multiple test cases corresponding to the test target are generated through the fuzzy testing algorithm.
[0010] According to a batch processing system automatic testing method provided by the present invention, the method generates a plurality of test cases corresponding to the test target by using the fuzzy testing algorithm based on the test case generation rule, including: Inputting the test case generation rule into a target test algorithm to obtain initial test cases generated by the target test algorithm based on a preset generation target, wherein the preset generation target represents the number of initial test cases expected to be generated; The initial test cases are screened and sorted by level based on a preset sorting rule to determine a plurality of test cases with level information corresponding to the test target.
[0011] According to an automatic testing method for a batch processing system provided by the present invention, the multidimensional impact analysis data set of each test target and the test cases corresponding to each test target are used to test each test target to obtain a test result, including: Based on the multidimensional impact analysis data sets corresponding to the test targets, determine the test timing relationship of the test targets, whether the test targets support repeated business processing, and the single business execution duration corresponding to the test targets; For each test target that supports repetitive business processing, based on the test timing relationship, the test cases corresponding to the test target that supports repetitive business processing and the duration of a single business execution, the test target that supports repetitive business processing is tested to obtain test results, which include one or more of output result error, business execution timeout and business execution error.
[0012] According to the present invention, a batch processing system automatic testing method further includes: Obtain the test results corresponding to each of the test targets, perform statistics on the test results of each of the test targets, and obtain a test result summary table corresponding to the current test batch; Visually display the test result summary table and / or generate a download address for the test result summary table.
[0013] According to the present invention, a batch processing system automatic testing method further includes: For a test target with a business execution error in the test result, a test execution log corresponding to the test target is extracted, and the test execution log is analyzed to determine the error cause corresponding to the business execution error in the test result corresponding to the test target.
[0014] The present invention also provides an automatic testing device for a batch processing system, comprising the following modules: a determination module, an impact analysis module, a case generation module and a testing module.
[0015] A determination module, configured to determine at least one test level corresponding to the batch processing system based on the test target in the test task, wherein the test level indicates that the test task is targeted at a business market level, a business branch level, or a business node level in the batch processing system; An impact analysis module, for each test level, analyzing the data processing link of the batch processing system to determine a multidimensional impact analysis data set of the test target corresponding to the test level, wherein the multidimensional impact analysis data set represents the processing characteristics of the test target in the data processing link; A case generation module, for generating a plurality of test cases corresponding to each of the test targets respectively through a fuzzy testing algorithm based on a multi-dimensional impact analysis data set of each of the test targets; The test module is used to test each of the test targets based on the multi-dimensional impact analysis data set of each of the test targets and the test cases corresponding to each of the test targets to obtain the test results.
[0016] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned batch processing system automatic testing methods is implemented.
[0017] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the automatic testing method for a batch processing system as described in any one of the above is implemented.
[0018] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the automatic testing method for a batch processing system as described above is implemented.
[0019] The automatic testing method, device and electronic device for a batch processing system provided by the present invention analyze the data processing link of the batch processing system to determine the multi-dimensional impact analysis data of the test targets corresponding to each test level, and then generate test cases for each test target through a fuzzy testing algorithm based on the multi-dimensional impact analysis data of each test target, and then perform automatic batch business tests on each test target based on the multi-dimensional impact analysis data set of each test target and the test cases corresponding to each test target. This method does not require manual generation of test cases, manual execution of the test process and monitoring of the test process, saving labor costs, and a large number of test cases can be generated through a fuzzy testing algorithm based on the multi-dimensional impact analysis data set. The large number of test cases generated by this method can improve the coverage of positive and negative examples, and can thus dig out a large number of unforeseen defects during the test process, reducing the risk of defect escape. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are 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.
[0021] Figure 1 It is a flow chart of an automatic testing method for a batch processing system provided by an embodiment of the present invention.
[0022] Figure 2 It is a structural schematic diagram of an automatic testing device for a batch processing system provided in an embodiment of the present invention.
[0023] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] In order to facilitate a clearer understanding of the embodiments of the present invention, some relevant technical knowledge is first introduced as follows.
[0026] Batch processing systems exist in the technical systems of most financial institutions and are generally used to perform system status changes, online business data processing, data extraction and input, and report generation at specified times (such as the beginning, middle, and end of a working day).
[0027] The batch processing characteristics of the batch processing system include the following aspects: First, scheduled execution, for example, report batches are generally executed at the end of the day or even at night; second, the completion time of batch execution is uncertain, and the batch execution time will depend on the performance of the batch execution server and business system database, the data volume of the related system, the execution efficiency of the batch job statements, the complexity of the batch job-related system, etc., which may be as fast as a few minutes or as slow as a few hours; third, batch execution is inflexible, and some batch jobs have a wide impact range. If the execution fails, it is necessary to troubleshoot the problem the next day and wait for regeneration for batch processing; fourth, the logic is complex, and batch design and execution concerns involve multiple disciplines, from the business system call relationship at the architectural level, batch execution system design, to database performance and execution efficiency, underlying operating system, server storage and other aspects.
[0028] Based on the processing characteristics of the above batch system, it is very necessary to test the batch processing system before using batch data for batch processing to fully understand its defects. Traditional batch system test analysis requires manual writing of test cases and manual execution of batch tests and monitoring of execution progress, which has high labor costs. In addition, the business systems associated with batches are usually complex, and service decoupling leads to increasingly complex call links. Manually written test cases usually have a narrow coverage, which may cause unforeseen defects to escape.
[0029] In view of the problems in the prior art, the embodiments of the present invention provide a method for automatically testing a batch processing system. The execution subject of each embodiment of the present invention can be a processor, a server, etc., or an electronic device that integrates the functions of a processor or a server, such as a terminal device, a client, etc. In the following embodiments, the execution subject is taken as an example to introduce. Figure 1 The automatic testing method of a batch processing system of the present invention is described.
[0030] Figure 1 FIG. 1 is a flow chart of an automatic testing method for a batch processing system provided by an embodiment of the present invention. Figure 1 As shown in , the batch processing system automatic testing method includes the following steps 101 to 104.
[0031] Step 101: Determine at least one test level corresponding to a batch processing system based on a test target in a test task, wherein the test level indicates that the test task targets a business market level, a business branch level, or a business node level in the batch processing system.
[0032] Specifically, when the batch test system needs to be tested, the tester can enter the test instruction on the client, and the client can obtain the test task of the batch processing system by parsing the test instruction. It can be understood that the batch test system can include multiple business markets, each business market can include multiple business branches, and each business branch can include multiple business nodes.
[0033] Exemplarily, when the test task is to test business market A in the batch processing system, where business market A is the test target in the test task, the batch processing system corresponds to one test level, namely the business market level. When the test task is to test business market A, business branch 1 and business branch 2 in business market B, and business node a in business branch 3 in business market C in the batch processing system, where business market A, business branch 1 and business branch 2 in business market B, and business node a in business branch 3 in business market C are all test targets in the test task. At this time, the batch processing system corresponds to three test levels, namely the business market level, the business branch level, and the business node level.
[0034] Step 102: For each test level, by analyzing the data processing link of the batch processing system, a multidimensional impact analysis data set of the test target corresponding to the test level is determined, and the multidimensional impact analysis data set characterizes the processing characteristics of the test target in the data processing link.
[0035] Specifically, the batch processing system can perform a variety of data processing. By analyzing the data processing link of the batch processing system, a multi-dimensional impact analysis data set of each test target in the batch processing system at each test level can be obtained.
[0036] In one embodiment, for each test level, determining the multi-dimensional impact analysis data set of the test target corresponding to the test level by analyzing the data processing link of the batch processing system includes: For each test level, analyzing the data processing link of the batch processing system, determining the influence and business processing information of the test target corresponding to the test level in the data processing link, wherein the influence represents the correlation between the test target and other test targets or non-test targets; A multidimensional impact analysis data set of the test target is determined based on the impact and business processing information corresponding to the test target, and the multidimensional impact analysis data set includes whether the test target supports repeated business processing, the single business execution duration of the test target, the input data set type of the test target, the expected output result of the test target, the business processing type of the test target and the directly associated targets of the test target.
[0037] Specifically, for each test level, the data processing link of the batch processing system is analyzed to determine the influence and business processing information of the test target corresponding to the test level in the data processing link. Influence refers to the correlation between the test target and other test targets or non-test targets. For example, for test target A, the batch business execution of test target B must be completed before test target A can execute batch business, and the batch business execution of test target A must be completed before test target C can execute batch business, and the data set input of test target C is the data set output of test target A, which means that test target A is associated with test target B and test target C respectively. Business processing information refers to the information related to the test target and batch business processing, such as input data set type, expected output result and business processing type.
[0038] After analyzing the data processing link of the batch processing system and determining the influence and business processing information of the test target corresponding to the test level in the data processing link, a multi-dimensional influence analysis data set for each test target can be generated based on the influence and business processing information corresponding to each test target. The multi-dimensional influence analysis data set may include whether the test target supports repeated business processing, the single business execution time of the test target, the input data set type of the test target, the expected output result of the test target, the business processing type of the test target, and the directly associated target of the test target. Whether the test target supports repeated business processing refers to whether the test target can perform repetitive batch business processing, the single business execution time refers to the reasonable time used by the test target to perform a batch business processing, and the business processing type refers to which type of system state adjustment type, data extraction processing type, and file collection and reading processing type the test target performs.
[0039] It is understandable that after obtaining the multidimensional impact analysis data set of each test target, the multidimensional impact analysis data set of each test target can be stored separately as needed, that is, one multidimensional impact analysis data set is stored as one data file; or all multidimensional impact analysis data sets can be stored together as one data file. When stored separately, each data file has different identification information to distinguish which test target the data file is for, and when stored together, each multidimensional impact analysis data file has different identification information.
[0040] Exemplarily, the following is the structure of a multi-dimensional impact analysis data set of a test target when the test target is a business market, a business branch, or a business node: Business market: business market associated with the current business market, whether the business market supports repeated business processing, the execution time of a single business in the business market, the input data set type of the business market, the expected output result of the business market, and the business processing type of the business market.
[0041] Business branch: business branches associated with the current business branch, whether the business branch supports repeated business processing, the single business execution time of the business branch, the input data set type of the business branch, the expected output result of the business branch, and the business processing type of the business branch.
[0042] Business node: the business node associated with the current business node, whether the business node supports repeated business processing, the single business execution duration of the business node, the input data set type of the business node, the expected output result of the business node and the business processing type of the business node.
[0043] Step 103: Based on the multi-dimensional impact analysis data set of each test target, a plurality of test cases corresponding to each test target are generated respectively through a fuzzy testing algorithm.
[0044] In one embodiment, the multi-dimensional impact analysis data set based on each of the test targets generates a plurality of test cases corresponding to each of the test targets through a fuzzy testing algorithm, including: For each of the test targets, generating a test case generation rule corresponding to the test target based on the multi-dimensional impact analysis data set of the test target; Based on the test case generation rule, multiple test cases corresponding to the test target are generated through the fuzzy testing algorithm.
[0045] Specifically, since the multidimensional impact analysis data set of the test target may include the impact and business processing information of the test target in the data processing link, test case generation rules for each test target can be generated based on the multidimensional impact analysis data set of each target.
[0046] Exemplarily, the multi-dimensional impact analysis data set of test target A may include, for example, whether test target A supports repeated business processing, the single business execution time of test target A, the input data set type of test target A, the expected output result of test target A, the business processing type of test target A, and the directly associated target of test target A. The test case generation rule may be determined based on each piece of information in the multi-dimensional impact analysis data set and the importance of each piece of information. The specific determination method may be set according to business needs, and this embodiment does not make any specific limitation here.
[0047] Based on the test case generation rules corresponding to the test target, the test case generation rules are automatically input into the fuzzy testing algorithm, and the fuzzy testing algorithm can be mutated to generate multiple test cases corresponding to the test target. It is understandable that the number of test cases that the fuzzy testing algorithm can generate for a test target can be pre-configured by the tester, and the specific number can be set as needed, and the embodiment of the present application does not make specific limitations here.
[0048] In one embodiment, the generating a plurality of test cases corresponding to the test target by the fuzzy testing algorithm based on the test case generation rule includes: Inputting the test case generation rule into the fuzzy testing algorithm to obtain initial test cases generated by the fuzzy testing algorithm based on a preset generation target, wherein the preset generation target represents the number of initial test cases expected to be generated; The initial test cases are screened and sorted by level based on a preset sorting rule to determine a plurality of test cases with level information corresponding to the test target.
[0049] Specifically, when generating test cases for the test target, the test case generation rules corresponding to the test target are input into the fuzzy testing algorithm, and the fuzzy testing algorithm generates initial test cases based on the preset generation target mutation. The preset generation target refers to the number of initial test cases expected to be generated. The preset generation target can be set in advance by the tester according to the needs, and the embodiments of the present application are not specifically limited here.
[0050] The preset sorting rules can be set according to business needs. When setting the preset sorting rules, one or more of the following factors can be considered: whether it is a test case corresponding to a changed test target, whether the test case will have an impact on the performance, availability and response time of the batch processing system, whether the test target corresponding to the test case is a key, core function or process key point, whether the test case is a common situation for customers, whether the test case has risks such as security, compatibility and complex calculations, and the complexity of the test process data processing of the test case. Based on the above sorting factors, the preset sorting rules can be, for example: the first priority level is the test case corresponding to the changed test target, the second priority level is the test case corresponding to the key and core functions, the third priority level is the test case corresponding to the common situation of users, the fourth priority level is the test case with risk, and the fifth priority level is the test case with more complex data processing. It can be understood that after determining multiple test cases with level information, and in the case of limited test resources, the test cases with higher priority levels can be selected for testing.
[0051] Optionally, the fuzz testing algorithm can be, for example, one or more of a random fuzz testing algorithm, a boundary value fuzz testing algorithm, a protocol fuzz testing algorithm, a file format fuzz testing algorithm, or a symbolic execution fuzz testing algorithm. The specific process is to generate test cases based on the test case generation rules by randomly mutating the input data, inject the mutated input data into the batch processing system being tested, and observe the reaction and output results of the batch processing system. The fuzz testing algorithm mainly uses a mutation function to convert a set of valid program inputs into new "child" inputs. The mutation function is used to perform operations such as flipping random bytes in the input, inserting special characters, or deleting part of the input. Therefore, the generated child input is similar to but different from its parent input. If the child input increases code coverage by affecting previously unexplored code paths, it is added to the valid input queue and the process is repeated.
[0052] It is understandable that there may be test cases that do not meet the requirements among the multiple initial test cases obtained based on the fuzzy testing algorithm, so it is necessary to screen the initial test cases and then determine the available test cases from the initial test cases.
[0053] Step 104: Based on the multi-dimensional impact analysis data set of each test target and the test cases corresponding to each test target, each test target is tested to obtain a test result.
[0054] In one embodiment, the testing of each test target based on the multidimensional impact analysis data set of each test target and the test cases corresponding to each test target to obtain the test results includes: Based on the multidimensional impact analysis data sets corresponding to the test targets, determine the test timing relationship of the test targets, whether the test targets support repeated business processing, and the single business execution duration corresponding to the test targets; For each test target that supports repetitive business processing, based on the test timing relationship, the test cases corresponding to the test target that supports repetitive business processing and the duration of a single business execution, the test target that supports repetitive business processing is tested to obtain test results, which include one or more of output result error, business execution timeout and business execution error.
[0055] Specifically, the test timing relationship of each test target, whether each test target supports repeated business processing, and the single business execution duration corresponding to each test target can be determined according to the multi-dimensional impact analysis data set corresponding to each test target.
[0056] It is understandable that when testing each test target, each test target needs to be tested according to the test timing relationship. There are some test targets in the test targets that do not support repeated business processing. Based on these test targets, it is impossible to use multiple test cases for testing, so no testing is performed. For test targets that support repeated business processing, multiple test cases corresponding to the test target are sequentially input into the test target for testing, and the test results corresponding to each test case can be obtained. The test results include one or more of output result error, business execution timeout, and business execution error. Output result error means that the test output result does not meet the expected output result. Business execution timeout means that the single test duration of a single test case exceeds the single business execution duration. Business execution error refers to the error message that appears during the test process.
[0057] The automatic testing method for batch processing system provided by the present invention determines the multi-dimensional impact analysis data of the test targets corresponding to each test level by analyzing the data processing link of the batch processing system, and then generates multiple test cases for each test target through a fuzzy testing algorithm based on the multi-dimensional impact analysis data of each test target, and then performs automatic batch business testing on each test target based on the multi-dimensional impact analysis data set of each test target and the test cases corresponding to each test target. This method does not require manual generation of test cases, manual execution of the test process, and monitoring of the test process, saving labor costs, and a large number of test cases can be generated through a fuzzy testing algorithm based on the multi-dimensional impact analysis data set. The large number of test cases generated by this method can improve the coverage of positive and negative examples, and can thus dig out a large number of unforeseen defects during the test process, reducing the risk of defect escape.
[0058] In one embodiment, the batch processing system automatic testing method further includes: Obtain the test results corresponding to each of the test targets, perform statistics on the test results of each of the test targets, and obtain a test result summary table corresponding to the current test batch; Visually display the test result summary table and / or generate a download address for the test result summary table.
[0059] Specifically, after all test targets are tested, the test results of each test target can be counted to obtain a test result summary table corresponding to the current test batch. The test result summary table can be visualized for testers to determine test defects based on the test result summary table, which is convenient for subsequent improvement of test defects.
[0060] In one embodiment, the batch processing system automatic testing method further includes: For a test target with a business execution error in the test result, a test execution log corresponding to the test target is extracted, and the test execution log is analyzed to determine the error cause corresponding to the business execution error in the test result corresponding to the test target.
[0061] Specifically, after completing the testing of each test target, for the test target with business execution errors in the test results, the test execution log corresponding to the test target can be extracted, and then the error cause of the business execution error in the test results of the test target can be determined by analyzing the test execution log. The error cause can facilitate the testers to make subsequent corrections.
[0062] It is understandable that the batch jobs of the batch processing system mainly rely on external software and hardware and resources, involving batch operation frameworks, databases, file servers, and distributed messages. The possible abnormal situations include the following different situations: First, the batch operation framework initiates the stop of the job or throws an exception; second, there are many reasons for the abnormality at the database level, such as waiting for locks, network errors, submission failures, and primary key conflicts; when reading files from the file server, the exception of the file not existing may occur; the abnormal situation thrown by the distributed message includes connection exceptions, initialization connection pool verification failure, authentication failure, data format problems, etc. The above abnormal situations can be determined by analyzing the error information or error code in the test execution log. After determining the cause of the error, the tester can make corrections. For example, the abnormal situation of waiting for locks, network errors, and submission failures can be solved by waiting and retrying. The abnormal situation of the file not existing may be that the file has not arrived yet, which can be solved by extending the waiting time. The abnormal situation thrown by the distributed message can be solved by retrying after checking the network and environment configuration. For the abnormalities that are difficult to solve by the above methods, it is necessary to further investigate the program errors of the batch processing system for rectification and solution.
[0063] The automatic testing device for a batch processing system provided by the present invention is described below. The automatic testing device for a batch processing system described below and the automatic testing method for a batch processing system described above can be referred to each other.
[0064] Figure 2 is a schematic diagram of the structure of an automatic testing device for a batch processing system provided by an embodiment of the present invention. Figure 2 As shown in, the batch processing system automatic testing device comprises: A determination module 201 is used to determine at least one test level corresponding to the batch processing system based on the test target in the test task, wherein the test level indicates that the test task is targeted at a business market level, a business branch level or a business node level in the batch processing system; The impact analysis module 202 is used to determine, for each test level, a multi-dimensional impact analysis data set of the test target corresponding to the test level by analyzing the data processing link of the batch processing system, wherein the multi-dimensional impact analysis data set represents the processing characteristics of the test target in the data processing link; A case generation module 203 is used to generate a plurality of test cases corresponding to each of the test targets respectively through a fuzzy testing algorithm based on a multi-dimensional impact analysis data set of each of the test targets; The testing module 204 is used to test each of the test targets based on the multi-dimensional impact analysis data set of each of the test targets and the test cases corresponding to each of the test targets to obtain the test results.
[0065] The automatic testing device for batch processing system provided by the present invention analyzes the data processing link of the batch processing system, determines the multi-dimensional impact analysis data of the test targets corresponding to each test level, and then generates test cases for each test target through a fuzzy testing algorithm based on the multi-dimensional impact analysis data of each test target, and then performs automatic batch business testing on each test target based on the multi-dimensional impact analysis data set of each test target and the test cases corresponding to each test target. This method does not require manual generation of test cases, manual execution of the test process, and monitoring of the test process, saving labor costs, and a large number of test cases can be generated through a fuzzy testing algorithm based on the multi-dimensional impact analysis data set. The large number of test cases generated by this method can improve the coverage of positive and negative examples, and can thus dig out a large number of unforeseen defects during the test process, reducing the risk of defect escape.
[0066] In one embodiment, the impact analysis module 202 is specifically used to: For each test level, analyzing the data processing link of the batch processing system, determining the influence and business processing information of the test target corresponding to the test level in the data processing link, wherein the influence represents the correlation between the test target and other test targets or non-test targets; A multidimensional impact analysis data set of the test target is determined based on the impact and business processing information corresponding to the test target, and the multidimensional impact analysis data set includes whether the test target supports repeated business processing, the single business execution duration of the test target, the input data set type of the test target, the expected output result of the test target, the business processing type of the test target and the directly associated targets of the test target.
[0067] In one embodiment, the use case generation module 203 is specifically used to: For each of the test targets, generating a test case generation rule corresponding to the test target based on the multi-dimensional impact analysis data set of the test target; Based on the test case generation rule, multiple test cases corresponding to the test target are generated through the fuzzy testing algorithm.
[0068] In one embodiment, the use case generation module 203 is further configured to: Inputting the test case generation rule into a target test algorithm to obtain initial test cases generated by the target test algorithm based on a preset generation target, wherein the preset generation target represents the number of initial test cases expected to be generated; The initial test cases are screened to determine the test cases corresponding to the test targets.
[0069] In one embodiment, the testing module 204 is specifically used for: Based on the multidimensional impact analysis data sets corresponding to the test targets, determine the test timing relationship of the test targets, whether the test targets support repeated business processing, and the single business execution duration corresponding to the test targets; For each test target that supports repetitive business processing, based on the test timing relationship, the test cases corresponding to the test target that supports repetitive business processing and the duration of a single business execution, the test target that supports repetitive business processing is tested to obtain test results, which include one or more of output result error, business execution timeout and business execution error.
[0070] In one embodiment, the batch processing system automatic testing device further comprises: A summary display module is used to obtain the test results corresponding to each of the test targets, collect statistics on the test results of each of the test targets, and obtain a summary table of test results corresponding to the current test batch; Visually display the test result summary table and / or generate a download address for the test result summary table.
[0071] In one embodiment, the batch processing system automatic testing device further comprises: The analysis module is used to extract the test execution log corresponding to the test target with business execution errors in the test results, analyze the test execution log, and determine the error cause corresponding to the business execution error in the test results corresponding to the test target.
[0072] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communications interface 320 and the memory 330 communicate with each other via the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the batch processing system automatic testing method, which includes: Determine at least one test level corresponding to the batch processing system based on the test target in the test task, wherein the test level indicates that the test task is targeted at a business market level, a business branch level, or a business node level in the batch processing system; For each test level, by analyzing the data processing link of the batch processing system, a multidimensional impact analysis data set of the test target corresponding to the test level is determined, wherein the multidimensional impact analysis data set represents the processing characteristics of the test target in the data processing link; Based on the multi-dimensional impact analysis data set of each of the test targets, a plurality of test cases corresponding to each of the test targets are generated respectively by a fuzzy testing algorithm; Based on the multi-dimensional impact analysis data set of each test target and the test cases corresponding to each test target, each test target is tested to obtain a test result.
[0073] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0074] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the batch processing system automatic testing method provided by the above methods, the method comprising: Determine at least one test level corresponding to the batch processing system based on the test target in the test task, wherein the test level indicates that the test task is targeted at a business market level, a business branch level, or a business node level in the batch processing system; For each test level, by analyzing the data processing link of the batch processing system, a multidimensional impact analysis data set of the test target corresponding to the test level is determined, wherein the multidimensional impact analysis data set represents the processing characteristics of the test target in the data processing link; Based on the multi-dimensional impact analysis data set of each of the test targets, a plurality of test cases corresponding to each of the test targets are generated respectively by a fuzzy testing algorithm; Based on the multi-dimensional impact analysis data set of each test target and the test cases corresponding to each test target, each test target is tested to obtain a test result.
[0075] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the batch processing system automatic testing method provided by the above methods, the method comprising: Determine at least one test level corresponding to the batch processing system based on the test target in the test task, wherein the test level indicates that the test task is targeted at a business market level, a business branch level, or a business node level in the batch processing system; For each test level, by analyzing the data processing link of the batch processing system, a multidimensional impact analysis data set of the test target corresponding to the test level is determined, wherein the multidimensional impact analysis data set represents the processing characteristics of the test target in the data processing link; Based on the multi-dimensional impact analysis data set of each of the test targets, a plurality of test cases corresponding to each of the test targets are generated respectively by a fuzzy testing algorithm; Based on the multi-dimensional impact analysis data set of each test target and the test cases corresponding to each test target, each test target is tested to obtain a test result.
[0076] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A batch processing system automatic testing method, It is characterized in that include: Determine at least one test level corresponding to the batch processing system based on the test target in the test task, wherein the test level indicates that the test task is targeted at a business market level, a business branch level, or a business node level in the batch processing system; For each test level, by analyzing the data processing link of the batch processing system, a multidimensional impact analysis data set of the test target corresponding to the test level is determined, wherein the multidimensional impact analysis data set represents the processing characteristics of the test target in the data processing link; Based on the multi-dimensional impact analysis data set of each of the test targets, a plurality of test cases corresponding to each of the test targets are generated respectively by a fuzzy testing algorithm; Based on the multi-dimensional impact analysis data set of each test target and the test cases corresponding to each test target, each test target is tested to obtain a test result.
2. The automatic testing method for batch processing system according to claim 1, It is characterized in that For each test level, by analyzing the data processing link of the batch processing system, determining a multi-dimensional impact analysis data set of the test target corresponding to the test level, includes: For each test level, analyzing the data processing link of the batch processing system, determining the influence and business processing information of the test target corresponding to the test level in the data processing link, wherein the influence represents the correlation between the test target and other test targets or non-test targets; A multidimensional impact analysis data set of the test target is determined based on the impact and business processing information corresponding to the test target, and the multidimensional impact analysis data set includes whether the test target supports repeated business processing, the single business execution duration of the test target, the input data set type of the test target, the expected output result of the test target, the business processing type of the test target and the directly associated targets of the test target.
3. The automatic testing method for batch processing system according to claim 1, It is characterized in that The multi-dimensional impact analysis data set based on each of the test targets generates a plurality of test cases corresponding to each of the test targets through a fuzzy testing algorithm, including: For each of the test targets, generating a test case generation rule corresponding to the test target based on the multi-dimensional impact analysis data set of the test target; Based on the test case generation rule, multiple test cases corresponding to the test target are generated through the fuzzy testing algorithm.
4. The automatic testing method for batch processing system according to claim 3, It is characterized in that The step of generating a plurality of test cases corresponding to the test target by using the fuzzy testing algorithm based on the test case generation rule includes: Inputting the test case generation rule into a target test algorithm to obtain initial test cases generated by the target test algorithm based on a preset generation target, wherein the preset generation target represents the number of initial test cases expected to be generated; The initial test cases are screened and sorted by level based on a preset sorting rule to determine a plurality of test cases with level information corresponding to the test target.
5. The automatic testing method for batch processing system according to claim 1, It is characterized in that The step of testing each test target based on the multidimensional impact analysis data set of each test target and the test cases corresponding to each test target to obtain the test results includes: Based on the multidimensional impact analysis data sets corresponding to the test targets, determine the test timing relationship of the test targets, whether the test targets support repeated business processing, and the single business execution duration corresponding to the test targets; For each test target that supports repetitive business processing, based on the test timing relationship, the test cases corresponding to the test target that supports repetitive business processing and the duration of a single business execution, the test target that supports repetitive business processing is tested to obtain test results, which include one or more of output result error, business execution timeout and business execution error.
6. The automatic testing method for a batch processing system according to any one of claims 1 to 5, It is characterized in that Also includes: Obtain the test results corresponding to each of the test targets, perform statistics on the test results of each of the test targets, and obtain a test result summary table corresponding to the current test batch; Visually display the test result summary table and / or generate a download address for the test result summary table.
7. The automatic testing method for a batch processing system according to any one of claims 1 to 5, It is characterized in that Also includes: For a test target with a business execution error in the test result, a test execution log corresponding to the test target is extracted, and the test execution log is analyzed to determine the error cause corresponding to the business execution error in the test result corresponding to the test target.
8. An automatic testing device for batch processing system, It is characterized in that include: A determination module, configured to determine at least one test level corresponding to the batch processing system based on the test target in the test task, wherein the test level indicates that the test task is targeted at a business market level, a business branch level, or a business node level in the batch processing system; An impact analysis module, for each test level, analyzing the data processing link of the batch processing system to determine a multidimensional impact analysis data set of the test target corresponding to the test level, wherein the multidimensional impact analysis data set represents the processing characteristics of the test target in the data processing link; A case generation module, for generating a plurality of test cases corresponding to each of the test targets respectively through a fuzzy testing algorithm based on a multi-dimensional impact analysis data set of each of the test targets; The test module is used to test each of the test targets based on the multi-dimensional impact analysis data set of each of the test targets and the test cases corresponding to each of the test targets to obtain the test results.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the automatic testing method for a batch processing system as claimed in any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the automatic testing method for a batch processing system as claimed in any one of claims 1 to 7 is implemented.
