Software performance test system and method based on groover language

Through the web version software performance testing system based on the Groovy language, test script templates and monitoring units are provided, which solves the problem of low testing efficiency in the existing technology and realizes efficient and easy-to-use software performance testing.

CN120803923APending Publication Date: 2025-10-17SUNING CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510867251.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing software performance testing methods need to be installed locally, occupying device resources, consuming system resources, and requiring a high level of programming skills, resulting in low testing efficiency.

Method used

It uses a web-based software performance testing system based on the Groovy language, provides test script templates and monitoring units, performs tests through the HTTP protocol, supports script writing in the Groovy language and calling third-party JAR packages, simulates user business requests, and generates performance test reports.

Benefits of technology

No need to download or install software, saving device storage space and system resources, improving test script writing efficiency and anomaly locating speed, and enhancing test efficiency and maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803923A_ABST
    Figure CN120803923A_ABST
Patent Text Reader

Abstract

The invention discloses a software performance test system and method based on a grove language, the system comprises a test script unit and a monitoring unit, the test script unit is used for managing a test script written based on the grove language according to a test script template, and sending a software performance test request to software to be tested according to the test script; and the monitoring unit is used for setting a software performance test scene according to software to be tested to simulate a user to initiate a service request, running according to a test script generating the request, and generating a software performance test report. According to the software performance testing system, the testing script template is provided, reference is provided for compiling of the testing script, secondary development of the testing script is supported, the compiling efficiency of the testing script is greatly improved, and the abnormal probability is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of software performance testing, in particular to a software performance testing system and method based on groovy language. BACKGROUND

[0002] With the development of Internet technology, the requirement for software performance is higher and higher, especially for financial industry software, which needs to handle high-concurrency transaction processing, real-time data, user behavior analysis, and support complex business logic. Therefore, software testers need to regularly perform performance testing on frequently used software systems to ensure the performance requirements of the software system.

[0003] At present, the existing software performance testing method mostly needs to be installed on the local application software to perform software performance testing. This method has high requirements for computer hardware, occupies the storage space of the device during software running, consumes system resources, and requires a high requirement for scripting language, which needs a certain programming basis. During the testing process, abnormal errors are often encountered, and testers need to spend a lot of time to locate and solve the problems, resulting in low software performance testing efficiency. SUMMARY

[0004] In view of the problems in the prior art, the present application provides a software performance testing system and method based on groovy language, which adopts a web-based software performance testing method and system, does not occupy device resources, and provides a test script template, greatly improving the efficiency of software performance testing.

[0005] To achieve the above purpose, the present application adopts the following technical solution: a software performance testing system based on groovy language, comprising: a test script unit and a monitoring unit, The test script unit is used to manage the test script written based on groovy language according to the test script template, and sends a software performance testing request to the software to be tested according to the test script; The monitoring unit is used to set up a software performance testing scene according to the software to be tested to simulate user-initiated business requests, run according to the test script of the request, and generate a software performance testing report.

[0006] Further, the test script template comprises: a pre-step of software performance testing, transaction definition of software performance testing, software performance testing step and post-step of software performance testing, the pre-step of software performance testing comprises: setting request header of software performance testing, request timeout duration and connecting database; the transaction definition of software performance testing comprises: counting request sending times of software performance testing and response of each request; the software performance testing step sends software performance testing request to the software to be tested through the http protocol; the post-step of software performance testing is used for closing database connection or closing software performance testing request.

[0007] Further, the test script unit further comprises: a test data template, which is used for templating test data, and the test script template needs to be debugged by using the templated test data after being written, and the content of the test script template is modified according to log error information generated during running of the test script template.

[0008] Further, the test data template is in a csv format, needs to be downloaded to the local when used, and the test data template is used to convert the test data collected locally into csv data meeting the requirements of the test data template, and the csv data is uploaded to the test script unit for loading by the test script template; the test data comprises: user identity card number, mobile phone number and name.

[0009] Further, the test script unit further comprises: a third-party jar package depended by the test script template, which is used for calling when the test script template is written.

[0010] Further, the software performance testing scene comprises: running mode, running duration and virtual user concurrency number of the software performance testing scene.

[0011] Further, the software performance testing report displays the transaction number processed per second of the software during performance testing in the form of a line chart, displays the maximum transaction number processed and the total data volume during the test time, and prints the request processed by the software and the returned response message during the software performance testing in a log file.

[0012] Further, the software performance testing system is provided with a plurality of calling interfaces, and a plurality of test script copies are generated, so that a plurality of software to be tested can be called simultaneously.

[0013] Further, the application further provides a software performance testing method based on a groovy language, comprising the following steps: A folder is newly created in the test script unit, and three sub-files are generated, namely a test script template, a data file for storing templated test data and a lib file for storing a third-party jar package depended by the test script template; The third-party jar package is called to write the test script of the software to be tested in the test script template. After the software test script is written, the software test script needs to be debugged by the template test data in the data folder, and the content of the test script is modified according to the log error information generated when the test script is run. After the script debugging is successful, the software performance test scene is created according to the software to be tested in the monitoring unit, the test script is called to perform software performance test, and the software performance test report is generated.

[0014] Further, if the software performs software performance test, the request error rate of processing reaches a preset value, and the test is stopped.

[0015] Compared with the prior art, the software performance test system and method based on the groovy language has the following beneficial effects: the test script is written in the groovy language, the groovy is a script language based on the Java platform, object-oriented and supporting agile development, the language combines the advantages of Python and Ruby languages, can well combine Java code and use Java language library; the test script template is provided, the writing of the test script is provided with reference, the secondary development of the test script is supported, the writing efficiency of the test script is greatly improved, and the abnormal probability is reduced; at the same time, the third-party jar package is introduced in the writing of the test script, so that the writing of the test script is more flexible and efficient; the software performance test system and method of the application realizes software performance test by using the http protocol, without downloading and installing software, and the test can be performed by opening a webpage, so that the device storage space is not occupied and the system resources are not consumed. The software performance test system and method based on the groovy language has the characteristics of convenience, easy use and high availability. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 Fig. 1 is a schematic diagram of the software performance test system based on the groovy language of the application. DETAILED DESCRIPTION

[0017] The technical solutions of the application will be further explained and described below in combination with the drawings.

[0018] As Figure 1The application discloses a schematic diagram of a software performance test system based on a groovy language, which comprises a test script unit and a monitoring unit; the test script unit is used for managing a test script based on the groovy language according to a test script template, the test script is used for simulating a real business scenario, the test script is written in the groovy language, the groovy language is a script language based on a Java platform, object-oriented and supporting agile development, the language combines the advantages of Python and Ruby languages, can well combine Java codes and use Java language libraries; and the test script unit is used for sending a software performance test request to software to be tested according to the test script; the monitoring unit is used for setting a software performance test scene according to the software to be tested, simulating a user to initiate a business request, running according to the test script of the request, and generating a software performance test report, which can be viewed by a tester at any time. The software performance test system provides a test script template, provides a reference for writing the test script, supports secondary development of the test script, greatly improves the writing efficiency of the test script, and reduces an abnormal probability.

[0019] The test script template in the application comprises: a pre-step of software performance testing, transaction definition of software performance testing, software performance testing steps and a post-step of software performance testing, so that the script structure is clear and the test personnel can understand and maintain it, for example, when a certain link needs to be modified or optimized in the future, only the specific module needs to be adjusted, and the normal operation of other modules will not be affected, which greatly improves the maintainability and scalability of the script. The pre-step of software performance testing comprises: setting the request header, request timeout duration and connecting the database of software performance testing, the setting of the request header can simulate different user identities, device types and other scenarios, so that the software performance testing is closer to the actual use; the setting of the request timeout duration can control the rhythm of the test, avoiding long-time non-response of the test due to network delay and other problems; the connection of the database provides data support for subsequent testing, ensuring that the required data can be obtained from the database during the testing process, meeting the performance testing requirements in complex business scenarios; the transaction definition of software performance testing comprises: counting the number of request sending times and the response of each request of software performance testing, by counting the number of request sending times, the processing capacity of the software under high concurrency can be understood; and recording the response time of each request can accurately evaluate the response performance of the software, helping the test personnel to quickly locate the performance bottleneck; the software performance testing steps send software performance testing requests to the software to be tested through the http protocol, including the simulation script and response assertion sent by the http protocol, the simulation script can be customized according to different test scenarios, simulating various user operations and business requests, making the test more real and reliable; the response assertion is used to verify whether the response returned by the server meets the expectation, ensuring the accuracy of the test results; the post-step of software performance testing is used to close the database connection or close the software performance testing request, ensuring that resources can be released in time after the test is completed, avoiding resource leakage leading to software performance degradation. The test script template uses the http protocol to realize software performance testing, without the need to download and install software, and the test can be performed by opening a webpage, so it does not occupy the device storage space and consume system resources, and the test script template saves the time of writing test scripts, and has good universality and scalability, which can be reused in different software performance testing projects, the test personnel only needs to make a small amount of modification to the test script template, which can adapt to new test scenarios and requirements, further improving the utilization rate of test resources and the efficiency of test work; at the same time, the standardized test script template also helps to ensure that the scripts written by different test personnel are consistent and comparable, improving the test quality.

[0020] In one technical solution of the present invention, the test script unit also includes a test data template, which is used to template test data. Once the test script template is written, it is necessary to use the templated test data for local debugging, and modify the content of the test script template based on the log error information generated when the test script template is run. The test data template is in CSV format and needs to be downloaded locally when used. The test data template is used to convert the locally collected test data into CSV data that meets the requirements of the test data template and upload it to the test script unit for loading by the test script template. The test data includes: user ID number, mobile phone number, and name.

[0021] In one technical solution of the present invention, the test script unit also includes: a third-party jar package that the test script template depends on, which supports the import function and can import the downloaded jar package from the local for calling when writing the test script template, making the writing of the test script more flexible and efficient.

[0022] The software performance testing scenarios described in this invention include: the software performance testing scenario's operating mode, runtime, and concurrent virtual user count, including the initial number of users and the incremental number. Different operating modes and concurrent virtual user counts can affect different software performance indicators. For example, under high concurrency conditions, software indicators such as response time, throughput, and resource utilization may vary. By setting multiple operating modes and varying concurrent virtual user counts, the software's performance under different load conditions can be comprehensively evaluated, identifying potential performance bottlenecks.

[0023] The software performance test report in the present invention displays the number of transactions processed per second by the performance tested software in the form of a line graph, displays the maximum number of transactions processed by the software during the test time and the total test data volume, and prints the requests processed by the software and the returned response messages during the software performance test in a log file, which can be used by testers to verify whether the request content initiated by the simulated user and the response information returned by the system are correct. It supports online viewing and downloading to local viewing.

[0024] In one technical solution of the present invention, a software performance testing system is provided with multiple calling interfaces, which can generate multiple copies of the same test script for simultaneous calling by multiple software to be tested, thereby greatly improving the testing efficiency.

[0025] In one technical solution of the present invention, performance testers need to regularly perform performance testing on business software with a large number of calls, including the following steps: Create a new folder in the test script unit and generate three sub-files: the test script template, the data file for storing templated test data, and the lib file for storing the third-party jar package that the test script template depends on; The third-party jar package is called to write the test script of the software to be tested in the test script template; After the software test script is written, the software test script needs to be debugged by the template test data in the data folder, and the content of the test script is modified according to the log error information generated when the test script is run; After the script debugging is successful, the software performance test scene is created according to the software to be tested in the monitoring unit, the test script is called to perform software performance test, and the software performance test report is generated. If the request error rate of the software during the software performance test reaches the preset value, the test is stopped.

[0026] In one of the technical solutions of the present application, a computer readable storage medium is provided, which stores a computer program, and the computer program enables a computer to execute the software performance test method based on the groovy language.

[0027] In one of the technical solutions of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the software performance test method based on the groovy language is implemented.

[0028] In the embodiments disclosed in the present application, the computer storage medium can be a tangible medium, which can contain or store programs for use by or in connection with an instruction execution system, apparatus or device. The computer storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses or devices, or any suitable combination of the above. More specific examples of computer storage media can include one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0029] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in the present application can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0030] The above are only preferred embodiments of the present application, and the protection scope of the present application is not limited to the above-mentioned embodiments. Any technical scheme falling within the concept of the present application shall fall within the protection scope of the present application. It should be noted that, for ordinary skilled in the art, some improvements and refinements without departing from the principles of the present application shall be considered as the protection scope of the present application.

Claims

1. A software performance testing system based on Groovy language, characterized in that: include: Test script unit and monitoring unit, The test script unit is used to manage the test script written in Groovy language according to the test script template, and send a software performance test request to the software to be tested according to the test script; The monitoring unit is used to set a software performance test scenario according to the software to be tested, simulate a user to initiate a service request, run the test script according to the request, and generate a software performance test report.

2. A software performance testing system based on Groovy language according to claim 1, characterized in that: The test script template includes: the pre-steps of software performance testing, the transaction definition of software performance testing, the software performance testing steps and the post-steps of software performance testing. The pre-steps of software performance testing include: setting the request header, request timeout duration and database connection of the software performance testing; the transaction definition of software performance testing includes: counting the number of requests sent for software performance testing and the response to each request; the software performance testing step sends a software performance test request to the software to be tested via the http protocol; the post-steps of software performance testing are used to close the database connection or close the software performance test request.

3. A software performance testing system based on Groovy language according to claim 1, characterized in that: The test script unit also includes: a test data template, which is used to template test data. After the test script template is written, it is necessary to use the templated test data for debugging, and modify the content of the test script template according to the log error information generated when the test script template is running.

4. A software performance testing system based on Groovy language according to claim 3, characterized in that: The test data template is in CSV format and needs to be downloaded locally when used. The test data template is used to convert the locally collected test data into CSV data that meets the requirements of the test data template and upload it to the test script unit for loading by the test script template. The test data includes: user ID number, mobile phone number and name.

5. A software performance testing system based on Groovy language according to claim 1, characterized in that: The test script unit also includes: a third-party jar package that the test script template depends on, which is called when writing the test script template.

6. A software performance testing system based on Groovy language according to claim 1, characterized in that: The software performance test scenario includes: the running mode, running time and concurrent number of virtual users of the software performance test scenario.

7. A software performance testing system based on Groovy language according to claim 1, characterized in that: The software performance test report displays the number of transactions processed per second by the performance tested software in the form of a line graph, shows the maximum number of transactions processed by the software during the test time and the total test data volume, and prints the requests processed by the software and the returned response messages during the software performance test in a log file.

8. A software performance testing system based on Groovy language according to claim 1, characterized in that: The software performance testing system is provided with multiple calling interfaces, which can be called simultaneously by multiple software to be tested by generating multiple copies of the same test script.

9. A software performance testing method based on Groovy language, characterized in that: The steps include: Create a new folder in the test script unit and generate three sub-files: the test script template, the data file for storing templated test data, and the lib file for storing the third-party jar package that the test script template depends on; Call the third-party jar package to write the test script of the software to be tested in the test script template; After writing, the software test script needs to be debugged using the templated test data in the data folder, and the content of the test script needs to be modified based on the log error information generated when the test script is running; After the script is successfully debugged, a software performance test scenario is created in the monitoring unit according to the software to be tested, the test script is called to perform software performance testing, and a software performance test report is generated.

10. A software performance testing method based on Groovy language according to claim 9, characterized in that: If the error rate of processed requests reaches the preset value during software performance testing, the test will be stopped.