Performance test system and method of integrated Jmeter
By integrating Jmeter's performance testing system, the existing performance testing tools are solved for large-scale testing, insufficient automation and scalability, complex operation and poor ease of use, lack of real-time monitoring functions and low team collaboration rates during large-scale testing, and efficient, accurate and reliable performance testing is achieved.
Patent Information
- Application Number
- CN202510321654.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-06-17
AI Technical Summary
Existing performance testing tools consume a lot of resources during large-scale testing, lack of automation and scalability, complex operation and poor ease of use, lack of real-time monitoring functions, and low reliability, and low team testing collaboration rate.
It provides a performance testing system that integrates Jmeter, including acquisition modules, new modules, test modules and monitoring modules, through which the pressure measurement resources are obtained and allocated, new and executed test tasks, and real-time monitoring of response time, throughput, error rate and resource usage during the test process, and generate test reports.
Through interface operation, the efficiency of performance testing is significantly improved, the test cycle is shortened, and the testing cost is reduced. By monitoring the test process in real time, exceptions and errors in the test can be discovered and processed in a timely manner, the accuracy and reliability of the test are improved, the operation process is simplified, and the team collaboration efficiency is improved.
Smart Images

Figure CN120162267A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software testing technologies, and particularly to a performance testing system and method integrating Jmeter. Background Art
[0002] Apache JMeter, as an open-source and widely used software performance testing tool, provides powerful functional support for developers and testers. However, although JMeter performs well in both GUI (Graphical User Interface) and non-GUI (Command Line Interface) modes, there are still a series of limitations and deficiencies, which are particularly obvious in large-scale performance testing scenarios.
[0003] In the GUI mode, the intuitiveness and ease of use of JMeter bring convenience to users, making the formulation of test plans, the writing of scripts, and the preliminary analysis of results relatively simple. However, behind this intuitiveness lies a significant performance bottleneck. When conducting large-scale tests, the high resource consumption of the GUI mode will seriously affect the accuracy and reliability of test results. In addition, the GUI mode also limits the automation level of testing, making the writing, execution, and management of test scripts cumbersome and inefficient.
[0004] To reduce resource consumption and improve the automation level of testing, users usually choose the non-GUI mode of JMeter. However, although this mode can reduce resource consumption, the operation is relatively complex and requires users to have certain command-line operation knowledge. More critically, the non-GUI mode lacks the ability to monitor in real time and dynamically adjust test plans, which makes it extremely difficult to debug and troubleshoot problems during the testing process. Users cannot understand the test progress and performance in real time, nor can they make adjustments and optimizations in a timely manner based on test results.
[0005] In addition to the limitations of the GUI and non-GUI modes respectively, JMeter also faces other challenges. For example, its test task and script management usually rely on the offline manual maintenance of testers, which leads to low collaboration efficiency in aspects such as test plan formulation, script writing, task execution, and result analysis. In addition, JMeter also has deficiencies in generating test reports. In the GUI mode, although real-time stress test reports can be viewed through third-party plugins, the performance is poor and it is generally not adopted. In the non-GUI mode, JMeter can only generate result reports, and users need to manually download them and then conduct specific analysis.
[0006] In terms of resource monitoring, the default configuration of JMeter does not support performance monitoring. In GUI mode, although it is possible to monitor basic metrics such as CPU, memory, and network by extending the listener plugin, the scalability is limited. In non-GUI mode, other monitoring tools need to be used to monitor the resources of the load testing machine. This additional configuration and tool usage undoubtedly increase the complexity and cost of testing.
[0007] In addition, the single-machine mode of JMeter is limited by its own mechanism and hardware configuration under general stress machine configurations. Although the test scale can be increased by increasing the number of simulated request threads, limited by JMeter's own performance and hardware configuration, it can support at most several hundred to about a thousand simulated request threads. Conducting a large number of distributed Slave deployments will bring difficulties in operation and maintenance management. At the same time, the Master-Slave mode of JMeter will also bring a great deal of interaction pressure to the master node, making it impractical to deploy large-scale distributed cluster load testing.
[0008] In summary, although Apache JMeter has wide applications and recognition in the field of software performance testing, both its GUI and non-GUI modes have deficiencies. These limitations and challenges not only affect the efficiency and effectiveness of performance testing but also increase the complexity and cost of testing. Therefore, it is necessary to improve and optimize JMeter to better meet the needs of large-scale performance testing. Summary of the Invention
[0009] This application provides a performance testing system and method integrating Jmeter to solve problems such as high resource consumption, insufficient automation and scalability, complex operation and poor usability, lack of real-time monitoring function and low reliability, and low team test collaboration rate in large-scale testing with existing performance testing tools.
[0010] The first aspect of the embodiments of this application provides a performance testing system integrating Jmeter, including: an acquisition module for acquiring the load testing resources, new test task instructions, test parameter setting instructions, and test scenario setting instructions corresponding to the current test project; a new module for creating a to-be-tested task under the current test project using the new test task instructions; a test module for testing the to-be-tested task according to the test parameter setting instructions, the test scenario setting instructions, and the load testing resources; a monitoring module for monitoring the response time, throughput, error rate of the to-be-tested task during the test process, and the usage of the load testing resources, and generating a test report of the to-be-tested task based on the response time, the throughput, the error rate, and the usage of the load testing resources.
[0011] Optionally, the above performance testing system integrated with Jmeter further includes: a management module, configured to receive a creation instruction from an administrator, create a stress testing resource pool and multiple test projects based on the creation instruction, and match corresponding stress testing resources from the stress testing resource pool according to the test requirements of each test project.
[0012] Optionally, the management module includes: a new unit, configured to receive a creation instruction from an administrator and create the stress testing resource pool and the multiple test projects based on the creation instruction; an allocation unit, configured to match corresponding stress testing resources from the stress testing resource pool according to the test requirements of each test project; and a resource recovery unit, configured to recover the remaining stress testing resources to the stress testing resource pool according to the usage of the stress testing resources.
[0013] Optionally, the new module includes: a script writing unit, configured to write a Jmeter test script for the task to be tested; a storage unit, configured to store the Jmeter test script; a version control unit, configured to perform version control on the Jmeter test script; and a setting unit, configured to set test parameters and test scenarios for the task to be tested.
[0014] Optionally, the monitoring module further includes: a recording unit, configured to record the response time, throughput, and error rate of the task to be tested during the test process, and record the usage of the stress testing resources.
[0015] Optionally, the monitoring module further includes: an analysis unit, configured to generate a Jmeter test report for the task to be tested based on the response time, throughput, error rate, and usage of the stress testing resources; and a display unit, configured to display the Jmeter test report.
[0016] Optionally, the above performance testing system integrated with Jmeter further includes: a download module, configured to receive a download instruction from a tester and download the Jmeter test report to a smart terminal; and a sharing module, configured to receive a sharing instruction from the tester and share the Jmeter test report to the smart terminal.
[0017] Optionally, the new module further includes: an adjustment unit, configured to adjust at least one of the number of concurrent users, execution mode, stress testing duration, and thread time in the test parameters.
[0018] Optionally, the monitoring module further includes: a monitoring unit, configured to identify error information of the task to be tested during the test process through a preset algorithm; and a reminder unit, configured to remind the tester of the error information of the task to be tested during the test process through a preset reminder method.
[0019] The second aspect of the present application provides a performance testing method integrating Jmeter, including the following steps: obtaining stress testing resources, a new test task instruction, a test parameter setting instruction, and a test scenario setting instruction corresponding to the current test project; creating a to-be-tested task under the current test project by using the new test task instruction; testing the to-be-tested task according to the test parameter setting instruction, the test scenario setting instruction, and the stress testing resources, and monitoring the response time, throughput, error rate, and the usage of the stress testing resources during the testing process of the to-be-tested task, so as to generate a test report of the to-be-tested task according to the response time, the throughput, the error rate, and the usage of the stress testing resources.
[0020] In the above implementation manner, the stress testing resources, the new test task instruction, the test parameter setting instruction, and the test scenario setting instruction corresponding to the current test project are obtained through the obtaining module; the to-be-tested task is created under the current test project by using the new test task instruction through the new creating module; the to-be-tested task is tested according to the test parameter setting instruction, the test scenario setting instruction, and the stress testing resources through the testing module; the response time, throughput, error rate, and the usage of the stress testing resources during the testing of the to-be-tested task are monitored through the monitoring module, and a test report of the to-be-tested task is generated. Thereby, the problems of large resource consumption, insufficient automation and scalability, complex operation and poor usability, low reliability due to lack of real-time monitoring function, and low team test collaboration rate in existing performance testing tools are solved. The efficiency of performance testing is significantly improved through graphical operation, the test cycle is shortened, and the test cost is reduced. By real-time monitoring the testing process, anomalies and errors in the testing can be discovered and processed in a timely manner, improving the accuracy and reliability of the testing. Through platform management, performance testing becomes simpler and easier to use, reducing the complexity and maintenance cost of the testing work. Resource allocation can be performed according to different test requirements, meeting the performance testing requirements in different scenarios, supporting multiple people to participate in the test task simultaneously, and improving the overall efficiency and collaboration effect of the testing work.
[0021] Additional aspects and advantages of the present application will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present application. Description of the Drawings
[0022] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description of the embodiments in conjunction with the drawings, where:
[0023] Figure 1 It is a schematic diagram of a performance testing system integrating Jmeter according to an embodiment of the present application;
[0024] Figure 2Schematic diagram of the performance testing system integrating Jmeter according to an embodiment of the present application;
[0025] Figure 3 Test flow chart of the performance testing system integrating Jmeter according to an embodiment of the present application;
[0026] Figure 4 Flow chart of the performance testing method integrating Jmeter according to an embodiment of the present application. Detailed implementation manners
[0027] The embodiments of the present application will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present application, and should not be construed as a limitation to the present application.
[0028] The performance testing system and method integrating Jmeter according to the embodiments of the present application will be described below with reference to the accompanying drawings. Aiming at the problems of high resource consumption, insufficient automation and scalability, complex operation and poor usability, lack of real-time monitoring function and low reliability, and low team test collaboration rate of existing performance testing tools mentioned in the above background technology, the present application provides a performance testing system integrating Jmeter. In this system, the stress testing resources, new test task instructions, test parameter setting instructions and test scenario setting instructions corresponding to the current test project are obtained through the acquisition module. The new test task instruction is used by the new module to create a to-be-tested task under the current test project. The test module tests the to-be-tested task according to the test parameter setting instruction, test scenario setting instruction and stress testing resources. The monitoring module monitors the response time, throughput, error rate of the to-be-tested task during the test and the usage of stress testing resources, and generates a test report of the to-be-tested task. Thus, the problems of high resource consumption, insufficient automation and scalability, complex operation and poor usability, lack of real-time monitoring function and low reliability, and low team test collaboration rate of existing performance testing tools are solved. The efficiency of performance testing is significantly improved through interface operation, the test cycle is shortened, and the test cost is reduced. By real-time monitoring the test process, anomalies and errors in the test can be detected and processed in a timely manner, improving the accuracy and reliability of the test. Through platform management, performance testing becomes simpler and easier to use, reducing the complexity and maintenance cost of test work. Resource allocation can be carried out according to different test requirements, meeting the performance testing requirements in different scenarios, supporting multiple people to participate in test tasks simultaneously, and improving the overall efficiency and collaboration effect of test work.
[0029] Specifically, Figure 1Schematic diagram of a performance testing system integrating Jmeter provided by an embodiment of the present application.
[0030] Among them, the architecture schematic diagram of the performance testing system integrating Jmeter is as Figure 2 shown, including a performance testing platform, a resource pool, a Kafka cluster, a MySQL database, and a real-time computing service. User management, resource calendar management, project management, and task management, etc. constitute the performance testing platform. Jmeter is a key tool for performance testing and exists in the form of multiple independent docker containers in the architecture diagram (Jmeter1, Jmeter2, Jmeter3, Jmeter...). The Kafka cluster is used to collect and store data generated during the testing process, including test report data, log data, etc. The MySQL database is used to store and manage the configuration information, test results, and other relevant data of the performance testing platform. The real-time computing service is responsible for processing and analyzing the test data in the Kafka cluster to generate real-time test reports and performance metrics.
[0031] As Figure 1 shown, the performance testing system integrating Jmeter includes: an acquisition module 100, a new task module 200, a testing module 300, and a monitoring module 400.
[0032] Among them, the acquisition module 100 is used to obtain the stress testing resources, new test task instructions, test parameter setting instructions, and test scenario setting instructions corresponding to the current test project; the new task module 200 is used to create a to-be-tested task under the current test project using the new test task instructions; the testing module 300 is used to test the to-be-tested task according to the test parameter setting instructions, test scenario setting instructions, and stress testing resources; the monitoring module 400 is used to monitor the response time, throughput, error rate, and the usage of stress testing resources of the to-be-tested task during the testing process to generate a test report of the to-be-tested task based on the response time, throughput, error rate, and the usage of stress testing resources.
[0033] Specifically, the acquisition module 100 is the core entry of the performance testing platform and is responsible for obtaining the stress testing resources, new test task instructions, test scenario instructions, and test parameter instructions corresponding to the current test project from the platform database.
[0034] Among them, obtaining the stress testing resources corresponding to the current test project is to allocate corresponding stress testing resources from the resource pool according to the project requirements. The new test task instruction is to generate an instruction containing the basic information of the test task. The test scenario instruction is to generate an instruction describing the test scenario. The test parameter instruction is to generate an instruction describing the test parameters (such as the number of concurrent users, execution method, stress testing duration, etc.).
[0035] The new module 200 is responsible for using the new test task instruction provided by the acquisition module 100, parsing the new test task instruction, generating a Jmeter test task file (.jmx), and configuring the relevant parameters of the test task file according to the test scenario setting instruction and the test parameter setting instruction.
[0036] The test module 300 is responsible for executing the task to be tested according to the test scenario setting instruction, the test parameter setting instruction, and the stress test resources.
[0037] The monitoring module 400 monitors in real time key metrics such as the response time, throughput, and error rate of the test task, monitors the usage of the stress test resources, such as CPU usage rate, memory occupancy, etc., and generates a test report containing detailed test results based on the monitoring data.
[0038] Optionally, in some embodiments, the above performance test system integrating Jmeter further includes: a management module, which is used to receive the creation instruction from the administrator, create a stress test resource pool and multiple test projects based on the creation instruction, and match the corresponding stress test resources from the stress test resource pool according to the test requirements of each test project.
[0039] Optionally, in some embodiments, the management module includes: a new unit, which is used to receive the creation instruction from the administrator and create a stress test resource pool and multiple test projects based on the creation instruction; an allocation unit, which is used to match the corresponding stress test resources from the stress test resource pool according to the test requirements of each test project; a resource recovery unit, which is used to recycle the remaining stress test resources to the stress test resource pool according to the usage of the stress test resources.
[0040] It should be understood that the management module is responsible for the overall resource configuration and management, including the new unit: which is used to receive and respond to the creation instruction from the administrator. According to the creation instruction, the new unit can create a stress test resource pool and multiple test projects.
[0041] Specifically, the administrator performs identity authentication through the login interface provided by the system and enters the system management interface after successful login. The administrator issues a creation instruction in the new unit, and the system automatically constructs a stress test resource pool according to the instruction. The resource pool may include various resources such as virtual machines, physical servers, network bandwidth, etc. The administrator continues to issue an instruction in the new unit, and the system creates multiple test projects according to the instruction and assigns a unique identifier to each project. The allocation unit selects the most suitable resources from the stress test resource pool according to the specific requirements of each test project (such as the number of concurrent users, stress test duration, etc.) and allocates them to the corresponding test projects. The resource recovery unit recycles the remaining stress test resources to the stress test resource pool according to the usage of the stress test resources for subsequent test tasks.
[0042] Optionally, in some embodiments, the new module 200 includes: a script writing unit for writing Jmeter test scripts for the tasks to be tested; a storage unit for storing Jmeter test scripts; a version control unit for performing version control on Jmeter test scripts; and a setting unit for setting test parameters and test scenarios for the tasks to be tested.
[0043] It should be understood that the new module 200 is responsible for constructing and configuring the tasks to be tested, including a script writing unit: providing a user-friendly interface or tool to support testers in writing or importing Jmeter test scripts; a storage unit: responsible for storing all written Jmeter test scripts, ensuring the security and accessibility of the scripts, and the storage unit is in the form of a database or a file system, etc.
[0044] The version control unit: performs version control on Jmeter test scripts, records the modification history of the scripts, allows testers to compare the differences between different versions, roll back to previous versions, or merge changes from multiple versions. The version control unit improves the efficiency of team collaboration and the flexibility of script management.
[0045] The setting unit: is used to set test parameters (such as the number of concurrent users, request rate, execution method, stress test duration, thread ramp-up time, number of retries, etc.) and test scenarios for the tasks to be tested, ensuring that the test tasks can accurately reflect the real test requirements.
[0046] Among them, there are two ways to set the test scenario:
[0047] Way 1: Manually add in the performance testing platform, such as the URL of the interface request, request method, request parameters, etc.;
[0048] Way 2: Upload the locally debugged Jmeter test plan file (.jmx)
[0049] and bind the stress test resource pool information, set the scenario execution order (same as the thread group running method in the Jmeter test plan), etc.
[0050] Optionally, in some embodiments, the new module 200 further includes: an adjustment unit for adjusting at least one of the number of concurrent users, execution method, stress test duration, and thread time in the test parameters.
[0051] Specifically, according to the test requirements, the tester adjusts the test parameters through the adjustment unit. For example, the tester may want to increase the number of concurrent users to simulate a higher load, or extend the stress test duration to obtain more stable performance metrics. The adjustment unit receives the adjustment instruction and updates the test parameters in real time, and the test module 300 executes the tasks to be tested according to the updated test parameters.
[0052] Optionally, in some embodiments, the monitoring module 400 further includes: a recording unit configured to record the response time, throughput, and error rate of the task to be tested during the test process, and record the usage of the stress testing resources.
[0053] It should be understood that the monitoring module 400 monitors the key performance indicators during the test process in real time and generates a test report. The recording unit records in real time during the test process the key performance indicators such as the response time, throughput, and error rate of the task to be tested, as well as the usage of the stress testing resources (such as CPU usage rate, memory occupancy rate, network bandwidth, etc.). The recording unit ensures the accuracy, integrity, and real-time nature of the data, providing a solid foundation for subsequent performance analysis and optimization.
[0054] Optionally, in some embodiments, the monitoring module 400 further includes: an analysis unit configured to generate a Jmeter test report for the task to be tested based on the response time, throughput, error rate, and usage of the stress testing resources; and a display unit configured to display the Jmeter test report.
[0055] Specifically, the analysis unit receives the data from the recording unit and conducts in-depth analysis. For example, if the analysis unit finds that the response time significantly increases, the throughput decreases, and the error rate rises within a certain period, this indicates that there may be a server performance bottleneck or network latency problem. The analysis unit generates a Jmeter test report based on the analysis results. The Jmeter test report may include the following content:
[0056] (1) The overall performance of the task to be tested, including the average response time, maximum response time, throughput, error rate, etc.
[0057] (2) Performance bottleneck analysis, pointing out the key factors leading to performance degradation.
[0058] (3) The usage of the stress testing resources, including CPU usage rate, memory occupancy rate, network bandwidth, etc.
[0059] (4) Optimization suggestions, proposing possible performance optimization measures based on the analysis results.
[0060] Furthermore, the display unit receives the test report generated by the analysis unit and presents it to the testers in an intuitive manner. For example, the display unit may show the changing trends of the response time and throughput in a line chart, show the distribution of the error rate in a pie chart, and list the usage of the stress testing resources in a table.
[0061] Testers can view the test report through the display unit, quickly understand the performance of the test task and potential problems, and make adjustments and optimizations according to the optimization suggestions in the report.
[0062] Optionally, in some embodiments, the monitoring module 400 further includes: a monitoring unit configured to identify error information of the task to be tested during the test process through a preset algorithm; and a reminder unit configured to remind the tester of the error information of the task to be tested during the test process through a preset reminder method.
[0063] Specifically, during the test process, the monitoring unit monitors the execution status of the task to be tested in real time. Once error information (such as HTTP request failure, database connection timeout, etc.) is detected, the monitoring unit immediately records the error information and prepares to trigger a reminder.
[0064] The reminder unit sends an error information reminder to the tester according to the preset reminder method (such as email notification, SMS reminder, or system message pop-up window, etc.). The reminder content includes key information such as error type, error time, and error location, so that the tester can quickly locate and solve the problem.
[0065] After receiving the reminder, the tester adjusts or repairs the test task according to the error information. If necessary, the tester can re-execute the test task to verify whether the problem has been solved.
[0066] Optionally, in some embodiments, the above performance testing system integrated with Jmeter further includes: a download module configured to receive a download instruction from the tester and download the Jmeter test report to the smart terminal; and a sharing module configured to receive a sharing instruction from the tester and share the Jmeter test report to the smart terminal.
[0067] It should be understood that the download module receives the download instruction from the tester, the system retrieves the corresponding Jmeter test report, and packages it into an appropriate file format (such as PDF, Excel, etc.) for downloading to the smart terminal. The sharing module receives the sharing instruction from the tester and shares the Jmeter test report to the smart terminal or the designated recipient by means of email, social media, cloud storage, etc.
[0068] Specifically, the tester accesses the user interface of the system through a smart terminal (such as a mobile phone or a tablet). The user interface provides a download option. The tester selects the test report to be downloaded. The download module receives the download instruction, retrieves and packages the test report, and the test report is downloaded to the smart terminal in an appropriate file format (such as PDF).
[0069] The tester also accesses the user interface of the system through the smart terminal. The user interface provides a sharing option. The tester selects the test report to be shared and the sharing method (such as email, social media, cloud storage, etc.). The sharing module receives the sharing instruction, prepares the test report according to the selected sharing method, and the test report is sent to the smart terminal or the designated recipient through the specified sharing method.
[0070] To enable those skilled in the art to further understand the test method of the integrated Jmeter performance testing system in the embodiments of the present application, the following will be elaborated in detail in conjunction with specific embodiments, as Figure 3 shown.
[0071] Step 1: Platform deployment, where the performance testing platform can be deployed on the cloud or within a local area network;
[0072] Step 2: The administrator logs in to the platform;
[0073] Step 3: The administrator creates a stress testing resource pool for stress testing resource allocation;
[0074] Step 4: The administrator creates user accounts and passwords;
[0075] Step 5: The administrator creates a test project;
[0076] Step 6: According to the project stress testing requirements, the administrator allocates corresponding quotas of stress testing resources from the stress testing resource pool to the test project;
[0077] Step 7: The administrator assigns project permissions to users, and users can only enter projects with permissions;
[0078] Step 8: The tester logs in to the platform and enters a test project with permissions;
[0079] Step 9: Enter the test task management to create a test task, including creating a new performance test task and setting the performance test scenario, setting the scenario execution order, setting the performance test parameters of the thread group (consistent with Jmeter), setting the monitoring information, and saving the test task after setting;
[0080] Step 10: Edit the test task created in Step 9, modify the concurrent testing or execution duration, save and run the task, check whether the modified test task can run normally, view the log to troubleshoot the error cause if it reports an error, and then run it again. If it runs normally, set the relevant stress testing parameters according to the stress testing requirements;
[0081] Step 11: Select the test task to be executed in the task management, click the run button, the task starts to run, and monitor the stress testing resources and running logs;
[0082] Step 12: Stop the execution;
[0083] Step 13: View the task execution details, including viewing the test report;
[0084] Step 14: Export the test report, and compare it with the historical test reports, compare the execution results of this task recently, and at the same time, the test report can be downloaded and shared, and shared in the form of a link for others to view.
[0085] It should be noted that the devices required to implement the steps of the embodiments of the present application include: (1) Hardware devices: local servers or cloud servers; (2) Software devices: MySQL, Docker, different versions of Jmeter images, Kafka clusters, real-time computing platforms.
[0086] In summary, the beneficial effects of the embodiments of the present application are as follows:
[0087] (1) Resource optimization and dynamic allocation: By optimizing the resource utilization in the performance testing process, the dynamic allocation and adjustment of resources are realized, effectively reducing the consumption of system resources, avoiding the occurrence of performance bottlenecks, and thus improving the accuracy and reliability of the testing.
[0088] (2) High scalability: While integrating Jmeter, platformization is achieved, making the writing, execution, and management of test scripts simpler and more efficient. At the same time, the system supports flexible expansion.
[0089] (3) Real-time monitoring and dynamic adjustment: A real-time monitoring function is provided, which can display the key indicators and data during the testing process in real time, enabling users to promptly discover and handle the anomalies and errors in the testing.
[0090] (3) Simplified operation and enhanced usability: By optimizing the user interface and operation process, the operation complexity is reduced, enabling users to easily get started without the need to have professional command-line operation knowledge and JMeter configuration experience.
[0091] (4) Efficient teamwork: It supports multiple people to simultaneously manage testing tasks, write scripts, execute tasks, and analyze results, etc., improving the overall efficiency of the testing work.
[0092] The performance testing system integrating Jmeter proposed according to the embodiments of the present application obtains the stress testing resources, new test task instructions, test parameter setting instructions, and test scenario setting instructions corresponding to the current test project through the acquisition module, creates a to-be-tested task under the current test project using the new test task instructions through the new module, tests the to-be-tested task according to the test parameter setting instructions, test scenario setting instructions, and stress testing resources through the test module, monitors the response time, throughput, error rate, and the usage of stress testing resources of the to-be-tested task during the test through the monitoring module, and generates a test report for the to-be-tested task. Thus, it solves the problems of large resource consumption, insufficient automation and scalability, complex operation and poor usability, lack of real-time monitoring function and low reliability, and low team test collaboration rate in existing performance testing tools. It significantly improves the efficiency of performance testing, shortens the test cycle, and reduces the test cost through graphical operation. By monitoring the test process in real time, it can timely detect and handle anomalies and errors in the test, improve the accuracy and reliability of the test. Through platform management, performance testing becomes simpler and easier to use, reduces the complexity and maintenance cost of test work, can allocate resources according to different test requirements, meets the performance testing requirements in different scenarios, supports multiple people to participate in test tasks simultaneously, and improves the overall efficiency and collaboration effect of test work.
[0093] Next, the performance testing method integrating Jmeter proposed according to the embodiments of the present application will be described with reference to the accompanying drawings.
[0094] Figure 4 It is a schematic diagram of the performance testing method integrating Jmeter according to the embodiments of the present application.
[0095] As Figure 4 shown, the performance testing method integrating Jmeter includes the following steps:
[0096] In step S401, obtain the stress testing resources, new test task instructions, test parameter setting instructions, and test scenario setting instructions corresponding to the current test project.
[0097] In step S402, use the new test task instructions to create a to-be-tested task under the current test project.
[0098] In step S403, test the to-be-tested task according to the test parameter setting instructions, test scenario setting instructions, and stress testing resources, and monitor the response time, throughput, error rate, and the usage of stress testing resources of the to-be-tested task during the test process, so as to generate a test report for the to-be-tested task according to the response time, throughput, error rate, and the usage of stress testing resources.
[0099] It should be noted that the foregoing explanation of the embodiment of the integrated Jmeter performance testing system also applies to the integrated Jmeter performance testing method of this embodiment, and will not be elaborated here.
[0100] According to the integrated Jmeter performance testing method proposed in the embodiments of the present application, obtain the stress testing resources corresponding to the current test project, new test task instructions, test parameter setting instructions, and test scenario setting instructions, use the new test task instructions to create a to-be-tested task under the current test project, test the to-be-tested task according to the test parameter setting instructions, test scenario setting instructions, and stress testing resources, and monitor the response time, throughput, error rate, and usage of stress testing resources during the testing process of the to-be-tested task, so as to generate a test report for the to-be-tested task based on the response time, throughput, error rate, and usage of stress testing resources. Thereby, it solves the problems of large resource consumption, insufficient automation and scalability, complex operation and poor usability, lack of real-time monitoring function and low reliability, and low team test collaboration rate of existing performance testing tools in large-scale testing. The efficiency of performance testing is significantly improved through graphical operation, the test cycle is shortened, and the test cost is reduced. By monitoring the testing process in real time, anomalies and errors in the testing can be detected and handled in a timely manner, improving the accuracy and reliability of the testing. Through platform management, performance testing becomes simpler and easier to use, reducing the complexity and maintenance cost of testing work. Resource allocation can be carried out according to different test requirements, meeting the performance testing requirements in different scenarios, supporting multiple people to participate in the test task simultaneously, and improving the overall efficiency and collaboration effect of the testing work.
[0101] In the description of this specification, the descriptions with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or N embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0102] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of these features. In the description of the present application, the meaning of "N" is at least two, such as two, three, etc., unless otherwise specifically defined.
[0103] Any process or method description represented in a flowchart or otherwise described herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a customized logical function or process, and the scope of the preferred embodiments of the present application includes additional implementations, where the functions may be executed in a substantially simultaneous manner or in an order opposite to that shown or discussed, according to the functions involved, which should be understood by those skilled in the technical field to which the embodiments of the present application pertain.
[0104] The logic and / or steps represented in a flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing a logical function, and can be specifically implemented in any computer program product for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or used in conjunction with these instruction execution systems, apparatuses, or devices.
Claims
1. A performance testing system integrated with Jmeter, characterized in that: include: The acquisition module is used to obtain the stress testing resources, new test task instructions, test parameter setting instructions, and test scenario setting instructions corresponding to the current test project; A new module, used to create a new task to be tested under the current test project using the new test task instruction; A testing module, used to test the task to be tested according to the test parameter setting instruction, the test scenario setting instruction and the stress testing resource; A monitoring module is used to monitor the response time, throughput, error rate and usage of the stress testing resources of the task to be tested during the test process, so as to generate a test report for the task to be tested based on the response time, throughput, error rate and usage of the stress testing resources.
2. The system according to claim 1, characterized in that Also includes: The management module is used to receive a creation instruction from an administrator, create a stress testing resource pool and multiple test projects based on the creation instruction, and match corresponding stress testing resources from the stress testing resource pool according to the test requirements of each test project.
3. The system according to claim 2, characterized in that The management module comprises: A new creation unit, used to receive a creation instruction from an administrator, and create the stress testing resource pool and the multiple test items based on the creation instruction; An allocation unit, configured to match corresponding stress testing resources from the stress testing resource pool according to the test requirements of each test project; The resource recovery unit is used to recover the remaining stress testing resources to the stress testing resource pool according to the usage of the stress testing resources.
4. The system according to claim 1, characterized in that The newly created module includes: A script writing unit, used for writing the Jmeter test script of the task to be tested; A storage unit, used to store the Jmeter test script; A version control unit, used to perform version control on the Jmeter test script; The setting unit is used to set the test parameters and test scenarios of the task to be tested.
5. The system according to claim 1, characterized in that The monitoring module further includes: The recording unit is used to record the response time, throughput and error rate of the task to be tested during the test process, and record the usage of the stress testing resources.
6. The system according to claim 5, characterized in that The monitoring module further includes: An analysis unit, used for analyzing and generating a Jmeter test report of the task to be tested according to the response time, the throughput, the error rate and the usage of the stress testing resources; The display unit is used to display the Jmeter test report.
7. The system according to claim 6, characterized in that Also includes: The download module is used to receive the download instruction from the tester and download the Jmeter test report to the smart terminal; The sharing module is used to receive the sharing instruction of the tester and share the Jmeter test report to the smart terminal.
8. The system according to claim 1, characterized in that The newly created module also includes: The adjustment unit is used to adjust at least one of the test parameters: the number of concurrent users, the execution mode, the stress test duration, and the thread time.
9. The system according to claim 1, characterized in that The monitoring module further includes: A monitoring unit, used to identify error information of the task to be tested during the test process through a preset algorithm; The reminder unit is used to remind the tester of the error information of the task to be tested during the test process through a preset reminder method.
10. A performance testing method integrated with Jmeter, characterized in that: A performance testing system integrated with Jmeter as claimed in any one of claims 1 to 9, wherein the method comprises the following steps: Get the stress testing resources, new test task instructions, test parameter setting instructions, and test scenario setting instructions corresponding to the current test project; Create a new task to be tested under the current test item using the new test task instruction; The task to be tested is tested according to the test parameter setting instructions, the test scenario setting instructions and the stress testing resources, and the response time, throughput, error rate and usage of the stress testing resources of the task to be tested during the test are monitored, so as to generate a test report for the task to be tested based on the response time, the throughput, the error rate and usage of the stress testing resources.