CN114327765A - Server testing method and device based on Docker virtual container - Google Patents

Server testing method and device based on Docker virtual container Download PDF

Info

Publication number
CN114327765A
CN114327765A CN202111629052.1A CN202111629052A CN114327765A CN 114327765 A CN114327765 A CN 114327765A CN 202111629052 A CN202111629052 A CN 202111629052A CN 114327765 A CN114327765 A CN 114327765A
Authority
CN
China
Prior art keywords
server
tested
virtual container
docker virtual
docker
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
CN202111629052.1A
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.)
Nanchang Huaqin Electronic Technology Co ltd
Original Assignee
Nanchang Huaqin Electronic 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 Nanchang Huaqin Electronic Technology Co ltd filed Critical Nanchang Huaqin Electronic Technology Co ltd
Priority to CN202111629052.1A priority Critical patent/CN114327765A/en
Publication of CN114327765A publication Critical patent/CN114327765A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application discloses a server testing method and device based on a Docker virtual container, wherein the method comprises the following steps: reading the identification information of the server to be tested; opening a corresponding Docker virtual container according to the identification information; triggering a corresponding server to be tested by the Docker virtual container to download a mirror image operating system and sending registration data; according to the registration data, the Docker virtual container establishes a corresponding test environment; and testing the server to be tested by utilizing the corresponding testing environment established by the Docker virtual container. The method and the device can open the corresponding Docker virtual containers according to the identification information of different servers to be tested, and each Docker virtual container can configure the corresponding test environment according to the related information of the corresponding server to be tested, test the servers to be tested by using the corresponding test environment, simulate a plurality of test devices, test a plurality of servers, improve the efficiency and reduce the test cost.

Description

Server testing method and device based on Docker virtual container
Technical Field
The application relates to the technical field of server testing, in particular to a server testing method and device based on a Docker virtual container.
Background
In the big data era, the demands of computing or storing products, network products and the like are continuously increased, and the development cycle of the products is also continuously compressed. Therefore, on the premise that the development cycle is shortened, ensuring the quality of product shipment is also a focus of attention. Meanwhile, production tests are becoming an important part for ensuring the quality in the production process of products.
However, the existing server production test has the following problems:
during production test, due to the limitation of a field and test equipment, only one device can be used for one machine to be tested or one device can be used for four machines to be tested, and the test cannot be performed in a one-to-many mode.
The same test station requires multiple testers to operate, resulting in wasted personnel.
Due to the one-to-one or one-to-four mode of the equipment, the aging test can be carried out only by investing more test equipment when the aging test is carried out in batches, so that the investment of fixed asset equipment is more.
When a plurality of test cases are tested simultaneously, a plurality of independent test reports are generated and cannot be integrated together.
Disclosure of Invention
The present application aims to solve at least some of the above technical problems, and provide a server testing method, device, electronic device and computer readable storage medium based on a Docker virtual container, which can simulate a plurality of testing devices, test a plurality of servers, improve efficiency and reduce testing cost.
In order to achieve the above object, the present application discloses a server testing method based on a Docker virtual container, which includes:
reading the identification information of the server to be tested;
opening a corresponding Docker virtual container according to the identification information;
the Docker virtual container triggers the corresponding server to be tested to download the mirror image operating system and sends registration data;
according to the registration data, the Docker virtual container establishes a corresponding test environment;
and testing the server to be tested by utilizing the corresponding testing environment established by the Docker virtual container.
Optionally, the method further comprises:
correspondingly opening a plurality of Docker virtual containers according to the read identification information of the plurality of servers to be tested;
the plurality of Docker virtual containers are respectively used for testing the corresponding servers to be tested.
Optionally, the "testing the server to be tested by using the corresponding testing environment established by the Docker virtual container" includes:
outputting a test report of the server to be tested;
the outputting the test report of the server to be tested includes:
collecting test information of each server to be tested through a Robot frame automatic test framework;
and integrating the collected test information of each server to be tested to generate a test report with a custom format.
Optionally, the registration data includes parameter information of the server to be tested;
the step of triggering the corresponding server to be tested to download the mirror image operating system and send the registration data by the Docker virtual container comprises the following steps:
the server to be tested downloads the corresponding mirror image operating system from the server system, and the mirror image operating system is configured with a corresponding running script;
and the running script sends the parameter information of the server to be tested.
Optionally, the "establishing a corresponding test environment by the Docker virtual container according to the registration data" includes:
and the Docker virtual container downloads a corresponding test tool according to the parameter information of the server to be tested, and the test tool is used for controlling the server to be tested loaded with the mirror image operating system to perform corresponding test.
Optionally, the step of triggering the corresponding server to be tested to download the mirror image operating system and send the registration data by the Docker virtual container includes:
the Docker virtual container controls the corresponding server to be tested to be powered on through the PDU;
and the Docker virtual container triggers the corresponding server to be tested to download the mirror image operating system and sends registration data.
Optionally, the identification information includes SN code information, and each SN code information has a corresponding relationship with each server to be tested.
In order to achieve the above object, the present application further discloses a server testing apparatus based on a Docker virtual container, which includes:
the reading module is used for reading the identification information of the server to be tested;
the starting module is used for starting the corresponding Docker virtual container according to the identification information;
the trigger module is used for triggering the corresponding server to be tested to download the mirror image operating system and sending registration data by the Docker virtual container;
the configuration module is used for establishing a corresponding test environment for the Docker virtual container according to the registration data;
and the testing module is used for testing the server to be tested by utilizing the corresponding testing environment established by the Docker virtual container.
In order to achieve the above object, the present application also discloses an electronic device, comprising:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the Docker virtual container based server testing method as described above via execution of the executable instructions.
In order to achieve the above object, the present application also discloses a computer-readable storage medium having stored thereon a computer program, which includes a program code for implementing the server testing method based on the Docker virtual container as described above when the computer program is executed by a processor.
To achieve the above object, the present application also discloses a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read by a processor of the electronic device from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the server testing method based on the Docker virtual container as described above.
The method includes the steps of firstly reading identification information of the servers to be tested, starting the corresponding Docker virtual containers according to the identification information, triggering the corresponding servers to be tested to download mirror image operating systems and send registration data by the Docker virtual containers, then establishing corresponding testing environments by the Docker virtual containers according to the registration data, and finally testing the servers to be tested by the aid of the corresponding testing environments established by the Docker virtual containers. The method and the device can open the corresponding Docker virtual containers according to the identification information of different servers to be tested, and each Docker virtual container can configure the corresponding test environment according to the related information of the corresponding server to be tested, test the servers to be tested by using the corresponding test environment, simulate a plurality of test devices, test a plurality of servers, improve the efficiency and reduce the test cost.
Drawings
Fig. 1 is a flowchart of a server testing method based on a Docker virtual container in an embodiment of the present application.
Fig. 2 is a schematic block diagram of a server testing apparatus based on a Docker virtual container according to an embodiment of the present application.
Fig. 3 is a schematic block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to explain technical contents, structural features, implementation principles, and objects and effects of the present application in detail, the following detailed description is given with reference to the accompanying drawings in combination with the embodiments.
Referring to fig. 1, the present application discloses a server testing method based on a Docker virtual container, which includes:
101. and reading the identification information of the server to be tested.
Specifically, each identification information corresponds to each server to be tested one to one, and relevant information, such as configuration information and the like, of the corresponding server to be tested can be acquired by identifying the identification information.
Specifically, "reading the identification information of the server to be tested" may be to obtain the identification information corresponding to the server to be tested in a scanning manner and record the identification information in the testing device. Of course, the identification information of the server to be tested may also be read by other ways, which is not limited herein.
In some embodiments, the identification information includes SN code information, and each SN code information has a corresponding relationship with each server to be tested.
By using the SN code information as the identification information, the relevant information of the server to be tested corresponding to the SN code information can be accurately acquired.
102. And opening the corresponding Docker virtual container according to the identification information.
In some embodiments, the test device is configured with a plurality of Docker virtual containers, the method further comprising:
correspondingly opening a plurality of Docker virtual containers according to the read identification information of the plurality of servers to be tested;
the plurality of Docker virtual containers are respectively used for testing the corresponding servers to be tested.
The multiple Docker virtual containers are used for respectively testing the corresponding servers to be tested, so that the servers can be tested in large batches at the same time, and equipment investment and test environment space are reduced.
103. And the Docker virtual container triggers the corresponding server to be tested to download the mirror image operating system and sends the registration data.
Specifically, after downloading the mirror image operating system, the server to be tested can perform relevant test operations, such as sending data, receiving instructions, executing instructions, and the like.
In some embodiments, the registration data includes parameter information of the server to be tested;
the step of triggering the corresponding server to be tested to download the mirror image operating system and send the registration data by the Docker virtual container includes:
a server to be tested downloads a corresponding mirror image operating system from a server system, and the mirror image operating system is provided with a corresponding running script;
and the running script sends the parameter information of the server to be tested.
The mirror image operating system is downloaded from the server system, so that each server to be tested can accurately install the corresponding mirror image operating system, the smooth test is ensured, in addition, the parameter information of the server to be tested is sent through the running script in the mirror image operating system, the parameter configuration corresponding to the server to be tested can be conveniently and timely obtained, and the corresponding test environment can be more effectively established.
Specifically, the server system is a PXE server system, the server to be tested downloads a mirror image operating system from the PXE server system, an operating script is configured on the mirror image operating system, and the operating script uploads parameter information of the server to be tested to the testing equipment for information registration.
In some embodiments, the triggering, by the Docker virtual container, the corresponding server to be tested to download the mirror operating system and send the registration data includes:
the Docker virtual container controls the corresponding server to be tested to be powered on through a Power Distribution Unit (PDU);
and the Docker virtual container triggers the corresponding server to be tested to download the mirror image operating system and sends the registration data.
The specific implementation and principle of the PDU are well known to those skilled in the art, and therefore will not be described herein.
104. And according to the registration data, the Docker virtual container establishes a corresponding test environment.
Specifically, the Docker virtual container on the testing device establishes a corresponding testing environment according to the corresponding registration data of the server to be tested.
In some embodiments, the "the Docker virtual container establishes a corresponding test environment according to the registration data" includes:
and the Docker virtual container downloads a corresponding test tool according to the parameter information of the server to be tested, and the test tool is used for controlling the server to be tested downloaded with the mirror image operating system to perform corresponding test.
By downloading the corresponding testing tool according to the parameter information of the server to be tested, the testing environment corresponding to the server to be tested is conveniently and accurately configured, and the smooth test is facilitated.
105. And testing the server to be tested by utilizing the corresponding testing environment established by the Docker virtual container.
Specifically, the testing tool downloaded by the Docker virtual container controls the mirror image operating system of the corresponding server to be tested to perform corresponding testing, and generates corresponding testing information.
In some embodiments, the "testing the server to be tested using the corresponding testing environment established by the Docker virtual container" includes:
outputting a test report of a server to be tested;
the outputting the test report of the server to be tested includes:
collecting test information of each server to be tested through a Robot frame automatic test framework;
and integrating the collected test information of each server to be tested to generate a test report with a custom format.
Test information corresponding to a plurality of servers to be tested is integrated through a Robot frame automatic test framework to generate a test report in a user-defined format, such as a test report in an html format, so that test results and information can be checked more visually, and the practicability is increased. In addition, the specific implementation process and principle of the Robot frame automation test framework are well known to those skilled in the art, and therefore, the detailed description thereof is omitted here.
The method includes the steps of firstly reading identification information of the servers to be tested, starting the corresponding Docker virtual containers according to the identification information, triggering the corresponding servers to be tested to download mirror image operating systems and send registration data by the Docker virtual containers, then establishing corresponding testing environments by the Docker virtual containers according to the registration data, and finally testing the servers to be tested by the aid of the corresponding testing environments established by the Docker virtual containers. The method and the device can open the corresponding Docker virtual containers according to the identification information of different servers to be tested, and each Docker virtual container can configure the corresponding test environment according to the related information of the corresponding server to be tested, test the servers to be tested by using the corresponding test environment, simulate a plurality of test devices, test a plurality of servers, improve the efficiency and reduce the test cost.
Referring to fig. 2, an embodiment of the present application further discloses a server testing apparatus based on a Docker virtual container, including:
the reading module 10, the reading module 10 is used for reading the identification information of the server to be tested;
the starting module 11 is used for starting the corresponding Docker virtual container according to the identification information;
the trigger module 12 is used for triggering the corresponding server to be tested to download the mirror image operating system and sending the registration data by the Docker virtual container 12;
the configuration module 13, the configuration module 13 is used for establishing a corresponding test environment for the Docker virtual container according to the registration data;
and the testing module 14, wherein the testing module 14 is used for testing the server to be tested by using the corresponding testing environment established by the Docker virtual container.
For a specific description of the server testing apparatus based on the Docker virtual container, see the above server testing method based on the Docker virtual container for details, which are not described herein again.
Referring to fig. 3, an embodiment of the present application further discloses an electronic device, which includes:
a processor 21;
a memory 20 having stored therein executable instructions of the processor 21;
wherein the processor 21 is configured to execute the above-mentioned server testing method based on the Docker virtual container via executing the executable instructions.
The embodiment of the application also discloses a computer readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the server testing method based on the Docker virtual container is realized.
The embodiment of the application also discloses a computer program product or a computer program, which comprises computer instructions, and the computer instructions are stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the electronic device executes the server testing method based on the Docker virtual container.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer program instructions, and the programs can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only a preferred embodiment of the present application and should not be taken as limiting the scope of the present application, so that the claims of the present application are covered by the appended claims.

Claims (10)

1. A server testing method based on a Docker virtual container is characterized by comprising the following steps:
reading the identification information of the server to be tested;
opening a corresponding Docker virtual container according to the identification information;
the Docker virtual container triggers the corresponding server to be tested to download the mirror image operating system and sends registration data;
according to the registration data, the Docker virtual container establishes a corresponding test environment;
and testing the server to be tested by utilizing the corresponding testing environment established by the Docker virtual container.
2. The Docker virtual container-based server testing method as recited in claim 1, further comprising:
correspondingly opening a plurality of Docker virtual containers according to the read identification information of the plurality of servers to be tested;
the plurality of Docker virtual containers are respectively used for testing the corresponding servers to be tested.
3. The Docker virtual container-based server testing method of claim 2, wherein,
the step of testing the server to be tested by using the corresponding testing environment established by the Docker virtual container comprises the following steps:
outputting a test report of the server to be tested;
the outputting the test report of the server to be tested includes:
collecting test information of each server to be tested through a Robot frame automatic test framework;
and integrating the collected test information of each server to be tested to generate a test report with a custom format.
4. The Docker virtual container-based server testing method of claim 1, wherein,
the registration data comprises parameter information of the server to be tested;
the step of triggering the corresponding server to be tested to download the mirror image operating system and send the registration data by the Docker virtual container comprises the following steps:
the server to be tested downloads the corresponding mirror image operating system from the server system, and the mirror image operating system is configured with a corresponding running script;
and the running script sends the parameter information of the server to be tested.
5. The Docker virtual container-based server testing method of claim 4, wherein,
the step of establishing the corresponding test environment for the Docker virtual container according to the registration data includes:
and the Docker virtual container downloads a corresponding test tool according to the parameter information of the server to be tested, and the test tool is used for controlling the server to be tested loaded with the mirror image operating system to perform corresponding test.
6. The Docker virtual container-based server testing method of claim 1, wherein,
the step of triggering the corresponding server to be tested to download the mirror image operating system and send the registration data by the Docker virtual container comprises the following steps:
the Docker virtual container controls the corresponding server to be tested to be powered on through the PDU;
and the Docker virtual container triggers the corresponding server to be tested to download the mirror image operating system and sends registration data.
7. The Docker virtual container-based server testing method of claim 1, wherein,
the identification information comprises SN code information, and each SN code information has a corresponding relation with each server to be tested.
8. A server testing device based on a Docker virtual container is characterized by comprising:
the reading module is used for reading the identification information of the server to be tested;
the starting module is used for starting the corresponding Docker virtual container according to the identification information;
the trigger module is used for triggering the corresponding server to be tested to download the mirror image operating system and sending registration data by the Docker virtual container;
the configuration module is used for establishing a corresponding test environment for the Docker virtual container according to the registration data;
and the testing module is used for testing the server to be tested by utilizing the corresponding testing environment established by the Docker virtual container.
9. An electronic device, comprising:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the Docker virtual container-based server testing method of any of claims 1-7 via execution of the executable instructions.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the Docker virtual container-based server testing method according to any one of claims 1 to 7.
CN202111629052.1A 2021-12-28 2021-12-28 Server testing method and device based on Docker virtual container Pending CN114327765A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111629052.1A CN114327765A (en) 2021-12-28 2021-12-28 Server testing method and device based on Docker virtual container

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111629052.1A CN114327765A (en) 2021-12-28 2021-12-28 Server testing method and device based on Docker virtual container

Publications (1)

Publication Number Publication Date
CN114327765A true CN114327765A (en) 2022-04-12

Family

ID=81015921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111629052.1A Pending CN114327765A (en) 2021-12-28 2021-12-28 Server testing method and device based on Docker virtual container

Country Status (1)

Country Link
CN (1) CN114327765A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412447A (en) * 2022-08-19 2022-11-29 浪潮思科网络科技有限公司 SDN-based service testing method, device and medium
CN117215858A (en) * 2023-11-07 2023-12-12 四川华鲲振宇智能科技有限责任公司 Method for automatically testing complete server

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412447A (en) * 2022-08-19 2022-11-29 浪潮思科网络科技有限公司 SDN-based service testing method, device and medium
CN115412447B (en) * 2022-08-19 2024-05-24 浪潮思科网络科技有限公司 Service testing method, device and medium based on SDN
CN117215858A (en) * 2023-11-07 2023-12-12 四川华鲲振宇智能科技有限责任公司 Method for automatically testing complete server
CN117215858B (en) * 2023-11-07 2024-03-08 四川华鲲振宇智能科技有限责任公司 Method for automatically testing complete server

Similar Documents

Publication Publication Date Title
CN114327765A (en) Server testing method and device based on Docker virtual container
CN111045952B (en) Software testing method, flow playback device, terminal equipment and readable storage medium
CN109582588B (en) Test case generation method and device and electronic equipment
CN109523752B (en) Equipment fault early warning method and device, electronic equipment and medium
CN107092489B (en) Processing method and system based on application version release
CN107656873A (en) Automatization test system and method for testing based on the vehicle-mounted softwares of Linux
CN112019609B (en) Equipment monitoring method, device, equipment and computer medium based on Internet of things
CN113821009B (en) Edge controller and quality detection system
CN108337125A (en) Intelligent hardware devices test method, cloud platform and background controller
CN111813686A (en) Game testing method and device, testing terminal and storage medium
CN110990289A (en) Method and device for automatically submitting bug, electronic equipment and storage medium
CN112256557A (en) Program regression testing method, device, system, computer equipment and storage medium
CN113032255B (en) Response noise identification method, model, electronic device and computer storage medium
CN111107100B (en) Equipment for transmitting industrial protocol flow message
CN113610242A (en) Data processing method and device and server
CN110287099B (en) Simplified Loadrunner performance test method, server and computer readable storage medium
CN107797927B (en) Application automation test method, device, equipment and readable storage medium
CN112395176A (en) Method, device, system, equipment, processor and storage medium for testing distributed cloud storage performance
CN111679974A (en) Application program testing method and device
CN110674573A (en) Method, device and storage medium for simulating hardware work in MES system
CN110545202A (en) Equipment management system based on cloud platform
CN105407112B (en) Equipment capability learning method, device and system
CN115438805B (en) Product defect detection method based on machine learning model in industrial quality inspection field
CN115248775A (en) Test system, test method, test terminal, and storage medium
CN113656289A (en) Test method, test device, electronic equipment and computer readable storage medium

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