Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flowchart of a method for automatically testing performance of a virtualization platform according to this embodiment, and referring to fig. 1, the method includes:
101: acquiring a product form of a virtualization platform to be tested and a performance index list consisting of performance indexes to be tested in the virtualization platform, and generating the virtualization platform as a tested virtualization platform to be tested according to the product form;
102: building a test topology for testing according to the tested virtualization platform and the performance index list, accessing to the entity instruments for testing, setting configuration parameters of each entity instrument according to the test pressure of the current round, and testing the tested virtualization platform through the generated test cases;
103: and if the test of the tested virtualization platform passes, outputting the generated test report, otherwise, performing the next round of test on the tested virtualization platform.
The method provided by the embodiment is executed by the test equipment for testing the virtual equipment. For a virtualization platform needing performance testing, the test equipment is firstly generated in the test environment to serve as a tested virtualization platform, and a test result of the tested virtualization platform is used as a test result of testing the virtualization platform.
The virtualization platform includes, for example, an enterprise private cloud service, an evaluation system for evaluating a user, or a cloud storage service, which is not limited in this embodiment. The product form of the virtualization platform refers to information describing the virtualization platform, and the virtualization platform can be produced by the product form. The performance index list is a list of performance indexes to be tested, for example, whether the performance of the virtualization platform for processing a certain service meets the expectation. The test topology is a built test structure with an entity instrument interface, and the configuration parameters of each entity instrument are determined according to the equipment state data set in the test process, wherein the equipment state data comprise memory occupation, CPU occupancy rate and the like. . And testing the tested virtualization platform, if the test is passed, continuing the test, otherwise, performing a new round of test until the test is passed or the number of the test rounds reaches the preset number of the rounds.
Fig. 2 is a schematic structural diagram of a test topology for testing a tested virtualization platform provided in this embodiment, and referring to fig. 2, the built test topology is connected to an entity instrument for testing, a state of a tested virtual device is obtained from a virtual environment of production, and creation and destruction of the virtual device are implemented. The test topology comprises a performance automation main interface, a virtual device configuration module, a topology configuration module, a meter configuration module, a data analysis module and a test report module.
In the test topology, the performance automation main interface provides scheduling of all the functional modules, and different functional modules are scheduled according to the automatic test flow and the test steps. The virtual equipment configuration module is used for producing the tested virtual equipment according to the product form of the tested virtual equipment selected by the tester and the hardware configuration information of the equipment; and after the test of each piece of virtual equipment is finished, the equipment destruction action is carried out. And the topology configuration module acquires the corresponding topology module according to the input virtualization product form and carries out topology construction. The instrument configuration module is used for taking a performance case set according to the product form of the tested equipment as input and carrying out specific case configuration on the entity instrument before each test; performance case execution is performed and each round of performance test data is returned. The data analysis module is used for sampling state information in the test of the tested equipment; and (3) judging the result by combining the equipment test state information according to the performance test data returned by the instrument configuration module, determining whether a round of performance test is needed again, and determining the final test result. The test report module is used for summarizing process data and outputting a test result; the functions of historical performance test data query and test report customized derivation are provided.
Specifically, the method provided in this embodiment accesses the physical commercial test instrument to the virtualization test environment through the interconnection device based on the more accurate test requirement for the virtualization performance data, so as to meet the performance test requirements of different network type virtualization platforms, and output more accurate performance data. On the other hand, the method can support the automatic production of different virtualization platforms, based on the test flow, the production of the tested platform is carried out according to the current test configuration, the basic information of the tested platform is obtained, and after the test is finished, the virtualization platform can be automatically destroyed, the occupied resources are released, and the test topology is recovered.
The embodiment provides a method for automatically testing the performance of a virtualization platform, which generates a tested virtualization platform for testing according to the product form of the virtualization platform to be tested. And generating a test topology by a set performance test case needing to be tested, and accessing the test case to the entity instrument for testing. And after the configuration parameters of each entity instrument are configured, executing a test, and repeatedly adjusting the configuration parameters to obtain a test report of the tested virtualization platform. Compared with a method for testing only through a software tool, the method has the advantage that the entity instrument is accessed into the virtualization testing environment, and the accuracy of the testing data is improved. Different testing requirements are met through the creation of the testing topology, and flexible testing of different virtualization platforms is achieved. Compared with a method for testing manually, the automatic testing method saves labor cost and improves testing efficiency.
Further, on the basis of the above embodiment, if the test of the virtualization platform under test passes, outputting the generated test report, otherwise, performing a next round of test on the virtualization platform under test, including:
acquiring equipment state data of the tested virtualization platform and test data returned by an entity instrument in the test process, and analyzing whether the test on the tested virtualization platform passes or not according to the equipment state data and the test data;
if the test on the tested virtualization platform is not passed, generating test pressure of the next test according to the equipment state data and the test data, and testing the tested virtualization platform through the test case set after the configuration parameters of each entity instrument are reconfigured according to the newly generated test pressure;
if the tested virtualization platform passes the test, judging that the performance indexes which are not tested still exist, if so, testing the tested virtualization platform through the test cases corresponding to the performance indexes which are not tested, otherwise, outputting a test report generated after the test passes, and releasing the space occupied by the tested virtualization platform after the test report is output.
The test equipment stores the judgment logic for judging whether the test of each test performance passes or not according to the equipment state data and the test data returned by the entity instrument in advance, and the test equipment automatically judges whether the test passes or not according to the equipment state data and the test data during each round of test. And when the test fails, automatically adjusting the test pressure to retest.
Specifically, the method provides re-verification of the accuracy of the performance test data, provides real-time state information sampling of the tested equipment in each round of virtual equipment test, displays the state information of the tested equipment under the pressure while providing each round of performance test data, re-determines the accuracy of each time of performance data, and sets subsequent test conditions by analyzing the test state of the tested equipment in the previous round as partial reference information.
After the test of all test cases is completed, the tested virtualization platform is automatically destroyed, and the space occupied by the tested virtualization platform is released, so that other virtualization platforms can be tested next time.
The embodiment provides a method for automatically testing the performance of a virtualization platform, which automatically analyzes whether the test is passed or not, generates a test case for the next round of test and tests the test case, so that the automation of the test is realized, and the test efficiency is improved. The space release of the tested virtualization platform avoids the occupation of the tested virtualization platform which passes the test on the space, and provides sufficient space for the next test.
Further, on the basis of the above embodiments, the method further includes:
storing the generated test report according to the attribute characteristics of the test report, and outputting the test report with the target attribute characteristics after receiving an instruction for inquiring the test report with the set target attribute characteristics;
the attribute characteristics of the test report comprise the time for generating the test report and test results corresponding to each performance index of the tested virtualization platform corresponding to the test report; and analyzing the test results corresponding to the performance indexes according to the equipment state data and the test data.
And storing the test report according to the attribute characteristics, so that the query operation on the test report is facilitated. Specifically, after each virtualization platform is completed, all process performance data are automatically output, and a final performance result is provided through data analysis; providing a history report query function, supporting testers to query the tested virtual platform test data, supporting the query in a specified time period, and the like; a performance report generation, export function is provided for a selected set of devices under test.
The embodiment provides a method for automatically testing the performance of a virtualization platform, which generates a test report, stores the stored report according to attribute characteristics, conveniently and timely queries the test report meeting conditions, and realizes scientific management of the test report.
Further, on the basis of the foregoing embodiments, if the test on the virtualization platform under test does not pass, generating a test pressure for a next test according to the device state data and the test data, and after reconfiguring configuration parameters of each entity instrument according to a newly generated test pressure, testing the virtualization platform under test through the test case set, further includes:
and judging whether the number of rounds of testing the tested virtualization platform is greater than a preset number of rounds, if so, generating prompt information that the tested virtualization platform fails to be tested.
The preset number of rounds is a set value, and the prompt information can be displayed on a pop-up window and sent to a short message or a mail to a related person, which is not limited in this embodiment.
The embodiment provides a method for automatically testing the performance of a virtualization platform, which avoids the situation that a tested virtualization platform is trapped in endless loop when the test is not passed through by presetting the number of turns, and prompts related personnel to process the problem in the test process as soon as possible by prompt information, so that the test on the tested virtualization platform is smoothly carried out.
Further, on the basis of the foregoing embodiments, the analyzing whether the test on the virtualization platform under test passes or not according to the device state data and the test data includes:
analyzing test results corresponding to various test performances according to the equipment state data and the test data, judging whether the test results are set expected test results or not for each performance index, if so, passing the test results corresponding to the performance indexes, otherwise, not passing the test results corresponding to the performance indexes;
and judging whether the test result corresponding to each performance index of the tested virtualization platform passes, if so, passing the test on the tested virtualization platform, otherwise, failing to pass the test on the tested virtualization platform.
And the test on the tested virtualization platform is passed only when the tests which do not want to test the performance are passed.
The embodiment provides a method for automatically testing the performance of a virtualization platform, which determines the test result of a tested virtualization platform according to the test result of each test case, and has strict test logic and ensures the accuracy of the test result.
Further, if the test on the tested virtualization platform fails, generating test pressure for a next test according to the device state data and the test data, and after reconfiguring configuration parameters of each entity instrument according to the newly generated test pressure, testing the tested virtualization platform through the test case set, including:
if the test on the tested virtualization platform is not passed, adjusting the test pressure according to the equipment state data and the test data, reconfiguring the configuration parameters of each entity instrument according to the adjusted test pressure, and testing the tested virtualization platform under the condition of keeping the test case unchanged and the new test pressure.
And when the test does not pass the new round of test, the test case is kept unchanged, and only the test pressure is changed.
Specifically, by analyzing the test steps and the support situation of the commercial instrument, the system provides input of a virtualized product performance case set with different product forms, and supports automatic configuration of each performance case on the instrument side; and providing a test data analysis function, judging data after each round of test is finished, setting new test conditions, and performing performance detection on each virtual device automatically and iteratively.
Further, still include:
and after the generated test report is output, the test of the tested virtualization platform is finished.
The testing pressure is adjusted through the equipment state data and the testing data to carry out testing again, so that a reliable basis for adjusting the next round of testing is provided, and the automatic optimization of the testing is realized. .
Fig. 3 is a schematic view of a complete flow of the method for automatically testing the performance of the virtualization platform according to this embodiment, and referring to fig. 3, when performing the performance test on the virtualization platform, platform configuration information (i.e., product form) and a performance case set of the test device are input to the test device. The test equipment produces a tested virtualization platform according to the platform configuration information, and builds a test topology according to the cases needing to be tested in the performance case set. After the test topology is built, a test process is carried out, and the operation of 'instrument side performance case configuration, performance test, analysis and test whether the real-time state of the tested equipment passes the test data of the instrument' is executed in a circulating mode until the test passes, the test of the tested equipment is finished, otherwise, the circulation is continued. After the test case is tested, whether the device needs to be tested is judged, until all the test cases are tested, if a new virtualization device needs to be tested, the tested device corresponding to the new virtualization device is regenerated, the new tested device is tested, and otherwise, a test report of the test is output.
The method provided by the embodiment solves the problems of universality adaptation of commercial instruments in different virtualization performance test topologies and virtualization product performance test requirements of different product forms, releases a large amount of manual test workload brought by a large number of virtualization product performance tests, provides more accurate performance data for secondary confirmation, and generates the performance report in a customized and automatic manner.
Fig. 4 is a block diagram illustrating a device for automatically testing performance of a virtualization platform according to an embodiment of the present invention, and referring to fig. 4, the device for automatically testing performance of a virtualization platform according to the embodiment includes a generation module 401, a test module 402, and a processing module 403, wherein,
a generating module 401, configured to obtain a product form of a virtualization platform to be tested and a performance index list composed of performance indexes to be tested in the virtualization platform, and generate the virtualization platform according to the product form, where the virtualization platform is used as a tested virtualization platform to be tested;
a test module 402, configured to build a test topology for testing according to the tested virtualization platform and the performance index list, access the entity instrument for testing, and test the tested virtualization platform through the generated test case after setting configuration parameters of each entity instrument according to the test pressure of the current round;
a processing module 403, configured to output the generated test report if the test of the tested virtualization platform passes, and otherwise, perform the next round of test on the tested virtualization platform.
The apparatus for automatically testing performance of a virtualization platform provided in this embodiment is suitable for the method for automatically testing performance of a virtualization platform provided in the above embodiments, and is not described herein again.
The embodiment of the invention provides a device for automatically testing the performance of a virtualization platform, which is used for generating a tested virtualization platform for testing according to the product form of the virtualization platform to be tested. And generating a test topology by a set performance index list needing to be tested, and accessing the test topology to the entity instrument. And after the configuration parameters of each entity instrument are configured, executing a test, and repeatedly adjusting the configuration parameters to obtain a test report of the tested virtualization platform. Compared with a method for testing only through a software tool, the method has the advantage that the entity instrument is accessed into the virtualization testing environment, and the accuracy of the testing data is improved. Different testing requirements are met through the creation of the testing topology, and flexible testing of different virtualization platforms is achieved. Compared with a method for testing manually, the automatic testing method saves labor cost and improves testing efficiency.
Fig. 5 is a block diagram showing the structure of the electronic apparatus provided in the present embodiment.
Referring to fig. 5, the electronic device includes: a processor (processor)501, a memory (memory)502, a communication Interface (Communications Interface)503, and a bus 504;
wherein,
the processor 501, the memory 502 and the communication interface 503 complete mutual communication through the bus 504;
the communication interface 503 is used for information transmission between the electronic equipment and communication equipment of each entity meter or other electronic equipment;
the processor 501 is configured to call program instructions in the memory 502 to perform the methods provided by the above-mentioned method embodiments, for example, including: acquiring a product form of a virtualization platform to be tested and a performance index list consisting of performance indexes to be tested in the virtualization platform, and generating the virtualization platform as a tested virtualization platform to be tested according to the product form; building a test topology for testing according to the tested virtualization platform and the performance index list, accessing to the entity instruments for testing, setting configuration parameters of each entity instrument according to the test pressure of the current round, and testing the tested virtualization platform through the generated test cases; and if the test of the tested virtualization platform passes, outputting the generated test report, otherwise, performing the next round of test on the tested virtualization platform.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided by the above method embodiments, for example, including: acquiring a product form of a virtualization platform to be tested and a performance index list consisting of performance indexes to be tested in the virtualization platform, and generating the virtualization platform as a tested virtualization platform to be tested according to the product form; building a test topology for testing according to the tested virtualization platform and the performance index list, accessing to the entity instruments for testing, setting configuration parameters of each entity instrument according to the test pressure of the current round, and testing the tested virtualization platform through the generated test cases; and if the test of the tested virtualization platform passes, outputting the generated test report, otherwise, performing the next round of test on the tested virtualization platform.
The present embodiments disclose a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the methods provided by the above-described method embodiments, for example, comprising: acquiring a product form of a virtualization platform to be tested and a performance index list consisting of performance indexes to be tested in the virtualization platform, and generating the virtualization platform as a tested virtualization platform to be tested according to the product form; building a test topology for testing according to the tested virtualization platform and the performance index list, accessing to the entity instruments for testing, setting configuration parameters of each entity instrument according to the test pressure of the current round, and testing the tested virtualization platform through the generated test cases; and if the test of the tested virtualization platform passes, outputting the generated test report, otherwise, performing the next round of test on the tested virtualization platform.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the electronic device and the like are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may also be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention, and are not limited thereto; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.