Chaotic engineering practice management system
Through the chaos engineering practice management system of BS architecture, combined with the chaos-mesh platform, it solves the problems of high correlation between tools and environment, high threshold, and difficulty in solidifying results in chaos engineering practice. It realizes flexible use case management and automated testing, and reduces costs. cost and improves the visibility of system stability assessment.
Patent Information
- Application Number
- CN202410719467.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-09-13
AI Technical Summary
In the existing practice of chaos engineering, there are problems such as strong correlation between tools and environment, high threshold, difficulty in solidifying and reusing experimental results, lack of customized scene management, complicated use, and difficulty in quantitatively evaluating system stability.
Chaos engineering practice management system developed using BS architecture, based on Springboot and Angular, combined with the cloud-native chaos engineering platform chaos-mesh, to provide environment configuration, fault scenario customization, test suites, visual display, scheduled tasks, execution records and test report modules , realizing zero-code construction of custom fault scenarios, automated testing and visual reports.
It lowers the threshold of chaos engineering practice, improves the flexibility of use case management and the clarity of result output, saves labor costs, and creates conditions for in-depth research on the chaos engineering practice system.
Smart Images

Figure CN118642953A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chaos engineering technology, and in particular to a chaos engineering practice management system. Background Art
[0002] Chaos engineering is a discipline that conducts experiments on distributed systems to build confidence in the system's ability to withstand out-of-control conditions in production environments. By proactively creating failures and testing the system's behavior under various pressures, failures can be nipped in the bud, that is, they can be identified and repaired before they cause disruptions, avoiding serious consequences and thus improving system robustness.
[0003] There are some relatively mature open source testing projects in the field of chaos engineering testing, such as chaos-mesh, chaos-blade, etc. Chaos engineering practices of many products directly use these open source projects for secondary development or based on them. For complex and diverse environments and business requirements, the underlying fault logic of a single tool often does not fully meet the requirements, and these open source projects may be difficult to use or have strong ties to the environment, making it difficult to accumulate and solidify the results of the experiment.
[0004] In the early stage of chaos engineering practice, due to factors such as frequent changes in the practice environment, personnel turnover, and insufficient knowledge reserves, the process from getting started to successfully applying chaos engineering to discover problems became very difficult, wasting a lot of manpower costs. However, the demand for stability testing in the project has always been very strong, and there needs to be a unified standard to guide the relevant personnel to perform chaos engineering. The platform can realize the control of the chaos engineering process, automation of the practice process, and systematization and standardization of the practice model, which will bring huge benefits to the product.
[0005] Based on the above situation, the present invention proposes a chaos engineering practice management system. Summary of the invention
[0006] In order to overcome the deficiencies of the prior art, the present invention provides a simple and efficient chaos engineering practice management system.
[0007] The present invention is achieved through the following technical solutions:
[0008] A chaos engineering practice management system, developed using the BS (Browser / Server) architecture, based on the Springboot framework, Angular front-end development framework and MySQL database to achieve basic business flow control; using the cloud-native chaos engineering platform chaos-mesh as the underlying fault executor, the test suite executes the test experiment through the workflow interface;
[0009] It includes environment configuration module, fault scenario customization module, test suite module, visualization module, scheduled task module, execution record module and test report module;
[0010] The environment configuration module supports users to add environment collections, which are used to provide global variables for the above other modules during the test process to achieve multi-cluster management and rapid reuse of test cases and test suites;
[0011] The environment configuration module fills in the relevant environment parameters required by other modules in each environment set; the successfully created environment set is displayed as an option in the cluster switching drop-down box list on the overview page.
[0012] The fault scenario customization module customizes the creation of container failure and physical machine failure scenarios based on a step-by-step self-selection method and forms data in yaml format;
[0013] When customizing a scenario, the fault scenario customization module can complete the construction of a scenario by customizing the fault name, fault type, fault detailed configuration and fault basic information, and the entire process does not involve code writing, thus achieving zero-code construction of a custom fault scenario.
[0014] The test suite module automatically generates executable workflow test suites supporting single scenarios, serial scenarios, and parallel scenarios based on keyword recognition, and forms executable data in yaml format;
[0015] The test suite module first identifies a specific task type according to a keyword of the task type, then pulls out a selected fault scenario according to the task type, and creates a workflow test suite of the corresponding task type according to the parent-child relationship of the fault scenario.
[0016] The visualization module generates a visualization topology diagram based on the relationship between the fault scenarios in the workflow, and displays the execution order of each scenario;
[0017] The scheduled task module provides scheduled task functions for random combination, automatic triggering and concurrent execution of test suites;
[0018] After the test suite module creates an executable workflow test suite, the scheduled task module uses the scheduled task creation function to combine different test suites according to actual needs, generates corresponding scheduled tasks according to several customized scheduled task scheduling strategies on a daily, weekly or monthly basis, and automatically executes multiple test suites concurrently at a scheduled time;
[0019] The management side runs a continuous task to query the scheduled task list in the MySQL database every minute to trigger the scheduled tasks that meet the trigger conditions. At the same time, to facilitate debugging and management, the chaos engineering practice management system provides immediate execution, enablement and disablement functions, allowing users to independently control the life cycle of scheduled tasks, which is highly flexible.
[0020] The execution record module uses log recording to retain the execution record, execution status and final result of the test suite;
[0021] On the management side, by executing a scheduled query script, all events generated during the execution of the test suite are periodically pulled, and the events are stored in the MySQL database according to the test suite classification to prevent data loss; this allows users to view all execution records in real time on the page.
[0022] The test report module performs data cleaning on the collected execution results based on the execution results of the test suite, removes invalid or erroneous execution results, and integrates the execution results of different test suites together for comprehensive analysis in the test report;
[0023] Design test report templates according to requirements, including report format and content, and use the automation platform to generate test reports with one click;
[0024] Analyze the generated test reports, including but not limited to statistical test pass rate and failure reasons;
[0025] Supports visualization of test reports, using charts and graphs to visualize test reports.
[0026] A testing method based on the chaos engineering practice management system of the present invention comprises the following steps:
[0027] Step S1: The user registers through a browser and logs in to the Chaos Engineering Practice Management System;
[0028] Step S2: The user creates or joins a test project on the browser side (side B), creates and selects an environment set; after creating or importing test cases and test suites, executes the test suites, and customizes the scheduled tasks;
[0029] Step S3: The server (S) requests the MySQL database to obtain the test suite data and environment configuration information, and generates a test experiment creation request;
[0030] Step S4: After the cloud-native chaos engineering platform chaos-mesh generates and executes the test experiment, it returns the test experiment result information;
[0031] Step S5: After receiving the test result information, the server (S) displays the test result to the user through the browser and stores the test result information in the MySQL database.
[0032] The beneficial effects of the present invention are as follows: the chaos engineering practice management system has flexible use case management, simple practice methods, and easy-to-use functional modules, which makes practice management more detailed and the output of results clearer, lowers the threshold for chaos engineering practice, saves labor costs, and creates conditions for more in-depth research and construction of a chaos engineering practice system. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are 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.
[0034] Attached Figure 1 The figure is a schematic diagram of the execution flow of the chaos engineering practice management system according to the present invention.
[0035] Attached Figure 2 The figure is a flowchart of the use of the chaos engineering practice management system according to the present invention. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in combination with the embodiments of the present invention. Obviously, the described embodiments are only 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 the field without creative work should fall within the scope of protection of the present invention.
[0037] Various pain points in daily chaos engineering practice:
[0038] 1) Chaos tools are strongly related to the environment, and experimental results are not easy to solidify and reuse;
[0039] 2) Baseline experiments need to be established from scratch, which has a high threshold and high manpower cost, making it difficult to free up manpower for deeper research;
[0040] 3) The level division of chaos experiments is not flexible, which is not convenient for management and classification scenario design. The relationship between use cases is not clear, which makes it easy to cover incompletely.
[0041] 4) Lack of customized scenario management function, making it difficult to systematize research results;
[0042] 5) Switching between multiple platforms to observe data is too cumbersome and has certain usage thresholds;
[0043] 6) It is difficult to manage experiments constructed in different ways, and the corresponding scripts are easy to lose, which is not convenient for handover and learning;
[0044] 7) It is difficult to quantify and evaluate practical results, it is difficult to have an objective understanding of system stability internally, there is a lack of standard and unified data support when presenting to customers externally, and it is difficult to build confidence in the stability of the system.
[0045] This chaos engineering practice management system is developed using the BS (Browser / Server) architecture, based on the Springboot framework, Angular front-end development framework, and MySQL database to implement basic business flow control. The cloud-native chaos engineering platform chaos-mesh is used as the underlying fault executor, and the test suite is executed through the workflow interface to execute the test experiment.
[0046] It includes environment configuration module, fault scenario customization module, test suite module, visualization module, scheduled task module, execution record module and test report module;
[0047] The environment configuration module supports users to add environment collections, which are used to provide global variables for the above other modules during the test process to achieve multi-cluster management and rapid reuse of test cases and test suites;
[0048] The environment configuration module fills in the relevant environment parameters required by other modules in each environment set; the successfully created environment set is displayed as an option in the cluster switching drop-down box list on the overview page.
[0049] The fault scenario customization module customizes the creation of container failure and physical machine failure scenarios based on a step-by-step self-selection method and forms data in yaml format;
[0050] When customizing a scenario, the fault scenario customization module can complete the construction of a scenario by customizing the fault name, fault type, fault detailed configuration and fault basic information, and the entire process does not involve code writing, thus achieving zero-code construction of a custom fault scenario.
[0051] The test suite module automatically generates executable workflow test suites supporting single scenarios, serial scenarios, and parallel scenarios based on keyword recognition, and forms executable data in yaml format;
[0052] The test suite module first identifies a specific task type according to a keyword of the task type, then pulls out a selected fault scenario according to the task type, and creates a workflow test suite of the corresponding task type according to the parent-child relationship of the fault scenario.
[0053] Taking the serial task type as an example, when the task type is identified as serial, a serial workflow is created, and then the selected fault scenarios are pulled. According to the parent-child relationship of the fault scenarios, the fault scenarios are added to the workflow in sequence, and finally the workflow is generated.
[0054] The visualization module generates a visualization topology diagram based on the relationship between the fault scenarios in the workflow, and displays the execution order of each scenario;
[0055] The scheduled task module provides scheduled task functions for random combination, automatic triggering and concurrent execution of test suites;
[0056] After the test suite module creates an executable workflow test suite, the scheduled task module uses the scheduled task creation function to combine different test suites according to actual needs, generates corresponding scheduled tasks according to several customized scheduled task scheduling strategies on a daily, weekly or monthly basis, and automatically executes multiple test suites concurrently at a scheduled time;
[0057] The management side runs a continuous task to query the scheduled task list in the MySQL database every minute to trigger the scheduled tasks that meet the trigger conditions. At the same time, to facilitate debugging and management, the chaos engineering practice management system provides immediate execution, enablement and disablement functions, allowing users to independently control the life cycle of scheduled tasks, which is highly flexible.
[0058] The execution record module uses log recording to retain the execution record, execution status and final result of the test suite;
[0059] After the test suite module creates the test suite, the execution record module uses the log function to filter according to the test suite actually executed and different test suites, and displays one or more execution records of the test suite in reverse chronological order. The occurrence time, duration, event details, execution process and execution status of events triggered during the execution of each suite are recorded and displayed, and the latest events are updated over time.
[0060] On the management side, by executing a scheduled query script, all events generated during the execution of the test suite are periodically pulled, and the events are stored in the MySQL database according to the test suite classification to prevent data loss; this allows users to view all execution records in real time on the page.
[0061] The test report module performs data cleaning on the collected execution results based on the execution results of the test suite, removes invalid or erroneous execution results, and integrates the execution results of different test suites together for comprehensive analysis in the test report;
[0062] Design test report templates according to requirements, including report format and content, and use the automation platform to generate test reports with one click;
[0063] Analyze the generated test reports, including but not limited to statistical test pass rate and failure reasons;
[0064] Supports visualization of test reports, using charts and graphs to visualize test reports.
[0065] The testing method based on the chaos engineering practice management system includes the following steps:
[0066] Step S1: The user registers through a browser and logs in to the Chaos Engineering Practice Management System;
[0067] Step S2: The user creates or joins a test project on the browser side (side B), creates and selects an environment set; after creating or importing test cases and test suites, executes the test suites, and customizes the scheduled tasks;
[0068] Step S3: The server (S) requests the MySQL database to obtain the test suite data and environment configuration information, and generates a test experiment creation request;
[0069] Step S4: After the cloud-native chaos engineering platform chaos-mesh generates and executes the test experiment, it returns the test experiment result information;
[0070] Step S5: After receiving the test result information, the server (S) displays the test result to the user through the browser and stores the test result information in the MySQL database.
[0071] Compared with the existing technology, this chaos engineering practice management system has the following characteristics:
[0072] 1) Decouple chaos experiment scenario use cases from the environment, achieve independent management of chaos experiment use cases, and support unified management and maintenance of multiple clusters.
[0073] 2) The preset general experimental scenarios are used as baselines to meet the basic needs of distributed system chaos practice and realize chaos experiment baseline management.
[0074] 3) It supports the design and management of experiments based on the different levels at which distributed systems may fail, thus realizing hierarchical management of chaos experiments.
[0075] 4) It supports experimental process management according to various application scenarios involved in different distributed systems, realizes the scenario-based management of chaos experiments, and enriches the experimental process under such application scenarios, including experimental tool sets, experimental scenario sets, observation tool sets, data standard references, etc.
[0076] 5) It realizes the integrated management of chaos experiments, covering a series of necessary elements in chaos experiment steps, such as scenario design, experimental operation, environmental indicator observation, operation log viewing, and result report output.
[0077] 6) It can manage various experiments created in different ways, including chaos tools, custom scripts, etc., realizing the diversification of chaos experiment construction.
[0078] 7) By connecting to a third-party use case management platform, experiments and use cases can be associated to facilitate synchronization management, workload statistics, chaos model maturity assessment, and report output.
[0079] The embodiment described above is only one specific implementation of the present invention. Common changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the protection scope of the present invention.
Claims
1. A chaos engineering practice management system, characterized by: Developed using the BS architecture, the system implements basic business flow control based on the Springboot framework, Angular front-end development framework, and MySQL database. The cloud-native chaos engineering platform chaos-mesh is used as the underlying fault executor, and the test suite executes the test experiment through the workflow interface when executing. It includes environment configuration module, fault scenario customization module, test suite module, visualization module, scheduled task module, execution record module and test report module; The environment configuration module supports users to add environment collections, which are used to provide global variables for the above other modules during the test process to achieve multi-cluster management and rapid reuse of test cases and test suites; The fault scenario customization module customizes the creation of container failure and physical machine failure scenarios based on a step-by-step self-selection method and forms data in yaml format; The test suite module automatically generates executable workflow test suites supporting single scenarios, serial scenarios, and parallel scenarios based on keyword recognition, and forms executable data in yaml format; The visualization module generates a visualization topology diagram based on the relationship between the fault scenarios in the workflow, and displays the execution order of each scenario; The scheduled task module provides scheduled task functions for random combination, automatic triggering and concurrent execution of test suites; The execution record module uses log recording to retain the execution record, execution status and final result of the test suite; The test report module performs data cleaning on the collected execution results based on the execution results of the test suite, removes invalid or erroneous execution results, and integrates the execution results of different test suites together for comprehensive analysis in the test report; At the same time, the test report module supports visualization of the test report, and uses charts and graphs to visualize the test report.
2. The chaos engineering practice management system according to claim 1, characterized in that: The environment configuration module fills in the relevant environment parameters required by other modules in each environment set; the successfully created environment set is displayed as an option in the cluster switching drop-down box list on the overview page.
3. The chaos engineering practice management system according to claim 1, characterized in that: When customizing a scenario, the fault scenario customization module customizes or fills in the fault name, fault type, fault detailed configuration, and fault basic information.
4. The chaos engineering practice management system according to claim 1, characterized in that: The test suite module first identifies a specific task type according to a keyword of the task type, then pulls out a selected fault scenario according to the task type, and creates a workflow test suite of the corresponding task type according to the parent-child relationship of the fault scenario.
5. The chaos engineering practice management system according to claim 1, characterized in that: The scheduled task module uses the function of creating scheduled tasks, combines different test suites according to actual needs, generates corresponding scheduled tasks according to the custom scheduled task scheduling strategy, and automatically executes multiple test suites concurrently at the scheduled time.
6. The chaos engineering practice management system according to claim 5, characterized in that: The management side runs a continuous task to query the scheduled task list in the MySQL database every minute and trigger the scheduled task that meets the trigger condition; At the same time, to facilitate debugging and management, the chaos engineering practice management system provides immediate execution, enablement and disablement functions, allowing users to independently control the life cycle of scheduled tasks.
7. The chaos engineering practice management system according to claim 1, characterized in that: On the management side, a scheduled query script is executed to periodically pull all events generated during the execution of the test suite, and store the events in the MySQL database according to the test suite classification to prevent data loss; It is convenient for users to view all execution records in real time on the page.
8. The chaos engineering practice management system according to claim 1, characterized in that: The test report module designs a test report template according to requirements, including report format and content, and generates a test report with one click using an automated platform; Analyze the generated test reports, including but not limited to statistical test pass rate and failure reasons.
9. A testing method for a chaos engineering practice management system according to any one of claims 1 to 8, characterized in that: The following steps are involved: Step S1: The user registers through a browser and logs in to the Chaos Engineering Practice Management System; Step S2: The user creates or joins a test project on the browser side, creates and selects an environment set; after creating or importing test cases and test suites, executes the test suites, and customizes the scheduled tasks; Step S3: The server requests the MySQL database to obtain the test suite data and environment configuration information, and generates a test experiment creation request; Step S4: After the cloud-native chaos engineering platform chaos-mesh generates and executes the test experiment, it returns the test experiment result information; Step S5: After receiving the test result information, the server displays the test result to the user through the browser and stores the test result information in the MySQL database.
