CN114564387A - Scene type automatic testing method and system for OpenStack cloud platform - Google Patents

Scene type automatic testing method and system for OpenStack cloud platform Download PDF

Info

Publication number
CN114564387A
CN114564387A CN202210156511.7A CN202210156511A CN114564387A CN 114564387 A CN114564387 A CN 114564387A CN 202210156511 A CN202210156511 A CN 202210156511A CN 114564387 A CN114564387 A CN 114564387A
Authority
CN
China
Prior art keywords
test
cloud platform
openstack cloud
scene
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210156511.7A
Other languages
Chinese (zh)
Inventor
郭武
尚林庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210156511.7A priority Critical patent/CN114564387A/en
Publication of CN114564387A publication Critical patent/CN114564387A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Abstract

The invention discloses a scene-type automatic testing method and a scene-type automatic testing system for an OpenStack cloud platform, wherein the method comprises the following steps: the method comprises the steps of selecting one or more OpenStack cloud platforms to be tested, conducting pretesting on the OpenStack cloud platforms to be tested and a scene test script suite, executing a formal test process after the pretesting passes, generating a formal test result according to the formal test process, aiming at the problems that most of the existing OpenStack cloud platform tests are manual tests and the script test efficiency is low, integrating various test scene scripts, testing the platforms to be tested in parallel and generating a test report.

Description

Scene type automatic testing method and system for OpenStack cloud platform
Technical Field
The invention relates to the technical field of automated testing, in particular to a scene type automated testing method and system for an OpenStack cloud platform.
Background
At present, most companies and personnel adopt manual testing or script testing in the aspect of testing for OpenStack cloud platforms, although the testing purpose can be achieved by the mode, the problems of low testing efficiency, large labor capacity of personnel, high possibility of error, lack of integration of testing scenes and the like exist.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a scene-based automatic testing method and a scene-based automatic testing system for an OpenStack cloud platform, so as to solve the problems existing in the current OpenStack cloud platform testing.
On one hand, the application provides a scene-based automatic testing method for an OpenStack cloud platform, which comprises the following steps:
selecting one or more OpenStack cloud platforms to be tested;
performing pretesting on the OpenStack cloud platform to be tested and the scene test script suite;
executing a formal test process after the pretest is passed;
and generating a formal test result according to the formal test process.
In one embodiment, before the selecting one or more OpenStack cloud platforms to be tested, the method includes:
and obtaining login authentication information, wherein the obtaining of the login authentication information comprises obtaining login authentication information of a test system and authenticating the OpenStack cloud platform to be tested.
In one embodiment, before the pretesting the OpenStack cloud platform to be tested and the scenario test script suite, the method further includes:
and verifying the OpenStack cloud platform to be tested, and if the OpenStack cloud platform to be tested does not pass the verification, adding or updating relevant environment authentication information of the OpenStack cloud platform to be tested.
In one embodiment, before the pretesting the OpenStack cloud platform to be tested and the scenario test script suite, the method further includes:
creating a scene test script suite according to a test purpose, wherein the creating of the scene test script suite according to the test purpose comprises the following steps:
calling a public cloud platform to form the scene test script suite;
and writing and modifying the test script by using a programming language according to the test purpose to form the scene test script suite.
In one embodiment, the method for the scene-based automated testing for the OpenStack cloud platform further includes:
and if the pretest does not pass, adjusting the scene test script suite according to the pretest result, wherein the adjustment comprises adding or editing the scene test script suite.
In one embodiment, before the executing the formal test process, the method further includes:
distributing the scene test script suite and the test tool to the OpenStack cloud platform to be tested;
selecting an execution time;
and placing the scene test script suite into a queue.
In one embodiment, the generating a formal test result according to a formal test process includes:
establishing a long connection between a front-end browser and the rear end of a test system, wherein the long connection is established by sending a websocket request to the rear end of the test system through the front-end browser;
sending a test starting request, and monitoring the real-time message of the websocket by adopting an onmessage method;
establishing an SSH channel between the rear end of the test system and a server to be operated, namely a management node of the OpenStack cloud platform to be tested, and sending a test start instruction to the management node of the OpenStack cloud platform to be tested behind the SSH channel;
and returning the log data executed by the test system to the front-end browser through the websocket, wherein the log data is displayed in real time after being received by the front-end browser.
In one embodiment, the method for the scene-based automated testing for the OpenStack cloud platform further includes:
and generating a correspondingly configured virtual machine and a correspondingly configured network according to the scene test script suite, copying the test tool into the virtual machine through the network, and executing a test task on the virtual machine.
On the other hand, the application also provides a scene-based automatic test system for the OpenStack cloud platform, which comprises:
a background scheduling management module: the OpenStack cloud platform to be tested is used for selecting one or more OpenStack cloud platforms to be tested;
cloud platform test module: the system is used for conducting pretesting on the OpenStack cloud platform to be tested and the scene test script suite, executing a formal test process and generating a formal test result according to the formal test process.
In another aspect, the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and is characterized in that when the processor executes the computer program, the steps of the method for scene-based automated testing for an OpenStack cloud platform as described above are implemented.
In yet another aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for scenario-based automated testing for an OpenStack cloud platform as described above.
The technical scheme provided by the invention has the beneficial effects that:
according to the technical scheme, one or more OpenStack cloud platforms to be tested are selected, the OpenStack cloud platforms to be tested and the scene test script suite are subjected to pretesting, after the pretesting is passed, formal test processes are executed and according to formal test results are generated by the formal test processes, the problems that most of tests of the existing OpenStack cloud platforms are manual tests, the script test efficiency is low and the like are solved, the effects that various test scene scripts are integrated, the platform to be tested is tested in parallel and a test report is generated are achieved, the test method can be used for newly-built or changed OpenStack cloud platform tests, the test process is unattended, the operation complexity of personnel is reduced, and the test time is saved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a scene-based automated testing method for an OpenStack cloud platform according to an embodiment of the present invention;
fig. 2 is a flowchart of testing steps of a scene-based automated testing method for an OpenStack cloud platform according to an embodiment of the present invention;
fig. 3 is a structural block diagram of a scene-based automated testing system for an OpenStack cloud platform according to an embodiment of the present invention;
fig. 4 is an execution diagram of a scenario-based test script suite in a scenario-based automated test method for an OpenStack cloud platform according to an embodiment of the present invention;
fig. 5 is a flowchart of scheduling of an OpenStack cloud platform test in a scene-based automated testing method for an OpenStack cloud platform according to an embodiment of the present invention;
fig. 6 is a flowchart of scheduling an OpenStack virtual machine test in a scene-based automated testing method for an OpenStack cloud platform according to an embodiment of the present invention;
fig. 7 is a diagram of steps executed by a scenario-based test script suite in a scenario-based automated test method for an OpenStack cloud platform according to an embodiment of the present invention;
fig. 8 is a schematic communication diagram in a testing process in a scenario-based automated testing method for an OpenStack cloud platform according to an embodiment of the present invention;
Detailed Description
In order to make the objects, technical solutions and advantages 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 accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.
Example one
As shown in fig. 1, the present application discloses a scene-based automated testing method for an OpenStack cloud platform, including:
s101: one or more OpenStack cloud platforms to be tested are selected.
In actual work, a plurality of OpenStack cloud platforms are often required to be tested, so that in order to improve the testing efficiency, a plurality of OpenStack cloud platforms can be added to a testing system at one time, and the OpenStack cloud platforms can be executed in parallel when a formal testing process is executed, so that the testing efficiency is improved.
It should be noted that before selecting one or more OpenStack cloud platforms to be tested, login authentication information needs to be acquired, where the acquiring of the login authentication information includes two parts:
obtaining login authentication information of a test system: the login authentication of the test system is based on open-source login authentication modules such as OAuth, Cookie-Session Auth, JWT (Json Web token), Django-Auth and the like.
Authenticating the OpenStack cloud platform to be tested: the method comprises the steps of OpenStack cloud platform API authentication and the OpenStack cloud platform CLI authentication, at least one of the API authentication and the CLI authentication can be selected according to actual needs to be authenticated, firstly, a user name and a password are required to be provided, the OpenStack cloud platform API authentication obtains a token of a user according to the user name and the password and is used for calling the API of the OpenStack cloud platform to obtain corresponding information and execute corresponding operation; the OpenStack cloud platform CLI can directly acquire an admin-openrcc.sh file of the test system according to the user name and the password, and the file is used for completing CLI authentication so as to call the CLI of the OpenStack cloud platform.
S102: and performing pretesting on the OpenStack cloud platform to be tested and the scene test script suite.
It should be noted that, in order to meet the test condition of the test system, before the pretesting is performed on the OpenStack cloud platform to be tested and the scenario test script suite, on one hand, the OpenStack cloud platform to be tested needs to be verified, as shown in fig. 2, if the verification fails, the relevant environment authentication information of the OpenStack cloud platform to be tested needs to be added or updated and authenticated, then the data information is saved or updated, and the verification is performed again until the verification passes.
On the other hand, a scenario-based test script suite needs to be created according to a test purpose, and the creating of the scenario-based test script suite according to the test purpose includes: and calling a public cloud platform to form the scene test script suite, writing by using a programming language according to a test purpose, and modifying the test script to form the scene test script suite.
The scene test script suite comprises one or more test scripts, each test script realizes different test functions during test execution, different test scripts can be selected according to actual needs to form different scene test script suites, the writing and modification of the scene test script suites mainly use Python, Java and the like, and the used programming language is not specifically limited in the application.
It should be noted that the test method of the present application mainly simulates an actual use scenario to perform a test, and not only tests a certain function, but also tests the actual scenario as follows: the OpenStack cloud platform runs for one month under the condition of 50% load, and performs related operation on the OpenStack cloud platform every day to test the stability of the cloud platform; if the whole function test of the OpenStack cloud platform patrols and examines the scene: the method comprises the steps of creating 100 virtual machines in batches, testing the disk performance of the virtual machines by using FIO (field-oriented automation), and the like, so that different scene-based test script kits need to be created according to different test purposes.
In order to enable the scenario test script suite to better meet the test requirements, as shown in fig. 2, a pretest is performed on the scenario test script suite and the scenario test script suite is adjusted according to a pretest result, where the adjustment includes adding or editing the scenario test script suite, the pretest is performed again after the adjustment, whether the pretest result meets an expectation is determined, if the pretest result meets the expectation, the pretest is passed, and if the pretest result does not meet the expectation, the adjustment is performed again until the pretest is passed, and then the test script is saved or updated.
S103: and after the pretest is passed, executing a formal test process.
It should be noted that, before executing the formal test process, it is further required to:
as shown in fig. 5, the scenario test script suite and the test tool are distributed to the OpenStack cloud platform to be tested, and may also be distributed to a management node of the OpenStack cloud platform to be tested, where the scenario test script suite is one or more than one, and the OpenStack cloud platform to be tested is also one or more than one, so that a formal test process may be executed in parallel when executing the formal test process; the test tools include, but are not limited to, a disk test tool FIO, a memory test tool stream.c, a CPU test tool unixbench, and the like.
Execution time is selected, such as immediate, periodically timed, etc., to reduce manual operations.
As shown in fig. 4, a plurality of scenario test script suites are placed in one queue, so that they are executed serially when a formal test process is executed, and meanwhile, the consistency of the test environment of the scenario test script suites in the test process is ensured.
When the formal test process is executed, one or more OpenStack cloud platforms to be tested, which have distributed a plurality of scene test script suites, are tested in parallel to improve the efficiency at the moment, wherein the scene test script suites are already placed in a queue, and the execution sequence of the formal test process is executed according to a first-in first-out rule.
S104: and generating a formal test result according to the formal test process.
In addition, on the one hand: in the process of executing the formal test process, whether an error is reported in the test process needs to be judged, if so, a relevant log is exported and stored so as to be convenient for a tester to consult; if no error is reported, the test result is sorted, analyzed and presented; on the other hand: in the testing process, the test logs are transmitted in real time, so that a tester can know the testing progress and the testing condition in time. As shown in fig. 7, it is an execution step of the scenario test script suite in the test process:
s201: test subject formation: the main content of the scene test script suite is formed by calling a CLI or API of a public OpenStack cloud platform, and is executed in a background in a multi-thread mode.
S202: monitoring the test process: and monitoring the test process in real time, redirecting the test process data to a server, and displaying the test process data on a front-end web page.
S203: collecting test results: and when the test process is monitored to be finished, integrally collecting the test result.
S204: and (3) formatting the test result: and (5) sorting and formatting the test results, and outputting the test results in a JSON format.
S205: collecting test process logs: checking the formatted test result, and exporting and storing the log to be collected according to the check result
S206: cleaning test data: and cleaning the data generated by the test to prepare for the next test.
The output log can be checked in real time in the execution process of the scene test script suite, and the output log depends on the websocket service provided by the rear end of the test system. As shown in fig. 8, when a test starts, the front-end browser sends a websocket request to the back end of the test system to establish a long connection, sends the test start request, monitors a real-time message of the websocket by using an onmessage method, after receiving a test start instruction, establishes a security protocol channel (for example, an SSH channel) between the back end of the test system and a server to be operated, that is, an OpenStack cloud platform management node, sends the test start instruction to the OpenStack cloud platform management node behind the security protocol channel, returns log data executed by the OpenStack cloud platform management node to the front-end browser through the websocket long connection, and displays the log data in real time after the browser receives the message.
S105: and generating a correspondingly configured virtual machine and a correspondingly configured network according to the scene test script suite, copying the test tool into the virtual machine through the network, and executing a test task on the virtual machine.
It should be noted that after the OpenStack cloud platform test is completed, the virtual machine on the OpenStack cloud platform can be continuously tested, and the test steps include S101 to S104, where on one hand, a test object is changed from the OpenStack cloud platform to the virtual machine on the OpenStack cloud platform, and on the other hand, a correspondingly configured virtual machine and network need to be generated according to the scenario test script suite, the test tool is copied into the virtual machine through the network, and then a corresponding test instruction is executed, so as to implement the test on the virtual machine on the OpenStack cloud platform, and improve the virtual machine test efficiency. The scheduling flow chart in the test process is shown in fig. 6, and the communication schematic in the test execution process is shown in fig. 8.
The application also discloses a scene-based automated testing system for the OpenStack cloud platform, which is shown in fig. 3 and includes:
a background scheduling management module: the OpenStack cloud platform to be tested is used for selecting one or more OpenStack cloud platforms to be tested;
cloud platform test module: the system is used for conducting pretesting on the OpenStack cloud platform to be tested and the scene test script suite, executing a formal test process and generating a formal test result according to the formal test process.
In one embodiment, the scenic automated testing system for the OpenStack cloud platform further includes an authentication management module, configured to:
and obtaining login authentication information.
In one embodiment, the authentication management module includes:
the test platform logs in the authentication module: the system comprises a server, a server and a server, wherein the server is used for acquiring login authentication information of a test system;
the cloud platform access authentication module: and the OpenStack cloud platform to be tested is authenticated.
In one embodiment, the cloud platform testing module is further configured to:
and verifying the OpenStack cloud platform to be tested, and if the OpenStack cloud platform to be tested does not pass the verification, adding or updating relevant environment authentication information of the OpenStack cloud platform to be tested.
In one embodiment, the scene-based automated testing system for the OpenStack cloud platform further includes a test script management module, configured to:
and creating a scene test script suite according to the test purpose.
In one embodiment, the test script management module comprises:
script flow template management module: the system comprises a cloud platform, a test script suite and a database, wherein the cloud platform is used for calling a public cloud platform to form a scene test script suite;
a script editing module: and writing and modifying the test script by using a programming language according to the test purpose to form the scene test script suite.
In one embodiment, the script editing module is further configured to:
and if the pretest fails, adjusting the scene test script suite according to the pretest result.
In one embodiment, the background scheduling management module is further configured to:
distributing the scene test script suite and the test tool to the OpenStack cloud platform to be tested;
selecting an execution time;
and placing the scene test script suite into a queue.
In one embodiment, the cloud platform testing module is further configured to:
establishing a long connection between a front-end browser and the rear end of a test system, wherein the long connection is established by sending a websocket request to the rear end of the test system through the front-end browser;
sending a test starting request, and monitoring the real-time message of the websocket by adopting an onmessage method;
establishing an SSH channel between the rear end of the test system and a server to be operated, namely a management node of the OpenStack cloud platform to be tested, and sending a test start instruction to the management node of the OpenStack cloud platform to be tested behind the SSH channel;
and returning the log data executed by the test system to the front-end browser through the websocket, wherein the front-end browser displays the log data in real time after receiving the log data.
In one embodiment, the scenic automation testing system for the OpenStack cloud platform further includes a virtual machine testing module, configured to:
and generating a correspondingly configured virtual machine and a correspondingly configured network according to the scene test script suite, copying the test tool into the virtual machine through the network, and executing a test task on the virtual machine.
The application also provides an electronic device, which can be a terminal, comprising a processor, a memory, a network interface, a display screen and an input device, which are connected through a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the electronic device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to realize a scene-based automatic testing method for the OpenStack cloud platform. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the electronic equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the above-described structures are only some of the structures associated with the embodiments of the present application and do not constitute a limitation on the electronic devices to which the embodiments of the present application may be applied, and that a particular electronic device may include more or less components than those described above, or may combine certain components, or have a different arrangement of components.
In one embodiment, an electronic device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the following steps when executing the program:
selecting one or more OpenStack cloud platforms to be tested;
performing pretesting on the OpenStack cloud platform to be tested and the scene test script suite;
executing a formal test process after the pretest is passed;
and generating a formal test result according to the formal test process.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
before the selecting the OpenStack cloud platform to be tested, the method further comprises the following steps:
and obtaining login authentication information, wherein the obtaining of the login authentication information comprises obtaining login authentication information of a test system and authenticating the OpenStack cloud platform to be tested.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
before the pretesting is performed on the OpenStack cloud platform to be tested and the scene test script suite, the method comprises the following steps:
and verifying the OpenStack cloud platform to be tested, and if the OpenStack cloud platform to be tested does not pass the verification, adding or updating relevant environment authentication information of the OpenStack cloud platform to be tested.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
before the pretesting is performed on the OpenStack cloud platform to be tested and the scene test script suite, the method comprises the following steps:
creating a scene test script suite according to a test purpose, wherein the creating of the scene test script suite according to the test purpose comprises the following steps:
calling a public cloud platform to form the scene test script suite;
and writing and modifying the test script by using a programming language according to the test purpose to form the scene test script suite.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
the scene type automatic testing method for the OpenStack cloud platform further comprises the following steps of;
and if the pretest fails, adjusting the scene test script suite according to the pretest result.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
before executing the formal test process, the method comprises the following steps:
distributing the scene test script suite and the test tool to the OpenStack cloud platform to be tested;
selecting an execution time;
and placing the scene test script into a queue.
In one embodiment, the processor when executing the computer program further performs the steps of:
the generating of the formal test result according to the formal test process comprises:
establishing a long connection between a front-end browser and the rear end of a test system, wherein the long connection is established by sending a websocket request to the rear end of the test system through the front-end browser;
sending a test starting request, and monitoring the real-time message of the websocket by adopting an onmessage method;
establishing an SSH channel between the rear end of the test system and a server to be operated, namely a management node of the OpenStack cloud platform to be tested, and sending a test start instruction to the management node of the OpenStack cloud platform to be tested behind the SSH channel;
and returning the log data executed by the test system to the front-end browser through the websocket, wherein the log data is displayed in real time after being received by the front-end browser.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
the scene-based automatic testing method for the OpenStack cloud platform further comprises the following steps:
and generating a correspondingly configured virtual machine and a correspondingly configured network according to the scene test script suite, copying the test tool into the virtual machine through the network, and executing a test task on the virtual machine.
In one embodiment, the present application further provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, performs the following steps.
Selecting one or more OpenStack cloud platforms to be tested;
performing pretesting on the OpenStack cloud platform to be tested and the scene test script suite;
executing a formal test process after the pretest is passed;
and generating a formal test result according to the formal test process.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
before the selecting the OpenStack cloud platform to be tested, the method further comprises the following steps:
and obtaining login authentication information, wherein the obtaining of the login authentication information comprises obtaining login authentication information of a test system and authenticating the OpenStack cloud platform to be tested.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
before the pretesting is performed on the OpenStack cloud platform to be tested and the scene test script suite, the method comprises the following steps:
and verifying the OpenStack cloud platform to be tested, and if the OpenStack cloud platform to be tested does not pass the verification, adding or updating relevant environment authentication information of the OpenStack cloud platform to be tested.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
before the pretesting is performed on the OpenStack cloud platform to be tested and the scene test script suite, the method comprises the following steps:
creating a scene test script suite according to a test purpose, wherein the creating of the scene test script suite according to the test purpose comprises the following steps:
calling a public cloud platform to form the scene test script suite;
and writing and modifying the test script by using a programming language according to the test purpose to form the scene test script suite.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
the scene type automatic testing method for the OpenStack cloud platform further comprises the following steps of;
and if the pretest fails, adjusting the scene test script suite according to the pretest result.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
before executing the formal test process, the method comprises the following steps:
distributing the scene test script suite and the test tool to the OpenStack cloud platform to be tested;
selecting an execution time;
and placing the scene test script into a queue.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
the generating of the formal test result according to the formal test process comprises:
establishing a long connection between a front-end browser and the rear end of a test system, wherein the long connection is established by sending a websocket request to the rear end of the test system through the front-end browser;
sending a test starting request, and monitoring the real-time message of the websocket by adopting an onmessage method;
establishing an SSH channel between the rear end of the test system and a server to be operated, namely a management node of the OpenStack cloud platform to be tested, and sending a test start instruction to the management node of the OpenStack cloud platform to be tested behind the SSH channel;
and returning the log data executed by the test system to the front-end browser through the websocket, wherein the log data is displayed in real time after being received by the front-end browser.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
the scene-based automatic testing method for the OpenStack cloud platform further comprises the following steps:
and generating a correspondingly configured virtual machine and a correspondingly configured network according to the scene test script suite, copying the test tool into the virtual machine through the network, and executing a test task on the virtual machine.
The technical solutions provided by the present application are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A scene-based automatic testing method for an OpenStack cloud platform is characterized by comprising the following steps:
selecting one or more OpenStack cloud platforms to be tested;
pre-testing the OpenStack cloud platform to be tested and the scenario-based test script suite;
executing a formal test process after the pretest is passed;
and generating a formal test result according to the formal test process.
2. The method of claim 1, wherein before the selecting one or more OpenStack cloud platforms to be tested, the method comprises:
and obtaining login authentication information, wherein the obtaining of the login authentication information comprises obtaining login authentication information of a test system and authenticating the OpenStack cloud platform to be tested.
3. The method of claim 2, wherein before the pretesting the OpenStack cloud platform to be tested and the scenario-based test script suite, the method further comprises:
and verifying the OpenStack cloud platform to be tested, and if the OpenStack cloud platform to be tested does not pass the verification, adding or updating the relevant environment authentication information of the OpenStack cloud platform to be tested.
4. The method of claim 1, wherein before the pretesting the OpenStack cloud platform to be tested and the scenario-based test script suite, the method further comprises:
creating a scene test script suite according to a test purpose, wherein the creating of the scene test script suite according to the test purpose comprises the following steps:
calling a public cloud platform to form the scene test script suite;
and writing and modifying the test script by using a programming language according to the test purpose to form the scene test script suite.
5. The method for the scene-based automated testing of the OpenStack cloud platform according to claim 1, further comprising:
and if the pretest fails, adjusting the scene test script suite according to the pretest result.
6. The method of claim 1, wherein before the executing a formal testing process, the method further comprises:
distributing the scene test script suite and the test tool to the OpenStack cloud platform to be tested;
selecting an execution time;
and placing the scene test script suite into a queue.
7. The scene-based automatic testing method for the OpenStack cloud platform according to claim 1, wherein the generating a formal testing result according to a formal testing process includes:
establishing a long connection between a front-end browser and the rear end of a test system, wherein the long connection is established by sending a websocket request to the rear end of the test system through the front-end browser;
sending a test starting request, and monitoring the real-time message of the websocket by adopting an onmessage method;
establishing an SSH channel between the rear end of the test system and a server to be operated, namely a management node of the OpenStack cloud platform to be tested, and sending a test start instruction to the management node of the OpenStack cloud platform to be tested behind the SSH channel;
and returning the log data executed by the test system to the front-end browser through the websocket, wherein the log data is displayed in real time after being received by the front-end browser.
8. The method for the scene-based automated testing for the OpenStack cloud platform according to any one of claims 1 to 7, further comprising:
and generating a correspondingly configured virtual machine and a correspondingly configured network according to the scene test script suite, copying the test tool into the virtual machine through the network, and executing a test task on the virtual machine.
9. A scene-based automatic test system for an OpenStack cloud platform established based on any one of the methods of claims 1-8, comprising:
a background scheduling management module: the OpenStack cloud platform to be tested is used for selecting one or more OpenStack cloud platforms to be tested;
cloud platform test module: the system is used for conducting pretesting on the OpenStack cloud platform to be tested and the scene test script suite, executing a formal test process and generating a formal test result according to the formal test process.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the steps of the method for scene-based automated testing for an OpenStack cloud platform according to any one of claims 1 to 8 are implemented when the processor executes the computer program.
CN202210156511.7A 2022-02-21 2022-02-21 Scene type automatic testing method and system for OpenStack cloud platform Pending CN114564387A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210156511.7A CN114564387A (en) 2022-02-21 2022-02-21 Scene type automatic testing method and system for OpenStack cloud platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210156511.7A CN114564387A (en) 2022-02-21 2022-02-21 Scene type automatic testing method and system for OpenStack cloud platform

Publications (1)

Publication Number Publication Date
CN114564387A true CN114564387A (en) 2022-05-31

Family

ID=81714655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210156511.7A Pending CN114564387A (en) 2022-02-21 2022-02-21 Scene type automatic testing method and system for OpenStack cloud platform

Country Status (1)

Country Link
CN (1) CN114564387A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116170345A (en) * 2023-02-20 2023-05-26 浪潮思科网络科技有限公司 Automatic flow testing method, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116170345A (en) * 2023-02-20 2023-05-26 浪潮思科网络科技有限公司 Automatic flow testing method, equipment and medium

Similar Documents

Publication Publication Date Title
CN108650149B (en) Server testing method, device, equipment and computer readable storage medium
CN111159049B (en) Automatic interface testing method and system
CN110442524B (en) Method and device for testing web service interface with authentication authorization
US11176030B2 (en) Conducting automated software testing using centralized controller and distributed test host servers
US7979532B2 (en) Systems and methods for using an access point for testing multiple devices and using several consoles
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
US20180329808A1 (en) Conducting Automated Software Testing Using Centralized Controller And Distributed Test Host Servers
CN108509344B (en) Daily cutting batch test method, equipment and readable storage medium
CN107145440A (en) Applied program testing method, device and computer equipment
CN112988608B (en) Data testing method and device, computer equipment and storage medium
CN110557299A (en) network transmission function batch test method, system, terminal and storage medium
CN108427639B (en) Automated testing method, application server and computer readable storage medium
CN110659870A (en) Business audit test method, device, equipment and storage medium
CN114546738A (en) Server general test method, system, terminal and storage medium
CN112463588A (en) Automatic test system and method, storage medium and computing equipment
CN108234246A (en) A kind of method and system of multidirectional server network performance
CN114564387A (en) Scene type automatic testing method and system for OpenStack cloud platform
CN107168844B (en) Performance monitoring method and device
CN105117340A (en) URL (Uniform Resource Locator) detection method and device used for quality evaluation of iOS browser application
CN110750446A (en) System testing method and related device
WO2016188101A1 (en) Service system test method and device
CN110750453B (en) HTML 5-based intelligent mobile terminal testing method, system, server and storage medium
CN117493188A (en) Interface testing method and device, electronic equipment and storage medium
CN110795330A (en) Monkey pressure testing method and device
CN114371866A (en) Version reconfiguration test method, device and equipment of service system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination