Server test system and method, electronic equipment and storage medium
By introducing an automated test process into the server test system, using electronic devices and touch display screens to communicate with the server, the problems of low testing efficiency and high cost caused by manual operations in the prior art are solved, and efficient and automated server testing is achieved.
Patent Information
- Application Number
- CN202311076124.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2025-02-25
AI Technical Summary
In the field of server testing, the existing technology relies on manual operations, resulting in low testing efficiency, high labor costs, and difficulty in tracking and viewing test results.
Provide a server testing system, including electronic devices and touch display screen, communicates with the server through a USB port, and realizes an automated test process. Electronic devices include interactive modules, configuration modules, sending modules, test modules and display modules, which can automatically generate configuration parameters, modify test scripts, execute test scripts, generate and display test results.
It realizes automation of server testing, simplifies the testing process, reduces the difficulty of testing personnel training, improves testing efficiency, and saves labor costs and testing resources.
Smart Images

Figure CN119512919A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing technology, and in particular to a server testing system, method, electronic device and storage medium. Background Art
[0002] In the field of server testing, server system testing is different from simple software and hardware testing. Server testing has more test items and test steps, and a variety of test tools and test cases are used in the testing process. Currently, most of the tests rely on testers with a certain technical foundation to perform various tests manually.
[0003] In the case where there are too many servers to be tested and there are many test items, if testers are solely relied upon to manually perform various tests, a lot of repetitive training is required, which is not only manpower-consuming, but also because there is a lot of fragmented time between test items, manual testing has a slow response speed in fragmented testing, resulting in longer testing time, low testing efficiency, and inconvenience in testing tracking and viewing test results. Summary of the invention
[0004] In view of the above, it is necessary to provide a server testing system, method, electronic device and computer-readable storage medium to solve the technical problems of low server testing efficiency and high manpower cost.
[0005] In a first aspect, an embodiment of the present application provides a server testing system, comprising: an electronic device, the electronic device having a USB port, the electronic device being communicatively connected to a server via the USB port; a touch display screen, the touch display screen being communicatively connected to the electronic device, the touch display screen being used to display a test item menu bar; wherein the electronic device comprises: an interactive module, responding to a user's selection operation on the test item menu bar via the touch display screen, and generating configuration parameters for the server based on the selection operation; a configuration module, used to modify a pre-stored test script according to the configuration parameters to obtain a modified test script; a sending module, used to send the modified test script to the server via the USB port; a testing module, used to control the server to execute the modified test script and generate a test result; and a display module, used to send the test result to the touch display screen for display.
[0006] In the server testing system provided by the above embodiment, the electronic device pre-packages the test process into an automatically executable test script and saves it, and then the USB port of the electronic device is connected to the server to automatically execute it with one click, thereby generating the test result. The above implementation method uses the electronic device to realize the automation of server testing, simplifies the test process, reduces the difficulty of tester training, improves test efficiency, and saves labor costs and test resources.
[0007] In some embodiments of the present application, the electronic device also includes: a detection module, used to detect whether the environmental configuration of the server meets the test environment requirements; if the environmental configuration of the server does not meet the test environment requirements, the sending module is also used to send the pre-stored test driver to the server through the USB port, and install the test driver to the server.
[0008] In some embodiments of the present application, the server testing system further includes: an external storage device, the external storage device is communicatively connected to the electronic device, and the external storage device is used to store the test script, the test driver and the test result.
[0009] In some embodiments of the present application, the server includes a server device, and the electronic device further includes: a communication interface, and the electronic device is connected to and controls the server device through the communication interface.
[0010] In a second aspect, an embodiment of the present application further provides a server testing method, the server testing method comprising:
[0011] Responding to the user's selection operation on the test item menu bar through the touch display screen, and generating configuration parameters for the server according to the selection operation;
[0012] Modifying a pre-stored test script according to the configuration parameters to obtain a modified test script;
[0013] Sending the modified test script to the server via a USB port;
[0014] Controlling the server to execute the modified test script and generate test results;
[0015] The test result is sent to the touch display screen for display.
[0016] In some embodiments of the present application, before sending the modified test script to the server via the USB port, the method further includes:
[0017] Check whether the environment configuration of the server meets the test environment requirements;
[0018] If the environment configuration of the server meets the test environment requirements, sending the modified test script to the server via the USB port;
[0019] If the environment configuration of the server does not meet the test environment requirement, the pre-stored test driver is sent to the server through the USB port and the test driver is installed on the server.
[0020] In some embodiments of the present application, after generating the test result, the method further includes:
[0021] Determining whether the test result is consistent with preset standard data;
[0022] If the test result is inconsistent with the preset standard data, it is determined that the working state of the server is abnormal and the test is terminated;
[0023] If the test result is consistent with the preset standard data, it is determined that the working status of the server is normal.
[0024] In some embodiments of the present application, after generating the test result, the method further includes:
[0025] The test results are saved in an external storage device.
[0026] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a memory storing at least one instruction; and a processor acquiring the instruction stored in the memory to implement the server testing method described in the above embodiment.
[0027] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is executed by a processor in an electronic device to implement the server testing method described in the above embodiment. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application.
[0029] Figure 2 It is a structural diagram of a server testing system provided in one embodiment of the present application.
[0030] Figure 3 yes Figure 2 The topological structure diagram of the test item menu bar displayed on the touch screen is shown.
[0031] Figure 4 It is a flow chart of a server testing method provided in one embodiment of the present application.
[0032] Figure 5 This is a flow chart of a server testing method provided by another embodiment of the present application.
[0033] Main component symbols
[0034] Server test system 100
[0035] Electronic devices 10
[0036] Memory 11
[0037] Processor 12
[0038] Computer Programs 13
[0039] Interaction Module 131
[0040] Configuration module 132
[0041] Sending module 133
[0042] Test Module 134
[0043] Display module 135
[0044] Detection module 136
[0045] USB Ports 14
[0046] Communication interface 15
[0047] Server 20
[0048] Touch screen 30
[0049] External storage device 40
[0050] Server device 50 DETAILED DESCRIPTION
[0051] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0052] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. The embodiments described are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] In the description of the present application, unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0054] In the embodiments of the present application, it should be noted that, unless otherwise clearly specified and limited, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.
[0055] In the embodiments of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or can communicate with each other; it can be a direct connection, or it can be indirectly connected through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0056] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or reference letters in different examples, and this repetition is for the purpose of simplification and clarity, which itself does not indicate the relationship between the various embodiments and / or settings discussed.
[0057] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0058] At present, for the standardized testing of servers, the existing testing process is: testers with a certain foundation are required to first check and configure the test environment on the server, then execute the corresponding test scripts, and finally summarize the test results. The above testing method requires technical training for testers, which has high labor costs, and the entire process requires manual operation to complete the test, which has low testing efficiency. In addition, for some tests, the extensiveness of the test is very high, but the test frequency is low. For example, the GPU bandwidth test, many departments need to perform this test, but the test frequency is very low, which leads to a lot of repetitive training and high manual training costs. In addition, due to the discontinuity and fragmentation of server testing in time, the time utilization rate of manual testing in fragmented testing is low, resulting in low testing efficiency.
[0059] In order to solve the above problems, the embodiments of the present application provide a server testing system, method, electronic device and computer readable storage medium. The server testing method provided in the embodiments of the present application can be applied to electronic devices of the server testing system. The following is an introduction in combination with the application scenarios provided in the embodiments of the present application.
[0060] See also Figure 1 , is a schematic diagram of the structure of an electronic device 10 provided in one embodiment of the present application.
[0061] Specifically, the electronic device 10 includes, but is not limited to: a memory 11, a processor 12, and a computer program 13 stored in the memory 11 and executable on the processor 12, for example, for testing Figure 2 The testing procedure of the server 20 is shown.
[0062] Exemplarily, the computer program 13 may be divided into one or more modules / units, for example, an interaction module 131, a configuration module 132, a sending module 133, a test module 134, a display module 135, and a detection module 136. One or more modules / units are stored in the memory 11 and executed by the processor 12 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the acquisition process of the computer program 13 in the electronic device 10.
[0063] The hardware of the electronic device 10 includes, but is not limited to: a microprocessor, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.
[0064] The electronic device 10 may be a single-chip microcomputer (such as an STM32 single-chip microcomputer, a PIC single-chip microcomputer, an 8051 single-chip microcomputer, an AVR single-chip microcomputer, etc.), or an embedded chip (such as an ARM Cortex chip, etc.). The present application does not limit the type of the electronic device 10.
[0065] The network where the electronic device 10 is located includes, but is not limited to: the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0066] See also Figure 2 , is a structural diagram of a server testing system 100 provided in an embodiment of the present application.
[0067] Specifically, the server test system 100 includes the electronic device 10 and a touch screen 30. The electronic device 10 has a USB port 14. The electronic device 10 is connected to the server 20 via the USB port 14. The touch screen 30 is communicatively connected to the electronic device 10, and the touch screen 30 is used to display a test item menu bar. Among them, the electronic device 10 includes an interaction module 131, a configuration module 132, a sending module 133, a testing module 134, a display module 135, and a detection module 136. The interaction module 131 is used to respond to the user's selection operation on the test item menu bar through the touch screen 30, and generate configuration parameters for the server 20 according to the selection operation. The configuration module 132 is used to modify the pre-stored test script according to the configuration parameters to obtain the modified test script. The sending module 133 is used to send the modified test script to the server 20 through the USB port. The testing module 134 is used to control the server 20 to execute the modified test script and generate a test result. The display module 135 is used to send the test result to the touch screen 30 for display.
[0068] In this embodiment, the electronic device 10 may be a single-chip microcomputer STM32F407 supporting USB Host and USB Device functions. In other embodiments of the present application, other embedded chips may be used to replace the single-chip microcomputer STM32F407 according to actual needs.
[0069] In the above embodiment, the electronic device 10 can be communicated with the server 20 through the USB port 14, and then perform file transfer and system control functions between the electronic device 10 and the server 20, and can easily deploy automated testing of the server 20, with strong applicability, small module size, and no usage restrictions, which reduces the difficulty of tester training, improves test efficiency, and saves labor costs and test resources.
[0070] In some embodiments, in order to reduce the difficulty of operation for testers, the control system of the touch display screen 30 adopts a multi-level tree topology. In the embodiment of the present application, the test item menu bar displayed by the touch display screen 30 includes a three-level menu, the first-level menu displays the content of the test item, the second-level menu displays the type of the test item or displays the "Start" option, and the third-level menu displays the "Start" option. When a signal is received that the user clicks the "Start" option, the user's configuration of the test parameters is determined, and then the interaction module 131 generates configuration parameters according to the tester's selection from the test item menu bar.
[0071] Combination Figure 3The following takes four different test items as examples. The four test items are bandwidth test, basic information collection, hot plug test, and firmware upgrade test.
[0072] In one embodiment of the present application, after selecting the bandwidth test in the first-level menu, it is further necessary to select the broadband type from the second-level menu. For example, the broadband types include but are not limited to Gen4 broadband and Gen3 broadband. Finally, select the start option in the third-level menu.
[0073] In one embodiment of the present application, after selecting basic information collection in the first-level menu, it is further necessary to select the information type from the second-level menu. For example, the information type includes but is not limited to port information, operating status information, and finally select the start option in the third-level menu.
[0074] In one embodiment of the present application, after selecting the hot plug test in the primary menu, directly select the start option in the secondary menu.
[0075] In one embodiment of the present application, after selecting the firmware upgrade test in the primary menu, directly select the start option in the secondary menu.
[0076] In the above embodiment, the tester can select the required test item through the test item menu bar displayed by the touch display screen 30, and then the interactive module 131 responds to the user's selection operation on the test item menu bar, and configures the test parameters according to the user's selection content, which has the characteristics of convenient interaction, beautiful interface, sensitive response, offline operation, precise control, and accurate output. In addition, the touch display screen 30 is used to visualize the test process, and the interactive method of the graphical interface reduces the operating difficulty of the tester, simplifies the training difficulty of the tester, further improves the test efficiency, and saves labor costs.
[0077] In some embodiments, the touch screen 30 displays a one-key test selection box, and the tester can select multiple test items through the above menu bar, and then the interactive module 131 generates configuration parameters corresponding to multiple test items according to the selection operation. The tester further clicks the one-key test selection box, and the electronic device 10 simultaneously executes tests of multiple test items according to the configuration parameters corresponding to the multiple test items, and can complete multiple tests continuously and without intervals, thereby realizing server testing automation, reducing the difficulty of training testers, saving labor costs and testing resources, and thus improving testing efficiency.
[0078] In some embodiments of the present application, the electronic device 10 further includes a detection module 136. The detection module 136 is used to detect whether the environment configuration of the server 20 meets the test environment requirements. If the environment configuration of the server 20 does not meet the test environment requirements, the sending module 133 is further used to send the pre-stored test driver to the server 20 through the USB port and install the test driver to the server 20.
[0079] For example, the test content of the server 20 may include, but is not limited to, (1) basic function testing, such as accessing web pages, sending emails, processing files, etc. through the server 20. (2) performance testing, such as testing the response time, throughput, number of concurrent testers, etc. of the server 20. (3) security testing, such as testing the vulnerability, identity authentication, authorization, etc. of the server 20. (4) reliability testing, such as testing the stability, availability, fault tolerance, etc. of the server 20.
[0080] In some embodiments of the present application, the server test system 100 further includes an external storage device 40. The external storage device 40 is connected to the electronic device 10, and the external storage device 40 is used to store the test script, the test driver and the test result. The external storage device 40 may include but is not limited to a memory card and a USB flash drive.
[0081] In the above embodiment, the external storage device 40 pre-stores the relevant test drivers, test scripts, and the test results generated by executing the test scripts for building the test environment, thereby saving on-site debugging time and further improving test efficiency.
[0082] In some embodiments of the present application, the server 20 includes a server device 50, and the electronic device 10 also includes a communication interface 15. The electronic device 10 is connected to and controls the server device 50 through the communication interface 15. For example, the communication interface 15 includes but is not limited to a UART port and an I2C bus interface. In this embodiment, the electronic device 10 is connected to and controls the server device 50 through the UART port or the I2C bus interface.
[0083] In the above embodiment, the electronic device 10 can directly control the server device 50 to perform the test through the UART port or the I2C bus interface without sending the test script to the server 20 .
[0084] See also Figure 4 , is a flow chart of a server testing method provided in an embodiment of the present application. In the present application, according to different requirements, the order of each step in the flow chart can be adjusted according to actual requirements, and some steps can be omitted.
[0085] In this embodiment, the execution subject of the server testing method can be Figure 2 The electronic device 10 in the server testing system 100 is communicatively connected with the server 20 via the USB port 14 .
[0086] In some embodiments, before the electronic device 10 executes the server testing method, the server testing system 100 needs to complete functional initialization, for example, the USB port 14, the communication interface 15, and the touch display screen 30 are initialized.
[0087] The server testing method comprises:
[0088] S100, responding to a user's selection operation on a test item menu bar via a touch display screen, and generating configuration parameters for a server according to the selection operation.
[0089] Specifically, the electronic device 10 is connected to the touch display screen 30, and the electronic device 10 displays a test item menu bar on the interactive interface of the touch display screen 30. The electronic device 10 completes the configuration of the test parameters according to the test item selected by the user, such as a tester, in the test item menu bar, thereby, the electronic device 10 can generate configuration parameters.
[0090] The configuration parameters include, but are not limited to, test items, types of test items, etc.
[0091] S200, configuring a pre-stored test script according to the configuration parameters to obtain a modified test script.
[0092] Specifically, the electronic device 10 is connected to the external storage device 40, a test script is pre-stored in the external storage device 40, and the electronic device 10 configures the pre-stored test script according to the test items and test types in the configuration parameters to obtain a modified test script. The external storage device 40 may include but is not limited to a memory card and a USB flash drive.
[0093] S300, detecting whether the environment configuration of the server meets the test environment requirements.
[0094] In some embodiments, if the environment configuration of the server 20 does not meet the test environment requirements, step S400 is executed; if the environment configuration of the server 20 meets the test environment requirements, step S500 is executed.
[0095] Specifically, the detection content may include, but is not limited to, detecting whether the software and application programs installed on the server 20 are the same or similar to the test environment. If there are software and application programs required to execute the test script, it indicates that they are the same or similar.
[0096] S400, sending a pre-stored test driver to the server through the USB port and installing the test driver to the server.
[0097] Specifically, the external storage device 40 stores a test driver program for setting up a test environment in advance. If the environment configuration of the server 20 does not meet the test environment requirements, the electronic device 10 sends the pre-stored test driver program to the server 20 and installs the test driver program to the server 20, thereby completing the test environment configuration and making the server 20 meet the test environment requirements. The specific content of the test driver program is determined by the environment requirements for executing the test script.
[0098] S500, sending the modified test script to the server via the USB port.
[0099] Specifically, the USB port 14 performs a file transfer function between the electronic device 10 and the server 20 and has strong applicability.
[0100] S600, controlling the server to execute the modified test script to generate a test result.
[0101] Specifically, the test content of the server 20 may include, but is not limited to, (1) basic function test, such as basic information collection through the server 20. (2) performance test, such as hot plug test, bandwidth test, etc. (3) security test, such as firmware upgrade test, etc.
[0102] In some embodiments, the test results generally include, but are not limited to, (1) response time: the time required for the server 20 to respond to a request, wherein the request includes a control request from the electronic device 10 to control the server 20 to execute the test script. (2) status code: HTTP response code indicating whether the server 20 successfully processed the control request. (3) data transmission volume: the number of bytes returned by the server 20 in response to the control request. (4) error log: records any errors or exceptions that occur when the server 20 processes the request. (5) hardware resource utilization: CPU usage, memory usage, and disk space of the server 20. (6) network latency: the time it takes to transmit data from the electronic device 10 to the server 20. (7) average load: the amount of work being processed by the server 20.
[0103] S700, sending the test result to the touch display screen for display.
[0104] Specifically, the test results are visualized by using the touch display screen 30, and the operating difficulty of the tester is reduced in an interactive manner of a graphical interface, the training difficulty of the tester is simplified, the test efficiency is further improved, and the labor cost is saved.
[0105] In one embodiment of the present application, after generating the test result, the server testing method further includes: determining whether the test result is consistent with the preset standard data. In some embodiments, if the test result is inconsistent with the preset standard data, it is determined that the working state of the server 20 is abnormal and the test is terminated. In some embodiments, if the test result is consistent with the preset standard data, it is determined that the working state of the server 20 is normal.
[0106] Specifically, the preset standard data is set by the tester according to the actual test requirements. The preset standard data may include, but is not limited to, (1) standard CPU usage: comparing the CPU usage of the server 20 with the standard CPU usage can reflect the current CPU usage of the server 20, and further can reflect the performance load of the server 20. (2) standard memory usage: comparing the memory usage of the server 20 with the standard memory usage can reflect the current memory usage of the server 20, and further can reflect the resource consumption of the server 20. (3) standard disk space utilization: comparing the disk space utilization of the server 20 with the standard disk space utilization can reflect the current disk storage space usage of the server 20, and further can reflect the data storage of the server 20. (4) standard network traffic: comparing the network traffic of the server 20 with the standard network traffic can reflect the current network transmission speed and bandwidth usage of the server 20, and further can reflect the network performance of the server 20. (5) Standard response time: By comparing the response time required by the server 20 to the control request of the electronic device 10 with the standard response time, the response time required by the server 20 to the request can be reflected. (6) Standard data transmission volume: By comparing the data transmission volume of the server 20 with the standard data transmission volume, the number of bytes returned by the server 20 can be reflected. (7) Standard average load: By comparing the average load of the server 20 with the standard average load, the workload being processed by the server 20 can be reflected.
[0107] In one embodiment of the present application, after generating the test result, the server testing method further includes: saving the test result to an external storage device 40 .
[0108] In the server testing method provided in the above embodiment, the electronic device 10 prepackages the test process into an automatically executable test script and saves it, and then the USB port 14 of the electronic device 10 is connected to the server 20 to automatically execute it with one key, thereby generating a test result. The above method uses the electronic device 10 to realize the automation of the test of the server 20, simplifies the test process, reduces the difficulty of tester training, improves test efficiency, saves labor costs and test resources, and can monitor the test results at any time, which has strong applicability.
[0109] See also Figure 5 , is a flow chart of a server testing method provided by another embodiment of the present application. In the present application, according to different requirements, the order of each step in the flow chart can be adjusted according to actual requirements, and some steps can be omitted.
[0110] In this embodiment, the execution subject of the server testing method can be Figure 2 The electronic device 10 of the server testing system 100 is communicatively connected with the server 20 to be tested via the USB port 14 .
[0111] In this embodiment, the server 20 includes the server device 50 , and the server testing system 100 further includes a communication interface 15 , through which the electronic device 10 is connected to and controls the server device 50 .
[0112] In some embodiments, before the electronic device 10 executes the server testing method, the server testing system 100 needs to complete functional initialization, for example, the USB port 14, the communication interface 15, and the touch display screen 30 are initialized.
[0113] The server testing method comprises:
[0114] S10, responding to the user's selection operation on the test item menu bar through the touch display screen, and generating configuration parameters for the server according to the selection operation.
[0115] Specifically, the electronic device 10 is connected to the touch display screen 30, and the electronic device 10 displays a test item menu bar on the interactive interface of the touch display screen 30. The electronic device 10 completes the configuration of the test parameters according to the test item selected by the user, such as a tester, in the test item menu bar, and obtains the configuration parameters. Thus, the electronic device 10 can obtain the configuration parameters.
[0116] The configuration parameters include, but are not limited to, test items, types of test items, etc.
[0117] S20, configure the pre-stored test script according to the configuration parameters to obtain a modified test script. Specifically, the electronic device 10 is connected to the external storage device 40, and the test script is pre-stored in the external storage device 40. The electronic device 10 configures the pre-stored test script according to the test items and test types in the configuration parameters to obtain a modified test script. The external storage device 40 may include but is not limited to a memory card and a USB flash drive.
[0118] S30, detecting whether the environment configuration of the server meets the test environment requirements.
[0119] In some embodiments, if the environment configuration of the server 20 does not meet the test environment requirements, step S40 is executed; if the environment configuration of the server 20 meets the test environment requirements, step S50 is executed.
[0120] Specifically, the detection content may include, but is not limited to, detecting whether the software and application programs installed on the server 20 are the same or similar to the test environment. If there are software and application programs required to execute the test script, it indicates that they are the same or similar.
[0121] S40, sending the pre-stored test driver to the server through the USB port and installing the test driver to the server.
[0122] Specifically, the external storage device 40 stores a test driver program for setting up a test environment in advance. If the environment configuration of the server 20 does not meet the test environment requirements, the electronic device 10 sends the pre-stored test driver program to the server 20 and installs the test driver program to the server 20, thereby completing the test environment configuration and making the server 20 meet the test environment requirements. The specific content of the test driver program is determined by the environment requirements for executing the test script.
[0123] S50, controlling the server device to start testing through the communication interface and generating test results.
[0124] For example, the communication interface 15 includes but is not limited to a UART port and an I2C bus interface. In this embodiment, the electronic device 10 is connected to and controls the server device 50 through the UART port or the I2C bus interface.
[0125] For example, the test content of the server 20 may include, but is not limited to, (1) basic function test, such as basic information collection through the server 20, etc. (2) performance test, such as hot plug test, bandwidth test, etc. (3) security test, such as firmware upgrade test, etc.
[0126] In some embodiments, the test results generally include, but are not limited to, (1) response time: the time required for the server 20 to respond to a request, wherein the request includes a control request from the electronic device 10 to control the server 20 to execute the test script. (2) status code: HTTP response code indicating whether the server 20 successfully processed the control request. (3) data transmission volume: the number of bytes returned by the server 20 in response to the control request. (4) error log: records any errors or exceptions that occur when the server 20 processes the request. (5) hardware resource utilization: CPU usage, memory usage, and disk space of the server 20. (6) network latency: the time it takes to transmit data from the electronic device 10 to the server 20. (7) average load: the amount of work being processed by the server 20.
[0127] S60, sending the test result to the touch display screen for display.
[0128] Specifically, the test results are visualized by using the touch display screen 30, and the operating difficulty of the tester is reduced in an interactive manner of a graphical interface, the training difficulty of the tester is simplified, the test efficiency is further improved, and the labor cost is saved.
[0129] In one embodiment of the present application, after generating the test result, the server testing method further includes: determining whether the test result is consistent with the preset standard data. In some embodiments, if the test result is inconsistent with the preset standard data, it is determined that the working state of the server is abnormal and the test is terminated. In some embodiments, if the test result is consistent with the preset standard data, it is determined that the working state of the server 20 is normal.
[0130] Specifically, the preset standard data is set by the tester according to the actual test requirements. The preset standard data may include, but is not limited to, (1) standard CPU usage: comparing the CPU usage of the server 20 with the standard CPU usage can reflect the current CPU usage of the server 20, and further can reflect the performance load of the server 20. (2) standard memory usage: comparing the memory usage of the server 20 with the standard memory usage can reflect the current memory usage of the server 20, and further can reflect the resource consumption of the server 20. (3) standard disk space utilization: comparing the disk space utilization of the server 20 with the standard disk space utilization can reflect the current disk storage space usage of the server 20, and further can reflect the data storage of the server 20. (4) standard network traffic: comparing the network traffic of the server 20 with the standard network traffic can reflect the current network transmission speed and bandwidth usage of the server 20, and further can reflect the network performance of the server 20. (5) Standard response time: By comparing the response time required by the server 20 to the control request of the electronic device 10 with the standard response time, the response time required by the server 20 to the request can be reflected. (6) Standard data transmission volume: By comparing the data transmission volume of the server 20 with the standard data transmission volume, the number of bytes returned by the server 20 can be reflected. (7) Standard average load: By comparing the average load of the server 20 with the standard average load, the workload being processed by the server 20 can be reflected.
[0131] In one embodiment of the present application, after generating the test result, the server testing method further includes: saving the test result to an external storage device 40 .
[0132] In the server testing method provided in the above embodiment, the electronic device 10 pre-packages the test process into an automatically executable test script and saves it. There is no need to send the test script to the server 20. The USB port 14 of the electronic device 10 is connected to the server 20 to directly control the server device 50 for testing through the communication interface, without sending the test script to the server 20, and then generate the test results. The above method uses the electronic device 10 to realize the automation of the server 20 test, simplifies the test process, reduces the difficulty of tester training, improves the test efficiency, saves labor costs and test resources, and can monitor the test results at any time, which is highly applicable.
[0133] In one embodiment, following the above description, Figure 1In the description of the electronic device 10 in FIG. 1 , the processor 12 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor. The processor 12 may also be any conventional processor, etc. The processor 12 is the computing core and control center of the electronic device 10, and uses various interfaces and lines to connect the various parts of the entire electronic device 10, and obtain the operating system of the electronic device 10 and various installed applications, program codes, etc.
[0134] The processor 12 obtains the operating system of the electronic device 10 and various installed applications. The processor 12 obtains the application to implement the steps in the above-mentioned server testing method embodiments, for example Figure 4 , Figure 5 Steps shown.
[0135] The memory 11 can be used to store computer programs 13 and / or modules, and the processor 12 can be used to run or obtain the computer programs 13 and / or modules stored in the memory 11, and call the data stored in the memory 11 to realize various functions of the electronic device 10. The memory 11 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc.; the data storage area can store data created according to the use of the server 20, etc. In addition, the memory 11 can include a non-volatile memory 11, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0136] If the module / unit integrated in the electronic device 10 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program 13. The computer program 13 can be stored in a computer-readable storage medium. When the computer program 13 is obtained by the processor 12, the steps of the above-mentioned method embodiments can be implemented.
[0137] The computer program 13 includes computer program code, which may be in source code form, object code form, an accessible file or some intermediate form.
[0138] In some embodiments, in combination Figure 1 The memory 11 in the electronic device 10 stores a plurality of instructions to implement a server testing method, and the processor 12 can obtain the plurality of instructions to implement the server testing method of the above embodiment.
[0139] Specifically, the specific implementation method of the processor 12 for the above instructions can refer to Figure 4 , Figure 5 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0140] The embodiment of the present application also provides a computer-readable storage medium, wherein at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is executed by the processor 12 in the electronic device 10 to implement the server testing method as described in the above embodiment. The computer-readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), etc.
[0141] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation.
[0142] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0143] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0144] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present application is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present application. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0145] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in this application can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
Claims
1. A server testing system, characterized in that: include: An electronic device having a USB port, wherein the electronic device is communicatively connected with a server via the USB port; A touch screen, the touch screen is communicatively connected to the electronic device, and the touch screen is used to display a test item menu bar; Wherein, the electronic equipment comprises: An interactive module, used to respond to a user's selection operation on the test item menu bar through the touch display screen, and generate configuration parameters for the server according to the selection operation; A configuration module, used to modify the pre-stored test script according to the configuration parameters to obtain a modified test script; A sending module, used for sending the modified test script to the server through the USB port; A test module, used to control the server to execute the modified test script and generate test results; The display module is used to send the test result to the touch screen for display.
2. The server testing system according to claim 1, characterized in that: The electronic device further comprises: The detection module is used to detect whether the environmental configuration of the server meets the test environment requirements; if the environmental configuration of the server does not meet the test environment requirements, the sending module is also used to send the pre-stored test driver to the server through the USB port and install the test driver to the server.
3. The server testing system according to claim 2, characterized in that: The server testing system also includes: An external storage device is communicatively connected to the electronic device, and is used to store the test script, the test driver and the test result.
4. The server testing system according to claim 1, wherein: The server includes a server device, and the electronic device also includes: A communication interface, through which the electronic device is connected to and controls the server device.
5. A server testing method, characterized in that: The server testing system applied to any one of claims 1 to 4, wherein the server testing method comprises: Responding to the user's selection operation on the test item menu bar through the touch display screen, and generating configuration parameters for the server according to the selection operation; Modifying a pre-stored test script according to the configuration parameters to obtain a modified test script; Sending the modified test script to the server via a USB port; Controlling the server to execute the modified test script and generate test results; The test result is sent to the touch display screen for display.
6. The server testing method according to claim 5, characterized in that: The server testing method further includes, before sending the modified test script to the server via the USB port: Check whether the environment configuration of the server meets the test environment requirements; If the environment configuration of the server does not meet the test environment requirement, the pre-stored test driver is sent to the server through the USB port and the test driver is installed on the server.
7. The server testing method according to claim 5, characterized in that: After generating the test result, the server testing method further includes: Determining whether the test result is consistent with preset standard data; If the test result is inconsistent with the preset standard data, it is determined that the working state of the server is abnormal and the test is terminated; If the test result is consistent with the preset standard data, it is determined that the working status of the server is normal.
8. The server testing method according to claim 5, characterized in that: After generating the test result, the server testing method further includes: The test results are saved in an external storage device.
9. An electronic device, characterized in that: include: A memory storing at least one instruction; The processor obtains the instructions stored in the memory to implement the server testing method as described in any one of claims 5-8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in an electronic device to implement the server testing method according to any one of claims 5 to 8.
Citation Information
Cited By
Electronic device
CN120469545A
Power-on / off test device and power-on / off test method
CN121069068A