Method and device for constructing chaos test fault case library
By building and managing a chaos test failure case library, the problem of low efficiency of traditional chaos tests is solved, flexible reuse and efficient management of test assets are realized, and the efficiency of chaos test implementation is improved.
Patent Information
- Application Number
- CN202411678995.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The traditional chaos testing method is inefficient and requires a lot of time and resources to perform system analysis, fault scenario design, fault design and fault injection implementation.
By building a chaos test failure case library, including system technology library, system business library, fault scenario library, fault means library and implementation record library, these asset libraries are updated and managed in real time, so as to flexibly reuse assets during each chaos test and improve testing efficiency.
It realizes the effective organization and management of assets throughout the chaos testing process, improves testing efficiency, and reduces labor costs and repeated energy consumption.
Smart Images

Figure CN119512962A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chaos testing technology, and in particular to a method and device for constructing a chaos testing fault case library. Background Art
[0002] In today's digital world, software systems are becoming increasingly complex and critical. Maintaining high availability and stability is particularly important for large-scale software systems and cloud infrastructure. However, traditional testing methods and operation and maintenance methods often cannot fully simulate complex scenarios and potential failures in real environments.
[0003] Chaos engineering, as an emerging method and concept, aims to test and evaluate the robustness and reliability of the system by actively introducing various failures, anomalies and uncertainties. Its concept originates from complex system science and chaos theory, and aims to discover and solve potential problems in the system and improve the resilience of the system by simulating a chaotic environment. The basic principle of chaos engineering is to observe the behavior and response of the system in an unstable and abnormal environment by intentionally creating and introducing various anomalies and failures. This method can help developers better understand the weaknesses, bottlenecks and potential failure points of the system, so as to take corresponding measures to improve the design and performance of the system.
[0004] Chaos engineering has a wide range of applications in software development and system operation and maintenance. It can help development teams discover and fix vulnerabilities and faults in software at an early stage, improving system stability and maintainability. For cloud infrastructure and distributed systems, chaos engineering can simulate network failures, resource bottlenecks, and other situations to evaluate the system's elasticity and fault tolerance. In addition, chaos engineering can also help operation and maintenance teams conduct disaster recovery planning and test system recovery capabilities to ensure that the system can quickly recover and respond to unexpected situations.
[0005] However, when performing chaos testing on a system based on the principles of chaos engineering, multiple work links are involved, including system analysis, fault scenario design, fault design, and fault injection implementation. Each work link requires a lot of time and resources to handle the corresponding work tasks, resulting in low test efficiency of chaos testing. Summary of the invention
[0006] To this end, this application discloses the following technical solutions:
[0007] The first aspect of the present application provides a method for constructing a chaos test fault case library, comprising:
[0008] Determine whether the system technology library has system technology assets corresponding to the target system;
[0009] If the system technology library does not have a system technology asset corresponding to the target system, generate a system technology asset to update the system technology library, and return to execute the step of determining whether the system technology library has a system technology asset corresponding to the target system;
[0010] If the system technology library has system technology assets corresponding to the target system, select the system technology assets corresponding to the target system;
[0011] Determine whether the system business library corresponding to the system technical asset has a system business asset corresponding to the target business;
[0012] If the system business library does not have a system business asset corresponding to the target business, generate a system business asset to update the system business library, and return to execute the step of determining whether the system business library corresponding to the system technical asset has a system business asset corresponding to the target business;
[0013] If the system service library has a system service asset corresponding to the target service, select the system service asset corresponding to the target service;
[0014] Determine whether the fault scenario library corresponding to the system business asset has a fault scenario asset corresponding to the target scenario;
[0015] If the fault scenario library does not have a fault scenario asset corresponding to the target scenario, generate a fault scenario asset to update the fault scenario library, and return to execute the step of determining whether the fault scenario library corresponding to the system business asset has a fault scenario asset corresponding to the target scenario;
[0016] If the fault scenario library has a fault scenario asset corresponding to the target scenario, select the fault scenario asset corresponding to the target scenario;
[0017] Determine whether the fault means library has a fault means asset corresponding to the fault scenario asset;
[0018] If the fault means library does not have a fault means asset corresponding to the fault scenario asset, generate a fault means asset to update the fault means library, and return to execute the step of determining whether the fault means library has a fault means asset corresponding to the fault scenario asset;
[0019] If the fault means library has a fault means asset corresponding to the fault scenario asset, select the fault means asset corresponding to the fault scenario asset;
[0020] Performing chaos testing on the target business of the target system according to the selected fault scenario assets and the fault means assets;
[0021] At the end of the test, the test case assets corresponding to this test are obtained and stored in the implementation record library.
[0022] A second aspect of the present application provides a device for constructing a chaos test fault case library, comprising:
[0023] System technology unit for:
[0024] Determine whether the system technology library has system technology assets corresponding to the target system;
[0025] If the system technology library does not have a system technology asset corresponding to the target system, generate a system technology asset to update the system technology library, and return to execute the step of determining whether the system technology library has a system technology asset corresponding to the target system;
[0026] If the system technology library has system technology assets corresponding to the target system, select the system technology assets corresponding to the target system;
[0027] System Business Unit, for:
[0028] Determine whether the system business library corresponding to the system technical asset has a system business asset corresponding to the target business;
[0029] If the system business library does not have a system business asset corresponding to the target business, generate a system business asset to update the system business library, and return to execute the step of determining whether the system business library corresponding to the system technical asset has a system business asset corresponding to the target business;
[0030] If the system service library has a system service asset corresponding to the target service, select the system service asset corresponding to the target service;
[0031] Fault scenario unit, used to:
[0032] Determine whether the fault scenario library corresponding to the system business asset has a fault scenario asset corresponding to the target scenario;
[0033] If the fault scenario library does not have a fault scenario asset corresponding to the target scenario, generate a fault scenario asset to update the fault scenario library, and return to execute the step of determining whether the fault scenario library corresponding to the system business asset has a fault scenario asset corresponding to the target scenario;
[0034] If the fault scenario library has a fault scenario asset corresponding to the target scenario, select the fault scenario asset corresponding to the target scenario;
[0035] Fault handling unit, used to:
[0036] Determine whether the fault means library has a fault means asset corresponding to the fault scenario asset;
[0037] If the fault means library does not have a fault means asset corresponding to the fault scenario asset, generate a fault means asset to update the fault means library, and return to execute the step of determining whether the fault means library has a fault means asset corresponding to the fault scenario asset;
[0038] If the fault means library has a fault means asset corresponding to the fault scenario asset, select the fault means asset corresponding to the fault scenario asset;
[0039] Test unit for:
[0040] Performing chaos testing on the target business of the target system according to the selected fault scenario assets and the fault means assets;
[0041] The implementation record unit is used to obtain the test case assets corresponding to this test and store them in the implementation record library when the test is completed.
[0042] The beneficial effects of this solution are:
[0043] This embodiment can store the system technology assets, system business assets, fault scenario assets, fault means assets and test case assets generated by each link of the chaos test in the corresponding system technology library, system business library, fault scenario library, fault means library and implementation record library, and update the above asset libraries in real time. These asset libraries carry the entire implementation process of the entire chaos test from beginning to end, and this embodiment can manage the assets generated during these chaos tests through the above asset libraries, so as to facilitate the flexible reuse of the assets in each chaos test and improve the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present application 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 embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0045] Figure 1 It is a structural schematic diagram of a chaos test fault case library provided in an embodiment of the present application;
[0046] Figure 2 It is a flow chart of a method for constructing a chaos test fault case library provided in an embodiment of the present application;
[0047] Figure 3 It is a flow chart of generating system technology assets to update the system technology library provided by an embodiment of the present application;
[0048] Figure 4This is a flow chart of generating system business assets to update the system business library provided by an embodiment of the present application;
[0049] Figure 5 This is a flow chart of generating a fault scenario asset to update a fault scenario library provided by an embodiment of the present application;
[0050] Figure 6 This is a flow chart of generating a fault means asset to update a fault means library provided by an embodiment of the present application;
[0051] Figure 7 This is a flow chart of performing chaos testing provided by an embodiment of the present application;
[0052] Figure 8 It is a structural schematic diagram of a device for constructing a chaos test fault case library provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] 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.
[0054] First, some terms that may be involved in this application are explained.
[0055] Chaos engineering aims to test and evaluate the robustness and reliability of a system by actively introducing various failures, anomalies, and uncertainties.
[0056] Chaos testing is the main way to implement chaos engineering. It injects faults into the system to test whether the system's fault response, processing, and recovery capabilities meet expectations. The reliability of the system is evaluated by analyzing phenomena and test data.
[0057] Simply put, the SRE team is an operation and maintenance team responsible for system stability. Compared with traditional system operation and maintenance, it pays more attention to system stability and reliability, breaking the situation in which development, operation and maintenance, testing, and security in IT organizations are independent of each other. It is a concrete practice of DevOps culture.
[0058] A fault case is an asset that summarizes information on fault scenario analysis, fault design, and fault implementation records during fault injection implementation. It is used to provide effective reference information for subsequent fault injection implementations in the target system and has the ability to be reused.
[0059] The method for constructing a chaos test fault case library provided in this embodiment can be used to construct and maintain the following Figure 1 The chaos test fault case library shown in the figure aggregates and classifies the work assets of the chaos test full process analysis, design, execution and other links through the chaos test fault case library, so that the assets in the library can be flexibly reused during chaos testing.
[0060] like Figure 1 As shown, the chaos test fault case library can include a system technology library, a system business library, a fault scenario library, a fault means library and an implementation record library.
[0061] System technology library. It carries the technical assets of chaos test system analysis and converts the system's technical analysis results into technical analysis assets. Testers can quickly grasp the system's technical attributes, including system architecture, resource deployment, and technical characteristics, through the system library.
[0062] System business library. It carries the business analysis assets for the system. The chaos testing team converts the system business combing and analysis content into business analysis assets. Testers can use business assets to quickly understand what type of business the system is running, and what the scale and sensitivity of the business are.
[0063] Fault scenario library. It carries the assets of the fault scenario analysis and design conducted by the chaos testing team, converts the system fault scenario design into fault scenario design assets, and supports testers who do not need to repeat the fault scenario design when facing the same fault scenario test.
[0064] Fault means library: It carries the work output of fault injection method design, and manages the fault means to be adopted for the target fault scenario in an asset-based manner.
[0065] Implementation record library. The asset portfolio and implementation configuration of chaos testing are managed as assets, and specific implementation records are managed as assets, which makes it convenient for testers to quickly retrieve various asset portfolios and implementation configuration parameters of chaos test records, and supports testers to replay implementation records with the same configuration.
[0066] Figure 1 In the system technology library, system business library, and fault scenario library, the relationship is a cascade relationship, that is, one system technology asset is associated with multiple system business assets, and one system business asset is associated with multiple fault scenario assets. The fault means library contains multiple fault means corresponding to the organizational level fault means and the fault scenario library. The implementation record library includes multiple test case assets, each of which can be used for a chaos test. The test case assets can include the fault scenarios, fault means, and implementation parameters used in the chaos test.
[0067] The addition and update of assets in the above asset libraries require the approval of the administrator before the assets can be added or updated. The implementation of chaos testing can be initiated by replaying (reusing) the test case assets in the implementation record library or by selecting assets in sequence based on system technology, system business, fault scenarios, and fault means.
[0068] Based on the above chaos test fault case library, this embodiment provides a method for constructing a chaos test fault case library. Figure 2 , is a flow chart of the method, and the method may include the following steps.
[0069] S201, determining whether the system technology library has system technology assets corresponding to the target system.
[0070] If the system technology library does not have the system technology assets corresponding to the target system, execute step S202; if the system technology library has the system technology assets corresponding to the target system, execute step S203.
[0071] The target system refers to the system that currently needs to undergo chaos testing.
[0072] The system technology library can store multiple system technology assets, each of which can correspond to a specific system under test. The system technology asset can include various system information and system technology attribute data required for performing chaos testing on the system under test.
[0073] In this embodiment, each system technology asset in the system technology library can have a system identifier, which is used to characterize the tested system corresponding to the asset. In S201, it can be determined whether each system technology asset in the system technology library has the system identifier of the target system. If so, it means that there is a corresponding system technology asset in the system technology library, and S203 is executed. If each asset in the library does not have the system identifier of the target system, it means that there is no corresponding system technology asset in the system technology library, and S202 is executed.
[0074] S202, generating system technology assets to update the system technology library.
[0075] Update the system technology library, specifically by adding new system technology assets to the system technology library.
[0076] In step S202, a system technology analysis can be performed on the target system to obtain new system technology assets corresponding to the target system, and then the new system technology assets can be applied to be added to the system technology library. After the administrator of the system technology library reviews and agrees, the assets can be added to the library.
[0077] After the system technology library is updated, the process returns to the step of determining whether the system technology library has system technology assets corresponding to the target system. Since the newly added system technology assets corresponding to the target system have been added to the system technology library in step S202, when S201 is executed again, the system technology assets corresponding to the target system can be found in the system technology library, and then S203 is executed.
[0078] S203, selecting system technology assets corresponding to the target system.
[0079] As mentioned above, each system technology asset corresponds to a system identifier. In S203, the system technology asset having the system identifier of the target system can be read from the system technology library, and the asset is used as the system technology asset corresponding to the target system to execute S203.
[0080] S204, determining whether the system business library corresponding to the system technical asset has a system business asset corresponding to the target business.
[0081] If the system business library does not have a system business asset corresponding to the target business, execute step S205; if the system business library has a system business asset corresponding to the target business, execute step S206.
[0082] A system may include multiple businesses. The target business may refer to any one or more businesses that currently need to undergo chaos testing among the multiple businesses corresponding to the target system.
[0083] Each system business asset corresponds to a specific business, and the system business asset may include various business attributes of the corresponding business.
[0084] In step S204, the system business library corresponding to the target system can be determined first, and then a search can be made to see whether there is a system business asset corresponding to the target business among the multiple system business assets contained in the system business library. If so, step S206 can be executed, and if not, step S205 can be executed.
[0085] S205: Generate system business assets to update the system business library.
[0086] After the system business library is updated, the process returns to the step of determining whether the system business library corresponding to the system technical asset has a system business asset corresponding to the target business.
[0087] Updating the system business library may specifically include adding new system business assets corresponding to the target business to the system business library.
[0088] In step S205, if there is no system business asset corresponding to the target business, business analysis can be carried out and an application for asset storage can be made. After the administrator of the system business library reviews and agrees, the system business asset can be added.
[0089] After the system business library is updated, step S204 can be executed again. At this time, the newly added system business assets corresponding to the target business have been added to the system business library through step S205. Therefore, the system business assets corresponding to the target business can be found in the system business library, and then S206 is executed.
[0090] S206: Select system business assets corresponding to the target business.
[0091] In step S206, the service identifiers of various system service assets contained in the system service library may be identified, and the system service asset whose service identifier matches the target service may be determined as the system service asset corresponding to the target service and read from the system service library.
[0092] S207, determining whether the fault scenario library corresponding to the system business asset has a fault scenario asset corresponding to the target scenario.
[0093] If the fault scenario library does not have a fault scenario asset corresponding to the target scenario, execute step S208; if the fault scenario library has a fault scenario asset corresponding to the target scenario, execute step S209.
[0094] The target scenario may be a fault scenario required for testing the target business of the target system. In step S207, the target scenario required for chaos testing may be determined based on the system technical assets of the target system and the system business assets of the target business, and then the fault scenario library may be searched to see whether there is a fault scenario asset corresponding to the target scenario.
[0095] Each fault scenario asset corresponds to a fault scenario, and the fault scenario asset may include fault scenario data of the corresponding fault scenario, including but not limited to the values of various parameters constituting the fault scenario, input data and output data, etc.
[0096] If there is a fault scenario library asset corresponding to the target scenario, execute S209; if there is no fault scenario library asset corresponding to the target scenario, execute step S208.
[0097] S208, generating fault scenario assets to update the fault scenario library.
[0098] After updating the fault scenario library, return to execute the step of determining whether the fault scenario library corresponding to the system business asset has a fault scenario asset corresponding to the target scenario.
[0099] Updating the fault scenario library is equivalent to adding the newly added fault scenario assets corresponding to the target scenario to the fault scenario library (i.e., asset storage).
[0100] If there is no fault scenario asset corresponding to the target scenario in the fault scenario library, a fault scenario analysis can be carried out in step S208 and an application can be made to add the asset to the library. After the administrator of the fault scenario library reviews and agrees, the asset can be added to the library.
[0101] After updating the fault scenario library, step S207 can be executed again. At this time, the newly added fault scenario assets corresponding to the target scenario have been added to the fault scenario library through step S208. Therefore, the newly added fault scenario assets corresponding to the target scenario can be found in the fault scenario library, and then S209 is executed.
[0102] S209, selecting a fault scenario asset corresponding to the target scenario.
[0103] In step S209, a fault scenario asset having a scenario identifier of the target scenario in the fault scenario library may be identified, and the fault scenario asset may be read out as a fault scenario asset corresponding to the target scenario.
[0104] S210, determining whether the fault means library has a fault means asset corresponding to the fault scenario asset.
[0105] If the fault means library does not have a fault means asset corresponding to the fault scenario asset, execute step S211; if the fault means library has a fault means asset corresponding to the fault scenario asset, execute step S212.
[0106] In S210, the fault means suitable for use in this test can be determined based on the system technology assets of the target system, the system business assets of the target business, and the fault scenario assets of the target scenario, combined with specific test requirements, and then the fault means library can be searched to see whether there is a fault means asset corresponding to the required fault means.
[0107] If yes, execute step S212; if no, execute step S211.
[0108] Each fault means asset may correspond to a fault means, and the fault means asset may include various data for describing the corresponding fault means.
[0109] S211, generating a fault means asset to update a fault means library.
[0110] After updating the fault means library, return to execute the step of determining whether the fault means library has a fault means asset corresponding to the fault scenario asset.
[0111] Updating the fault means library refers to adding the fault means assets of the required fault means to the fault means library.
[0112] In step S211, the user can define the fault means and the administrator can review it, and then the reviewed fault means can be added to the fault means library in the form of fault means assets.
[0113] S212, selecting a fault means asset corresponding to the fault scenario asset.
[0114] In S212, if it is determined that the fault means library already has the fault means asset of the required fault means, the fault means asset can be directly read out, and then S213 is executed.
[0115] S213, performing chaos testing on the target business of the target system according to the selected fault scenario assets and fault means assets.
[0116] After the fault means are identified and the corresponding fault means assets are obtained in step S212, the implementation parameters of the chaos test can be configured in step S213, and then chaos testing can be performed on the target business of the target system based on the implementation parameters, fault scenario assets and fault means assets.
[0117] The specific method of chaos testing can be found in the relevant existing technology and will not be described in detail.
[0118] S214, when the test is finished, the test case assets corresponding to the test are obtained and stored in the implementation record library.
[0119] During the implementation of chaos testing, various data of the target system and target business during the test can be recorded in real time to obtain the test record of this test.
[0120] After completing the chaos test, if you plan to manage the records of this implementation as assets, convert the above test records of this test into corresponding test case assets and apply for asset entry. They can be added to the implementation record library only after the administrator's review.
[0121] The beneficial effects of this embodiment are:
[0122] Some existing technologies manage various types of fault injection methods for chaos testing as cases, and support flexible reuse of multiple types of injection methods when injecting faults in chaos testing. After the target system enters the implementation phase of fault injection, it can be selected from the list of fault injection methods. Managing fault injection methods as cases does not actually reflect the assets of the entire process of chaos testing. Fault injection is only one of the multiple work links of chaos testing, and the main links of chaos testing are still in the system analysis and fault scenario design links, which require a lot of manual communication, analysis, and confirmation work. Therefore, only managing fault injection capabilities as assets can only achieve the effect of reusing fault injection tool capabilities, and cannot flexibly reuse assets for multiple chaos tests on the system, and reduce labor costs and repeated energy consumption.
[0123] In this embodiment, the system technology assets, system business assets, fault scenario assets, fault means assets and test case assets generated in each link of the chaos test can be stored in the corresponding system technology library, system business library, fault scenario library, fault means library and implementation record library, and the above asset libraries can be updated in real time. These asset libraries carry the entire implementation process of the entire chaos test from beginning to end, and this embodiment can manage the assets generated during these chaos tests through the above asset libraries, so as to facilitate the flexible reuse of the assets in each chaos test and improve the testing efficiency.
[0124] In summary, this application proposes a method and device for constructing a chaos testing fault case library, which effectively organizes and manages the entire process assets of chaos testing through the design method of the fault case library, and realizes the entire process of asset management through automated devices, fully utilizing flexible reuse capabilities and improving the efficiency of chaos testing implementation.
[0125] In some optional embodiments, the following steps may be performed before performing step S201:
[0126] Determine whether the implementation record library has reusable test case assets;
[0127] If the implementation record library has reusable test case assets, perform chaos testing based on the test case assets;
[0128] If the implementation record library does not have reusable test case assets, execute the step of determining whether the system technology library has system technology assets corresponding to the target system.
[0129] The implementation record library may store multiple previous test case assets, and each test case asset corresponds to a chaos test that was previously executed.
[0130] In this embodiment, when preparing for chaos testing, you can first analyze whether the implementation record library already has reusable test case assets. If there are reusable test case assets in the implementation record library and you plan to reuse the assets for this test, you can directly start the chaos test based on the reusable test case assets.
[0131] If there is no reusable test case asset in the implementation record library, or there is a reusable test case asset but it is not planned to be reused for this test, the system technology library can be screened, that is, step S201 is executed.
[0132] Among them, the method for judging whether the implementation record library has reusable test case assets can be, for each test case asset in the implementation record library, judging whether the tested system, tested business, failure scenario and failure means corresponding to the test case asset meet the requirements of this chaos test; if so, determining that the test case asset is a reusable test case asset; if not, determining that the test case asset is not a reusable test case asset.
[0133] Whether to plan to reuse the reusable test case assets for this test can be decided by the relevant testers. That is, the reusable test case assets can be screened out first and displayed to the relevant testers. Then, based on the testers' operations, it can be decided whether to plan to reuse the reusable test case assets for this test.
[0134] Optional, see Figure 3 The process of generating system technology assets to update the system technology library (that is, the process of conducting system technology analysis) can include:
[0135] Synchronize the enterprise system service directory to update system information;
[0136] Verify and complete system technical attribute data;
[0137] After the system technical attribute data and the updated system information have passed the review, the system technical attribute data and the system information are assembled in an asset standardized manner to obtain the newly added system technical assets;
[0138] Add new system technology assets to the system technology library.
[0139] In this embodiment, it is possible to first synchronize with the enterprise system service directory and read the latest system information of the target system from the directory, that is, the updated system information mentioned above; then, the system technical attribute data can be read from each target system according to the updated system information, and the system technical attribute data can be pushed to the terminal of the relevant operation and maintenance personnel, so that the relevant operation and maintenance personnel can verify and complete the system technical attribute data; then, the verified and completed system technical attribute data and the updated system information are pushed to the administrator responsible for managing the system technical assets, and the administrator will review them; if the administrator passes the review, the verified and completed system technical attribute data and the updated system information can be assembled for asset standardization to obtain the newly added system technical assets corresponding to the target system, and finally the newly added system technical assets of the target system are added to the system technology library.
[0140] Among them, if the administrator's review fails, you can follow the administrator's review opinion, execute the directory synchronization step again, and the verification and completion steps, and review again.
[0141] The specific process of standardized asset assembly can be found in the relevant existing technology and will not be described in detail here.
[0142] Optional, see Figure 4 , the process of generating system business assets to update the system business library may include:
[0143] Analyze system business attributes and obtain system business analysis results;
[0144] Verify and complete system business analysis results;
[0145] After the system business analysis results are reviewed, the system business analysis results are assembled in an asset standard to obtain new system business assets;
[0146] Add new system business assets to the system business library.
[0147] In this embodiment, various business attribute data of the target business of the target system can be collected first, and these data can be pushed to relevant operation and maintenance personnel for analysis to obtain system business analysis results, and then the operation and maintenance personnel can verify and complete the system business analysis results, and push the verified and completed system business analysis results to the administrator of the system business library for review. If the review passes, the system business analysis results will be assembled for asset standardization to obtain new system business assets corresponding to the target business and add them to the system business library. If the review fails, the analysis, verification and completion steps can be repeated based on the review opinions to obtain new system business analysis results.
[0148] Optional, see Figure 5 , the process of generating fault scenario assets to update the fault scenario library may include:
[0149] Determine the fault scenario design data;
[0150] Verify and complete the fault scenario design data;
[0151] After the fault scenario design data passes the review, the fault scenario design data is assembled in an asset standardized manner to obtain new fault scenario assets;
[0152] Add new fault scenario assets to the fault scenario library.
[0153] In this embodiment, the user responsible for designing the fault scenario can design the fault scenario required for this test based on the system technical assets corresponding to the target system, the system business assets corresponding to the target business, and the test requirements of this test to obtain fault scenario design data.
[0154] After obtaining the fault scenario design data, these data can be pushed to the operation and maintenance personnel responsible for verifying the data, so as to verify and complete the fault scenario design data. Then, the verified and completed fault scenario design data can be sent to the administrator of the fault scenario library for review. If the review is passed, standardized asset assembly can be performed to obtain new fault scenario assets, and the new fault scenario assets can be added to the fault scenario library.
[0155] If the review fails, the fault scenario design can be re-performed and the fault scenario design data can be verified and completed based on the review opinions.
[0156] Optional, see Figure 6 , the process of generating a fault means asset to update the fault means library may include:
[0157] Design custom failure measures;
[0158] Program custom failure measures and perform blast radius setting checks;
[0159] After the custom fault means pass the review, the custom fault means are assembled in a standardized manner to obtain the newly added fault means assets;
[0160] Add the new fault means asset to the fault means library.
[0161] In the above embodiment, the user responsible for designing the fault means can design a custom fault means according to the target system, target business and target scenario, as well as the test requirements of this test. Then the user responsible for orchestration and inspection can orchestrate the custom fault means and perform an explosion radius setting check. Finally, the administrator of the fault means library can review the custom fault means. If the review fails, the design, orchestration and inspection can be re-performed to obtain a new custom fault means. If the review passes, the custom fault means can be assembled into standardized assets to obtain new fault means assets corresponding to the custom fault means, and then the new fault means assets can be added to the fault means library.
[0162] Optional, see Figure 7 , the process of performing chaos testing on the target business of the target system based on the selected fault scenario assets and fault means assets may include:
[0163] The user configures the chaos test implementation parameters;
[0164] Start chaos testing;
[0165] Complete chaos test review;
[0166] Implement record sorting;
[0167] Relevant operation and maintenance personnel determine whether to assemble it into a test case asset;
[0168] If it is not assembled as a test case asset, the chaos test ends;
[0169] If assembled into a test case asset, the aforementioned step S214 may be executed.
[0170] In step S214, the combed implementation records and various data collected during other chaos tests can be pushed to the system asset administrator for review. If the review fails, step S214 can be ended without adding new test case assets. If the review passes, the combed implementation records and various data collected during other chaos tests can be assembled for asset standardization to obtain the test case assets corresponding to this test, and then the test case assets can be added to the implementation record library for reuse in subsequent tests.
[0171] After the chaos test is started, the chaos test can be automatically performed through the system based on the technical assets of the aforementioned target system, the system business assets of the target business, the fault scenario assets of the target scenario, and the selected fault means assets, combined with the configured implementation parameters.
[0172] When testing based on reusable test case assets, the step of configuring chaos test implementation parameters in the above embodiment may be executed to directly enter the step of starting chaos test.
[0173] The present application also provides a device for constructing a chaos test fault case library. Figure 8 , the device may include the following units.
[0174] System Technology Unit 801, for:
[0175] Determine whether the system technology library has system technology assets corresponding to the target system;
[0176] If the system technology library does not have the system technology asset corresponding to the target system, then generate the system technology asset to update the system technology library, and return to the step of determining whether the system technology library has the system technology asset corresponding to the target system;
[0177] If the system technology library has system technology assets corresponding to the target system, select the system technology assets corresponding to the target system;
[0178] The system service unit 802 is used for:
[0179] Determine whether the system business library corresponding to the system technical assets has system business assets corresponding to the target business;
[0180] If the system business library does not have a system business asset corresponding to the target business, generate a system business asset to update the system business library, and return to execute the step of determining whether the system business library corresponding to the system technical asset has a system business asset corresponding to the target business;
[0181] If the system business library has system business assets corresponding to the target business, select the system business assets corresponding to the target business;
[0182] The fault scenario unit 803 is used to:
[0183] Determine whether the fault scenario library corresponding to the system business assets has fault scenario assets corresponding to the target scenario;
[0184] If the fault scenario library does not have a fault scenario asset corresponding to the target scenario, generate a fault scenario asset to update the fault scenario library, and return to execute the step of determining whether the fault scenario library corresponding to the system business asset has a fault scenario asset corresponding to the target scenario;
[0185] If the fault scenario library has fault scenario assets corresponding to the target scenario, select the fault scenario assets corresponding to the target scenario;
[0186] The fault handling unit 804 is used to:
[0187] Determine whether the fault means library has fault means assets corresponding to the fault scenario assets;
[0188] If the fault means library does not have a fault means asset corresponding to the fault scenario asset, generate a fault means asset to update the fault means library, and return to execute the step of determining whether the fault means library has a fault means asset corresponding to the fault scenario asset;
[0189] If the fault means library has a fault means asset corresponding to the fault scenario asset, select the fault means asset corresponding to the fault scenario asset;
[0190] The testing unit 805 is used for:
[0191] Perform chaos testing on the target business of the target system based on the selected fault scenario assets and fault means assets;
[0192] The implementation record unit 806 is used to obtain the test case assets corresponding to the test at the end of the test and store them in the implementation record library.
[0193] Optionally, the implementation recording unit 806 is further used for:
[0194] Determine whether the implementation record library has reusable test case assets;
[0195] If the implementation record library has reusable test case assets, perform chaos testing based on the test case assets;
[0196] If the implementation record library does not have reusable test case assets, execute the step of determining whether the system technology library has system technology assets corresponding to the target system.
[0197] Optionally, when the system technology unit 801 generates system technology assets to update the system technology library, it is specifically used for:
[0198] Synchronize the enterprise system service directory to update system information;
[0199] Verify and complete system technical attribute data;
[0200] After the system technical attribute data and the updated system information have passed the review, the system technical attribute data and the system information are assembled in an asset standardized manner to obtain the newly added system technical assets;
[0201] Add new system technology assets to the system technology library.
[0202] Optionally, when the system service unit 802 generates system service assets to update the system service library, it is specifically used to:
[0203] Analyze system business attributes and obtain system business analysis results;
[0204] Verify and complete system business analysis results;
[0205] After the system business analysis results are reviewed, the system business analysis results are assembled in an asset standard to obtain new system business assets;
[0206] Add new system business assets to the system business library.
[0207] Optionally, when the fault scenario unit 803 generates a fault scenario asset to update the fault scenario library, it is specifically used to:
[0208] Determine the fault scenario design data;
[0209] Verify and complete the fault scenario design data;
[0210] After the fault scenario design data passes the review, the fault scenario design data is assembled in an asset standardized manner to obtain new fault scenario assets;
[0211] Add new fault scenario assets to the fault scenario library.
[0212] The working principle of the device for constructing a chaos test fault case library in this embodiment can refer to the relevant steps of the method for constructing a chaos test fault case library provided in any embodiment of the present application, and will not be repeated here.
[0213] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0214] For the convenience of description, the above system or device is described by dividing it into various modules or units according to its functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0215] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0216] Finally, it should be noted that, in this article, relational terms such as first, second, third and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0217] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for constructing a chaos test fault case library, characterized in that: include: Determine whether the system technology library has system technology assets corresponding to the target system; If the system technology library does not have a system technology asset corresponding to the target system, generate a system technology asset to update the system technology library, and return to execute the step of determining whether the system technology library has a system technology asset corresponding to the target system; If the system technology library has system technology assets corresponding to the target system, select the system technology assets corresponding to the target system; Determine whether the system business library corresponding to the system technical asset has a system business asset corresponding to the target business; If the system business library does not have a system business asset corresponding to the target business, generate a system business asset to update the system business library, and return to execute the step of determining whether the system business library corresponding to the system technical asset has a system business asset corresponding to the target business; If the system service library has a system service asset corresponding to the target service, select the system service asset corresponding to the target service; Determine whether the fault scenario library corresponding to the system business asset has a fault scenario asset corresponding to the target scenario; If the fault scenario library does not have a fault scenario asset corresponding to the target scenario, generate a fault scenario asset to update the fault scenario library, and return to execute the step of determining whether the fault scenario library corresponding to the system business asset has a fault scenario asset corresponding to the target scenario; If the fault scenario library has a fault scenario asset corresponding to the target scenario, select the fault scenario asset corresponding to the target scenario; Determine whether the fault means library has a fault means asset corresponding to the fault scenario asset; If the fault means library does not have a fault means asset corresponding to the fault scenario asset, generate a fault means asset to update the fault means library, and return to execute the step of determining whether the fault means library has a fault means asset corresponding to the fault scenario asset; If the fault means library has a fault means asset corresponding to the fault scenario asset, select the fault means asset corresponding to the fault scenario asset; Performing chaos testing on the target business of the target system according to the selected fault scenario assets and the fault means assets; At the end of the test, the test case assets corresponding to this test are obtained and stored in the implementation record library.
2. The method according to claim 1, characterized in that Also includes: Determine whether the implementation record library has reusable test case assets; If the implementation record library has reusable test case assets, chaos testing is performed according to the test case assets; If the implementation record library does not have reusable test case assets, the step of determining whether the system technology library has system technology assets corresponding to the target system is performed.
3. The method according to claim 1, characterized in that The generating of system technology assets to update the system technology library includes: Synchronize the enterprise system service directory to update system information; Verify and complete system technical attribute data; After the system technical attribute data and the updated system information have passed the review, the system technical attribute data and the system information are assembled in an asset standardization manner to obtain newly added system technical assets; The newly added system technology assets are added to the system technology library.
4. The method according to claim 1, characterized in that The generating of system service assets to update the system service library includes: Analyze system business attributes and obtain system business analysis results; Verify and complete the system business analysis results; After the system business analysis results are reviewed, the system business analysis results are assembled in an asset standardization manner to obtain newly added system business assets; The newly added system service asset is added to the system service library.
5. The method according to claim 1, characterized in that The generating of the fault scenario assets to update the fault scenario library includes: Determine the fault scenario design data; Verifying and completing the fault scenario design data; After the fault scenario design data passes the review, the fault scenario design data is assembled in an asset standardized manner to obtain a newly added fault scenario asset; The newly added fault scenario asset is added to the fault scenario library.
6. A device for constructing a chaos test fault case library, characterized in that: include: System technology unit for: Determine whether the system technology library has system technology assets corresponding to the target system; If the system technology library does not have a system technology asset corresponding to the target system, generate a system technology asset to update the system technology library, and return to execute the step of determining whether the system technology library has a system technology asset corresponding to the target system; If the system technology library has system technology assets corresponding to the target system, select the system technology assets corresponding to the target system; System Business Unit, for: Determine whether the system business library corresponding to the system technical asset has a system business asset corresponding to the target business; If the system business library does not have a system business asset corresponding to the target business, generate a system business asset to update the system business library, and return to execute the step of determining whether the system business library corresponding to the system technical asset has a system business asset corresponding to the target business; If the system service library has a system service asset corresponding to the target service, select the system service asset corresponding to the target service; Fault scenario unit, used to: Determine whether the fault scenario library corresponding to the system business asset has a fault scenario asset corresponding to the target scenario; If the fault scenario library does not have a fault scenario asset corresponding to the target scenario, generate a fault scenario asset to update the fault scenario library, and return to execute the step of determining whether the fault scenario library corresponding to the system business asset has a fault scenario asset corresponding to the target scenario; If the fault scenario library has a fault scenario asset corresponding to the target scenario, select the fault scenario asset corresponding to the target scenario; Fault handling unit, used to: Determine whether the fault means library has a fault means asset corresponding to the fault scenario asset; If the fault means library does not have a fault means asset corresponding to the fault scenario asset, generate a fault means asset to update the fault means library, and return to execute the step of determining whether the fault means library has a fault means asset corresponding to the fault scenario asset; If the fault means library has a fault means asset corresponding to the fault scenario asset, select the fault means asset corresponding to the fault scenario asset; Test unit for: Performing chaos testing on the target business of the target system according to the selected fault scenario assets and the fault means assets; The implementation record unit is used to obtain the test case assets corresponding to this test and store them in the implementation record library when the test is completed.
7. The device according to claim 6, characterized in that The implementation recording unit is also used for: Determine whether the implementation record library has reusable test case assets; If the implementation record library has reusable test case assets, chaos testing is performed according to the test case assets; If the implementation record library does not have reusable test case assets, the step of determining whether the system technology library has system technology assets corresponding to the target system is performed.
8. The device according to claim 6, characterized in that When the system technology unit generates system technology assets to update the system technology library, it is specifically used to: Synchronize the enterprise system service directory to update system information; Verify and complete system technical attribute data; After the system technical attribute data and the updated system information have passed the review, the system technical attribute data and the system information are assembled in an asset standardization manner to obtain newly added system technical assets; The newly added system technology assets are added to the system technology library.
9. The device according to claim 6, characterized in that When the system service unit generates system service assets to update the system service library, it is specifically used to: Analyze system business attributes and obtain system business analysis results; Verify and complete the system business analysis results; After the system business analysis results are reviewed, the system business analysis results are assembled in an asset standardization manner to obtain newly added system business assets; The newly added system service asset is added to the system service library.
10. The device according to claim 6, characterized in that When the fault scenario unit generates a fault scenario asset to update the fault scenario library, it is specifically used to: Determine the fault scenario design data; Verifying and completing the fault scenario design data; After the fault scenario design data passes the review, the fault scenario design data is assembled in an asset standardized manner to obtain a newly added fault scenario asset; The newly added fault scenario asset is added to the fault scenario library.
Citation Information
Patent Citations
Project test method, device and equipment and storage medium
CN115437955A
Test case multiplexing method and device, medium, equipment and product
CN116680162A
Chaotic test method, device and equipment
CN117453567A
Service test system and method based on active-active application architecture
CN118503086A
Method of and system for dynamic automated test case generation and execution
US20070162894A1