CN109586987B - Method and device for testing equipment in cloud storage system - Google Patents

Method and device for testing equipment in cloud storage system Download PDF

Info

Publication number
CN109586987B
CN109586987B CN201710899103.XA CN201710899103A CN109586987B CN 109586987 B CN109586987 B CN 109586987B CN 201710899103 A CN201710899103 A CN 201710899103A CN 109586987 B CN109586987 B CN 109586987B
Authority
CN
China
Prior art keywords
tested
test
equipment
cloud storage
condition
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.)
Active
Application number
CN201710899103.XA
Other languages
Chinese (zh)
Other versions
CN109586987A (en
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.)
Hangzhou Hikvision System Technology Co Ltd
Original Assignee
Hangzhou Hikvision System 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 Hangzhou Hikvision System Technology Co Ltd filed Critical Hangzhou Hikvision System Technology Co Ltd
Priority to CN201710899103.XA priority Critical patent/CN109586987B/en
Publication of CN109586987A publication Critical patent/CN109586987A/en
Application granted granted Critical
Publication of CN109586987B publication Critical patent/CN109586987B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

The embodiment of the invention provides a method and a device for testing equipment in a cloud storage system, wherein the method comprises the following steps: based on the information which is contained in the test case and used for describing the preset condition of the device to be tested, test data is constructed, and the device to be tested is as follows: a device in a cloud storage system; sending the constructed test data to the equipment to be tested so as to test the equipment to be tested under the condition that the equipment to be tested is determined to be in a preset condition; obtaining a test result which is returned by the device to be tested and generated based on the test data; and determining whether the device to be tested normally operates under the condition of determining that the device to be tested is in the preset condition or not based on the obtained test result and the expected result contained in the test case. The embodiment of the invention is applied to test the cloud storage equipment in the cloud storage system.

Description

Method and device for testing equipment in cloud storage system
Technical Field
The invention relates to the technical field of automatic testing, in particular to a method and a device for testing equipment in a cloud storage system.
Background
The cloud storage system is an equipment cluster system, and communication can be performed between cloud storage equipment in the cloud storage system through a socket interface based on a Transmission Control Protocol/Internet Protocol (TCP/IP) Protocol. The operating states of the cloud storage devices in the cloud storage system may affect each other, for example: when a cloud storage device in the cloud storage system fails, the stability of the entire cloud storage system may be affected, and even the cloud storage system may crash. Therefore, in order to ensure the stability of the cloud storage system, before the cloud storage system is online, each cloud storage device in the cloud storage system needs to be tested, so as to avoid the above problems.
Then, the testing of the cloud storage device in the cloud storage system is called as a problem to be solved urgently.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for testing equipment in a cloud storage system, so as to test the cloud storage equipment in the cloud storage system. The specific technical scheme is as follows:
in one aspect, an embodiment of the present invention provides a method for testing devices in a cloud storage system, where the method includes:
constructing test data based on information which is contained in the test case and used for describing that the device to be tested is in a preset state, wherein the device to be tested is as follows: a device in a cloud storage system;
sending the constructed test data to the device to be tested so as to test the device to be tested under the condition that the device to be tested is determined to be in the preset condition;
obtaining a test result which is returned by the device to be tested and generated based on the test data;
and determining whether the device to be tested normally operates under the condition of determining that the device to be tested is in the preset condition or not based on the obtained test result and an expected result contained in the test case.
Optionally, the information included in the test case and used for describing that the device to be tested is in the preset condition includes: the information used for describing the situation that the device to be tested is in the state of confirming that the first device has the preset fault is that the first device is: a device in the cloud storage system that is communicable with the device under test;
the step of constructing test data based on the information which is contained in the test case and used for describing the preset condition of the device to be tested comprises the following steps:
and constructing test data based on information which is contained in the test case and used for describing that the to-be-tested equipment is in a state of determining that the first equipment has the preset fault, wherein the test data is the same as communication data which is sent to the first equipment by the first equipment under the condition that the preset fault occurs.
Optionally, before the step of constructing test data based on the information included in the test case and used for describing that the device to be tested determines that the first device has the preset fault, the method further includes:
intercepting communication data sent by the first equipment to the equipment to be tested;
the step of constructing test data based on the information contained in the test case and used for describing that the device to be tested determines that the first device has the preset fault includes:
and modifying the specified field of the communication data based on the information which is contained in the test case and used for describing that the first equipment is determined to have the preset fault by the equipment to be tested, so as to obtain the test data.
Optionally, the step of sending the constructed test data to the device to be tested includes:
and sending the constructed test data to the device to be tested through a Socket interface.
Optionally, the step of determining whether the device to be tested operates normally under the condition that it is determined that the device to be tested is in the preset condition based on the obtained test result and an expected result contained in the test case includes:
obtaining an expected result contained in the test case;
comparing the test result with the expected result to obtain and store a comparison result;
and determining whether the equipment to be tested normally operates under the condition that the equipment to be tested is determined to be in the preset condition based on the comparison result.
Optionally, after the step of obtaining the test result generated based on the test data and returned by the device to be tested, the method further includes:
obtaining log information generated by the device to be tested corresponding to the test data;
and displaying the obtained log information for the test personnel to check.
In another aspect, an embodiment of the present invention provides an apparatus for testing devices in a cloud storage system, where the apparatus includes:
the building module is used for building test data based on information which is contained in the test case and used for describing that the device to be tested is in a preset state, wherein the device to be tested is as follows: a device in a cloud storage system;
the sending module is used for sending the constructed test data to the equipment to be tested so as to test the equipment to be tested under the condition that the equipment to be tested is determined to be in the preset condition;
the first obtaining module is used for obtaining a test result which is returned by the device to be tested and generated based on the test data;
and the determining module is used for determining whether the device to be tested normally operates under the condition that the device to be tested is determined to be in the preset condition or not based on the obtained test result and the expected result contained in the test case.
Optionally, the information included in the test case and used for describing that the device to be tested is in the preset condition includes: the information used for describing the situation that the device to be tested is in the state of confirming that the first device has the preset fault is that the first device is: a device in the cloud storage system that is communicable with the device under test;
the building block, in particular for
And constructing test data based on information which is contained in the test case and used for describing that the to-be-tested equipment is in a state of determining that the first equipment has the preset fault, wherein the test data is the same as communication data which is sent to the first equipment by the first equipment under the condition that the preset fault occurs.
Optionally, the apparatus further comprises an interception module;
the interception module is configured to intercept communication data sent by the first device to the device to be tested before the test case based information, included in the test case, for describing that the first device to be tested determines that a preset fault occurs in the first device and test data is constructed;
the building block, in particular for
And modifying the specified field of the communication data based on the information which is contained in the test case and used for describing that the first equipment is determined to have the preset fault by the equipment to be tested, so as to obtain the test data.
Optionally, the sending module is specifically configured to
And sending the constructed test data to the device to be tested through a Socket interface.
Optionally, the determining means is specifically configured to
Obtaining an expected result contained in the test case;
comparing the test result with the expected result to obtain and store a comparison result;
and determining whether the equipment to be tested normally operates under the condition that the equipment to be tested is determined to be in the preset condition based on the comparison result.
Optionally, the apparatus further comprises a second obtaining module and a display module;
the second obtaining module is configured to obtain log information generated by the device to be tested corresponding to the test data after the test result generated based on the test data and returned by the device to be tested is obtained;
and the display module is used for displaying the obtained log information for the test personnel to check.
On the other hand, the embodiment of the invention provides electronic equipment, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
the processor is configured to implement any of the steps of the method for testing the device in the cloud storage system provided by the embodiments of the present invention when executing the computer program stored in the memory.
In another aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for testing a device in a cloud storage system according to any one of the embodiments of the present invention are implemented.
In the embodiment of the invention, based on the information which is contained in the test case and used for describing the preset condition of the device to be tested, the test data is constructed, and the device to be tested is as follows: a device in a cloud storage system; sending the constructed test data to the equipment to be tested so as to test the equipment to be tested under the condition that the equipment to be tested is determined to be in a preset condition; obtaining a test result which is returned by the device to be tested and generated based on the test data; and determining whether the device to be tested normally operates under the condition of determining that the device to be tested is in the preset condition or not based on the obtained test result and the expected result contained in the test case.
In the embodiment of the invention, the test data can be directly constructed based on the test case, and the constructed test data is directly sent to the device to be tested, so that the test of the cloud storage device serving as the device to be tested in the cloud storage system can be realized. In addition, the test result of the cloud storage device serving as the device to be tested in the cloud storage system can be directly obtained, and whether the cloud storage device serving as the device to be tested in the cloud storage system operates normally or not can be directly determined according to the test result. Moreover, the cloud storage device serving as the device to be tested in the cloud storage system can be directly tested in a manner of directly communicating with the cloud storage device serving as the device to be tested in the cloud storage system, so that the obtained test result is as follows: the operation result of the cloud storage device serving as the device to be tested in the cloud storage system can be represented more accurately and truly, and the operation result is not influenced by other cloud storage devices except the cloud storage device serving as the device to be tested in the cloud storage system. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart illustrating a method for testing devices in a cloud storage system according to an embodiment of the present invention;
fig. 2 is a diagram illustrating a specific format of communication data;
fig. 3 is a schematic structural diagram of a device for testing devices in a cloud storage system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are 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.
Each cloud storage device in the cloud storage system can determine the condition of the cloud storage device through the received data: in one case, after receiving communication data sent by an opposite-end cloud storage device, a cloud storage device in a cloud storage system may determine a situation of the cloud storage device through the received communication data, and then may execute a corresponding processing flow according to the received communication data and the situation of the cloud storage device, that is, the device operates normally, for example: when the cloud storage device is in a condition that it is determined that the opposite-end cloud storage device fails, the cloud storage device may report information that the opposite-end cloud storage device fails, and stop communication with the opposite-end cloud storage device; another example is: when the cloud storage device is in a condition that it is determined that the opposite-end cloud storage device is not in a fault, the cloud storage device may execute a corresponding processing procedure according to the received communication data, when the received communication data represents that the cloud storage device needs to store data, the corresponding processing procedure executed by the cloud storage device may be stored data, and when the received communication data represents that the cloud storage device needs to delete data, the corresponding processing procedure executed by the cloud storage device may be deleted data.
The cloud storage device cannot determine the self-located condition according to the received communication data, and further cannot execute a corresponding processing flow, namely that the cloud storage device is abnormal in operation. When the cloud storage device cannot determine the self-located condition through the received communication data, the cloud storage device cannot execute a corresponding processing flow based on the received communication data; for example: when communication data represents a condition that the cloud storage device is in a fault state of an opposite-end cloud storage device communicating with the cloud storage device, the cloud storage device is required to report information about the fault of the opposite-end cloud storage device, and communication with the opposite-end device is stopped, the cloud storage device does not report the information about the fault of the opposite-end cloud storage device, and communication with the opposite-end device is not stopped. Another example is: when communication data represent that the cloud storage device is in a condition that an opposite-end cloud storage device communicated with the cloud storage device is not in fault and the cloud storage device is required to store data, the cloud storage device does not store the data, and when the communication data represent that the cloud storage device is required to delete the data, the cloud storage device does not delete the data.
In another case, when the cloud storage device in the cloud storage system determines that the cloud storage device is in a power-off and power-on state after receiving the communication data, the cloud storage device may execute a corresponding process after the cloud storage device is powered on again, that is, the cloud storage device operates normally, for example: and when the cloud storage equipment determines that the cloud storage equipment is in the condition of power failure and power re-on, the cloud storage equipment updates the online state of the cloud storage equipment and establishes connection with other cloud storage equipment in the cloud storage system. On the contrary, the cloud storage device cannot automatically execute the corresponding process after being powered on again, so that the abnormal operation of the device can be represented, and when the cloud storage device determines that the cloud storage device is in the power-off and power-on state again, the online state of the cloud storage device is not updated, and/or the connection with other cloud storage devices in the cloud storage system is not established.
In view of the above, embodiments of the present invention provide a method and an apparatus for testing devices in a cloud storage system, and an electronic device, so as to implement testing of devices in the cloud storage system.
It can be understood that, in the cloud storage system, communication may be performed between cloud storage devices through a socket interface based on a TCP/IP (Transmission Control Protocol/Internet Protocol ) Protocol, where the communication data may be: communication data based on the TCP/IP protocol.
As shown in fig. 1, an embodiment of the present invention provides a method for testing devices in a cloud storage system, which may include the following steps:
s101: constructing test data based on information which is contained in the test case and used for describing that the device to be tested is in a preset state, wherein the device to be tested is as follows: a device in a cloud storage system;
the method for testing the equipment in the cloud storage system provided by the embodiment of the invention can be applied to test equipment, the test equipment can be any electronic equipment, and the electronic equipment can be a computer, a smart phone and the like. In an implementation manner, an automated test framework may be installed in the test device, and the automated test framework may be a functional automated test framework written in a Python programming language. The method for testing the equipment in the cloud storage system provided by the embodiment of the invention can be realized based on the automatic test framework installed on the test equipment.
The test device may construct test data based on information, included in the test case, for describing that the device to be tested is in a preset condition, and execute a subsequent test flow based on the constructed test data. The cloud storage devices in the storage system can communicate with each other through a socket interface based on a TCP/IP protocol, and the constructed test data can be as follows: constructed based on communication data of TCP/IP protocol.
The test device under preset conditions may include: the method comprises the steps that the device to be tested is in a state of determining that a preset fault occurs in the cloud storage device communicated with the device to be tested, or the device to be tested is in a state of power failure and network disconnection, or the device to be tested is in a normal working state and receives tasks dispatched by the cloud storage device communicated with the device to be tested. The preset faults may include faults such as too high CPU utilization, too high IO disk occupancy, power failure, network outage, and crash.
In an implementation manner, a data template capable of representing the received communication data when the cloud storage device is in any condition may be prestored in the test device, and the test device may determine, based on information included in the test case and used for describing that the device to be tested is in the preset condition, a data template of the communication data corresponding to the preset condition, and further construct, based on the determined data template of the communication data, the test data for the device to be tested in the embodiment of the present invention.
S102: sending the constructed test data to the equipment to be tested so as to test the equipment to be tested under the condition that the equipment to be tested is determined to be in a preset condition;
in this step, the test device may directly send the constructed test data to the device to be tested, so as to test the device to be tested under the condition that the device to be tested is determined to be in the preset condition. In one case, after receiving the test data, the device to be tested may determine its own status through the test data, and then may execute a series of actions according to its own status and the test data, and generate a result based on the executed series of actions. In the embodiment of the invention, the device to be tested can directly return the generated result to the testing device as the testing result. In one implementation, the device to be tested may generate communication data based on the TCP/IP protocol based on the generated result, and return the communication data to the testing device as the testing result.
S103: obtaining a test result which is returned by the device to be tested and generated based on the test data;
s104: and determining whether the device to be tested normally operates under the condition of determining that the device to be tested is in the preset condition or not based on the obtained test result and the expected result contained in the test case.
In one implementation, after obtaining a test result generated based on test data returned by a device to be tested, a testing device may compare the obtained test result with an expected result included in a test case, and determine whether the obtained test result is the same as the expected result included in the test case, when the determination is the same, the testing device may determine that the device to be tested operates normally under the condition that the device to be tested is determined to be in a preset condition, and when the determination is different, the testing device may determine that the device to be tested operates abnormally under the condition that the device to be tested is determined to be in the preset condition.
In the embodiment of the invention, the test equipment can directly construct the test data based on the test case and directly send the constructed test data to the equipment to be tested, so that the test on the cloud storage equipment serving as the equipment to be tested in the cloud storage system can be realized. In addition, the test result of the cloud storage device serving as the device to be tested in the cloud storage system can be directly obtained, and whether the cloud storage device serving as the device to be tested in the cloud storage system operates normally or not can be directly determined according to the test result. Moreover, the cloud storage device serving as the device to be tested in the cloud storage system can be directly tested in a manner of directly communicating with the cloud storage device serving as the device to be tested in the cloud storage system, so that the obtained test result is as follows: the operation result of the cloud storage device serving as the device to be tested in the cloud storage system can be represented more accurately and truly, and the operation result is not influenced by other cloud storage devices except the cloud storage device serving as the device to be tested in the cloud storage system.
In one case, when a cloud storage device in the cloud storage system fails, stability of the entire cloud storage system may be affected, and in order to avoid that the cloud storage device in the cloud storage system fails and the entire cloud storage system fails, the cloud storage device in the cloud storage system needs to have the following functions: the cloud storage device in the cloud storage system can sense whether the opposite-end cloud storage device communicated with the cloud storage device is in fault, and can execute a corresponding processing flow when sensing that the opposite-end cloud storage device communicated with the cloud storage device is in fault, so that the cloud storage device in fault is prevented from causing greater harm to the cloud storage system. At this time, the functions may be tested for the cloud storage device in the cloud storage system, and whether the cloud storage device can normally operate the functions is tested. In an implementation manner, the information included in the test case and used for describing that the device to be tested is in the preset condition may include: information for describing that a device to be tested is in a state of determining that a first device has a preset fault, where the first device is: the device comprises a device which can be communicated with the device to be tested in the cloud storage system;
the step of constructing test data (S101) based on the information included in the test case and used for describing the preset condition of the device to be tested may include:
and constructing test data based on the information which is contained in the test case and used for describing the condition that the to-be-tested equipment is in the state of determining that the first equipment has the preset fault, wherein the test data is the same as the communication data which is sent to the first equipment by the first equipment under the condition that the first equipment has the preset fault.
It can be understood that a tester can obtain a data template of communication data required for communication between cloud storage devices in the cloud storage system in advance, and the tester can also obtain various faults that can occur in the cloud storage devices in the cloud storage system, obtain a data template of the communication data sent after the cloud storage devices in the cloud storage system have various faults, and obtain an action that needs to be executed after the cloud storage devices in the cloud storage system have faults. The tester may compile a test case in advance based on the obtained various information, where the test case may include information describing that the device to be tested is in a preset condition, and in an implementation manner, the test case may include information describing that the device to be tested is in a condition where it is determined that the first device has a preset fault. Subsequently, the test equipment obtains the test case, and constructs test data based on the information contained in the test case so as to test the equipment to be tested.
In the embodiment of the present invention, in the process of sending the constructed test data to the device to be tested by the test device, it can be understood that the test device pretends to be the first device and communicates with the device to be tested, so that the device to be tested is in a condition where it is determined that the first device has a preset fault.
In an implementation manner, before the step of constructing test data (S101) based on the information included in the test case and used for describing that the device to be tested determines that the first device has the preset fault, the method may further include:
intercepting communication data sent by first equipment to be tested;
the step of constructing test data (S101) based on the information included in the test case and used for describing that the device to be tested determines that the first device has the preset fault may include:
and modifying the specified field of the communication data based on the information which is contained in the test case and used for describing that the first equipment to be tested is determined to have the preset fault, and obtaining the test data.
In one implementation manner, the test device may directly intercept communication data sent by the first device to the device to be tested, and modify a specified field of the communication data based on information contained in the test case and used for describing that the first device to be tested has a preset fault, so as to obtain the test data. In one case, the communication data is communication data based on a TCP/IP protocol, where a specific format of the communication data may be as shown in fig. 2, where "source port number" in fig. 2 occupies 16 bits, and may be used to characterize a source port number of a sending connected device, that is, a source port number of a data sending device; the destination port number occupies 16 bits and can be used for representing the destination port number of the device to be connected, namely the destination port number of the data receiving device; the "sequence number" occupies 32 bits and can represent the initial connection request, i.e. the SEQ value; the 'acknowledgement number' occupies 32 bits and can represent an ACK value returned by an opposite terminal, wherein two ends of communication are opposite terminals; the data offset occupies 4 bits and can represent the size of the data offset; the "reserved bits" occupy 6 bits; flags, occupying 6 bits, represented by a continuous hexadecimal number, contains 6 flag bits, which are respectively: URG, urgent data mark, 1 indicates urgent data, should transmit immediately; ACK, confirming a flag bit, wherein the 1 indicates that the data packet is a response data packet; PSH, PUSH flag, 1 indicates that the packet should be immediately transmitted; RST, resetting a flag bit, and returning a RST if a data packet which does not belong to the equipment is received; SYN, a connection request flag bit, of which 1 indicates a request packet for initiating a connection; FIN, ending connection request flag bit, 1 indicates the request packet for ending connection; "Window size", accounting for 16 bits; the "16-bit checksum" occupies 16 bits. Expressed in hexadecimal; the "urgent pointer" occupies 16 bits.
In this embodiment of the present invention, the designated field may be a field where "data" is located as shown in fig. 2, and the test device may modify the field where "data" of the communication data is located to obtain the test data based on information, included in the test case, for describing that the to-be-tested device determines that the first device has the preset fault.
In one implementation, a cloud storage device in the cloud storage system may be a management device or a storage device, where the management device is used for resource scheduling and managing the storage device, and the storage device is used for storing data. In one situation, when a tester needs to test management equipment in a cloud storage system, the function to be tested is that when the management equipment dispatches a task to the storage equipment, the management equipment receives communication data which is sent by the storage equipment and represents that the storage equipment has a fault with an excessively high CPU process rate, namely the management equipment is in a condition that the management equipment determines that the storage equipment has the fault with the excessively high CPU process rate, and whether the management equipment can normally run or not;
in the foregoing situation, the management device is used as a device to be tested in an embodiment of the present invention, and the first storage device is a first device in an embodiment of the present invention, that is, the testing device needs to masquerade as the first storage device, communicate with the management device, and masquerade as a fault that a CPU process ratio is too high;
the method comprises the steps that firstly, a test device needs to obtain a test case A which contains information describing that a device to be tested determines that a first device has a preset fault and contains an expected result, and test data is constructed based on the information which is contained in the test case A and used for describing that the device to be tested determines that the first device has the preset fault, wherein the constructed test data is the same as communication data which is sent by a first storage device and used for representing that the first storage device has the fault with the overhigh CPU process rate when a management device sends a task to the first storage device in an actual situation;
the testing equipment sends the constructed testing data to the equipment to be tested;
after receiving the test data, the device to be tested can determine that the device to be tested is in a state of determining that the first device has a fault with an excessively high CPU process rate, the device to be tested can execute a series of actions and generate a result, and the device to be tested sends the result serving as a test result to the test device;
the test device receives the test result, and can determine whether the device to be tested operates normally under the condition that the first device is determined to have the fault of the overhigh CPU process rate based on the test result and the expected result contained in the test case A;
the test result can be compared with an expected result of the test case A, when the test result is the same as the expected result, the device to be tested can be determined to operate normally under the condition that the first device is determined to have the fault of the CPU process rate, and when the test result is different from the expected result, the device to be tested can be determined to operate abnormally under the condition that the first device is determined to have the fault of the CPU process rate;
the test case a of the test device determines information that a first device has a preset fault, and modifies a specified field of communication data to construct test data, where the preset fault is a fault with an excessively high CPU process ratio, and a data template of the communication data on which the test data depends is constructed, which may be shown in table 1:
TABLE 1
Figure BDA0001422779460000121
The data type of protocol _ flag in a data template of communication data on which test data depend is constructed is char, occupies 8 bits, and can represent protocol marking information; the data type of the cseq is long, and can represent a protocol serial number; the data type of the version is char, which occupies 4 bits and can represent protocol version information; the data type of the "cmd" is int, which can represent the protocol event type; the data type of "type" is int, which can represent the protocol request type; the data type of "len" is int, which can represent the data length of the protocol body; the data type of the "enc" is int, which can represent a protocol body encryption algorithm; the data type of the access _ key is char, occupies 64 bits, and can represent a cloud storage access key; the data type of the digest is char, which occupies 64 bits and can represent summary information; the data type of the res is char, which occupies 4 bits and can represent a reserved field; the content of the field where "payload" or "data" in the data template of the communication data on which the test data is constructed may be as shown in table 2:
TABLE 2
Figure BDA0001422779460000131
It is understood that, when the device to be tested receives the communication data sent by the first device and indicating that the first device has a fault with an excessive CPU processing rate, in one case, the "CPU consumption rate" in the field of the above "data" in table 2 may be assigned a value exceeding 95 to indicate that the first device has a fault with an excessive CPU processing rate, wherein the assigned value of the "CPU consumption rate" may range from "0" to "100". When the testing device receives communication data with a value exceeding 95 given by the "Cpu consumption ratio" of the field where the "data" is contained, the device to be tested determines that the Cpu process ratio of the first device is too high, that is, the device to be tested determines that the device to be tested is in a fault condition where the Cpu process ratio of the first device is determined to be too high, and at this time, a normal processing flow of the device to be tested may be: the device to be tested sends the abnormal alarm information of the first device to the Web front end, namely the abnormal alarm information of the first device is output by the device to be tested and displayed in a connected display; and stopping dispatching the new task to the first device; and subsequently, the device to be tested generates a result, the result characterization abnormity is known, the result is taken as a test result and is responded to the test device, and the test device obtains the test result returned by the device to be tested. In one case, the expected result contained in the test case a is an exception to the device under test.
In another situation, when a tester needs to test the management equipment in the cloud storage system, the function to be tested is to determine whether the management equipment can normally operate after the management equipment is connected with the second storage equipment and heartbeat information sent by the second storage equipment is not received within a preset time period, wherein the heartbeat information is used for representing continuous connection between the management equipment and the second storage equipment; after the storage device sends a connection request for connecting the management device to the management device, the storage device establishes connection with the management device, and whether the management device can normally operate is judged under the condition that heartbeat information for continuing connection is not sent to the management device within a preset time length; namely, the management equipment is in the condition of determining that the storage equipment II has faults such as power failure or network failure and the like, and whether the management equipment can normally operate or not;
in the above situation, the management device is used as a device to be tested in the embodiment of the present invention, and the second storage device is a first device in the embodiment of the present invention, that is, the second storage device is disguised as the test device to establish a connection with the management device, and after the connection is established, the second storage device is disguised as being disconnected from the management device;
the test equipment firstly needs to obtain a test case B which contains information describing that the to-be-tested equipment determines that the first equipment has the preset fault and contains an expected result, and based on the information which is contained in the test case B and used for describing that the to-be-tested equipment determines that the first equipment has the preset fault, test data is constructed, the constructed test data is the same as a connection request required for establishing connection between the storage equipment II and the management equipment in an actual situation, the test data is sent to the to-be-tested equipment and then connected with the to-be-tested equipment, and after the connection is established, the test data is continuously constructed, at the moment, the constructed test data is the same as heartbeat information which is sent to the storage equipment to the management equipment and continues to be connected, the constructed test data is sent to the to;
the testing equipment sends the constructed testing data to the testing equipment, at the moment, the testing equipment is determined to be in a condition of being connected with the first equipment, when the testing equipment does not receive the constructed testing data within a preset time length, the testing equipment is determined to be in a condition that the first equipment has faults of power failure or network failure and the like, the testing equipment executes a series of actions and generates a result, and the testing equipment sends the result as a testing result to the testing equipment;
the test device receives the test result, and can determine whether the device to be tested operates normally under the condition that the first device is determined to have faults such as power failure or network failure and the like based on the test result and an expected result contained in the test case B;
the test result can be compared with an expected result of the test case B, when the test result is the same as the expected result, the device to be tested can be determined to normally operate under the condition that the first device is determined to have the faults such as power failure or network disconnection, and when the test result is different from the expected result, the device to be tested can be determined to abnormally operate under the condition that the first device is determined to have the faults such as power failure or network disconnection;
the test case B of the test device determines information that a first device has a preset fault, and modifies a specified field of communication data to construct test data, where the preset fault is a fault such as power failure or network failure, and a data template of the communication data on which the test data depends is constructed, and may be as shown in table 1; the content of the field where the "payload", that is, the "data", in the data template of the communication data on which the test data is constructed may be shown in table 3 and table 4, where table 3 is the content of the "payload" of the connection information of the storage device login management device, and table 4 is the content of the "payload" of the heartbeat information sent by the storage device to the management device;
TABLE 3
Figure BDA0001422779460000151
TABLE 4
Figure BDA0001422779460000152
It can be understood that, when the device to be tested receives communication data, that is, heartbeat information, sent by the first device and indicating that the first device is continuously connected with the device to be tested, the device to be tested is determined to be in a condition of being connected with the first device, and when the device to be tested receives the communication data within a predetermined time period, the device to be tested is determined to be in a condition of being disconnected from the first device, that is, the device to be tested is determined to be in a condition of a fault such as power failure or network failure of the first device, at this time, a normal processing flow of the device to be tested may be: the device to be tested stops communicating with the first device, for example: stopping dispatching the storage task to the first device; and subsequently, the device to be tested generates a result, the result can represent that the abnormity is known, the result is taken as a test result and is responded to the test device, and the test device obtains the test result returned by the device to be tested. In one case, the expected result contained in the test case B is that the device under test is informed of an abnormality.
In the embodiment of the invention, any cloud storage device in the cloud storage system can be used as a device to be tested, and the embodiment of the invention does not limit the cloud storage device used as the device to be tested in the cloud storage system and does not limit the function of the tested device.
In one implementation, the step of sending the constructed test data to the device under test (S102) may include:
and sending the constructed test data to the equipment to be tested through a Socket interface.
It can be understood that communication can be performed between cloud storage devices in the cloud storage system through a Socket interface depending on a TCP/IP protocol, at this time, the test device can send the constructed test data to the Socket interface of the device to be tested through the Socket interface, and the device to be tested receives the test data through the Socket interface of the device to be tested.
In one implementation, the step of determining whether the device to be tested operates normally (S104) under the condition that the device to be tested is determined to be in the preset condition based on the obtained test result and the expected result included in the test case may include:
obtaining an expected result contained in the test case;
comparing the test result with the expected result to obtain and store a comparison result;
and determining whether the equipment to be tested normally operates under the condition of determining that the equipment to be tested is in the preset condition based on the comparison result.
It can be understood that, after obtaining the test result, the testing device may continue to obtain an expected result included in the test case, further compare the test result with the expected result to obtain a comparison result, and further determine, based on the comparison result, whether the device to be tested operates normally under the condition that the device to be tested is determined to be in the preset condition, where, when the comparison result indicates that the test result is the same as the expected result, the testing device may determine that the device to be tested operates normally under the condition that the device to be tested is determined to be in the preset condition, and when the comparison result indicates that the test result is different from the expected result, the testing device may determine that the device to be tested operates abnormally under the condition that the device to be tested is determined to be in the preset condition.
In order to better improve the use experience of the tester, facilitate the tester to find out the defects of the equipment in the cloud storage system at the later stage, further improve the defects of the equipment in the cloud storage system, and improve the robustness of the cloud storage system, the tester can continue to store the comparison result after obtaining the comparison result, so that the tester can check the comparison result subsequently.
In one implementation, after the step of obtaining the test result (S103) generated based on the test data returned by the device to be tested, the method may further include:
obtaining log information generated by test data corresponding to a device to be tested;
and displaying the obtained log information for the test personnel to check.
The embodiment of the invention can also provide that: and checking log information generated by the device to be tested corresponding to the test data. In an implementation manner, after the test device obtains a test result generated based on the test data returned by the device to be tested, the test device may determine that a series of actions performed by the device to be tested based on the test data are completed, and at this time, the test device may directly obtain log information generated by the device to be tested corresponding to the test data from the device to be tested, and display the obtained log information for the test personnel to check. In another implementation manner, after the test device obtains a test result generated based on the test data and returned by the device to be tested, and after receiving a log information obtaining instruction triggered by the tester, the test device obtains log information generated by the test data corresponding to the device to be tested from the device to be tested, and displays the obtained log information for the tester to check.
In one case, the example is accepted, and the test case may include: the representation management equipment executes the action of sending the abnormal warning information of the first equipment to the Web front end and stops sending a new task to the first equipment; and an act of generating a result, and responding the result as a test result to the content of the act of testing the device. When the content contained in the obtained log information is the content, the tester can better determine that the device to be tested operates normally, and when the content contained in the obtained log information is not the content, the tester can perfect the device to be tested based on the test case and the content contained in the obtained log information, and further perfect the cloud storage system.
Corresponding to the foregoing method embodiment, an embodiment of the present invention provides an apparatus for testing devices in a cloud storage system, where as shown in fig. 3, the apparatus may include:
a constructing module 310, configured to construct test data based on information, included in the test case, for describing that the device to be tested is in a preset condition, where the device to be tested is: a device in a cloud storage system;
a sending module 320, configured to send the constructed test data to the device to be tested, so as to test the device to be tested when the device to be tested is determined to be in the preset condition;
a first obtaining module 330, configured to obtain a test result, which is returned by the device to be tested and generated based on the test data;
the determining module 340 is configured to determine whether the device to be tested operates normally under the condition that it is determined that the device to be tested is in the preset condition, based on the obtained test result and an expected result included in the test case.
In the embodiment of the invention, the test equipment can directly construct the test data based on the test case and directly send the constructed test data to the equipment to be tested, so that the test on the cloud storage equipment serving as the equipment to be tested in the cloud storage system can be realized. In addition, the test result of the cloud storage device serving as the device to be tested in the cloud storage system can be directly obtained, and whether the cloud storage device serving as the device to be tested in the cloud storage system operates normally or not can be directly determined according to the test result. Moreover, the cloud storage device serving as the device to be tested in the cloud storage system can be directly tested in a manner of directly communicating with the cloud storage device serving as the device to be tested in the cloud storage system, so that the obtained test result is as follows: the operation result of the cloud storage device serving as the device to be tested in the cloud storage system can be represented more accurately and truly, and the operation result is not influenced by other cloud storage devices except the cloud storage device serving as the device to be tested in the cloud storage system.
In one implementation manner, the information included in the test case and used for describing that the device to be tested is in the preset condition includes: the information used for describing the situation that the device to be tested is in the state of confirming that the first device has the preset fault is that the first device is: a device in the cloud storage system that is communicable with the device under test;
the building block 310 is particularly useful for
And constructing test data based on information which is contained in the test case and used for describing that the to-be-tested equipment is in a state of determining that the first equipment has the preset fault, wherein the test data is the same as communication data which is sent to the first equipment by the first equipment under the condition that the preset fault occurs.
In one implementation, the apparatus may further include an interception module;
the interception module is configured to intercept communication data sent by the first device to the device to be tested before the test case based information, included in the test case, for describing that the first device to be tested determines that a preset fault occurs in the first device and test data is constructed;
the building block 310 is particularly useful for
And modifying the specified field of the communication data based on the information which is contained in the test case and used for describing that the first equipment is determined to have the preset fault by the equipment to be tested, so as to obtain the test data.
In one implementation, the sending module 320 is specifically configured to
And sending the constructed test data to the device to be tested through a Socket interface.
In one implementation, the determining module 340 is specifically configured to
Obtaining an expected result contained in the test case;
comparing the test result with the expected result to obtain and store a comparison result;
and determining whether the equipment to be tested normally operates under the condition that the equipment to be tested is determined to be in the preset condition based on the comparison result.
In one implementation, the apparatus further comprises a second obtaining module and a presentation module;
the second obtaining module is configured to obtain log information generated by the device to be tested corresponding to the test data after the test result generated based on the test data and returned by the device to be tested is obtained;
and the display module is used for displaying the obtained log information for the test personnel to check.
Corresponding to the above method embodiments, the embodiment of the present invention further provides an electronic device, as shown in fig. 4, including a processor 410, a communication interface 420, a memory 430, and a communication bus 440, where the processor 410, the communication interface 420, and the memory 430 complete mutual communication through the communication bus 440,
a memory 430 for storing computer programs;
the processor 410 is configured to, when executing the computer program stored in the memory 430, implement the method for testing the device in any pair of cloud storage systems provided by the embodiment of the present invention, where the method may include the steps of:
constructing test data based on information which is contained in the test case and used for describing that the device to be tested is in a preset state, wherein the device to be tested is as follows: a device in a cloud storage system;
sending the constructed test data to the device to be tested so as to test the device to be tested under the condition that the device to be tested is determined to be in the preset condition;
obtaining a test result which is returned by the device to be tested and generated based on the test data;
and determining whether the device to be tested normally operates under the condition of determining that the device to be tested is in the preset condition or not based on the obtained test result and an expected result contained in the test case.
In the embodiment of the invention, the test equipment can directly construct the test data based on the test case and directly send the constructed test data to the equipment to be tested, so that the test on the cloud storage equipment serving as the equipment to be tested in the cloud storage system can be realized. In addition, the test result of the cloud storage device serving as the device to be tested in the cloud storage system can be directly obtained, and whether the cloud storage device serving as the device to be tested in the cloud storage system operates normally or not can be directly determined according to the test result. Moreover, the cloud storage device serving as the device to be tested in the cloud storage system can be directly tested in a manner of directly communicating with the cloud storage device serving as the device to be tested in the cloud storage system, so that the obtained test result is as follows: the operation result of the cloud storage device serving as the device to be tested in the cloud storage system can be represented more accurately and truly, and the operation result is not influenced by other cloud storage devices except the cloud storage device serving as the device to be tested in the cloud storage system.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
Optionally, the information included in the test case and used for describing that the device to be tested is in the preset condition includes: the information used for describing the situation that the device to be tested is in the state of confirming that the first device has the preset fault is that the first device is: a device in the cloud storage system that is communicable with the device under test;
the method for constructing the test data based on the information which is contained in the test case and used for describing the preset condition of the device to be tested comprises the following steps:
and constructing test data based on information which is contained in the test case and used for describing that the to-be-tested equipment is in a state of determining that the first equipment has the preset fault, wherein the test data is the same as communication data which is sent to the first equipment by the first equipment under the condition that the preset fault occurs.
Optionally, before constructing test data based on the information included in the test case and used for describing that the device to be tested determines that the first device has the preset fault, the method further includes:
intercepting communication data sent by the first equipment to the equipment to be tested;
the constructing test data based on the information which is contained in the test case and used for describing that the to-be-tested device determines that the first device has the preset fault includes:
and modifying the specified field of the communication data based on the information which is contained in the test case and used for describing that the first equipment is determined to have the preset fault by the equipment to be tested, so as to obtain the test data.
Optionally, the sending the constructed test data to the device to be tested includes:
and sending the constructed test data to the device to be tested through a Socket interface.
Optionally, the determining, based on the obtained test result and an expected result included in the test case, whether the device to be tested operates normally when it is determined that the device to be tested is in the preset condition includes:
obtaining an expected result contained in the test case;
comparing the test result with the expected result to obtain and store a comparison result;
and determining whether the equipment to be tested normally operates under the condition that the equipment to be tested is determined to be in the preset condition based on the comparison result.
Optionally, after obtaining a test result generated based on the test data and returned by the device under test, the method further includes:
obtaining log information generated by the device to be tested corresponding to the test data;
and displaying the obtained log information for the test personnel to check.
Corresponding to the foregoing method embodiment, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements a method for testing devices in any pair of cloud storage systems provided in the foregoing embodiment of the present invention, where the method may include the steps of:
constructing test data based on information which is contained in the test case and used for describing that the device to be tested is in a preset state, wherein the device to be tested is as follows: a device in a cloud storage system;
sending the constructed test data to the device to be tested so as to test the device to be tested under the condition that the device to be tested is determined to be in the preset condition;
obtaining a test result which is returned by the device to be tested and generated based on the test data;
and determining whether the device to be tested normally operates under the condition of determining that the device to be tested is in the preset condition or not based on the obtained test result and an expected result contained in the test case.
In the embodiment of the invention, the test equipment can directly construct the test data based on the test case and directly send the constructed test data to the equipment to be tested, so that the test on the cloud storage equipment serving as the equipment to be tested in the cloud storage system can be realized. In addition, the test result of the cloud storage device serving as the device to be tested in the cloud storage system can be directly obtained, and whether the cloud storage device serving as the device to be tested in the cloud storage system operates normally or not can be directly determined according to the test result. Moreover, the cloud storage device serving as the device to be tested in the cloud storage system can be directly tested in a manner of directly communicating with the cloud storage device serving as the device to be tested in the cloud storage system, so that the obtained test result is as follows: the operation result of the cloud storage device serving as the device to be tested in the cloud storage system can be represented more accurately and truly, and the operation result is not influenced by other cloud storage devices except the cloud storage device serving as the device to be tested in the cloud storage system.
Optionally, the information included in the test case and used for describing that the device to be tested is in the preset condition includes: the information used for describing the situation that the device to be tested is in the state of confirming that the first device has the preset fault is that the first device is: a device in the cloud storage system that is communicable with the device under test;
the method for constructing the test data based on the information which is contained in the test case and used for describing the preset condition of the device to be tested comprises the following steps:
and constructing test data based on information which is contained in the test case and used for describing that the to-be-tested equipment is in a state of determining that the first equipment has the preset fault, wherein the test data is the same as communication data which is sent to the first equipment by the first equipment under the condition that the preset fault occurs.
Optionally, before constructing test data based on the information included in the test case and used for describing that the device to be tested determines that the first device has the preset fault, the method further includes:
intercepting communication data sent by the first equipment to the equipment to be tested;
the constructing test data based on the information which is contained in the test case and used for describing that the to-be-tested device determines that the first device has the preset fault includes:
and modifying the specified field of the communication data based on the information which is contained in the test case and used for describing that the first equipment is determined to have the preset fault by the equipment to be tested, so as to obtain the test data.
Optionally, the sending the constructed test data to the device to be tested includes:
and sending the constructed test data to the device to be tested through a Socket interface.
Optionally, the determining, based on the obtained test result and an expected result included in the test case, whether the device to be tested operates normally when it is determined that the device to be tested is in the preset condition includes:
obtaining an expected result contained in the test case;
comparing the test result with the expected result to obtain and store a comparison result;
and determining whether the equipment to be tested normally operates under the condition that the equipment to be tested is determined to be in the preset condition based on the comparison result.
Optionally, after obtaining a test result generated based on the test data and returned by the device under test, the method further includes:
obtaining log information generated by the device to be tested corresponding to the test data;
and displaying the obtained log information for the test personnel to check.
It is noted that, herein, relational terms such as first and second, and the like may be 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.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method for testing equipment in a cloud storage system is characterized by comprising the following steps:
constructing test data based on information which is contained in the test case and used for describing that the device to be tested is in a preset state, wherein the device to be tested is as follows: a device in a cloud storage system;
sending the constructed test data to the device to be tested so as to test the device to be tested under the condition that the device to be tested is determined to be in the preset condition;
obtaining a test result which is returned by the device to be tested and generated based on the test data;
determining whether the device to be tested normally operates under the condition that the device to be tested is determined to be in the preset condition or not based on the obtained test result and an expected result contained in the test case;
the information used for describing that the device to be tested is in the preset condition and contained in the test case comprises the following steps: the information used for describing the situation that the device to be tested is in the state of confirming that the first device has the preset fault is that the first device is: a device in the cloud storage system that is communicable with the device under test;
the step of constructing test data based on the information which is contained in the test case and used for describing the preset condition of the device to be tested comprises the following steps:
and constructing test data based on information which is contained in the test case and used for describing that the to-be-tested equipment is in a state of determining that the first equipment has the preset fault, wherein the test data is the same as communication data which is sent to the first equipment by the first equipment under the condition that the preset fault occurs.
2. The method according to claim 1, wherein before the step of constructing test data based on the information included in the test case and describing that the device to be tested is in a condition for determining that the first device has the preset fault, the method further comprises:
intercepting communication data sent by the first equipment to the equipment to be tested;
the step of constructing test data based on the information contained in the test case and used for describing the condition that the device to be tested is in the state of determining that the first device has the preset fault includes:
and modifying the specified field of the communication data based on the information which is contained in the test case and used for describing the condition that the to-be-tested equipment is in the state of determining that the first equipment has the preset fault, and obtaining the test data.
3. The method of claim 1, wherein the step of sending the constructed test data to the device under test comprises:
and sending the constructed test data to the device to be tested through a Socket interface.
4. The method according to any one of claims 1 to 3, wherein the step of determining whether the device to be tested is operating normally under the condition that the device to be tested is determined to be in the preset condition based on the obtained test result and an expected result contained in the test case comprises:
obtaining an expected result contained in the test case;
comparing the test result with the expected result to obtain and store a comparison result;
and determining whether the equipment to be tested normally operates under the condition that the equipment to be tested is determined to be in the preset condition based on the comparison result.
5. The method of any of claims 1-3, wherein after the step of obtaining test results generated based on the test data returned by the device under test, the method further comprises:
obtaining log information generated by the device to be tested corresponding to the test data;
and displaying the obtained log information for the test personnel to check.
6. An apparatus for testing devices in a cloud storage system, the apparatus comprising:
the building module is used for building test data based on information which is contained in the test case and used for describing that the device to be tested is in a preset state, wherein the device to be tested is as follows: a device in a cloud storage system;
the sending module is used for sending the constructed test data to the equipment to be tested so as to test the equipment to be tested under the condition that the equipment to be tested is determined to be in the preset condition;
the first obtaining module is used for obtaining a test result which is returned by the device to be tested and generated based on the test data;
the determining module is used for determining whether the device to be tested normally operates under the condition that the device to be tested is determined to be in the preset condition or not based on the obtained test result and the expected result contained in the test case;
the information used for describing that the device to be tested is in the preset condition and contained in the test case comprises the following steps: the information used for describing the situation that the device to be tested is in the state of confirming that the first device has the preset fault is that the first device is: a device in the cloud storage system that is communicable with the device under test;
the building block, in particular for
And constructing test data based on information which is contained in the test case and used for describing that the to-be-tested equipment is in a state of determining that the first equipment has the preset fault, wherein the test data is the same as communication data which is sent to the first equipment by the first equipment under the condition that the preset fault occurs.
7. The apparatus of claim 6, further comprising an intercept module;
the interception module is configured to intercept communication data sent by the first device to the device to be tested before the test data is constructed based on the information included in the test case and used for describing that the device to be tested is in a state where a preset fault occurs in the first device;
the building block, in particular for
And modifying the specified field of the communication data based on the information which is contained in the test case and used for describing the condition that the to-be-tested equipment is in the state of determining that the first equipment has the preset fault, and obtaining the test data.
8. Device according to claim 6, characterized in that said transmission module is particularly adapted to
And sending the constructed test data to the device to be tested through a Socket interface.
9. The device according to any of claims 6 to 8, wherein the determining means are particularly adapted to determine the position of the object in the image
Obtaining an expected result contained in the test case;
comparing the test result with the expected result to obtain and store a comparison result;
and determining whether the equipment to be tested normally operates under the condition that the equipment to be tested is determined to be in the preset condition based on the comparison result.
10. The apparatus of any one of claims 6-8, further comprising a second obtaining module and a presentation module;
the second obtaining module is configured to obtain log information generated by the device to be tested corresponding to the test data after the test result generated based on the test data and returned by the device to be tested is obtained;
and the display module is used for displaying the obtained log information for the test personnel to check.
CN201710899103.XA 2017-09-28 2017-09-28 Method and device for testing equipment in cloud storage system Active CN109586987B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710899103.XA CN109586987B (en) 2017-09-28 2017-09-28 Method and device for testing equipment in cloud storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710899103.XA CN109586987B (en) 2017-09-28 2017-09-28 Method and device for testing equipment in cloud storage system

Publications (2)

Publication Number Publication Date
CN109586987A CN109586987A (en) 2019-04-05
CN109586987B true CN109586987B (en) 2020-10-20

Family

ID=65913774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710899103.XA Active CN109586987B (en) 2017-09-28 2017-09-28 Method and device for testing equipment in cloud storage system

Country Status (1)

Country Link
CN (1) CN109586987B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110535945A (en) * 2019-08-30 2019-12-03 苏州浪潮智能科技有限公司 Test method, device, equipment and the storage medium of storage cluster alarm function
CN112631887A (en) * 2020-12-25 2021-04-09 百度在线网络技术(北京)有限公司 Abnormality detection method, abnormality detection device, electronic apparatus, and computer-readable storage medium
CN112965889A (en) * 2021-03-03 2021-06-15 北京百度网讯科技有限公司 Stability testing method and device, electronic equipment and readable storage medium
CN114245416A (en) * 2021-12-22 2022-03-25 上海豪承信息技术有限公司 Test management method, device, equipment and test system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103684921A (en) * 2013-12-18 2014-03-26 创新科存储技术有限公司 Testing method and system for cloud storage system
CN104731698A (en) * 2013-12-20 2015-06-24 深圳中兴力维技术有限公司 Abnormal test case automatic generation processing method and device based on automatic tests
CN105487966A (en) * 2014-09-17 2016-04-13 腾讯科技(深圳)有限公司 Program testing method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9117027B2 (en) * 2012-09-03 2015-08-25 Tata Consultancy Services Limited Method and system for compliance testing in a cloud storage environment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103684921A (en) * 2013-12-18 2014-03-26 创新科存储技术有限公司 Testing method and system for cloud storage system
CN104731698A (en) * 2013-12-20 2015-06-24 深圳中兴力维技术有限公司 Abnormal test case automatic generation processing method and device based on automatic tests
CN105487966A (en) * 2014-09-17 2016-04-13 腾讯科技(深圳)有限公司 Program testing method, device and system

Also Published As

Publication number Publication date
CN109586987A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
CN109586987B (en) Method and device for testing equipment in cloud storage system
EP3575975A1 (en) Method and apparatus for operating smart network interface card
US11063855B2 (en) Monitoring of the data transmission in a client/server-based device access system
CN107241229B (en) Service monitoring method and device based on interface testing tool
CN109218407B (en) Code management and control method based on log monitoring technology and terminal equipment
US6772376B1 (en) System and method for reporting detected errors in a computer system
KR20190017208A (en) Apparatus for serial port based cyber security vulnerability assessment and method for the same
CN114301673A (en) Vulnerability detection method and device, electronic equipment and storage medium
CN112134748A (en) Equipment state monitoring method, device, system and computer readable medium
CN109150587B (en) Maintenance method and device
JP6612151B2 (en) Network equipment monitoring device
CN112180201A (en) Equipment state monitoring method and device
CN116225804A (en) PCIe link detection method, system, equipment and storage medium
CN112583617A (en) Fault determination method, server, control terminal and storage medium
CN114185804A (en) Interface testing method and device and terminal equipment
CN112702705A (en) Equipment debugging method, device and system based on Zigbee technology
CN110995495A (en) Network fault detection method and device, electronic equipment and storage medium
CN106909489B (en) Method and device for testing EventLog state
CN112565348A (en) Intelligent equipment testing method and system, computer equipment and storage medium
CN117251769B (en) Abnormal data identification method, device, equipment and medium based on monitoring component
JP7417438B2 (en) Inspection system and method
CN111131528B (en) Equipment network domain determining method, server and terminal
CN114430567B (en) Network detection model evaluation method, device and system and electronic equipment
CN109274530B (en) TCP (Transmission control protocol) -based network data packet zero-error scene reproduction method and device
CN104040513A (en) Display device management system, server apparatus therefor, programmable display device, and operation control method

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
GR01 Patent grant
GR01 Patent grant