Method, device and equipment for automatic tuning of software testing environment and storage medium

By acquiring device model and performance data, the UI automated testing environment can be monitored and optimized in real time, solving the problem of test environment deterioration caused by long-term operation of test devices or interference from other applications, and improving the test pass rate.

CN115437958BActive Publication Date: 2026-04-07SUZHOU SOFTWARE EVALUATING CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-18
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

The low pass rate of UI automated testing is mainly due to the deterioration of the testing environment caused by prolonged operation of testing equipment or interference from other applications.

Method used

By acquiring the target device model and the target performance data of the software under test, the actual performance data is monitored in real time, and environmental optimization is performed when the performance data is lower than the target data, including closing other applications or adjusting the number of threads to optimize the test environment.

Benefits of technology

It improves the pass rate of UI automation tests, ensures the stable execution of test scripts, and avoids the deterioration of the test environment due to long-term operation or interference from other applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115437958B_ABST
    Figure CN115437958B_ABST
Patent Text Reader

Abstract

The application discloses a kind of automatic tuning method, device and equipment of software test environment and storage medium, belong to computer technical field.It includes: by obtaining the device model of target device;The target performance data of the software to be tested corresponding to the device model is obtained;The test script corresponding to the software to be tested is executed, to test the software to be tested on target device;In the testing process, the actual performance data occupied by the software to be tested is acquired in real time;In the case where actual performance data is lower than target performance data, the test environment of the software to be tested is tuned based on target performance data.Can solve the problem that the passing rate of UI automation test is relatively low.Can avoid the test environment of the software to be tested to deteriorate due to long time running or the interference of other application software in target device, can guarantee that the test script corresponding to the software to be tested can be executed stably, so as to improve the passing rate of UI automation test.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of computers, and particularly relates to a software test environment automatic tuning method and device, equipment and a storage medium. BACKGROUND

[0002] At present, automatic testing of software includes interface automatic testing and UI automatic testing, etc., wherein, UI automatic testing is to simulate user operation behavior for testing, and is closer to the real situation when used by users, and can find some problems that cannot be found by other testing, therefore, UI automatic testing is essential in the software testing process.

[0003] Traditional software UI automatic testing includes: installing software to be tested in a device for testing, and performing UI automatic testing of the software to be tested by executing a test script.

[0004] However, after long-time UI automatic testing of the device for testing, due to long-time running of the testing device or interference of other application software in the testing device, the testing environment of the software deteriorates, thereby causing a low pass rate of the UI automatic testing. SUMMARY

[0005] The present application provides a software test environment automatic tuning method and device, equipment and a storage medium, which can solve the problem of low pass rate of UI automatic testing. The present application provides the following technical solutions:

[0006] In a first aspect, a software test environment automatic tuning method is provided, which is applied to a target device, and the target device is installed with software to be tested, and the method comprises the following steps: obtaining a device model of the target device; obtaining target performance data of the software to be tested corresponding to the device model; executing a test script corresponding to the software to be tested to test the software to be tested on the target device; and in the testing process, obtaining actual performance data occupied by the software to be tested in real time, and tuning a testing environment of the software to be tested in a case where the actual performance data is lower than the target performance data.

[0007] Optionally, before the step of obtaining the target performance data of the software to be tested corresponding to the device model, the method further comprises the following steps: initializing and setting the target device; obtaining preset test performance data; setting a performance proportion of the software to be tested when running in the target device according to the test performance data; executing the test script corresponding to the software to be tested to obtain a test result corresponding to the test performance data; and determining the target performance data based on the test result.

[0008] Optionally, the test performance data comprises K groups of test performance data, where K is an integer greater than 1, and different groups of test performance data are different; the determining the target performance data based on the test performance data comprises: setting performance data occupied by the software to be tested when running in the target device according to the Ith group of test performance data, where I is an integer greater than 1 and less than or equal to K; executing the test script according to a preset execution condition to obtain the Ith group of test results corresponding to the software to be tested; in the case that I is less than K, another I = I + 1, and the above steps are repeated to obtain K groups of test results; and analyzing the K groups of test results to determine the target performance data.

[0009] Optionally, the analyzing the K groups of test results to determine the target performance data comprises: obtaining a preset execution threshold; filtering in the K groups of test results based on the preset execution threshold to obtain target test results greater than or equal to the preset execution threshold; and taking test performance data corresponding to the target test results as the target performance data.

[0010] Optionally, the determining the target performance data based on the test performance data comprises: setting performance data occupied by the software to be tested when running in the target device according to the test performance data; executing the test script to obtain test results corresponding to the software to be tested; in the case that the test results do not satisfy a preset condition, adjusting the test performance data based on the test results, setting performance data occupied by the software to be tested when running in the target device according to the adjusted test performance data, and repeating the above steps.

[0011] Optionally, in the case that the test results satisfy the preset condition, the current test performance data is determined as the target performance data.

[0012] Optionally, the test results comprise stable execution time, stable execution times, response time of the test script corresponding to the target device, and performance occupation of the software to be tested.

[0013] In a second aspect, an automatic tuning device of a software testing environment is provided, and the device comprises:

[0014] a model obtaining module, configured to obtain a device model of the target device;

[0015] a data obtaining module, configured to obtain target performance data of the software to be tested corresponding to the device model;

[0016] a script executing module, configured to execute a test script corresponding to the software to be tested to test the software to be tested on the target device;

[0017] The data monitoring module is used to acquire the actual performance data of the software under test in real time during the testing process;

[0018] The environment tuning module is used to tune the test environment of the software under test when the actual performance data is lower than the target performance data.

[0019] Thirdly, an electronic device is provided, including a memory, a controller, and a computer program stored in the memory and executable on the controller, wherein the controller executes the computer program to implement the steps of the above-described automatic tuning method for the software testing environment.

[0020] Fourthly, a computer-readable storage medium is provided, wherein a program is stored therein, and when executed by a processor, the program is used to implement the automatic tuning method for the software testing environment provided in the first aspect.

[0021] The beneficial effects of this application include at least the following: obtaining the device model of the target device; obtaining the target performance data of the software under test corresponding to the device model; executing the test script corresponding to the software under test to test the software under test on the target device; obtaining the actual performance data of the software under test in real time during the test; and optimizing the test environment of the software under test based on the target performance data when the actual performance data is lower than the target performance data. This can solve the problem of low pass rate in UI automated testing. By obtaining the actual performance data of the software under test in real time during the test, and optimizing the test environment according to the target performance data when the actual performance data is lower than the target performance data of the software under test, it is possible to avoid the test environment of the software under test deteriorating due to long-term operation of the target device or interference from other applications on the target device. This ensures that the test script corresponding to the software under test can be executed stably, thereby improving the pass rate of UI automated testing. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0023] Figure 1 This is a flowchart of an automatic tuning method for a software testing environment provided in one embodiment of this application;

[0024] Figure 2 This is a flowchart of another automatic tuning method for a software testing environment provided in one embodiment of this application;

[0025] Figure 3 This is a block diagram of an automatic tuning device for a software testing environment provided in one embodiment of this application;

[0026] Figure 4 This is a block diagram of an electronic device provided in one embodiment of this application. Detailed Implementation

[0027] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. The application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0029] In this application, unless otherwise stated, directional terms such as "upper," "lower," "top," and "bottom" are generally used in relation to the direction shown in the accompanying drawings, or in relation to the vertical, perpendicular, or gravitational direction of the component itself; similarly, for ease of understanding and description, "inner" and "outer" refer to the inner and outer contours of each component itself, but the above directional terms are not intended to limit this application.

[0030] The automatic optimization method for the software testing environment provided in this application will be described in detail below.

[0031] like Figure 1 As shown, embodiments of this application provide an automatic optimization method for a software testing environment. This method is applied to a target device, on which the software to be tested and a performance monitoring program are installed. The method includes at least the following steps:

[0032] Step 101: Obtain the device model of the target device.

[0033] The target device can be a computer device such as a smartphone, tablet, or personal computer, or a server. This embodiment does not limit the type of the target device.

[0034] In this embodiment, the device model of the target device is used to uniquely indicate the target device. Optionally, the device model can be numbers, letters, or a combination of numbers and letters. This embodiment does not limit the implementation method of the device model.

[0035] Step 102: Obtain the target performance data of the software to be tested corresponding to the device model.

[0036] The target performance data refers to the performance data corresponding to the stable operation of the software under test on the target device, including but not limited to the CPU and memory usage percentages of the software under test when running on the target device. The target performance data can be pre-stored on the target device or sent to the target device by other devices. These other devices can be mobile phones, tablets, or computers, etc., and this embodiment does not limit the type of these other devices.

[0037] For the same software under test, the target performance data for different target devices may be the same or different.

[0038] For example, taking target device A, target device B, and software under test a as an example, when software under test a is tested on target device A, the corresponding CPU percentage can be 20% and the memory percentage can be 30%, and when tested on target device B, the corresponding CPU percentage can be 10% and the memory percentage can be 15%; or, when software under test a is tested on target device A and target device B, the corresponding CPU percentage can be 20% and the memory percentage can be 30% respectively.

[0039] Correspondingly, for the same target device, the target performance data for different software under test may be the same or different.

[0040] For example, taking target device A, software a to be tested, and software b to be tested as examples, when software a to be tested is tested on target device A, the corresponding CPU usage can be 20% and the memory usage can be 30%, and when software b to be tested is tested on target device A, the corresponding CPU usage can be 10% and the memory usage can be 20%; or, when software a to be tested and software b to be tested are tested on target device A, the corresponding CPU usage can be 20% and the memory usage can be 30% respectively.

[0041] In this embodiment, before obtaining the target performance data of the software to be tested corresponding to the device model, it is necessary to first set the test performance data of the software to be tested. After executing the test script corresponding to the software to be tested on the target device according to the test performance data, the test performance data is adjusted, and the test script is executed again. After repeating this process multiple times, the target performance data is determined from the test performance data based on the obtained test results.

[0042] Among them, the test performance data is the performance occupied by the software under test when it is tested on the target device. For example, the test performance data may include the CPU ratio and memory ratio of the software under test when it runs on the target device, and may also include the disk read speed of the software under test when it runs on the target device. This embodiment does not limit the implementation method of the test performance data.

[0043] Specifically, before obtaining the target performance data of the software under test corresponding to the device model, the process includes: initializing the target device; obtaining preset test performance data; setting the performance ratio of the software under test running on the target device according to the test performance data; executing the test script corresponding to the software under test to obtain the test results corresponding to the test performance data; and determining the target performance data based on the test results.

[0044] In this embodiment, the test performance data includes one or at least two sets. The methods for determining the target performance data differ depending on the number of test performance data sets, and specifically include at least one of the following:

[0045] The first type includes K sets of test performance data, where K is an integer greater than 1, and the test performance data of different sets are different.

[0046] At this point, the target performance data is determined based on the test performance data, including at least steps S11 to S14:

[0047] Step S11: Set the performance data used by the software under test when running on the target device according to the test performance data of Group I.

[0048] Where I is an integer greater than 1 and less than or equal to K. Initially, the value of I is 1.

[0049] Step S12: Execute the test script according to the preset execution conditions to obtain the test results of the I group corresponding to the software under test.

[0050] The test results include the stable execution time, stable execution count, response time, and performance consumption of the test script corresponding to the target device. Performance consumption includes, but is not limited to, the CPU and memory usage of the software under test.

[0051] In practice, CPU and memory usage can be displayed to users in the form of graphs.

[0052] Step S13: If I is less than K, set I = I + 1 and repeat the above steps to obtain K sets of test results.

[0053] Step S14: Analyze the test results of K groups to determine the target performance data.

[0054] In this embodiment, since each set of test results includes the stable execution duration and stable execution count of the test script, an execution threshold can be preset, including an execution duration threshold, an execution count threshold, or a response time threshold. Based on the execution threshold, the test results in K sets of test results are filtered, and the test performance data corresponding to the test results that are greater than the execution threshold in the K sets of test results are taken as the target performance data.

[0055] Specifically, the K sets of test results are analyzed to determine the target performance data, including: obtaining a preset execution threshold; filtering the K sets of test results based on the preset execution threshold to obtain target test results that are greater than or equal to the preset execution threshold; and using the test performance data corresponding to the target test results as the target performance data.

[0056] For example, with a value of K of 2, an execution time threshold of 100 hours, and an execution count threshold of 20,000, the first set of test results includes a stable execution time of 90 hours and a stable execution count of 17,500. The second set of test results includes a stable execution time of 105 hours and a stable execution count of 21,000. The test performance data corresponding to the second set of test results will be used as the target performance data.

[0057] In other embodiments, the test performance data corresponding to the test result with the longest stable execution time or the most stable execution times among the K groups of test results can also be used as the target performance data.

[0058] The second type involves a test performance data package containing only one set of test performance data. In this case, determining the target performance data based on the test performance data includes at least steps S21 to S24:

[0059] Step S21: Set the performance data used by the software under test when it runs on the target device according to the test performance data.

[0060] Step S22: Execute the test script to obtain the test results for the software under test.

[0061] Step S23: If the test results do not meet the preset conditions, adjust the test performance data based on the test results, set the performance data occupied by the software under test when running on the target device according to the adjusted test performance data, and repeat the above steps.

[0062] The preset conditions include the pre-set stable execution duration and / or stable execution count.

[0063] In this embodiment, when the stable execution duration and / or stable execution count indicated by the test results are lower than preset conditions, adjusting the test performance data based on the test results includes: adjusting the test performance data based on a preset growth ratio.

[0064] For example, if the test performance data includes a CPU percentage of 30% and a memory percentage of 20%, the corresponding preset growth rates include a CPU growth rate of 1% and a memory growth rate of 1%. If the stable execution time and / or the number of stable executions indicated by the test results are lower than the preset conditions, the CPU percentage in the test performance data will be adjusted to 31%, and / or the memory percentage in the test performance data will be adjusted to 21%.

[0065] Accordingly, if the stable execution duration and / or stable execution count indicated by the test results are higher than the preset conditions, adjusting the test performance data based on the test results includes: adjusting the test performance data based on a preset reduction ratio.

[0066] For example, if the test performance data includes a CPU percentage of 50% and a memory percentage of 40%, the corresponding preset growth rates include a CPU decrease rate of 1% and a memory decrease rate of 1%. If the stable execution time and / or the number of stable executions indicated by the test results are higher than the preset conditions, the CPU percentage in the test performance data will be adjusted to 49%, and / or the memory percentage in the test performance data will be adjusted to 39%.

[0067] In addition, since the actual stable execution time and stable execution count are difficult to be exactly equal to the preset stable execution duration and / or stable execution count, the range of stable execution duration and / or stable execution count can be preset in actual implementation.

[0068] Step S24: If the test results meet the preset conditions, the current test performance data is determined as the target performance data.

[0069] Step 103: Execute the test script corresponding to the software under test to test the software under test on the target device.

[0070] In the case of a smartphone, automated test scripts can be implemented using automated testing tools (such as Appium or UIAutomation2).

[0071] If the target device is another type of device, the automated test script can be implemented using the automated test tools corresponding to that type of device.

[0072] Step 104: During the test, obtain the actual performance data of the software under test in real time.

[0073] When the target device is a smartphone, performance monitoring tools (such as Android Debug Bridge (adb) or mobileperf) can be used to obtain the actual performance data of the software under test in real time.

[0074] When the target device is another type of device, the performance monitoring tools corresponding to that type of device can be used to obtain the actual performance data of the software under test in real time.

[0075] Step 105: If the actual performance data is lower than the target performance data, optimize the test environment of the software to be tested.

[0076] Optimizing the test environment for the software under test includes, but is not limited to, closing other applications on the target device, or increasing / decreasing the number of threads in the software under test to adjust the performance metrics of the target device.

[0077] In summary, the automatic optimization method for the software testing environment provided in this embodiment obtains the device model of the target device; obtains the target performance data of the software under test corresponding to the device model; executes the test script corresponding to the software under test to test the software under test on the target device; during the test, it obtains the actual performance data of the software under test in real time; and when the actual performance data is lower than the target performance data, it optimizes the test environment of the software under test based on the target performance data. This can solve the problem of low pass rate in UI automated testing. By obtaining the actual performance data of the software under test in real time during the test, and optimizing the test environment according to the target performance data when the actual performance data is lower than the target performance data of the software under test, it can avoid the test environment of the software under test from deteriorating due to long-term operation of the target device or interference from other applications on the target device. It can ensure that the test script corresponding to the software under test can be executed stably, thereby improving the pass rate of UI automated testing.

[0078] To better understand the automatic tuning method for the software testing environment provided in this application, an example is given below. (Reference) Figure 2 The method includes the following steps:

[0079] Step 201: Set the test performance data before running the software to be tested;

[0080] Step 202: Execute the test script and obtain the test results;

[0081] Step 203: Determine whether the number of tests meets the preset conditions. If the preset conditions are met, proceed to step 205; otherwise, proceed to step 204.

[0082] Step 204: Adjust the test performance data and execute step 201;

[0083] Step 205: Determine the target performance data based on at least one set of test results;

[0084] Step 206: Execute the test script to perform automated testing on the software to be tested;

[0085] Step 207: Acquire the actual performance data of the software under test in real time during the test;

[0086] Step 208: Determine whether the actual performance data is lower than the target performance data. If it is lower than the target performance data, proceed to step 209; otherwise, proceed to step 207.

[0087] Step 209: Optimize the testing environment for the software to be tested.

[0088] In summary, by setting test performance data for the software under test before execution and executing test scripts to obtain at least one set of test results, the target performance data is determined based on these results. The corresponding test scripts for the software under test are then executed on the target device. During the test, the actual performance data of the software under test is acquired in real time. If the actual performance data is lower than the target performance data, the test environment for the software under test is optimized based on the target performance data. This approach can solve the problem of low pass rates in UI automated testing. By acquiring the actual performance data of the software under test in real time during the test, and optimizing the test environment according to the target performance data when the actual performance data is lower than the target performance data, the test environment for the software under test can be prevented from deteriorating due to prolonged operation on the target device or interference from other applications on the target device. This ensures the stable execution of the test scripts for the software under test, thereby improving the pass rate of UI automated testing.

[0089] This embodiment provides an automatic optimization device for a software testing environment, such as... Figure 2 As shown. The device includes at least the following modules: model acquisition module 310, data acquisition module 320, script execution module 330, data monitoring module 340, and environment optimization module 350.

[0090] Model acquisition module 310 is used to acquire the device model of the target device.

[0091] The data acquisition module 320 is used to acquire the target performance data of the software to be tested corresponding to the device model.

[0092] The script execution module 330 is used to execute the test script corresponding to the software under test, so as to test the software under test on the target device.

[0093] The data monitoring module 340 is used to acquire the actual performance data of the software under test in real time during the testing process.

[0094] The environment tuning module 350 is used to tune the test environment of the software under test when the actual performance data is lower than the target performance data.

[0095] For relevant details, please refer to the above methods and system implementation examples.

[0096] It should be noted that the automatic optimization device for the software testing environment provided in the above embodiments is only illustrated by the division of the above functional modules when automatically optimizing the software testing environment. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the automatic optimization device for the software testing environment can be divided into different functional modules to complete all or part of the functions described above. In addition, the automatic optimization device for the software testing environment provided in the above embodiments and the automatic optimization method embodiments for the software testing environment belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0097] This embodiment provides an electronic device, such as... Figure 4 As shown. The electronic device includes at least a processor 401 and a memory 402.

[0098] Processor 401 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 401 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 401 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 401 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 401 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0099] Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage medium in memory 402 is used to store at least one instruction, which is executed by processor 401 to implement the automatic tuning method for the software testing environment provided in the method embodiments of this application.

[0100] In some embodiments, the electronic device may also optionally include: a peripheral device interface and at least one peripheral device. The processor 401, memory 402, and peripheral device interface can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface via a bus, signal line, or circuit board. Indicatively, peripheral devices include, but are not limited to: radio frequency circuitry, a touch display screen, audio circuitry, and a power supply.

[0101] Of course, electronic devices may also include fewer or more components, and this embodiment does not limit this.

[0102] Optionally, this application also provides a computer-readable storage medium storing a program that is loaded and executed by a processor to implement the automatic tuning method for the software testing environment described in the above method embodiments.

[0103] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0104] Obviously, the embodiments described above are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, those skilled in the art can make other variations or modifications without creative effort, and all such variations or modifications should fall within the scope of protection of this application.

Claims

1. An automatic optimization method for a software testing environment, characterized in that, The method is applied to a target device, which has software to be tested installed on it, including: Obtain the device model of the target device; Perform initialization settings on the target device; Obtain preset test performance data; Set the performance percentage of the software under test when it runs on the target device according to the test performance data; The test script corresponding to the software under test is executed to obtain the test results corresponding to the test performance data; the test results include the stable execution time, stable execution count, response time and performance usage of the test script corresponding to the target device; The target performance data is determined based on the test results; the determination of the target performance data based on the test results includes: setting the performance data occupied by the software under test when running on the target device according to the test performance data; executing the test script to obtain the test results corresponding to the software under test; if the test results do not meet the preset conditions, adjusting the test performance data based on the test results, resetting the performance data occupied by the software under test when running on the target device according to the adjusted test performance data, repeatedly executing the test script to obtain the test results corresponding to the software under test, until the test results meet the preset conditions, and determining the current test performance data as the target performance data; Obtain the target performance data of the software to be tested corresponding to the device model; Execute the test script corresponding to the software under test to test the software under test on the target device; During the test, the actual performance data of the software under test is acquired in real time. If the actual performance data is lower than the target performance data, the test environment of the software under test is optimized.

2. The method according to claim 1, characterized in that, The test performance data includes K sets of test performance data, where K is an integer greater than 1, and the test performance data of different sets are different; determining the target performance data based on the test results includes: The performance data used by the software under test when running on the target device is set according to the test performance data of group I; wherein, I is an integer greater than 1 and less than or equal to K; Execute the test script to obtain the I-th group of test results corresponding to the software under test; If I is less than K, let I = I + 1, repeat the above steps, and obtain K sets of test results; The target performance data is determined by analyzing the K sets of test results.

3. The method according to claim 2, characterized in that, The analysis of the K sets of test results to determine the target performance data includes: Obtain the preset execution threshold; Based on the preset execution threshold, the K sets of test results are filtered to obtain a target test result that is greater than or equal to the preset execution threshold; The test performance data corresponding to the target test result is used as the target performance data.

4. An automatic tuning device for a software testing environment, characterized in that, The device includes: The model acquisition module is used to obtain the device model of the target device. The data acquisition module is used to initialize the target device; acquire preset test performance data; and set the performance ratio of the software under test running on the target device according to the test performance data. A script execution module is used to execute the test script corresponding to the software under test and obtain test results corresponding to the test performance data. The test results include the stable execution time, stable execution count, response time, and performance usage of the test script corresponding to the target device. Based on the test results, target performance data is determined. Determining the target performance data based on the test results includes: setting the performance data used by the software under test when running on the target device according to the test performance data; executing the test script to obtain the test results corresponding to the software under test; if the test results do not meet preset conditions, adjusting the test performance data based on the test results, resetting the performance data used by the software under test when running on the target device according to the adjusted test performance data, repeatedly executing the test script to obtain the test results corresponding to the software under test, until the test results meet the preset conditions, and determining the current test performance data as the target performance data; obtaining the target performance data of the software under test corresponding to the device model; and executing the test script corresponding to the software under test to test the software under test on the target device. The data monitoring module is used to acquire the actual performance data of the software under test in real time during the testing process; The environment tuning module is used to tune the test environment of the software under test when the actual performance data is lower than the target performance data.

5. An electronic device, characterized in that, The device includes a manager and a memory; the memory stores a program that is loaded and executed by the manager to implement the automatic tuning method for the software testing environment as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, The storage medium stores a program that, when executed by the manager, is used to implement the automatic tuning method for the software testing environment as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Database parameter adjustment method and device, storage medium and electronic equipment

    CN113590576A

  • Software performance test method and device, equipment and storage medium

    CN113971130A