Test method of test environment
Through the configuration and monitoring of the automated testing environment, combined with incremental snapshot technology and recovery strategies, the lack of flexible configuration and fault inspection in the test environment management in the existing technology, and improved the efficiency and accuracy of the test.
Patent Information
- Application Number
- CN202411476668.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-01-28
AI Technical Summary
The lack of flexible reconfiguration strategies and troubleshooting mechanisms in the management of test environments has led to test interruptions and inefficiency.
By obtaining test requirements documents, test scripts and test cases, analyze and match the model library to automatically configure the test environment, monitor the test index and automatically adjust the configuration, use incremental snapshot technology and backup technology for environmental snapshots and recovery.
The automated deployment and configuration management of the test environment is realized to ensure the consistency of the environment, reduce the manual configuration time, improve the accuracy and efficiency of the test, and provide automatic recovery strategies in abnormal conditions.
Smart Images

Figure CN119377130A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of test environment, and in particular to a test method for a test environment. Background Art
[0002] In the current software development and testing process, the management of the test environment is a critical and complex link. With the increasing complexity of software systems and the widespread application of distributed architectures, the requirements for test environments have become diversified and dynamic.
[0003] However, the test environment is usually affected by accidental factors during operation, which may cause the configuration of the test environment to continue to meet the test requirements. Existing environmental testing solutions often cannot reconfigure the test environment to continue to meet the test requirements, but only perform a simple preliminary analysis of the test requirements, and then perform a single configuration on the test environment without reconfiguring it, such as CN107301127A, a method and device for automated testing based on Robot Framework, which receives a configuration file input by a user, and deploys the test environment based on the configuration file. The configuration file can be the basis for deploying the test environment; users can write the configuration file of the test environment according to the test requirements or test case conditions, which often leads to unsatisfactory test results.
[0004] In addition, abnormal situations are inevitable in the test environment, which often lead to test interruptions. Existing environmental testing solutions lack troubleshooting strategies and flexible recovery strategies. Testers need to spend a lot of time on troubleshooting and environmental recovery, which seriously affects the continuity and progress of the test. Summary of the invention
[0005] In view of the deficiencies existing in the related art, the purpose of the present invention is to provide a testing method for a test environment to solve the technical problem that the existing environmental testing solutions in the prior art often cannot reconfigure the test environment to continue to meet the test requirements, but only perform a single configuration on the test environment after a preliminary and simple analysis of the test requirements and no longer reconfigure it, lack of troubleshooting strategies and flexible recovery strategies, testers need to spend a lot of time on troubleshooting and environmental recovery, which seriously affects the continuity and progress of the test.
[0006] The present invention provides a testing method for a testing environment, comprising the following steps:
[0007] S1. Obtain a test requirement document, a test script, and a test case, parse the test requirement document, the test script, and the test case to extract the test environment configuration requirements, match the test environment configuration requirements with a template in a preset template library or add a new template, configure the test environment according to the template, and automatically build and run the test environment based on the configuration;
[0008] S2, monitoring the test indicators of the test environment, matching the test indicators with the test environment configuration requirements one by one through a matching algorithm, and judging whether the test indicators meet the test environment configuration requirements by whether the test indicators match the test environment configuration requirements;
[0009] S3. If the test indicator does not meet the test environment configuration requirement, automatically adjusting the test environment configuration according to the test environment configuration requirement;
[0010] S4. Perform snapshot processing on the configuration of the test environment through incremental snapshot technology and incremental backup technology, and record the time point and changed data blocks.
[0011] The embodiment of the present invention automatically identifies test requirements and automatically deploys the test environment, which greatly reduces the complexity and time cost of manually configuring the environment. Through preset environment templates and automated deployment processes, it ensures that the environment configuration used for each test is consistent, avoiding test errors caused by environmental differences. It can monitor indicators in the test environment and analyze whether the configuration of the running test environment meets the required configuration requirements. If not, it can be automatically reconfigured, so that the configuration of the test environment can always meet the test requirements, thereby ensuring the accuracy and efficiency of the test.
[0012] In some embodiments of the present invention, the configuration of the test environment includes: network configuration, storage configuration, system configuration, software installation configuration, environment variable configuration, configuration file management, security configuration, performance monitoring configuration, application log configuration, automated test integration and health check configuration.
[0013] Automatically adjusting the configuration of the test environment includes: reconfiguring the software installation configuration, hardware resource configuration, network configuration, service status configuration, environment variable configuration, security configuration and performance optimization configuration in the test environment.
[0014] Hardware resource configuration includes allocating or releasing hardware resources according to the test environment configuration requirements and adjusting the resource limits of the system in the system configuration;
[0015] Service status configuration includes configuring service dependencies and startup order;
[0016] The performance optimization configuration includes adjusting system performance parameters according to the test environment configuration requirements.
[0017] The embodiment of the present invention can ensure that the environment and services remain in normal operation after startup by configuring the test environment. According to the preliminary configuration of the test environment, when the test environment after operation does not meet the test requirements, the preliminary configuration of the test environment can be automatically adjusted to continue to meet the test requirements.
[0018] In some embodiments of the present invention, the step S2 further includes: monitoring resource utilization of the test environment, and when the resource utilization exceeds a preset threshold, determining that an abnormality occurs in the test environment.
[0019] When an abnormal situation occurs in the test environment, the image of the server is restored to replace the abnormal server, the cause of the abnormality is analyzed according to the log information in the application log configuration and the test indicators of the monitored test environment, and the recovery strategy is matched according to the cause of the abnormality.
[0020] When the cause of the exception is application crash, the matching recovery strategy is to restart the server; when the cause of the exception is insufficient resources, the matching recovery strategy is to adjust resource allocation or expand the resource pool; when no corresponding recovery strategy is matched, an early warning message is output based on the cause of the exception.
[0021] When various unforeseen challenges occur during the operation of the test environment, the embodiment of the present invention can automatically analyze the cause of the abnormality, select a recovery strategy matching the cause of the abnormality, restore the test environment, and improve the test efficiency.
[0022] In some embodiments of the present invention, the dependency relationships between components of the test environment are analyzed by constructing a dependency graph, and the components in the test environment are installed in order according to the dependency relationships.
[0023] By parsing the dependency relationship of components, the embodiment of the present invention can install the components in a test environment configuration in a certain order, thereby ensuring that all necessary components can be correctly and orderly installed and configured during the configuration process.
[0024] In some embodiments of the present invention, step S4 further includes: recording the snapshot version and dependency information of each component in the test environment through a fine-grained rollback engine, and rolling back the test environment snapshot to the target state at the target time point through the fine-grained rollback engine.
[0025] The embodiment of the present invention uses snapshot technology to create an environment snapshot at any time during the test process to record the complete status of the current environment. If the test results are abnormal due to environmental changes or data pollution, the tester can quickly roll back to the previous snapshot state with one click and restore the test environment to a specific historical point, avoiding the tedious process of rebuilding the environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0027] Figure 1 A flow chart of a testing method for a testing environment provided by an embodiment of the present invention;
[0028] Figure 2 An application flow chart of a testing method for a testing environment provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0030] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0032] The technical solution of the present invention is described in detail below in conjunction with specific embodiments and the accompanying drawings.
[0033] As attached Figure 1 As shown, in an exemplary embodiment of a testing method for a testing environment of the present invention, the following steps are included:
[0034] S1. Obtain test requirement documents, test scripts and test cases, parse the test requirement documents, test scripts and test cases to extract test environment configuration requirements, match the test environment configuration requirements with templates in a preset template library or add new templates, configure the test environment according to the template, and automatically build and run the test environment based on the configuration; optionally, use natural language processing technology, machine learning technology, and deep learning models to parse test requirement documents, test scripts and test cases, where the deep learning model can be a Transformer-based deep learning model, such as BERT or GPT series, to perform deep semantic analysis on the test requirement document, and be able to identify complex grammatical structures, context dependencies and implicit environment configuration requirements in natural language, such as inferring the required database table structure, service dependencies, etc. from business logic descriptions; optionally, the test environment configuration requirements include software versions, patch levels, and settings for specific configuration files;
[0035] S2, monitoring the test indicators of the test environment, matching the test indicators with the test environment configuration requirements one by one through a matching algorithm, and judging whether the test indicators meet the test environment configuration requirements by whether the test indicators match the test environment configuration requirements; optionally, the test indicators include processor, memory, disk usage, network bandwidth, log, exception stack, system call, and environment operation status, wherein the environment operation status includes dividing the environment into running, idle, and fault states according to the test indicators;
[0036] S3. If the test indicator does not meet the test environment configuration requirement, automatically adjusting the test environment configuration according to the test environment configuration requirement;
[0037] S4. Use incremental snapshot technology and incremental backup technology to take snapshots of the test environment configuration and record time points and changed data blocks.
[0038] Based on the above method, test requirements are automatically identified and the test environment is automatically deployed, which greatly reduces the complexity and time cost of manual environment configuration. Through preset environment templates and automated deployment processes, the environment configuration used for each test is ensured to be consistent, avoiding test errors caused by environmental differences. It can monitor indicators in the test environment and analyze whether the configuration of the running test environment meets the required configuration requirements. If not, it can be automatically reconfigured, so that the configuration of the test environment can always meet the test requirements and ensure the accuracy and efficiency of the test.
[0039] Furthermore, the configuration of the test environment includes: network configuration, storage configuration, system configuration, software installation configuration, environment variable configuration, configuration file management, security configuration, performance monitoring configuration, application log configuration, automated test integration and health check configuration.
[0040] Among them, network configuration includes setting network topology (such as VLAN, subnet division), IP address allocation, firewall rules, and load balancing configuration; storage configuration is to configure data storage solutions, including database type (such as MySQL, MongoDB), file system, and backup strategy;
[0041] System configuration includes defining the required number of systems, i.e. virtual machines or containers, their specifications (CPU, memory, storage), and operating system versions;
[0042] Software installation and configuration includes installing necessary system updates, security patches, time zone settings, language packs according to template settings, installing and configuring web servers (such as Nginx, Apache), application servers (such as Tomcat, JBoss), database management systems (such as MySQL, PostgreSQL), message queues (such as RabbitMQ, Kafka), deploying application code to the specified directory, and configuring application startup scripts, environment variables, and log file paths;
[0043] Environment variable configuration includes setting system-level environment variables and application-specific environment variables, such as database connection information and third-party service API keys;
[0044] Configuration file management includes managing and configuring application configuration files, including database connection configuration files, log configuration files, and service configuration files;
[0045] Security configuration includes configuring system users and user groups, assigning necessary permissions and access controls, configuring SSL / TLS certificates, encrypting and storing sensitive data, setting up access authentication mechanisms (such as basic authentication, OAuth2), and implementing firewall rules, intrusion detection systems, and security audit logs;
[0046] Performance monitoring configuration includes configuring system performance monitoring tools (such as Prometheus and Grafana), collecting key indicators such as CPU, memory, and network bandwidth, setting alarm rules, and triggering alarm notifications when the system or application reaches the preset threshold;
[0047] Application log configuration includes configuring application logging levels, log file rotation strategies, and log analysis tools (such as ELK Stack);
[0048] Automated test integration includes integrating automated test frameworks (such as JUnit, pytest) and test data to ensure that the environment is configured correctly and the application runs as expected;
[0049] Health check configuration includes configuring health check scripts or services to ensure that the environment and services remain in normal operation after startup.
[0050] Furthermore, during the reconfiguration process, the system will automatically adjust the environment configuration according to the changes in the current environment status and test requirements to ensure that the environment can continue to meet the test requirements. First, the system continuously monitors various indicators of the test environment, including but not limited to resource utilization (CPU, memory, disk space), network status, service operation status, etc. Real-time data is collected through sensors, log analysis, performance monitoring tools, etc. Secondly, the system will analyze the current test requirements, including test cases, test scenarios, expected results, etc., and identify the specific requirements of the test requirements for the environment configuration, such as specific software versions, configuration parameters, resource restrictions, etc. According to the monitored environment status and test requirements, the decision algorithm within the system will evaluate whether the current environment configuration meets the test requirements (the degree of requirements of the tester on the server, such as whether it meets the requirements for deploying JAVA applications, whether the server CPU has 8 cores, etc.). If not, the system will automatically adjust the environment configuration according to the preset rules or policies. These rules or policies may be based on best practices, historical data, or expert knowledge. The system executes the adjusted environment configuration and re-evaluates the environment status to ensure the effectiveness of the adjustment. It checks whether the environment is correctly configured and meets the test requirements by running test cases or executing verification scripts. The system retains the historical records of each environment configuration adjustment, including configuration details before and after the adjustment, adjustment time, adjustment reasons, etc. These historical records can be used for subsequent retrospective analysis, troubleshooting, or configuration comparison.
[0051] Combining historical monitoring data with current environmental load conditions, we designed an adaptive threshold adjustment mechanism that can dynamically adjust the threshold range of monitoring indicators to more accurately reflect the health status and potential risks of the environment. For example, we can appropriately increase the threshold of performance indicators during high-load periods to avoid false positives.
[0052] Among them, automatically adjusting the configuration of the test environment includes: reconfiguring the software installation configuration, hardware resource configuration, network configuration, service status configuration, environment variable configuration, security configuration and performance optimization configuration in the test environment.
[0053] Software installation and configuration includes installing or uninstalling specific software packages, updating software versions or patches, and modifying software configuration parameters (such as database connection information, service port numbers, etc.);
[0054] Hardware resource configuration includes allocating or releasing hardware resources according to the test environment configuration requirements and adjusting the resource limits of the system in the system configuration; optionally, the hardware resources are CPU, memory, and disk space;
[0055] Network configuration includes modifying network topology or routing rules, configuring firewall rules or security group policies, and adjusting network bandwidth or latency settings to simulate different network environments;
[0056] Service status configuration includes configuring service dependencies and startup sequence; optionally, service status configuration also includes starting, stopping or restarting a specific service;
[0057] Environment variable configuration involves setting or modifying environment variables to affect the behavior of the application;
[0058] Security configuration includes configuring encryption, authentication, and authorization mechanisms to ensure the security of the environment;
[0059] The performance optimization configuration includes adjusting system performance parameters according to the test environment configuration requirements; optionally, the system performance parameters include cache strategy and concurrency control.
[0060] Combined with reference Figure 2 As shown, the resource utilization of the test environment is monitored. When the resource utilization exceeds a preset threshold, it is determined that the test environment is abnormal. Optionally, an early warning is set for the CPU. Under normal circumstances, the average CPU utilization is stable at about 30%. The system will calculate a more reasonable early warning value based on the maximum, minimum and average utilization of the server CPU. Optionally, optionally, time series analysis (such as ARI MA, LSTM, etc.) and machine learning algorithms (such as random forests, neural networks) are used to build an abnormal pattern recognition model. The model can learn the normal fluctuation range of monitoring data (a common method is to calculate the mean (μ) and standard deviation (σ) of monitoring data (such as CPU, disk occupancy, etc.), and then define a range based on these statistics, such as (μ-σ, μ+σ) or more stringent (μ-2σ, μ+2σ), as the normal fluctuation range), and identify abnormal patterns beyond the normal range, such as sudden performance degradation, periodic fault reproduction, etc., integrate log analysis, system call tracking, performance analysis and other technologies to build a root cause analysis engine.
[0061] When an abnormal situation occurs in the test environment, the server image is restored to replace the abnormal server. The cause of the abnormality is analyzed based on the log information in the application log configuration and the test indicators of the monitored test environment, and the recovery strategy is matched according to the cause of the abnormality. Before the recovery process is started, fault isolation and preliminary diagnosis are performed to determine the specific cause and scope of the problem, providing guidance for subsequent recovery operations. When an abnormality is detected, relevant logs, stack information and system call records can be automatically collected, and graph theory, decision tree and other algorithms can be used to analyze the path and root cause of the abnormal propagation, providing precise guidance for troubleshooting.
[0062] When the cause of the exception is an application crash, the matching recovery strategy is to restart the server; when the cause of the exception is insufficient resources, the matching recovery strategy is to adjust resource allocation or expand the resource pool; when the corresponding recovery strategy is not matched, the warning information is output based on the cause of the exception. According to the type of exception cause and the environmental status, the most appropriate recovery strategy is intelligently selected. The system will maintain a set of recovery strategies corresponding to the exception cause. After locating the type of exception cause, it will prioritize matching the corresponding rules. If it cannot be matched, it will issue a warning in time and ask relevant personnel to handle it. When various unforeseen challenges arise during the operation of the test environment, it can automatically analyze the cause of the exception, select a recovery strategy that matches the cause of the exception, restore the test environment, and improve test efficiency. Automated environment configuration and recovery significantly shortens the test preparation and recovery time, allowing the test team to focus more on the test itself, thereby accelerating the test cycle and speeding up product launch. By automating the environment configuration and recovery work, it reduces problems such as test failures or data loss caused by human operation errors, and improves the accuracy of the test.
[0063] In order to install components in a test environment configuration in a certain order, and to ensure that all necessary components can be correctly and orderly installed and configured during the configuration process, the dependency relationship between components in the test environment is analyzed by building a dependency graph, and the components in the test environment are installed in order according to the dependency relationship. For example, for JAVA applications, JDK needs to be configured in advance. The necessary components include:
[0064] Core application: This is the center of the test environment around which all other components are configured and depend on; the core application may be a software product, service, or platform, which defines the main functions and goals of the test environment.
[0065] Database and storage system: Databases are used to store application data and are an integral part of most applications. Storage systems may include file systems, object storage, or block storage to store unstructured data or large files.
[0066] Middleware and frameworks: Middleware and frameworks provide necessary services and functional support for applications, such as message queues, cache services, API gateways, etc.; these components usually run as independent services and interact with the core application.
[0067] Third-party libraries and plug-ins: Third-party libraries and plug-ins provide additional functionality or optimization for applications, such as logging, performance monitoring, security scanning, etc. These components may be provided by different developers or organizations and need to be properly integrated into the test environment.
[0068] Network services and infrastructure: Network services include load balancers, firewalls, VPNs, etc., which are used to ensure the security and availability of applications; infrastructure components such as virtual machines, containers, physical servers, etc., provide the basic environment for applications to run.
[0069] Build a knowledge graph of the test environment, including component relationship diagrams, fault case libraries, solution libraries, etc., and continuously enrich and improve the content of the knowledge graph by continuously collecting and analyzing data during environment configuration, operation, and recovery. At the same time, introduce advanced technologies such as graph embedding and knowledge reasoning to improve the intelligence level of the knowledge graph, and design a multi-stage recovery strategy engine, including preliminary repair, detailed diagnosis, environment reset and other stages. Each stage contains multiple recovery strategy options, such as restarting services, restoring backups, updating patches, etc. The engine intelligently selects the most appropriate recovery strategy combination based on factors such as the type of abnormal cause, environmental status, and recovery history, and automatically performs recovery operations. Advanced machine learning technologies such as reinforcement learning or transfer learning are introduced to build an environment self-learning mechanism. By continuously collecting and analyzing data feedback during environment configuration, operation, and recovery, the system can automatically optimize its configuration and recovery strategies to improve the efficiency and quality of future tests.
[0070] In addition, in order to create an environment snapshot at any time during the test process and record the complete status of the current environment, if the test results are abnormal due to environmental changes or data pollution, the tester can quickly roll back to the previous snapshot state with one click, restore the test environment to a specific historical point, and avoid the tedious process of rebuilding the environment. The fine-grained rollback engine records the snapshot version and dependency information of each component in the test environment, and rolls back the test environment snapshot to the target state at the target time point through the fine-grained rollback engine. Adopt snapshot technology, back up server data according to certain time rules, such as 5 days, 7 days, etc., develop efficient rollback algorithm, support fast positioning and recovery of environment status at a specific time point, and provide rollback preview function to help testers evaluate the impact of rollback operation. After the rollback is completed, automatically perform environmental consistency check to ensure that the environment status after rollback is consistent with expectations. Optionally, adopt efficient compression algorithms such as LZ4 and Zstandard to compress snapshot files to reduce storage space occupancy, combine with incremental backup technology to record only changed data blocks, further improve storage efficiency and transmission speed, introduce data deduplication and indexing technology to speed up snapshot retrieval and recovery.
[0071] It should be noted that the automatic testing method of the present invention also provides an integrated management platform and user experience optimization, adopts an intuitive and easy-to-use user interface design, integrates environment configuration, monitoring, recovery and rollback functions on the same platform, reduces the user's learning cost, supports multi-user collaboration and permission management functions, ensures information sharing and collaborative work between different roles and teams, provides rich report templates and customizable options, and helps users generate test environment reports that meet project requirements;
[0072] In addition, a graphical automated workflow editor is provided to allow users to design custom workflow templates by dragging and dropping. The editor supports multiple workflow node types (such as environment configuration nodes, monitoring nodes, recovery nodes, etc.) and logical relationship definitions between nodes (such as sequential execution, conditional branches, etc.) to meet the needs of complex test scenarios. Automated testing and continuous integration tools such as Jenkins and GitLab CI / CD are introduced to automate the testing and deployment of system codes. By building test suites and integrated test environments, the stability and reliability of code quality are ensured. At the same time, continuous integration tools are used to automate the build and deployment process to improve development efficiency and response speed.
[0073] It should be noted that the above is a reference for the testing method of the testing environment, and the present invention is not limited thereto.
[0074] The embodiments of the present invention realize the ability to automatically analyze whether the configuration of the running test environment meets the required configuration requirements. If not, it can be automatically reconfigured, so that the configuration of the test environment can always meet the test requirements, ensure the accuracy and efficiency of the test, and automatically analyze the cause of the exception, select a recovery strategy that matches the cause of the exception, restore the test environment, and improve the test efficiency. It solves the problem that the prior art cannot reconfigure the test environment to continue to meet the test requirements, but only performs a single configuration on the test environment after a preliminary and simple analysis of the test requirements and no longer reconfigures it, resulting in unsatisfactory test results and a lack of troubleshooting strategies and flexible recovery strategies. Testers need to spend a lot of time on troubleshooting and environment recovery, which seriously affects the continuity and progress of the test.
[0075] Finally, 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.
[0076] The above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present invention, which should be included in the scope of the technical solution for protection of the present invention.
Claims
1. A testing method for a testing environment, characterized in that: The steps include: S1. Obtain a test requirement document, a test script, and a test case, parse the test requirement document, the test script, and the test case to extract the test environment configuration requirements, match the test environment configuration requirements with a template in a preset template library or add a new template, configure the test environment according to the template, and automatically build and run the test environment based on the configuration; S2, monitoring the test indicators of the test environment, matching the test indicators with the test environment configuration requirements one by one through a matching algorithm, and judging whether the test indicators meet the test environment configuration requirements by whether the test indicators match the test environment configuration requirements; S3. If the test indicator does not meet the test environment configuration requirement, the configuration of the test environment is automatically adjusted according to the test environment configuration requirement.
2. The testing method of the testing environment according to claim 1, characterized in that: The configuration of the test environment includes: network configuration, storage configuration, system configuration, software installation configuration, environment variable configuration, configuration file management, security configuration, performance monitoring configuration, application log configuration, automated test integration and health check configuration.
3. The testing method of the testing environment according to claim 2, characterized in that: Automatically adjusting the configuration of the test environment includes: reconfiguring the software installation configuration, hardware resource configuration, network configuration, service status configuration, environment variable configuration, security configuration and performance optimization configuration in the test environment.
4. The testing method of the testing environment according to claim 3, characterized in that: The configuration of the test environment is also automatically adjusted: Hardware resource configuration includes allocating or releasing hardware resources according to the test environment configuration requirements and adjusting the resource limits of the system in the system configuration; Service status configuration includes configuring service dependencies and startup order; The performance optimization configuration includes adjusting system performance parameters according to the test environment configuration requirements.
5. The testing method of the testing environment according to claim 1, characterized in that: The step S2 further includes: monitoring the resource utilization of the test environment, and when the resource utilization exceeds a preset threshold, determining that an abnormality occurs in the test environment.
6. The testing method of the testing environment according to claim 5, characterized in that: The step S2 also includes: when an abnormal situation occurs in the test environment, the image of the server is restored to replace the abnormal server, the cause of the abnormality is analyzed according to the log information in the application log configuration and the test indicators of the monitored test environment, and the recovery strategy is matched according to the cause of the abnormality.
7. The testing method of the testing environment according to claim 6, characterized in that: The step S2 further comprises: When the cause of the exception is application crash, the matching recovery strategy is to restart the server; when the cause of the exception is insufficient resources, the matching recovery strategy is to adjust resource allocation or expand the resource pool; when no corresponding recovery strategy is matched, an early warning message is output based on the cause of the exception.
8. The testing method of the testing environment according to claim 1, characterized in that: The dependency relationships between components of the test environment are analyzed by constructing a dependency graph, and the components in the test environment are installed in order according to the dependency relationships.
9. The testing method of the testing environment according to claim 1, characterized in that: The method further comprises: S4. Perform snapshot processing on the configuration of the test environment through incremental snapshot technology and incremental backup technology, and record the time point and changed data blocks.
10. The test environment testing method according to claim 9, characterized in that: The step S4 further includes: recording the snapshot version and dependency information of each component in the test environment through a fine-grained rollback engine, and rolling back the test environment snapshot to a target state at a target time point through the fine-grained rollback engine.
Citation Information
Patent Citations
Robot Framework (RF)-based method and device of automated testing
CN107301127A