A storage automation testing method and device capable of dynamically adjusting resources

By configuring the test task priority and use case type in the storage automation test platform, and dynamically allocating resources, the problem of low efficiency and lack of priority setting in the existing technology is solved, and efficient test resource utilization and time shortening are achieved.

CN114647593BActive Publication Date: 2024-10-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210468821.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-30
Publication Date
2024-10-22
Estimated Expiration
2042-04-30

AI Technical Summary

Technical Problem

The existing storage automation test platform cannot achieve parallel execution, has low efficiency and lacks priority setting, resulting in long test time and high labor costs.

Method used

By configuring the test task priority in the front-end web system, and automatically allocating resources according to the test case type and priority in the background automation control system, determining parallel execution use cases, calculating the required resources and dynamically allocating them, achieving resource controllability and efficiency use.

Benefits of technology

Automatic resource allocation and parallel execution based on test task priority are realized, which significantly reduces test time, improves test efficiency, and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114647593B_ABST
    Figure CN114647593B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of test resource allocation, and specifically discloses a storage automation test method and device capable of dynamically adjusting resources, wherein a test task is created in a foreground web system, and a priority is configured for the test task; a background automation control system determines parallel test cases according to the type of test cases in the test task, calculates the total resources required for all test tasks to be executed, and calculates the current available resources in the background; if the current available resources in the background are less than the total resources required for all test tasks to be executed, the background automation control system allocates resources to the test task according to the test task priority to execute the test; when the test task is executed, the determined parallel test cases are executed in parallel. The present invention pre-configures the test task priority at the front end, and can automatically allocate test resources according to the test task priority, so that resources are controllable; the background determines whether the test case can be executed in parallel according to the classification algorithm of the test case, so as to reduce the test time and improve the test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of test resource allocation, and in particular to a storage automation test method and device capable of dynamically adjusting resources. Background Art

[0002] As the degree of automated testing of storage product lines increases, the number of automated tests increases dramatically, and the requirements for automated platforms become increasingly higher. The currently used storage automated testing platforms are gradually unable to meet the needs of automated testing. The current automated testing platform uses a distributed structure. Under the control of the scheduling system, multiple execution devices do not affect each other. Test tasks are hung in the execution queue. When the execution device is idle, the task is published to the execution machine for testing. If the existing technology is applied to storage automated testing, it is limited by the characteristics of storage testing. The current tests are all executed serially and cannot be executed in parallel. The efficiency is low and the test time is long. There is no priority setting. When encountering urgent test tasks, it is necessary to manually adjust the resources occupied by other non-urgent tasks. The process is all manual operation, which occupies labor costs and affects other test plans. It is not automated or intelligent. Summary of the invention

[0003] To solve the above problems, the present invention provides a storage automation testing method and device that can dynamically adjust resources, which can automatically allocate test resources according to the priority of the test task to make the resources controllable; and determine whether the test cases can be executed in parallel according to the classification algorithm of the use cases to reduce the test time and improve the test efficiency.

[0004] In a first aspect, a storage automation testing method capable of dynamically adjusting resources comprises the following steps:

[0005] Create test tasks in the front-end web system and configure priorities for the test tasks; each test task contains at least one test case;

[0006] The background automation control system determines the parallel test cases according to the types of test cases in the test tasks;

[0007] The background automation control system calculates the total resources required for all test tasks to be executed based on the number of test cases executed in parallel, and also calculates the current available resources in the background;

[0008] If the current available resources in the background are less than the total resources required for all the test tasks to be executed, the background automation control system will allocate resources to the test tasks to execute the test according to the test task priority;

[0009] If the currently available resources in the background are greater than the total resources required by all the test tasks to be executed, the background automation control system allocates resources to each test task to execute the test according to the resources required by each test task to be executed;

[0010] When the test task is executed, the determined parallel test cases are executed in parallel.

[0011] Furthermore, the resources required for the test task include the required execution machine memory and the required number of storage devices;

[0012] The total resources required by all the test tasks to be executed are the sum of the resources required by each test task to be executed, including the sum of the memory required by the execution machine and the sum of the number of storage devices required;

[0013] The currently available resources of the background include the sum of the available memory of each execution machine and the total number of available storage devices.

[0014] Furthermore, the background automation control system calculates the resources required for the test task according to the number of parallel executions of the test cases, specifically including:

[0015] The required execution machine memory and the number of storage devices required for each test task are calculated using the following formula;

[0016] The execution machine memory required for the test task = the maximum memory required for the parallel operation of the test cases in the test task * the number of storage devices required for the test task;

[0017] The number of storage devices required for a test task = the number of storage devices required for all test cases of the test task to be operated in parallel at the same time.

[0018] Furthermore, the parallel test cases are determined according to the types of test cases in the test task, specifically including:

[0019] For query test cases, all test cases can be directly executed in parallel, and the sum of the number of parallel executions is not greater than the sum of requests that can be responded to simultaneously by the available storage devices in the background;

[0020] For I\O test cases, if there are test cases whose execution time or data volume is greater than the threshold, the test cases whose execution time or data volume is less than the threshold will be executed in parallel. At the same time, the performance requirement of parallel execution shall not be greater than the maximum performance of the background available storage device.

[0021] Furthermore, the background automation control system allocates resources to the test tasks to execute the tests according to the test task priority, including:

[0022] If all the test tasks to be executed have the same priority, the currently available resources in the background will be evenly allocated to each test task;

[0023] If all the test tasks to be executed have different priorities, M% of the currently available background resources will be evenly distributed to the test tasks with priorities higher than a certain level, and (100-M)% of the currently available background resources will be evenly distributed to the remaining test tasks.

[0024] Furthermore, M% of the currently available background resources include M% of the available execution machine memory and M% of the available storage device quantity, where M% of the available storage device quantity is the actual calculated storage device quantity rounded up. If the rounded value is equal to the total number of available storage devices in the background, then M% of the available storage device quantity is the rounded value minus 1.

[0025] Furthermore, the value of M% is 80%.

[0026] In a second aspect, the present invention provides a storage automation test device capable of dynamically adjusting resources, comprising:

[0027] Task creation and configuration module: Configured in the front-end web system, create test tasks and configure priorities for test tasks; each test task contains at least one test case;

[0028] Parallel test case determination module: configured in the background automatic control system, determines the parallel test cases according to the types of test cases in the test tasks;

[0029] Resource calculation module: It is configured in the background automation control system to calculate the total resources required for all test tasks to be executed according to the number of parallel execution of test cases, and also calculate the current available resources in the background;

[0030] Resource allocation module: configured in the background automation control system. If the current available resources in the background are less than the total resources required for all test tasks to be executed, the background automation control system allocates resources to the test tasks according to the test task priority to execute the test; if the current available resources in the background are greater than the total resources required for all test tasks to be executed, the background automation control system allocates resources to each test task according to the resources required for each test task to be executed; when the test task is executed, the determined parallel test cases are executed in parallel.

[0031] Furthermore, the parallel test case determination module determines the parallel test cases according to the types of test cases in the test task, specifically including:

[0032] For query test cases, all test cases can be directly executed in parallel, and the sum of the number of parallel executions is not greater than the sum of requests that can be responded to simultaneously by the available storage devices in the background;

[0033] For I\O test cases, if there are test cases whose execution time or data volume is greater than the threshold, the test cases whose execution time or data volume is less than the threshold will be executed in parallel. At the same time, the performance requirement of parallel execution shall not be greater than the maximum performance of the background available storage device.

[0034] Furthermore, the resource allocation module allocates resources to the test task to execute the test according to the test task priority, specifically including:

[0035] If all the test tasks to be executed have the same priority, the currently available resources in the background will be evenly allocated to each test task;

[0036] If all the test tasks to be executed have different priorities, M% of the currently available background resources will be evenly distributed to the test tasks with priorities higher than a certain level, and (100-M)% of the currently available background resources will be evenly distributed to the remaining test tasks.

[0037] The present invention provides a storage automation testing method and device that can dynamically adjust resources. Compared with the prior art, it has the following beneficial effects: the test task priority is pre-configured at the front end, and the test resources can be automatically allocated according to the priority of the test task, so that the resources are controllable; at the same time, the background determines whether the test case can be executed in parallel according to the classification algorithm of the test case, so as to reduce the test time and improve the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0039] Figure 1 This is a diagram of the storage automation test architecture that can dynamically adjust resources provided by the present invention.

[0040] Figure 2 A schematic flow chart of a storage automation testing method capable of dynamically adjusting resources provided in Embodiment 1 of the present invention.

[0041] Figure 3 A method flow chart of a specific embodiment of a storage automation testing method capable of dynamically adjusting resources provided in the first embodiment of the present invention.

[0042] Figure 4 A second embodiment of the present invention provides a schematic diagram of the structure of a storage automation test device capable of dynamically adjusting resources.

[0043] Figure 5 A schematic diagram of the structure of a terminal provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0044] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0045] Embodiment 1

[0046] like Figure 1 The figure shows a storage automation test architecture diagram of the present invention that can dynamically adjust resources, including a front-end web system and a back-end automation control system. The user creates an automation test task in the front-end web system and sends the test task to the back-end automation control system. The back-end automation control system automatically determines and calls corresponding test resources (executor and storage device) to perform automation testing according to the priority of the task. At the same time, the back-end automation control system determines whether the test case is executed in parallel according to the type of the test case.

[0047] like Figure 2 The figure shows a flow chart of a storage automation testing method capable of dynamically adjusting resources provided by an embodiment of the present invention, which includes the following steps.

[0048] S101, creating a test task in the front-end web system and configuring a priority for the test task; each test task includes at least one test case.

[0049] Users can configure the test task priority as needed, such as setting a priority level of 1-5. The larger the number, the higher the priority.

[0050] S102, the background automation control system determines parallel test cases according to the types of test cases in the test task.

[0051] This embodiment determines parallel test cases according to the type of test cases, and stores test cases into query class, I\O class and advanced feature class.

[0052] For query test cases, all test cases can be directly executed in parallel, and the sum of the number of parallel executions must not be greater than the sum of requests that can be simultaneously responded to by the available backend storage devices.

[0053] For I\O test cases, they can be processed according to the execution time or data size set in the test case. When testing I\O test cases with longer execution time or larger data volume, test cases with shorter execution time or smaller data volume can be executed in parallel to maximize resource utilization and improve test efficiency. Specifically, if there are test cases with execution time or data volume greater than the threshold, the test cases with execution time or data volume less than the threshold will be executed in parallel, and the performance requirement for parallel execution shall not be greater than the maximum performance of the available storage device in the background.

[0054] S103, the background automation control system calculates the total resources required for all the test tasks to be executed according to the number of parallel execution of the test cases, and calculates the current available resources of the background at the same time.

[0055] The resources required for the test task include the required execution machine memory and the required number of storage devices; accordingly, the total resources required for all test tasks to be executed are the sum of the resources required for each test task to be executed, including the sum of the required execution machine memory and the sum of the required number of storage devices.

[0056] At the same time, the current available resources in the background include the sum of the available memory of each execution machine and the total number of available storage devices.

[0057] Considering that some test cases can be executed in parallel, this embodiment calculates the resources required for the test task according to the number of test cases executed in parallel. Specifically, the execution machine memory and the number of storage devices required for each test task are calculated by the following formula:

[0058] The execution machine memory required for the test task = the maximum memory required for the parallel operation of the test cases in the test task * the number of storage devices required for the test task;

[0059] The number of storage devices required for a test task = the number of storage devices required for all test cases of the test task to be operated in parallel at the same time.

[0060] S104: If the currently available resources in the background are less than the total resources required by all the test tasks to be executed, the background automation control system allocates resources to the test tasks for test execution according to the test task priorities.

[0061] The background automation control system allocates resources to test tasks according to their priorities. Test tasks with higher priorities can be allocated more resources.

[0062] This embodiment first determines the priorities of all test tasks to be executed, whether there are different priorities. If all test tasks to be executed have the same priority, the currently available background resources are evenly distributed to each test task; if all test tasks to be executed have different priorities, M% of the currently available background resources are evenly distributed to test tasks with priorities higher than a certain level, and (100-M)% of the currently available background resources are evenly distributed to the remaining test tasks.

[0063] It is understandable that M% is a value greater than 50%. In specific implementation, M% can be 80%. For example, if there are 3 test tasks with priorities 5, 3, and 1, 80% of resources can be allocated to the two test tasks with priorities 5 and 3, and 20% of resources can be allocated to the test task with priority 1.

[0064] Among them, M% of the current available resources in the background include M% of the available execution machine memory and M% of the available storage device quantity, such as 80% of the available execution machine memory and 80% of the available storage device quantity. For storage devices, M% of the available storage device quantity is specifically the actual storage device quantity calculated rounded up. For example, if the total number of storage devices is 8, 80% of the storage device quantity is (8*80%) rounded up, which is determined to be 7. If the number of storage devices is small, the rounded value may be equal to the number of all available storage devices in the background. At this time, M% of the available storage device quantity is the rounded value minus 1. For example, there are 3 storage devices in total, (3*80%) is rounded up to 3. If all 3 storage devices are assigned to high-priority test tasks, low-priority test tasks cannot be executed. At this time, 2 storage devices are actually assigned to high-priority test tasks, and 1 storage device is reserved for low-priority test tasks to ensure that low-priority test tasks can also be executed.

[0065] It should be noted that the high-priority test tasks that are allocated 80% of the resources are evenly distributed. The same is true for the low-priority test tasks.

[0066] S105, if the current available resources in the background are greater than the total resources required by all the test tasks to be executed, the background automation control system allocates resources to each test task to execute the test according to the resources required by each test task to be executed.

[0067] When available resources exceed required resources, each test task is allocated the required resources.

[0068] S106, when the test task is executed, the determined parallel test cases are executed in parallel.

[0069] The background automation control system sends the test task to the execution machine for execution according to the resources allocated by the test task, and the execution machine executes the parallel test cases in parallel.

[0070] It should be noted that after the background automation control system detects that the test task is completed, it recalculates the resources required for all the test tasks to be completed, dynamically adjusts the resource value that can be used by each task, and executes the test task.

[0071] The automated testing method for dynamically adjusting resources in an embodiment of the present invention pre-configures the test task priority at the front end, and can automatically allocate test resources according to the test task priority, thereby making resources controllable; at the same time, the background determines whether the test cases can be executed in parallel based on the test case classification algorithm, so as to reduce the test time and improve the test efficiency.

[0072] To further understand the present solution, the following provides a specific embodiment of the storage automation testing method capable of dynamically adjusting resources of the present invention. Figure 3 As shown, the following steps are included.

[0073] SS1, the front-end web system issues test tasks.

[0074] SS2, the background automated testing system calculates the resource values ​​required for all test tasks to be completed.

[0075] The background automated testing system monitors in real time whether any test tasks have been completed, and when a test task is completed, recalculates the resource values ​​required for all pending test tasks.

[0076] SS3, compares the resource values ​​required for all test tasks to be completed with all resource values ​​of the platform.

[0077] SS4: If the total resource value of the platform is greater than the resource value required by all the test tasks to be completed, the maximum required resource value is allocated to each test task.

[0078] SS5: If the value of all platform resources is less than the value of all resources required by all test tasks to be completed, it is determined whether there are test tasks with different priorities.

[0079] SS6, if so, the test tasks with high priority share the maximum resource value on average, and the test tasks with low priority share the minimum resource value on average, and the test tasks are executed.

[0080] Among them, the maximum resource value is M% of the resource value, and the minimum resource value is (100-M)% of the resource value.

[0081] SS7, if not, all test tasks analyze all resource values ​​on average and execute the test tasks.

[0082] Embodiment 2

[0083] like Figure 4The embodiment of the present invention provides a schematic diagram of the structure of a storage automation test device capable of dynamically adjusting resources, including the following functional modules.

[0084] Task creation and configuration module 101: configures the front-end web system, creates a test task, and configures a priority for the test task; each test task includes at least one test case.

[0085] The parallel test case determination module 102 is configured in the background automatic control system and determines the parallel test cases according to the types of the test cases in the test tasks.

[0086] Resource calculation module 103: configured in the background automatic control system, calculates the total resources required for all the test tasks to be executed according to the number of parallel execution of test cases, and calculates the current available resources in the background.

[0087] Resource allocation module 104: configured in the background automation control system. If the current available resources in the background are less than the total resources required for all the test tasks to be executed, the background automation control system allocates resources to the test tasks according to the test task priority to execute the test; if the current available resources in the background are greater than the total resources required for all the test tasks to be executed, the background automation control system allocates resources to each test task according to the resources required for each test task to be executed to execute the test; when the test task is executed, the determined parallel test cases are executed in parallel.

[0088] The parallel test case determination module 102 determines the parallel test cases according to the types of the test cases in the test task, specifically including:

[0089] For query test cases, all test cases can be directly executed in parallel, and the sum of the number of parallel executions is not greater than the sum of requests that can be responded to simultaneously by the available storage devices in the background;

[0090] For I\O test cases, if there are test cases whose execution time or data volume is greater than the threshold, the test cases whose execution time or data volume is less than the threshold will be executed in parallel. At the same time, the performance requirement of parallel execution shall not be greater than the maximum performance of the background available storage device.

[0091] The resource allocation module 104 allocates resources to the test task to execute the test according to the test task priority, specifically including:

[0092] If all the test tasks to be executed have the same priority, the currently available resources in the background will be evenly allocated to each test task;

[0093] If all the test tasks to be executed have different priorities, M% of the currently available background resources will be evenly distributed to the test tasks with priorities higher than a certain level, and (100-M)% of the currently available background resources will be evenly distributed to the remaining test tasks.

[0094] The storage automation testing device with dynamically adjustable resources of this embodiment is used to implement the aforementioned storage automation testing method with dynamically adjustable resources. Therefore, the specific implementation method of the device can be seen in the embodiment part of the storage automation testing method with dynamically adjustable resources in the previous text. Therefore, its specific implementation method can refer to the description of the corresponding embodiments of each part, which will not be introduced in detail here.

[0095] In addition, since the storage automation testing device capable of dynamically adjusting resources of this embodiment is used to implement the aforementioned storage automation testing method capable of dynamically adjusting resources, its function corresponds to that of the aforementioned method and will not be described in detail here.

[0096] Embodiment 3

[0097] Figure 5 A schematic diagram of the structure of a controlled terminal 500 provided in an embodiment of the present invention includes: a processor 510, a memory 520 and a communication unit 530. The processor 510 is used to implement the following steps when implementing a storage automation test program with dynamically adjustable resources stored in the memory 520:

[0098] S101, creating a test task in the front-end web system and configuring a priority for the test task; each test task includes at least one test case;

[0099] S102, the background automation control system determines the parallel test cases according to the types of the test cases in the test task;

[0100] S103, the background automation control system calculates the total resources required for all the test tasks to be executed according to the number of parallel execution of the test cases, and calculates the current available resources of the background;

[0101] S104, if the current available resources in the background are less than the total resources required by all the test tasks to be executed, the background automation control system allocates resources to the test tasks to execute the tests according to the test task priorities;

[0102] S105, if the current available resources in the background are greater than the total resources required by all the test tasks to be executed, the background automation control system allocates resources to each test task to execute the test according to the resources required by each test task to be executed;

[0103] S106, when the test task is executed, the determined parallel test cases are executed in parallel.

[0104] The present invention pre-configures the test task priority at the front end, and can automatically allocate test resources according to the test task priority, so that resources are controllable; at the same time, the background determines whether the test cases can be executed in parallel according to the classification algorithm of the test cases, so as to reduce the test time and improve the test efficiency.

[0105] The controlled terminal 500 includes a processor 510, a memory 520 and a communication unit 530. These components communicate via one or more buses. It can be understood by those skilled in the art that the structure of the server shown in the figure does not constitute a limitation of the present invention, and it can be a bus structure or a star structure, and can also include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0106] The memory 520 can be used to store the execution instructions of the processor 510. The memory 520 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 520 are executed by the processor 510, the controlled terminal 500 can execute some or all of the steps in the following method embodiments.

[0107] The processor 510 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 520, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 510 can only include a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0108] The communication unit 530 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.

[0109] Embodiment 4

[0110] The present invention also provides a computer storage medium, wherein the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0111] The computer storage medium stores a storage automation test program capable of dynamically adjusting resources. When the storage automation test program capable of dynamically adjusting resources is executed by a processor, the following steps are implemented:

[0112] S101, creating a test task in the front-end web system and configuring a priority for the test task; each test task includes at least one test case;

[0113] S102, the background automation control system determines the parallel test cases according to the types of the test cases in the test task;

[0114] S103, the background automation control system calculates the total resources required for all the test tasks to be executed according to the number of parallel execution of the test cases, and calculates the current available resources of the background;

[0115] S104, if the current available resources in the background are less than the total resources required by all the test tasks to be executed, the background automation control system allocates resources to the test tasks to execute the tests according to the test task priorities;

[0116] S105, if the current available resources in the background are greater than the total resources required by all the test tasks to be executed, the background automation control system allocates resources to each test task to execute the test according to the resources required by each test task to be executed;

[0117] S106, when the test task is executed, the determined parallel test cases are executed in parallel.

[0118] The present invention pre-configures the test task priority at the front end, and can automatically allocate test resources according to the test task priority, so that resources are controllable; at the same time, the background determines whether the test cases can be executed in parallel according to the classification algorithm of the test cases, so as to reduce the test time and improve the test efficiency.

[0119] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.

[0120] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is 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 features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection 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.

[0121] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0122] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0123] The above disclosure is only a preferred embodiment of the present invention, but the present invention is not limited thereto. Any non-creative changes that can be thought of by a person skilled in the art, as well as several improvements and modifications made without departing from the principle of the present invention, should fall within the protection scope of the present invention.

Claims

1. A storage automation test method capable of dynamically adjusting resources, characterized in that: The following steps are involved: Create test tasks in the front-end web system and configure priorities for the test tasks; Each test task contains at least one test case; The background automation control system determines the parallel test cases according to the types of test cases in the test tasks; The background automation control system calculates the total resources required for all test tasks to be executed based on the number of test cases executed in parallel, and also calculates the current available resources in the background; If the current available resources in the background are less than the total resources required for all the test tasks to be executed, the background automation control system will allocate resources to the test tasks to execute the test according to the test task priority; If the currently available resources in the background are greater than the total resources required by all the test tasks to be executed, the background automation control system allocates resources to each test task to execute the test according to the resources required by each test task to be executed; When the test task is executed, the determined parallel test cases are executed in parallel; Wherein, the parallel test cases are determined according to the types of test cases in the test task, specifically including: For query test cases, all test cases can be directly executed in parallel, and the sum of the number of parallel executions is not greater than the sum of requests that can be responded to simultaneously by the available storage devices in the background; For I\O test cases, if there are test cases whose execution time or data volume is greater than the threshold, the test cases whose execution time or data volume is less than the threshold will be executed in parallel. At the same time, the performance requirement of parallel execution shall not be greater than the maximum performance of the background available storage device.

2. The storage automation test method capable of dynamically adjusting resources according to claim 1, characterized in that: The resources required for the test task include the required execution machine memory and the number of storage devices required; The total resources required by all the test tasks to be executed are the sum of the resources required by each test task to be executed, including the sum of the memory required by the execution machine and the sum of the number of storage devices required; The currently available resources of the background include the sum of the available memory of each execution machine and the total number of available storage devices.

3. The storage automation test method capable of dynamically adjusting resources according to claim 2, characterized in that: The background automation control system calculates the resources required for the test task based on the number of test cases executed in parallel, including: The required execution machine memory and the number of storage devices required for each test task are calculated using the following formula; The execution machine memory required for the test task = the maximum memory required for the parallel operation of the test cases in the test task * the number of storage devices required for the test task; The number of storage devices required for a test task = the number of storage devices required for all test cases of the test task to be operated in parallel at the same time.

4. The storage automation test method capable of dynamically adjusting resources according to claim 3, characterized in that: The background automation control system allocates resources to test tasks according to the test task priority to execute the test, including: If all the test tasks to be executed have the same priority, the currently available resources in the background will be evenly allocated to each test task; If all the test tasks to be executed have different priorities, M% of the currently available background resources will be evenly distributed to the test tasks with priorities higher than a certain level, and (100-M)% of the currently available background resources will be evenly distributed to the remaining test tasks.

5. The storage automation test method capable of dynamically adjusting resources according to claim 4, characterized in that: M% of the currently available resources in the background include M% of the available execution machine memory and M% of the available storage devices, where M% of the available storage devices is the actual number of storage devices calculated rounded up. If the rounded value is equal to the number of all available storage devices in the background, then M% of the available storage devices is the rounded value minus 1.

6. The storage automation test method capable of dynamically adjusting resources according to claim 5, characterized in that: The value of M% is 80%.

7. A storage automation test device capable of dynamically adjusting resources, characterized in that: include, Task creation and configuration module: Configured in the front-end web system, create test tasks and configure priorities for test tasks; each test task contains at least one test case; Parallel test case determination module: configured in the background automatic control system, determines the parallel test cases according to the types of test cases in the test tasks; Resource calculation module: It is configured in the background automation control system to calculate the total resources required for all test tasks to be executed according to the number of parallel execution of test cases, and also calculate the current available resources in the background; Resource allocation module: configured in the background automation control system. If the current available resources in the background are less than the total resources required for all the test tasks to be executed, the background automation control system will allocate resources to the test tasks according to the test task priority to execute the test; If the current available resources in the background are greater than the total resources required by all the test tasks to be executed, the background automation control system will allocate resources to each test task to execute the test according to the resources required by each test task to be executed; when the test task is executed, the determined parallel test cases are executed in parallel; The parallel test case determination module determines the parallel test cases according to the types of test cases in the test task, specifically including: For query test cases, all test cases can be directly executed in parallel, and the sum of the number of parallel executions is not greater than the sum of requests that can be responded to simultaneously by the available storage devices in the background; For I\O test cases, if there are test cases whose execution time or data volume is greater than the threshold, the test cases whose execution time or data volume is less than the threshold will be executed in parallel. At the same time, the performance requirement of parallel execution shall not be greater than the maximum performance of the background available storage device.

8. The storage automation test device capable of dynamically adjusting resources according to claim 7, characterized in that: The resource allocation module allocates resources to test tasks according to the test task priority to execute the test, including: If all the test tasks to be executed have the same priority, the currently available resources in the background will be evenly allocated to each test task; If all the test tasks to be executed have different priorities, M% of the currently available background resources will be evenly distributed to the test tasks with priorities higher than a certain level, and (100-M)% of the currently available background resources will be evenly distributed to the remaining test tasks.