Software performance testing method, system, electronic device and readable storage medium
By automatically detecting the software performance testing environment and performing performance testing, the slow detection speed problem caused by human intervention in the prior art is solved, and the software testing efficiency is improved.
Patent Information
- Application Number
- CN202210246749.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-14
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-03-14
AI Technical Summary
In the prior art, artificial intervention is required to conduct testing of the test environment before software performance testing, resulting in slow detection speed and thus reducing the efficiency of software testing.
By obtaining the performance testing tasks and data to be compared for the software to be tested, the environmental test items of the current test environment are automatically detected to determine whether the environmental test results meet the test conditions. If the conditions are met, performance testing is performed and the test data is analyzed automatically to generate a performance testing report.
It realizes automated detection of whether the test environment meets the conditions, and performs performance testing and analysis automatically under the conditions, improving software testing efficiency and reducing manual participation.
Smart Images

Figure CN114461534B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software testing technology, and in particular to a software performance testing method, system, electronic device and readable storage medium. Background Art
[0002] As software development technology matures, the complexity of modern application software is also exploding. Software applications can use dozens and hundreds of components to complete tasks that were once done with paper or manual work, but their complexity directly leads to more potential failure points in the business process, making it more difficult to analyze the root cause of the problem. Performance testing, in simple terms, is to test the specific performance of the application on the server side. Rigorous testing is the most commonly used strategy for quantifying and reducing business risks, allowing companies to verify whether the application meets business needs before putting it into operation, quantify the impact of changes in the end-user experience, and quickly analyze and resolve failed components, so that fewer accidents occur during deployment, which can not only save hardware costs for the enterprise, but also avoid losses to the company caused by bugs in functions with large concurrency, so as to ensure that the program runs stably under quantitative concurrency and avoid huge losses to the company caused by program downtime.
[0003] At present, with the increasing demand for automated performance testing of software systems, most steps can be automatically executed using performance testing tools according to certain configurations, and some steps can be connected to the R&D software testing pipeline. The basic process usually includes formulating a test plan, analyzing test requirements, building a test environment, designing performance test scripts, executing test scripts, analyzing and diagnosing performance test results, and other steps. Among them, since the quality of the test environment (including database environment, server environment, etc.) has a huge impact on the test results of automated performance testing, it is necessary to detect the test environment before automated performance testing, and then perform automated performance testing in a test environment that meets the standards. However, due to the lack of automated methods in the test environment, human intervention is required, resulting in a slow detection speed of the test environment, which makes the software testing efficiency low. Summary of the invention
[0004] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0005] In view of the above-mentioned shortcomings of the prior art, the present invention discloses a software performance testing method, system, electronic device and readable storage medium to improve software testing efficiency.
[0006] The present invention discloses a software performance testing method, comprising: obtaining a performance testing task and data to be compared corresponding to the software to be tested, the data to be compared including at least one of historical test data and performance indicator thresholds of the software to be tested; detecting an environmental test item corresponding to a current test environment, and judging whether an environmental detection result meets a test condition; if the environmental detection result meets the test condition, performing a performance test on the software to be tested according to the performance testing task to obtain current test data; comparing the current test data with the data to be compared, and generating a performance test report of the software to be tested according to the comparison result.
[0007] Optionally, the environmental test items corresponding to the current test environment are detected to determine whether the environmental detection results meet the test conditions, including: detecting the environmental test items corresponding to the current test environment to obtain one or more environmental parameters corresponding to the environmental test items; obtaining parameter weights and parameter threshold intervals corresponding to each of the environmental parameters; determining the environmental score of the current test environment based on the environmental parameters, the parameter weights and the parameter threshold intervals; and determining whether the environmental detection results meet the test conditions based on a comparison result between the environmental score and a preset score threshold.
[0008] Optionally, the test environment score of the current test environment is determined by the following formula: In the formula, Score is the environmental score of the current test environment, n is the number of environmental parameters, and p i is the i-th environmental parameter, is the maximum value in the parameter threshold interval corresponding to the i-th environmental parameter, is the minimum value in the parameter threshold interval corresponding to the i-th environmental parameter, w i is the parameter weight corresponding to the i-th environmental parameter, and α is the preset amplification index.
[0009] Optionally, after determining whether the environmental detection result meets the test conditions based on the comparison result between the environmental score and the preset score threshold, the method further includes: if the environmental detection result does not meet the test conditions, comparing the environmental parameters with the corresponding parameter threshold intervals to obtain environmental parameter results, wherein the environmental parameter results include a maximum value greater than the parameter threshold interval, a minimum value less than the parameter threshold interval, and a value between the parameter threshold intervals; obtaining corresponding test environment improvement suggestions based on the environmental parameter results corresponding to the environmental parameters, and displaying the test environment improvement suggestions; obtaining user selection information corresponding to the test environment improvement suggestions, and determining target modification suggestions from the test environment improvement suggestions based on the user selection information; and modifying parameters of the current test environment according to the target modification suggestions.
[0010] Optionally, a performance test is performed on the software to be tested according to the performance test task to obtain current test data, including: the performance test task includes one or more test scenario parameters, and a test tool and a test step corresponding to each of the test scenario parameters; the test scenarios corresponding to each of the test scenario parameters are respectively obtained; in each of the test scenarios, the test tool corresponding to the test scenario is called, and the software to be tested is simulated according to the test steps corresponding to the test scenario; during the simulation, the test collection items corresponding to the software to be tested are monitored to obtain monitoring data, and data is collected on the scene collection items corresponding to the test scene to obtain scene performance data; the monitoring data and scene performance data corresponding to each of the test scenarios are determined as the current test data.
[0011] Optionally, after detecting the environmental test items corresponding to the current test environment and determining whether the environmental detection results meet the test conditions, the method further includes at least one of the following: if the environmental detection results do not meet the test conditions, a reminder that the test environment has failed; if the environmental detection results do not meet the test conditions, stopping the software performance test on the software to be tested.
[0012] Optionally, the current test data is compared with the data to be compared, and a performance test report of the software to be tested is generated based on the comparison result, including: if the data to be compared is the historical test data, obtaining a comparison result between the current test data and the historical test data, and generating a performance change trend graph based on the comparison result; if the data to be compared is the performance indicator threshold, judging whether the current test data meets the standard based on the comparison result between the current test data and the performance indicator threshold, and obtaining a compliance result of the software to be tested; and generating a performance test report of the software to be tested based on the performance change trend graph and the compliance result.
[0013] The present invention discloses a software performance testing system, comprising: an acquisition module, used for acquiring performance test tasks and to-be-compared data corresponding to the software to be tested, wherein the to-be-compared data includes at least one of historical test data and performance index thresholds of the software to be tested; an environment detection module, used for detecting the environment test items corresponding to the current test environment, and judging whether the environment detection result meets the test conditions; a software detection module, used for performing a performance test on the software to be tested according to the performance test task if the environment detection result meets the test conditions, and obtaining the current test data; a generation module, used for comparing the current test data with the to-be-compared data, and generating a performance test report of the software to be tested according to the comparison result.
[0014] The present invention discloses an electronic device, comprising: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the above method.
[0015] The present invention discloses a computer-readable storage medium, on which a computer program is stored: when the computer program is executed by a processor, the above method is implemented.
[0016] Beneficial effects of the present invention:
[0017] By obtaining the performance test tasks and the data to be compared corresponding to the software to be tested, the environmental test items corresponding to the current test environment are tested to determine whether the environmental test results meet the test conditions. If the environmental test results meet the test conditions, the software to be tested is tested according to the performance test tasks to obtain the current test data, and the current test data is compared with the data to be compared, and a performance test report of the software to be tested is generated according to the comparison results. In this way, it is automatically detected whether the current test environment of the software to be tested meets the test conditions, and a performance test is performed when the test conditions are met, and the current test data obtained by the test is automatically analyzed, and a performance test report is generated. Compared with manual environmental inspections and result analysis, the entire test process does not require manual participation, which improves software testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a flowchart of a software performance testing method in an embodiment of the present invention;
[0019] Figure 2 is a flowchart of another software performance testing method in an embodiment of the present invention;
[0020] Figure 3 is a schematic diagram of the structure of a software performance testing system in an embodiment of the present invention;
[0021] Figure 4 It is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and sub-samples in the embodiments can be combined with each other without conflict.
[0023] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0024] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0025] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so as to describe the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0026] Unless otherwise stated, the term "plurality" means two or more.
[0027] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0028] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0029] Combination Figure 1 As shown, the embodiment of the present disclosure provides a software performance testing method, including:
[0030] Step S101, obtaining the performance test task and the data to be compared corresponding to the software to be tested;
[0031] The data to be compared includes at least one of historical test data of the software to be tested and a performance indicator threshold;
[0032] Step S102, testing the environment test items corresponding to the current test environment to determine whether the environment test results meet the test conditions;
[0033] Step S103, if the environmental detection result meets the test conditions, then a performance test is performed on the software to be tested according to the performance test task to obtain current test data;
[0034] Step S104, comparing the current test data with the data to be compared, and generating a performance test report of the software to be tested according to the comparison result.
[0035] The software performance testing method disclosed in the present invention is adopted to detect the environmental test items corresponding to the current test environment by obtaining the performance test tasks and the data to be compared corresponding to the software to be tested, and to judge whether the environmental test results meet the test conditions. If the environmental test results meet the test conditions, the software to be tested is subjected to performance testing according to the performance test tasks to obtain the current test data, and the current test data is compared with the data to be compared, and a performance test report of the software to be tested is generated according to the comparison results. In this way, it is automatically detected whether the current test environment of the software to be tested meets the test conditions, and a performance test is performed when the test conditions are met, and the current test data obtained by the test is automatically analyzed, and a performance test report is generated, including that compared with manual environmental inspection and result analysis, the entire test process does not require manual participation, thereby improving the efficiency of software testing.
[0036] Optionally, before obtaining the performance test tasks and data to be compared corresponding to the software to be tested, the method also includes at least one of the following: developing a performance test script to obtain a performance test task, wherein the performance test script is stored in a code management repository, and the code management repository includes Gitlab; creating a software testing pipeline, and configuring performance indicator thresholds and alarm notification rules in the software testing pipeline.
[0037] Optionally, the environmental test items corresponding to the current test environment are tested to determine whether the environmental test results meet the test conditions, including: testing the environmental test items corresponding to the current test environment to obtain one or more environmental parameters corresponding to the environmental test items; obtaining parameter weights and parameter threshold intervals corresponding to each environmental parameter; determining the environmental score of the current test environment according to the environmental parameters, parameter weights and parameter threshold intervals; and determining whether the environmental test results meet the test conditions according to the comparison result between the environmental score and the preset score threshold. In this way, the effectiveness of this performance test is guaranteed, making the test results more meaningful for reference.
[0038] Optionally, the environment test items corresponding to the current test environment are detected by a server inspection tool, wherein the server inspection tool is also used to configure the environment test items and count related table data according to a preset database table.
[0039] Optionally, the environmental test items include one or more of the current usage of the service CPU, the current usage of the memory, the current usage of the network bandwidth, and the like.
[0040] In some embodiments, real-time inspections are performed on projects that need to be inspected. When the inspection results meet the performance test execution conditions, the software test pipeline will automatically execute the performance test. Otherwise, the software test pipeline will issue an alarm and terminate the performance test task, thus ensuring the effectiveness of this performance test.
[0041] Optionally, the test environment score of the current test environment is determined by the following formula:
[0042]
[0043] In the formula, Score is the environmental score of the current test environment, n is the number of environmental parameters, and p i is the i-th environmental parameter, is the maximum value in the parameter threshold interval corresponding to the i-th environmental parameter, is the minimum value in the parameter threshold interval corresponding to the i-th environmental parameter, w i is the parameter weight corresponding to the i-th environmental parameter, and α is the preset amplification index.
[0044] Optionally, the preset magnification index is between 0.5-10, typically 0.5.
[0045] Optionally, after judging whether the environmental detection result meets the test conditions according to the comparison result between the environmental score and the preset score threshold, the method further includes: if the environmental detection result does not meet the test conditions, comparing the environmental parameters with the corresponding parameter threshold interval to obtain the environmental parameter results, wherein the environmental parameter results include a maximum value greater than the parameter threshold interval, a minimum value less than the parameter threshold interval, and a value between the parameter threshold interval; obtaining the corresponding test environment improvement suggestions based on the environmental parameter results corresponding to the environmental parameters, and displaying the test environment improvement suggestions; obtaining the user selection information corresponding to the test environment improvement suggestions, and determining the target modification suggestions from the test environment improvement suggestions according to the user selection information; and modifying the parameters of the current test environment according to the target modification suggestions. In this way, improvement suggestions are provided through the comparison results between the environmental parameters and the parameter threshold interval, and the target modification suggestions are determined according to the user selection information to optimize the current test environment without manual participation, thereby improving the optimization speed of the test environment, improving the test reliability, and improving the test efficiency.
[0046] Optionally, the test environment improvement suggestion includes at least one of closing the target thread, resetting environment parameters, etc.
[0047] Optionally, after testing the environmental test items corresponding to the current test environment and determining whether the environmental test results meet the test conditions, the method also includes at least one of the following: if the environmental test results do not meet the test conditions, a reminder that the test environment has failed; if the environmental test results do not meet the test conditions, stopping the software performance test on the software to be tested.
[0048] In this way, the test environment is inspected before the performance test is executed to confirm the effectiveness of this performance test. The content that needs to be inspected is configured according to the performance test scenario. Various monitoring data are collected during the performance test, and the monitoring data is extracted and saved in a certain format. The test results are analyzed, and the core indicator thresholds of this performance test are set in the software test pipeline, and compared with the saved monitoring data and core indicators. In addition, the historical version test baseline can be compared, and the performance test result trend during the iteration process can be analyzed. Then, for test results with certain abnormalities, an alarm can be issued through the configured contact person's email address, which improves the efficiency of software testing and enables the contact person to identify performance test risks as early as possible.
[0049] Optionally, a performance test is performed on the software to be tested according to the performance test task to obtain current test data, including: the performance test task includes one or more test scenario parameters, and the test tools and test steps corresponding to each test scenario parameter; the test scenarios corresponding to each test scenario parameter are respectively obtained; in each test scenario, the test tool corresponding to the test scenario is called, and the software to be tested is simulated according to the test steps corresponding to the test scenario; during the simulation, the test collection items corresponding to the software to be tested are monitored to obtain monitoring data, and data is collected on the scene collection items corresponding to the test scene to obtain scene performance data; the monitoring data and scene performance data corresponding to each test scenario are determined as the current test data.
[0050] Optionally, the test collection items corresponding to the software to be tested are monitored through the PaaS platform to obtain monitoring data, wherein the detection data includes one or more of server resource usage, network throughput data, JVM data, etc. In this way, with the help of the powerful monitoring system of the PaaS platform, there is no need to add additional monitoring, and the collected performance indicators can be extracted on demand, with flexible configuration.
[0051] In some embodiments, the PaaS platform itself has a complete monitoring system. For performance testing, custom collection projects are created to extract core monitoring indicators from the PaaS monitoring system, and different indicators are extracted according to different scenarios to achieve flexible configuration, and the extracted indicators are saved in a certain format.
[0052] Optionally, after monitoring the test collection items corresponding to the software under test and obtaining the monitoring data, the method further includes: acquiring extraction instructions and filtering instructions, and extracting and filtering the monitoring data based on the extraction instructions and the filtering instructions.
[0053] Optionally, the current test data is compared with the data to be compared, and a performance test report of the software to be tested is generated based on the comparison result, including: if the data to be compared is historical test data, the comparison result between the current test data and the historical test data is obtained, and a performance change trend chart is generated based on the comparison result; if the data to be compared is a performance index threshold, whether the current test data meets the standard is determined based on the comparison result between the current test data and the performance index threshold, and the standard-reaching result of the software to be tested is obtained; a performance test report of the software to be tested is generated based on the performance change trend chart and the standard-reaching result. In this way, manual intervention is reduced in the process of generating a performance test report, and test efficiency is improved. At the same time, based on the performance test report, an alarm can be issued for test results that do not meet the index in the first time, and performance risks can be identified faster and earlier.
[0054] In some embodiments, in the software testing pipeline executed by the performance test, the performance indicator threshold is set according to the scenario, the current test data is compared with the performance indicator threshold, the difference with the performance indicator is automatically identified, and a preliminary judgment is made whether the performance test result meets the standard; at the same time, for different code versions of the same scenario, the test results can automatically generate a performance trend chart based on historical test data, and after automated analysis by data analysis tools, a performance test report is formed. In addition to the test results, the report also lists the results of the indicator and version comparison, so that the contact person can identify performance testing risks as early as possible.
[0055] Combination Figure 2 As shown, the embodiment of the present disclosure provides a software performance testing method, including:
[0056] Step S201, developing a performance test script to obtain a performance test task;
[0057] The performance test script is stored in a code management repository, which includes Gitlab.
[0058] Step S202, creating a software test pipeline, and configuring performance indicator thresholds and alarm notification rules in the software test pipeline;
[0059] Step S203, start the software testing pipeline, and obtain the performance testing tasks and the data to be compared corresponding to the software to be tested;
[0060] Step S204, testing the environment test items corresponding to the current test environment to determine whether the environment test results meet the test conditions, if yes, jump to step S205, if not, jump to step S206;
[0061] Step S205, performing performance testing on the software to be tested according to the performance testing task, obtaining current test data, and jumping to step S207;
[0062] Among them, the performance test task includes one or more test scenario parameters, and the test tools and test steps corresponding to each test scenario parameter; respectively obtain the test scenarios corresponding to each test scenario parameter; in each test scenario, call the test tool corresponding to the test scenario, and simulate the software to be tested according to the test steps corresponding to the test scenario; during the simulation operation, monitor the test collection items corresponding to the software to be tested to obtain monitoring data, and collect data for the scene collection items corresponding to the test scenario to obtain scene performance data; determine the monitoring data and scene performance data corresponding to each test scenario as the current test data;
[0063] Step S206: Based on the alarm notification rule, it is reminded that the test environment has not passed, and the software performance test for the software to be tested is stopped.
[0064] Step S207, comparing the current test data with the data to be compared, and generating a performance test report of the software to be tested according to the comparison result.
[0065] The software performance testing method disclosed in the present invention is adopted to detect the environmental test items corresponding to the current test environment by obtaining the performance test tasks and the data to be compared corresponding to the software to be tested, and to judge whether the environmental test results meet the test conditions. If the environmental test results meet the test conditions, the software to be tested is subjected to performance testing according to the performance test tasks to obtain the current test data, and the current test data is compared with the data to be compared, and a performance test report of the software to be tested is generated according to the comparison results. In this way, it is automatically detected whether the current test environment of the software to be tested meets the test conditions, and a performance test is performed when the test conditions are met, and the current test data obtained by the test is automatically analyzed, and a performance test report is generated, including that compared with manual environmental inspection and result analysis, the entire test process does not require manual participation, thereby improving the efficiency of software testing.
[0066] Combination Figure 3As shown, the embodiment of the present disclosure provides a software performance testing system, including an acquisition module 301, an environment detection module 302, a software detection module 303, and a generation module 304. The acquisition module 301 is used to obtain the performance test tasks and the data to be compared corresponding to the software to be tested, and the data to be compared includes at least one of the historical test data and the performance index threshold of the software to be tested. The environment detection module 302 is used to detect the environment test items corresponding to the current test environment, and determine whether the environment detection results meet the test conditions. The software detection module 303 is used to perform a performance test on the software to be tested according to the performance test task if the environment detection results meet the test conditions, and obtain the current test data. The generation module 304 is used to compare the current test data with the data to be compared, and generate a performance test report for the software to be tested based on the comparison results.
[0067] The software performance testing system disclosed in the present invention is used to obtain the performance test tasks and the data to be compared corresponding to the software to be tested, detect the environmental test items corresponding to the current test environment, and judge whether the environmental test results meet the test conditions. If the environmental test results meet the test conditions, the software to be tested is subjected to performance testing according to the performance test tasks to obtain the current test data, and the current test data is compared with the data to be compared, and a performance test report of the software to be tested is generated according to the comparison results. In this way, it is automatically detected whether the current test environment of the software to be tested meets the test conditions, and a performance test is performed when the test conditions are met, and the current test data obtained by the test is automatically analyzed, and a performance test report is generated, including that compared with manual environmental inspection and result analysis, the entire test process does not require manual participation, thereby improving software testing efficiency.
[0068] Combination Figure 4 As shown, an embodiment of the present disclosure provides an electronic device, including: a processor (processor) 400 and a memory (memory) 401; the memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory, so that the terminal executes any one of the methods in this embodiment. Optionally, the electronic device may also include a communication interface (CommunicationInterface) 402 and a bus 403. Among them, the processor 400, the communication interface 402, and the memory 401 can communicate with each other through the bus 403. The communication interface 402 can be used for information transmission. The processor 400 can call the logic instructions in the memory 401 to execute the method in the above embodiment.
[0069] In addition, the logic instructions in the memory 401 described above may be implemented in the form of software functional units and when sold or used as independent products, may be stored in a computer-readable storage medium.
[0070] The memory 401 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present disclosure. The processor 400 executes functional applications and data processing by running the program instructions / modules stored in the memory 401, that is, implementing the methods in the above embodiments.
[0071] The memory 401 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 401 may include a high-speed random access memory and may also include a non-volatile memory.
[0072] The electronic device provided by the embodiment of the present disclosure is used to detect the environmental test items corresponding to the current test environment by obtaining the performance test tasks and the data to be compared corresponding to the software to be tested, and to determine whether the environmental test results meet the test conditions. If the environmental test results meet the test conditions, the software to be tested is subjected to a performance test according to the performance test tasks to obtain the current test data, and the current test data is compared with the data to be compared, and a performance test report of the software to be tested is generated according to the comparison results. In this way, it is automatically detected whether the current test environment of the software to be tested meets the test conditions, and a performance test is performed when the test conditions are met, and the current test data obtained by the test is automatically analyzed, and a performance test is generated, including that compared with manual environmental inspections and result analysis, the entire test process does not require manual participation, thereby improving software testing efficiency.
[0073] The embodiments of the present disclosure further provide a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the methods in the embodiments is implemented.
[0074] The computer-readable storage medium in the embodiments of the present disclosure can be understood by ordinary technicians in the field: all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the execution includes the steps of the above-mentioned method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0075] The electronic device disclosed in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run the computer program so that the electronic device executes each step of the above method.
[0076] In this embodiment, the memory may include a random access memory (Random Access Memory, RAM for short), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0077] The above-mentioned processors can be general-purpose processors, including central processing units (CPU), graphics processing units (GPU), network processors (NP), etc.; they can also be digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0078] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. Parts and subsamples of some embodiments may be included in or replace parts and subsamples of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of a stated sub-sample, whole, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other sub-samples, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device including the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0079] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technician may use different methods for each specific application to implement the described functions, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. The technician may clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit may be the corresponding process in the current aforementioned method embodiment, and will not be repeated here.
[0080] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some sub-samples can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0081] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A software performance testing method, characterized in that: include: Acquire a performance test task and data to be compared corresponding to the software to be tested, wherein the data to be compared includes at least one of historical test data and a performance indicator threshold of the software to be tested; Test the environmental test items corresponding to the current test environment to determine whether the environmental test results meet the test conditions; If the environmental detection result meets the test conditions, a performance test is performed on the software to be tested according to the performance test task to obtain current test data; Comparing the current test data with the data to be compared, and generating a performance test report of the software to be tested according to the comparison result; Detecting the environmental test items corresponding to the current test environment and judging whether the environmental detection results meet the test conditions, including detecting the environmental test items corresponding to the current test environment and obtaining one or more environmental parameters corresponding to the environmental test items; obtaining parameter weights and parameter threshold intervals corresponding to each of the environmental parameters; determining the environmental score of the current test environment according to the environmental parameters, the parameter weights and the parameter threshold intervals; judging whether the environmental detection results meet the test conditions according to the comparison result between the environmental score and a preset score threshold; The test environment score of the current test environment is determined by the following formula: , In the formula, Give an environment score to the current test environment. is the number of environmental parameters, For the environmental parameters, For the The maximum value in the parameter threshold interval corresponding to the environmental parameters, For the The minimum value in the parameter threshold interval corresponding to the environmental parameters, For the The parameter weights corresponding to the environmental parameters are is the preset magnification index.
2. The method according to claim 1, characterized in that After determining whether the environmental detection result meets the test condition according to the comparison result between the environmental score and the preset score threshold, the method further includes: If the environmental detection result does not meet the test condition, compare the environmental parameter with the corresponding parameter threshold interval to obtain an environmental parameter result, wherein the environmental parameter result includes a maximum value greater than the parameter threshold interval, a minimum value less than the parameter threshold interval, and a value between the parameter threshold interval; Obtaining corresponding test environment improvement suggestions based on the environmental parameter results corresponding to the environmental parameters, and displaying the test environment improvement suggestions; Acquiring user selection information corresponding to the test environment improvement suggestion, and determining a target modification suggestion from the test environment improvement suggestion according to the user selection information; Modify parameters of the current test environment according to the target modification suggestion.
3. The method according to any one of claims 1 to 2, characterized in that: Performing a performance test on the software to be tested according to the performance test task to obtain current test data includes: The performance test task includes one or more test scenario parameters, and test tools and test steps corresponding to each of the test scenario parameters; Respectively obtain the test scenarios corresponding to the test scenario parameters; In each of the test scenarios, the test tool corresponding to the test scenario is called, and the software to be tested is simulated and run according to the test steps corresponding to the test scenario; During the simulation operation, the test collection items corresponding to the software to be tested are monitored to obtain monitoring data, and data collection is performed on the scenario collection items corresponding to the test scenario to obtain scenario performance data; The monitoring data and scenario performance data corresponding to each of the test scenarios are determined as current test data.
4. The method according to claim 3, characterized in that After detecting the environmental test items corresponding to the current test environment and determining whether the environmental test results meet the test conditions, the method further includes at least one of the following: If the environmental test result does not meet the test conditions, a reminder is given that the test environment has failed; If the environmental detection result does not meet the test conditions, the software performance test for the software to be tested is stopped.
5. The method according to claim 4, characterized in that Comparing the current test data with the data to be compared, and generating a performance test report of the software to be tested according to the comparison result, including: If the data to be compared is the historical test data, obtaining a comparison result between the current test data and the historical test data, and generating a performance change trend graph according to the comparison result; If the data to be compared is the performance indicator threshold, judging whether the current test data meets the standard according to the comparison result between the current test data and the performance indicator threshold, and obtaining the standard-reaching result of the software to be tested; A performance test report of the software to be tested is generated according to the performance change trend graph and the compliance result.
6. A software performance testing system, characterized in that: include: An acquisition module, used to acquire performance test tasks and data to be compared corresponding to the software to be tested, wherein the data to be compared includes at least one of historical test data and performance indicator thresholds of the software to be tested; The environment detection module is used to detect the environment test items corresponding to the current test environment and determine whether the environment detection results meet the test conditions; A software detection module is used to perform a performance test on the software to be tested according to the performance test task to obtain current test data if the environmental detection result meets the test conditions; A generating module, used for comparing the current test data with the data to be compared, and generating a performance test report of the software to be tested according to the comparison result; The environment detection module detects the environment test items corresponding to the current test environment in the following manner to determine whether the environment detection results meet the test conditions, detects the environment test items corresponding to the current test environment, and obtains one or more environment parameters corresponding to the environment test items; obtains parameter weights and parameter threshold intervals corresponding to each of the environment parameters; determines the environment score of the current test environment according to the environment parameters, the parameter weights and the parameter threshold intervals; and determines whether the environment detection results meet the test conditions according to a comparison result between the environment score and a preset score threshold; The test environment score of the current test environment is determined by the following formula: , In the formula, Give an environment score to the current test environment. is the number of environmental parameters, For the environmental parameters, For the The maximum value in the parameter threshold interval corresponding to the environmental parameters, For the The minimum value in the parameter threshold interval corresponding to the environmental parameters, For the The parameter weights corresponding to the environmental parameters are is the preset magnification index.
7. An electronic device, characterized in that: include: Processor and memory; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Test task automatic management method and device, equipment and storage medium
CN107766236A
Software performance test method and device, equipment and medium
CN111984527A
Cited By
Software performance monitoring method, system, equipment and program
CN121116834A
A software performance monitoring method, system, device and program
CN121116834B