Automatic test method for bastion host performance, electronic equipment and storage medium

Through automated testing processes, the complex and inaccurate problems of manual testing in bastion machine performance evaluation are solved, and more accurate and reliable performance test results are achieved.

CN119766692AActive Publication Date: 2025-04-04BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411822109.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-04
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

In the prior art, the performance evaluation of the fortress machine mainly relies on manual testing, and the operation is complicated and it is easy to affect the accuracy and reliability of the test results due to human errors.

Method used

Provide an automatic test method for the performance of the basin machine. By creating a new automated test task, configuring performance parameter thresholds, automatically performing test tasks, continuously loading the operation and maintenance session and determining whether the actual performance parameters of the basin machine have reached the threshold. If it is reached, stop loading the operation and maintenance session, and continuously run the preset time to determine whether the stability preset indicators are met, and output the test report.

Benefits of technology

It reduces the cumbersomeness of manual operations, reduces the impact of human errors on test results, and improves the accuracy and reliability of test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766692A_ABST
    Figure CN119766692A_ABST
Patent Text Reader

Abstract

The invention provides an automatic test method for bastion host performance, electronic equipment, a computer readable storage medium and a computer program product, and relates to the field of operation and maintenance management, and the method comprises the steps: newly establishing an automatic test task, including configuring a performance parameter threshold value; automatically executing a test task, namely continuously loading the operation and maintenance session, and judging whether the actual performance parameter of the bastion host reaches a performance parameter threshold value or not; if the performance parameter threshold value is reached, stopping loading the operation and maintenance session; and continuously operating for preset time, judging whether a stability preset index is met, and outputting a test report. Through the automatic test process, the complexity of manual operation is reduced, the influence of human errors on the test result is reduced, the influence of human factors on test end condition judgment is eliminated, and the accuracy and reliability of the test result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of operation and maintenance management, and specifically, to an automatic testing method for bastion server performance, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] As a key component of network security, bastion hosts play a vital role in operation and maintenance management and security auditing. They are mainly used to centrally manage and monitor access to IT infrastructure to ensure the security and compliance of operations. With the development of technology and the increase in network security needs, the application scope of bastion hosts continues to expand, and enterprises have higher and higher performance requirements for bastion hosts, not only paying attention to the functional technical parameters of the equipment, but also paying more attention to the concurrent session processing capabilities.

[0003] In existing technologies, the performance evaluation of bastion hosts mainly relies on manual testing. However, this manual testing method is not only complicated to operate, but also prone to human error affecting the accuracy of test results. In addition, operation and maintenance personnel need to judge the end conditions of the test based on personal experience. This subjective judgment reduces the accuracy and reliability of the test output indicators. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide an automatic testing method for bastion host performance, an electronic device, a computer-readable storage medium, and a computer program product, which can reduce the tediousness of manual operations, reduce the impact of human errors on test results, and eliminate the impact of human factors on the judgment of test end conditions through automated testing processes, thereby improving the accuracy and reliability of test results.

[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for automatically testing the performance of a bastion host, including: creating a new automated test task, including configuring a performance parameter threshold; automatically executing the test task, including: continuously loading an operation and maintenance session, and determining whether the actual performance parameters of the bastion host reach the performance parameter threshold; if the performance parameter threshold is reached, stopping loading the operation and maintenance session; continuously running for a preset time, determining whether the preset stability index is met, and outputting a test report.

[0007] In one embodiment, the performance parameter thresholds include: connection tolerance rate, which is used to indicate the allowed proportion of failed connections; resource occupancy rate, which is used to indicate the maximum resource usage ratio of the bastion host; and instruction audit time, which is used to indicate the maximum time from instruction request to audit entry.

[0008] In one embodiment, the newly created automated testing task also includes: configuring relevant information of the bastion host and the asset, the relevant information of the bastion host and the asset including the IP address, account number and password, and protocol type of the bastion host and the asset; configuring preset stability indicators, the preset stability indicators including that after the bastion host reaches a performance parameter threshold, it continues to run for a preset time without a decrease in concurrent sessions.

[0009] In one embodiment, before the continuous loading of the operation and maintenance session, the automatically executing the test task further includes: automatically inputting relevant information of the bastion host and the asset to the bastion host according to the newly created automated test task, and configuring access rights to the asset.

[0010] In one embodiment, the continuously loading operation and maintenance sessions and determining whether the actual performance parameters of the bastion host have reached the performance parameter threshold include: adding operation and maintenance sessions one by one, and determining whether the actual performance parameters of the bastion host have reached the performance parameter threshold each time an operation and maintenance session is added.

[0011] In one embodiment, the actual performance parameters include actual fault tolerance rate, actual occupancy rate and actual audit time, and if the performance parameter threshold is reached, loading of the operation and maintenance session is stopped, including: if any one of the actual performance parameters reaches the performance parameter threshold, adding the operation and maintenance session is stopped.

[0012] In one embodiment, the continuous operation for a preset time and determining whether the preset stability index is met include: continuously operating for a preset time and regularly checking the number of concurrent sessions within the preset time; if the number of concurrent sessions decreases, determining that there is a performance abnormality and stopping the operation; if the number of concurrent sessions does not decrease, determining that the preset stability index is met and stopping the operation after the preset time is reached.

[0013] In one embodiment, the output test report includes: the resource status and system status of the bastion host at the beginning of the output test; the resource status and system status of the bastion host at the end of the output test; the resource status and system status of the bastion host when the performance parameter threshold is reached during the output test.

[0014] In one embodiment, after outputting the test report, the method further includes: automatically cleaning up the test environment and restoring the bastion host and assets to an initial state.

[0015] According to a second aspect of the present application, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the automatic testing method for the performance of a bastion host as described in the above embodiment.

[0016] According to a third aspect of the present application, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program can be executed by a processor to complete the automatic testing method of the bastion server performance described in the above embodiment.

[0017] According to a fourth aspect of the present application, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the automatic testing method for the bastion server performance described in the above embodiment.

[0018] According to the fifth aspect involved in the present application, an automatic testing device for the performance of a bastion host is also provided to realize the automatic testing method for the performance of the above-mentioned bastion host, including: a task establishment module, used to create a new automated testing task, including configuring performance parameter thresholds; a task execution module, used to automatically execute test tasks, including: continuously loading operation and maintenance sessions, and determining whether the actual performance parameters of the bastion host reach the performance parameter thresholds; a threshold judgment module, used to determine if the performance parameter threshold is reached, then stop loading the operation and maintenance session; a stability testing module, used to continuously run for a preset time, determine whether the preset stability indicators are met, and output a test report.

[0019] The above-mentioned embodiments provide an automatic testing method for bastion host performance, an electronic device, a computer-readable storage medium, and a computer program product, which reduce the tediousness of manual operations, reduce the impact of human errors on test results, and eliminate the impact of human factors on the judgment of test end conditions through automated testing processes, thereby improving the accuracy and reliability of test results. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 A schematic diagram of an application scenario of an automatic testing system for bastion host performance provided in an embodiment of the present application;

[0022] Figure 2 A flowchart of a method for automatically testing the performance of a bastion server provided in an embodiment of the present application;

[0023] Figure 3 A schematic diagram of a flow chart for determining a preset stability indicator provided in an embodiment of the present application;

[0024] Figure 4 A schematic diagram of a process for cleaning a test environment provided in an embodiment of the present application;

[0025] Figure 5 A detailed flowchart of a method for automatically testing the performance of a bastion server provided in an embodiment of the present application;

[0026] Figure 6 A schematic diagram of the structure of an automatic testing device for bastion host performance provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0028] Figure 1 A schematic diagram of an application scenario of an automatic testing system for bastion host performance provided in an embodiment of the present application, such as Figure 1 As shown, the application scenario includes an automatic test system 110 for bastion host performance, a bastion host 120, and an asset 130. The automatic test system 110 for bastion host performance communicates with the bastion host 120 and the asset 130 to implement performance testing and collect necessary data, and executes the automated process of bastion host performance testing, including configuring test parameters, starting test tasks, monitoring test execution, and collecting performance data. The bastion host 120 is a key component of network security, responsible for managing and monitoring access to internal network assets, and simulating real access scenarios by receiving test requests from the automatic test system 110 for bastion host performance and interacting with the asset 130. The asset 130 is an internal network resource managed by the bastion host 120, such as a server, database, etc. During the test process, the asset 130 simulates the actual business environment and responds to the access request of the bastion host 120.

[0029] The automatic testing system 110 for bastion host performance, the bastion host 120 and the assets 130 together form a closed-loop testing environment for simulating and evaluating the performance of the bastion host when processing user requests. The automatic testing system 110 for bastion host performance can interact with multiple assets 130 at the same time to test the performance under different configurations and load conditions. Figure 1 In the example, two assets 130 are used, but there is actually no limit on the number of assets.

[0030] Figure 2 A flowchart of a method for automatically testing the performance of a bastion server provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the steps S210 to S240 are included:

[0031] Step S210: Create a new automated test task, including configuring performance parameter thresholds.

[0032] Specifically, the user defines a new test task and configures the performance parameter thresholds in detail, such as setting the CPU usage to no more than 80%, the memory usage to no more than 60%, etc. These thresholds are preset performance upper limits, which are used to evaluate the performance of the bastion host during the test. In the prior art, the setting of performance parameters and the creation of test tasks are usually done manually, which is not only time-consuming but also prone to errors, resulting in inaccurate test configuration and affecting the reliability of the test results. This step creates new test tasks and configures performance parameter thresholds in an automated manner, which improves the error-prone and time-consuming problems of manual configuration in the prior art, ensures the accuracy and consistency of test parameters, and improves the repeatability and reliability of the test.

[0033] Step S220, automatically executing the test task, including: continuously loading the operation and maintenance session, and determining whether the actual performance parameters of the bastion host reach the performance parameter threshold.

[0034] Specifically, the system (i.e., the automatic testing system 110 for the bastion host performance mentioned above, hereinafter referred to as the system) automatically starts testing according to the configuration, gradually increases the simulated operation and maintenance sessions, and monitors the actual performance parameters of the bastion host, such as real-time monitoring of CPU and memory usage. Among them, the operation and maintenance session refers to a series of remote management and operation activities conducted through the bastion host, covering the entire process from logging in, executing commands to monitoring and auditing. In the prior art, test execution and performance monitoring often rely on manual operations, which leads to a slow testing process, and it is difficult to respond to performance changes in real time, and it is impossible to adjust the test strategy in time. This step realizes the automatic execution of test tasks and real-time performance monitoring, improves the problems of manual monitoring and insufficient response in the prior art, reduces human intervention, and improves the efficiency of testing and the accuracy of results.

[0035] Step S230: If the performance parameter threshold is reached, the loading operation and maintenance session is stopped.

[0036] Specifically, when the actual performance parameters monitored are close to or reach the performance parameter threshold, the system will automatically stop adding new operation and maintenance sessions to prevent the system from being overloaded or the performance from dropping to an unacceptable level. In the prior art, whether to stop the test usually requires manual judgment, which will cause response delays. The system may continue to bear unnecessary loads after reaching the performance limit, increasing the risk of system crashes. In this step, the system automatically stops adding new sessions, which improves the delays and system overloads that may be caused by relying on manual judgment in the prior art. The automated response mechanism ensures that the system can stop testing in time when the performance limit is reached, thereby protecting the stability of the system.

[0037] Step S240: Continue running for a preset time, determine whether the preset stability index is met, and output a test report.

[0038] Specifically, once the performance parameter threshold is reached, the system will maintain the current load for a preset time, such as 30 minutes, to verify the stability of the bastion host, and output a report containing the test results after the test is completed. In the prior art, stability tests often rely on manual monitoring and recording, which can easily lead to inaccurate and delayed test results, lack of real-time and objectivity. This step improves the efficiency and accuracy of the test while reducing human errors by automatically running for a preset time and monitoring performance in real time. The automated test report of this step provides objective performance data to help decision makers accurately assess system stability, identify risks in a timely manner, optimize resource allocation, and guide future system upgrades, thereby enhancing the performance and reliability of network security facilities.

[0039] In one embodiment, the performance parameter thresholds in step S210 include: connection tolerance rate, which is used to indicate the allowed proportion of failed connections; resource occupancy rate, which is used to indicate the maximum resource usage ratio of the bastion host; and instruction audit time, which is used to indicate the maximum time from instruction request to audit entry.

[0040] Specifically, creating a new automated test task involves creating a comprehensive test task that can automatically execute and evaluate the performance of the bastion host under different load conditions, covering detailed performance parameter threshold configuration to ensure the comprehensiveness and accuracy of the test. These performance parameter thresholds include key indicators such as connection fault tolerance, resource utilization, and command audit time. These thresholds serve as key condition constraints in the test to determine whether the test meets the expected performance standards and whether it is necessary to adjust the test strategy or optimize the system configuration.

[0041] Among them, the parameter of connection fault tolerance defines the maximum proportion of failed connections allowed in high-concurrency tests, so as to evaluate the stability and resilience of the system in the face of network fluctuations or anomalies. In the prior art, when performing performance testing, the judgment and decision-making process of fault tolerance often rely on manual operation, which is not only time-consuming, but also easily leads to inaccurate results. In the embodiment of the present application, the automated process judges the fault tolerance, reduces the time delay of manual decision-making, improves the efficiency of the test and the accuracy of the results. Exemplarily, if the business scenario has extremely high requirements for the reliability of the connection and no failed connections are allowed, the connection fault tolerance can be configured to 0, that is, a zero-tolerance policy is implemented. This is usually suitable for mission-critical systems that have extremely high requirements for continuity and stability.

[0042] The resource utilization parameter indicates the maximum utilization ratio of CPU and memory resources when the bastion host processes concurrent requests. Considering the differences between the bastion host and other security devices, as well as the differences between simulated concurrent performance tests and actual user usage, a certain proportion of resource utilization will be reserved during the test to simulate real operation and maintenance session interactions and system performance bottlenecks.

[0043] The parameter of instruction audit time measures the maximum time from request, response to audit storage of instructions after the establishment of the operation and maintenance session, reflecting the integrity of the operation and maintenance session channel and the response speed of the system. As a key performance indicator, instruction audit time is often ignored in the prior art because it is difficult to be captured and calculated by the human eye, although it is crucial for evaluating the success and reliability of concurrent sessions. The embodiments of the present application can automatically and accurately measure the instruction audit time, capture this subtle but critical performance indicator, and thus more accurately evaluate the success and reliability of concurrent sessions.

[0044] These thresholds together form the basis for evaluating whether the bastion host performance meets the expected standards and provide clear stop conditions for automated testing. Through these detailed configurations, automated testing can accurately simulate various scenarios in actual operation and maintenance operations and comprehensively evaluate the performance of the bastion host.

[0045] In one embodiment, in addition to the above-mentioned key performance parameter thresholds, the newly created automated testing task in step S210 specifically also includes: configuring relevant information of the bastion host and assets, and the relevant information of the bastion host and assets includes the IP address, account number and password, and protocol type of the bastion host and assets.

[0046] Configure the preset stability indicators. The preset stability indicators include that after the bastion host reaches the performance parameter threshold, it continues to run for a preset time (for example, 30 minutes) without a decrease in concurrent sessions.

[0047] Specifically, after configuring the key performance parameter thresholds, you must also configure the bastion host information and asset-related content configuration in detail. For setting the bastion host information, enter the device management IP address and port for remote access, and provide the administrator account and password for login verification. This basic information is a prerequisite for subsequent performance testing and monitoring operations. At the same time, you must also specify the communication protocol type, such as SSH, Telnet, or RDP, to ensure the compatibility and effectiveness of the test.

[0048] For the assets managed by the bastion host, it is necessary to list the IP address, port number, and access protocol of each asset in detail, and configure the corresponding access credentials and permissions for each asset to simulate real operation and maintenance operations. These configuration information ensures that the test tasks can correctly interact with the assets, comprehensively evaluate the performance of the bastion host under the actual workload, and ensure the accuracy and effectiveness of the test.

[0049] Through these detailed configurations, automated testing tasks can accurately simulate the operations of maintenance personnel on the bastion host and its managed assets, comprehensively evaluate the performance of the bastion host under actual workloads, and ensure the security and effectiveness of the test. These configuration information is the basis for the smooth execution of automated testing and is crucial for evaluating the performance and stability of the bastion host.

[0050] Specifically, the stability preset indicators refer to a series of performance standards set in performance testing to evaluate the stability of the system under continuous high load conditions. These indicators usually include whether the system can maintain a stable operating state for a certain period of time after reaching a certain performance parameter (such as CPU usage, memory usage, etc.) threshold without performance degradation or system crash.

[0051] The preset stability indicators include two main aspects: on the one hand, the preset continuous operation time. After the bastion host reaches a specific performance parameter threshold (such as CPU usage, memory usage, etc.), it needs to be able to continue to run stably for a preset period of time. The preset continuous operation time is the stable operation time. Among them, the stable operation time refers to the time that the session stability remains online after the maximum concurrency is reached, which is used to evaluate the performance of the system under high load. During this period, the system needs to maintain stable performance without performance degradation or system crash. On the other hand, the number of concurrent sessions has not decreased. During this period of continuous operation, the number of concurrent sessions that the bastion host can support must not decrease, which indicates that the system can continue to handle the same number of concurrent requests without causing some sessions to fail or disconnect due to resource competition or insufficient processing power.

[0052] By configuring preset stability indicators, a quantitative method is provided to evaluate the performance of the bastion host under high load conditions. These indicators help identify possible performance bottlenecks of the system, optimize resource allocation, and ensure that the system can maintain efficient and stable operation in the face of a large number of concurrent requests. By automating testing and monitoring these indicators, enterprises can better understand the performance characteristics of their network security infrastructure, thereby making more scientific technical decisions and system upgrade plans.

[0053] In one embodiment, before continuously loading the operation and maintenance session, step S220 also includes: automatically inputting relevant information of the bastion host and the asset into the bastion host according to the newly created automated testing task, and configuring access rights to the asset.

[0054] Specifically, during the automatic execution of test tasks, the system will automatically input pre-configured bastion host and asset-related information to the bastion host according to the requirements of the newly created automated test tasks. This includes but is not limited to the bastion host's IP address, management port, administrator account and password, as well as the network location, access credentials and communication protocols of all relevant assets. In addition, the system will automatically configure the access rights of the assets to ensure that during the test process, the operation and maintenance users can correctly operate and access the assets according to the preset security policies and permission requirements. This automated step not only improves the efficiency of the test, but also reduces human errors and ensures the accuracy and security of the test. In this way, the test task can seamlessly interact with the bastion host and the assets it manages, simulate real operation and maintenance operation scenarios, and comprehensively evaluate the performance and stability of the bastion host.

[0055] In one embodiment, step S220 continuously loads the operation and maintenance session and determines whether the actual performance parameters of the bastion host reach the performance parameter threshold, specifically including: adding the operation and maintenance sessions one by one, and each time an operation and maintenance session is added, determining whether the actual performance parameters of the bastion host reach the performance parameter threshold.

[0056] Specifically, during the automated performance test, the system will simulate actual operation and gradually increase the number of operation sessions. Each time an operation session is added, the system will monitor and determine in real time whether the actual performance parameters of the bastion host, such as CPU usage, memory usage, network traffic, and response time, have reached the preset performance parameter threshold. This method of adding sessions one by one allows the system to carefully monitor the performance of the bastion host under different loads and promptly discover performance bottlenecks and potential stability issues.

[0057] In addition, this testing method of gradually adding sessions also helps to simulate real business scenarios, where user sessions and system loads tend to increase gradually. By making performance judgments immediately after each session is added, the system can ensure that timely measures are taken when performance parameters approach or exceed thresholds, such as stopping the addition of new sessions or adjusting system configurations to avoid system overload and ensure service quality. This method also provides testers with detailed performance data to help them understand the behavior of the bastion host at different load levels, thereby optimizing system configuration, improving system performance, and ensuring that business needs can be met in actual operations and maintenance. Through this detailed control and real-time monitoring of automated test tasks, enterprises can more accurately evaluate and improve the performance and stability of the bastion host.

[0058] In one embodiment, the actual performance parameters include actual fault tolerance rate, actual occupancy rate and actual audit time. If the performance parameter threshold is reached, loading of the operation and maintenance session is stopped, including: if any one of the actual performance parameters reaches the performance parameter threshold, adding the operation and maintenance session is stopped.

[0059] Specifically, the system will continuously monitor the actual performance parameters of the bastion host, including but not limited to key indicators such as CPU usage, memory usage, disk I / O, network bandwidth utilization, and response time. These parameters are tracked in real time and compared with pre-set performance parameter thresholds. Once any actual performance parameter reaches or exceeds the set threshold, the system will automatically respond and stop adding further operation and maintenance sessions.

[0060] This automatic stop mechanism is designed to prevent the bastion host from experiencing performance degradation or system instability due to overload, ensuring that the testing process is both safe and effective. In this way, the test can accurately determine the performance limit of the bastion host without compromising system stability. Once the performance threshold is reached, the system will maintain the current session level, continue monitoring for a period of time to collect stability data, or begin executing other predetermined test scenarios, such as load reduction testing, to evaluate the system's response and recovery capabilities under different load conditions.

[0061] In addition, when the actual performance parameters reach the performance parameter threshold, the system can also automatically record the detailed performance data and system status at that moment, providing key information for subsequent performance analysis and reporting. This helps testers and system administrators to deeply understand the behavior of the system under high load conditions, and optimize system configuration accordingly to improve performance and reliability.

[0062] In one embodiment, Figure 3 A schematic diagram of a flow chart for determining a preset stability indicator provided in an embodiment of the present application, such as Figure 3 As shown, step S240 continues to run for a preset time, determines whether the preset stability index is met, and outputs a test report, which specifically includes the following steps S241-S243:

[0063] Step S241, continue running for a preset time, and regularly check the number of concurrent sessions within the preset time.

[0064] Step S242: If the number of concurrent sessions decreases, it is determined that there is a performance anomaly and the operation is stopped.

[0065] Step S243: If the number of concurrent sessions does not decrease, it is determined that the preset stability index is met and the operation is stopped after the preset time is reached.

[0066] Specifically, the preset continuous operation time is a key part of the stability test, which aims to verify the performance stability of the bastion host under long-term high load conditions. During the preset continuous operation time, the system will regularly check the number of concurrent sessions on the bastion host to monitor whether the system can stably handle the predetermined number of sessions without performance degradation.

[0067] If the number of concurrent sessions decreases within a preset time, the system will determine that there is a performance anomaly. This may mean that system resources are exhausted, processing power is reduced, or other potential performance issues. Once this situation is detected, the test will be stopped for further analysis and problem solving. For example, in a performance test, once any decrease in the number of concurrent sessions is found, even if it is only 1 session, the test will stop immediately. Such a design is highly sensitive and can capture any abnormal signs of system performance at the first time. In addition, this approach also allows testers to intervene quickly, analyze the cause of the problem, and adjust the test strategy or optimize the system configuration when necessary to ensure the stability and efficiency of subsequent tests or actual operations.

[0068] If the number of concurrent sessions remains stable and does not decrease throughout the preset time, the system will determine that the bastion host meets the preset stability indicators. This indicates that the bastion host can maintain stable performance under high load conditions without performance degradation. Regardless of the test results, the system will stop running after the preset time is reached and output a detailed test report. The report will include performance data during continuous operation, changes in the number of concurrent sessions, and the final stability test conclusions, providing testers with comprehensive test analysis and decision support. In this way, the automated performance testing method can not only comprehensively evaluate the stability of the bastion host, but also promptly discover performance problems, providing accurate data support for system optimization and maintenance.

[0069] In one embodiment, the test report is output, including: outputting the resource status and system status of the bastion host at the beginning of the test; outputting the resource status and system status of the bastion host at the end of the test; and outputting the resource status and system status of the bastion host when the performance parameter threshold is reached during the test.

[0070] Specifically, in the automated performance testing method of the present invention, outputting a test report is a key link, which records the entire test process in detail and provides an in-depth analysis of the bastion host performance. The content of the test report includes but is not limited to the following aspects:

[0071] At the beginning of the test, the report first records the resource status and system status of the bastion host in detail, including key resource indicators such as CPU usage, memory usage, disk space, network connection status, as well as system-level information such as system logs and service operation status. These data provide a baseline for the test and are used to compare with status changes during the test.

[0072] At the end of the test, the report records the resource status and system status of the bastion host again to evaluate the impact of performance changes during the test and determine whether the system has returned to its initial state. This helps identify the long-term impact of the test on system stability and performance.

[0073] During the test, whenever the actual performance parameters of the bastion host reach the preset performance parameter threshold, the report will record in detail the resource status and system status at that moment. This includes the specific time point when the threshold is reached, the relevant performance parameter values, the usage of system resources, etc., providing accurate data support for analyzing performance bottlenecks and system limits.

[0074] Through these detailed test reports, testers and system administrators can fully understand the performance of the bastion host under different load conditions, promptly identify performance bottlenecks and potential stability issues, and optimize system configuration and operation and maintenance strategies accordingly. Test reports provide valuable data and insights for performance analysis, troubleshooting, and system optimization, and are an important basis for evaluating test results and guiding system improvements.

[0075] In one embodiment, Figure 4 A flow chart of cleaning the test environment provided in the embodiment of the present application is as follows: Figure 4 As shown, after outputting the test report in step S240, the following steps are also included:

[0076] Step S250: automatically clean up the test environment and restore the bastion host and assets to their initial state.

[0077] Specifically, after outputting a detailed test report, the system also automatically cleans up the test environment to ensure that the bastion host and related assets are restored to their initial state before the test. This process involves undoing the configuration changes made during the test, releasing all used resources, clearing temporary data and log files, and verifying the system status to ensure that no negative impact caused by the test is left. The automatic cleanup step helps keep the test environment clean and secure, and reduces errors and omissions that may be caused by manual cleanup after the test. This automated process improves the efficiency and accuracy of the test, ensures the integrity of the test environment, and provides a reliable foundation for subsequent testing or normal operation and maintenance activities.

[0078] Figure 5 It is a detailed flow chart of a method for automatically testing the performance of a bastion server provided in an embodiment of the present application, such as Figure 5 As shown, the automatic testing method for the bastion host performance includes the following steps S100 to S700:

[0079] Step S100: creating a new automated test task, including configuring performance parameter thresholds.

[0080] Specifically, in this step, create a new automated test task and configure key performance parameter thresholds, including connection fault tolerance, resource utilization, and time settings. The time settings cover stable operation time and command audit time. The stable operation time refers to the preset continuous operation time, which means the time the system remains online to ensure connection stability after reaching the maximum concurrent sessions. The command audit time refers to the time from the establishment of the operation and maintenance session to the command request and response to the audit storage. In addition, detailed information about the bastion host and assets needs to be configured, including IP addresses, user names and passwords, protocols, etc.

[0081] Step S200: Execute the test task.

[0082] Specifically, after configuration is complete, automated test tasks can be started manually or automatically triggered according to a predetermined plan. Manual start provides flexibility, allowing testers to immediately execute the test after confirming that all preparations are correct, and choose the best test time based on network conditions and system load. Automatic triggering runs the test during periods of low system load, reducing the impact on the business, ensuring the continuity and periodicity of the test, and facilitating long-term performance monitoring.

[0083] Step S300: Record resource status and system status, and output to a test report.

[0084] Specifically, when the automated testing task starts, the system automatically captures the initial resources and system status of the bastion host, including CPU and memory usage, and outputs this data to the test report in real time, providing benchmark information for subsequent performance analysis.

[0085] Step S400: Automatically input the bastion host and asset configuration.

[0086] Specifically, the system will automatically enter the pre-configured asset information in the bastion host and set the necessary access rights for the operation and maintenance users to simulate the real operation and maintenance environment.

[0087] Step S500: Execute single sign-on and monitor performance parameters.

[0088] Specifically, when the single sign-on test starts, the system automatically logs in to the bastion host as an operation and maintenance user, adds sessions one by one, and monitors the fault tolerance rate, resource usage, and command audit time after each increase. If any parameter reaches the preset threshold, that is, the maximum performance index, step S510 is executed to stop adding single sign-ons. Once the maximum performance index is reached, step S300 is executed to output the resource status and system status of the bastion host when the performance parameter threshold is reached during the test to the test report to evaluate the performance limit.

[0089] Step S600: Continue stability operation and monitoring.

[0090] Specifically, after reaching the performance parameter threshold, the system enters a continuous operation state, and continuously executes step S610 to check whether the number of concurrent sessions is decreasing. If the number of sessions decreases, it indicates that there may be performance anomalies. The test will end the test early and execute step S300 to output to the test report. If the number of sessions remains stable, step S620 is executed to determine whether the stable operation time has been reached. After waiting for the preset continuous operation time (i.e., the stable operation time) to end, step S300 is executed. That is, after the stability test is completed, the system will record the resource status and system status, and output the results to the test report to evaluate the stability of the bastion host under long-term operation.

[0091] Step S700: Clean up the test environment.

[0092] Specifically, the system will clean up the bastion host and assets, restore them to their initial state before the test, ensure the cleanliness of the test environment, and formally end the automated test task.

[0093] Taking an actual application scenario as an example, the process of implementing automatic testing of bastion host performance is as follows:

[0094] The test parameters were set, including 1% fault tolerance, 90% maximum resource usage threshold, 30 minutes of stable operation time, and 200 milliseconds of command audit time. The bastion host IP address involved in the test was 192.168.1.25, and the managed asset IP address range was 192.168.1.2xx.

[0095] Start the automated test task and execute it according to the preset parameters and conditions.

[0096] The system automatically logs in to the bastion host and automatically configures related assets, including entering the account password and adding necessary authorization relationships for the operation and maintenance user.

[0097] Synchronously monitor and record the resource usage of the bastion host, such as CPU usage of 10%, memory usage of 30%, and disk usage of 10%, and output this data to the test report.

[0098] Automatically log in as an operation and maintenance user, perform single sign-on testing, add sessions one by one, and after each addition, determine whether the fault tolerance rate, resource usage, and instruction audit time meet the preset conditions.

[0099] When the number of sessions increases to 100, if more than 2 connections fail, the number of single sign-ons will be stopped; if the resource usage reaches 90%, or the instruction audit time of the 100th connection exceeds 200 milliseconds, the number of new sessions will also be stopped.

[0100] After reaching the maximum performance index, the resource status and system status of the equipment are recorded and these key data are output to the test report.

[0101] Enter the 30-minute stable operation phase, during which the number of concurrent sessions is regularly checked to see if it has decreased. If it has decreased, it is considered that there is a performance anomaly and the next step is carried out directly; if it has not decreased, continue monitoring until the stable operation time ends.

[0102] After the stability test is completed, the resource status and system status of the device are recorded again and the results are output to the test report.

[0103] Finally, clean up the test environment, restore the bastion host and assets to their initial state, ensure the cleanliness of the test environment, and then end the test task.

[0104] Based on the network security protection method provided in any of the above embodiments and based on the same inventive concept, an embodiment of the present application provides an automatic testing device 1000 for bastion server performance to implement the above-mentioned automatic testing method for bastion server performance. Figure 6 A schematic diagram of the structure of the automatic testing device for the bastion server performance provided in the embodiment of the present application is shown in FIG. Figure 6 As shown, the automatic testing device 1000 for the performance of the bastion host in the embodiment of the present application at least includes: a task establishment module 1001, a task execution module 1002, a threshold judgment module 1003, and a stability testing module 1004, wherein:

[0105] The task establishment module 1001 is used to create a new automated test task, including configuring performance parameter thresholds.

[0106] The task execution module 1002 is used to automatically execute the test task, including: continuously loading the operation and maintenance session, and determining whether the actual performance parameters of the bastion host reach the performance parameter threshold.

[0107] The threshold determination module 1003 is used to determine if the performance parameter threshold is reached and then stop loading the operation and maintenance session.

[0108] The stability test module 1004 is used to continuously run for a preset time, determine whether the preset stability index is met, and output a test report.

[0109] The specific execution process of each of the above modules can be found in the corresponding steps of the method section, which will not be repeated here.

[0110] An embodiment of the present application also provides an electronic device, which may include a processor and a memory for storing processor executable instructions, and the processor is configured to implement the steps of the automatic testing method of the bastion host performance of any of the above embodiments.

[0111] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program can be executed by a processor to complete the steps of the automatic testing method of the bastion host performance of any of the above embodiments.

[0112] An embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the automatic testing method for the bastion host performance of any of the above embodiments.

[0113] In summary, the technical solution provided by the embodiment of the present invention has the following advantages:

[0114] The present invention provides a novel method to determine the maximum number of sessions supported by the bastion host by gradually increasing the number of sessions until the maximum performance index is reached. This method is more accurate and efficient than traditional technologies. It can monitor the number of concurrent sessions in real time, intelligently judge performance anomalies, and stop the test in time to avoid resource waste and system risks, thereby improving the accuracy of the test and the stability of the system.

[0115] In addition, the automated testing mechanism of the present invention not only optimizes resource allocation, but also strengthens risk management. By stopping the addition of sessions when performance parameters reach the threshold, it avoids excessive consumption of system resources and reduces the risk of crashes or performance degradation caused by system overload. By accurately evaluating the performance of the bastion host, enterprises can make more scientific decisions based on detailed performance data, thereby enhancing the performance and security of network security facilities.

[0116] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative.

[0117] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM) random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0118] The above are only embodiments of the present application and are not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for automatically testing the performance of a bastion server, characterized in that: include: Create new automated test tasks, including configuring performance parameter thresholds; Automatically executing the test task, including: continuously loading the operation and maintenance session, and determining whether the actual performance parameter of the bastion host reaches the performance parameter threshold; If the performance parameter threshold is reached, the loading operation and maintenance session is stopped; Continue to run for the preset time, determine whether the preset stability indicators are met, and output a test report.

2. The method according to claim 1, characterized in that The performance parameter thresholds include: Connection fault tolerance rate, which is used to indicate the allowed proportion of failed connections; Resource occupancy rate, used to indicate the maximum resource usage ratio of the bastion host; Instruction audit time is used to indicate the maximum time from instruction request to audit storage.

3. The method according to claim 1, characterized in that The newly created automated test task also includes: Configure the relevant information of the bastion host and the asset, including the IP address, account number and password, and protocol type of the bastion host and the asset; Configure preset stability indicators, which include that after the bastion host reaches a performance parameter threshold, it continues to run for a preset time without a decrease in concurrent sessions.

4. The method according to claim 3, characterized in that Before the continuous loading of the operation and maintenance session, the automatic execution of the test task further includes: According to the newly created automated testing task, the relevant information of the bastion host and the assets is automatically input to the bastion host, and the access rights of the assets are configured.

5. The method according to claim 1, characterized in that The continuously loading operation and maintenance session and determining whether the actual performance parameter of the bastion host reaches the performance parameter threshold value includes: The operation and maintenance sessions are added one by one. Each time an operation and maintenance session is added, it is determined whether the actual performance parameter of the bastion host reaches the performance parameter threshold.

6. The method according to claim 1, characterized in that The actual performance parameters include actual fault tolerance rate, actual occupancy rate and actual audit time. If the performance parameter threshold is reached, the loading of the operation and maintenance session is stopped, including: If any one of the actual performance parameters reaches the performance parameter threshold, adding the operation and maintenance session is stopped.

7. The method according to claim 1, characterized in that The continuous operation preset time determines whether the preset stability index is met, including: Running continuously for a preset time and periodically checking the number of concurrent sessions during the preset time; If the number of concurrent sessions decreases, it is determined that there is a performance anomaly and the operation is stopped; If the number of concurrent sessions does not decrease, it is determined that the preset stability index is met and the operation is stopped after the preset time is reached.

8. The method according to claim 1, characterized in that The output test report includes: Output the resource status and system status of the bastion host at the start of the test; Output the resource status and system status of the bastion host at the end of the test; Outputs the resource status and system status of the bastion host when it reaches the performance parameter threshold during the test.

9. The method according to claim 1, characterized in that: After outputting the test report, the method further includes: Automatically clean up the test environment and restore the bastion host and assets to their initial state.

10. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the automatic testing method of the bastion host performance described in any one of claims 1-9.

11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program can be executed by a processor to complete the automatic testing method of the bastion server performance as described in any one of claims 1-9.

12. A computer program product, characterized in that It includes a computer program / instruction, which, when executed by a processor, implements the automatic testing method for the bastion server performance described in any one of claims 1-9.

Citation Information

Patent Citations

  • Performance test method, device, system and equipment and storage medium

    CN109977027A

  • Performance test index data display method, device and equipment and storage medium

    CN112527642A

  • A system, method and article of manufacture for network performance modeling

    WO2001010082A2