CN112256509A - USB expansion equipment testing method, device, system and storage medium - Google Patents

USB expansion equipment testing method, device, system and storage medium Download PDF

Info

Publication number
CN112256509A
CN112256509A CN202011151773.1A CN202011151773A CN112256509A CN 112256509 A CN112256509 A CN 112256509A CN 202011151773 A CN202011151773 A CN 202011151773A CN 112256509 A CN112256509 A CN 112256509A
Authority
CN
China
Prior art keywords
data
usb expansion
equipment
preset data
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011151773.1A
Other languages
Chinese (zh)
Inventor
桑继彬
邱德均
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xinhuang Shuntai Electronic Co ltd
Original Assignee
Xinhuang Shuntai Electronic 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 Xinhuang Shuntai Electronic Co ltd filed Critical Xinhuang Shuntai Electronic Co ltd
Priority to CN202011151773.1A priority Critical patent/CN112256509A/en
Publication of CN112256509A publication Critical patent/CN112256509A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test buses, lines or interfaces, e.g. stuck-at or open line faults
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses USB extension equipment test includes following steps: reading preset data on the storage device; sending the preset data to receiving equipment through N expansion interfaces of the USB expansion equipment; acquiring N copy data received by the receiving device; performing consistency verification on the N copied data; if the N copied data are consistent, outputting test information; if the copied data are different, outputting early warning information; restarting the USB expansion equipment; and circulating the steps according to preset times. The USB expansion equipment testing method effectively and quickly tests the USB expansion equipment, and is simple and effective.

Description

USB expansion equipment testing method, device, system and storage medium
Technical Field
The present disclosure relates to the field of electronic product quality detection technologies, and in particular, to a method, an apparatus, and a system for testing a USB expansion device.
Background
With the development of electronic technology, USB has become a common interface in production and development processes. The device is convenient for software downloading, various application tests and the like, provides a lot of convenience, and can be in butt joint with storage equipment such as a mobile hard disk or a USB flash disk as a data copying interface to realize data copying. Because the personal computer is mostly provided with 4 USB interfaces, and the number of external devices is more and more at present, the USB interfaces are basically adopted for being in butt joint with the computer, and the USB expansion device can only occupy 1 USB interface, but can output a plurality of corresponding expansion interfaces, so the use degree of the USB expansion device is gradually increased.
However, when the USB expansion device is used as a data copy interface, it needs to be tested for data copy integrity and continuous operation reliability.
Therefore, designing a testing method capable of effectively and quickly testing the USB expansion device is a problem to be solved by those skilled in the art.
Disclosure of Invention
In order to solve the technical problem, the application provides a method for testing the USB expansion device, which can automatically and effectively perform quick testing on the USB expansion device, and is simple and effective.
The technical scheme provided by the application is as follows:
a USB expansion device test method comprises the following steps:
reading preset data on the storage device;
sending the preset data to receiving equipment through N expansion interfaces of the USB expansion equipment;
acquiring N copy data received by the receiving device;
performing consistency verification on the N copied data;
if the N copied data are consistent, outputting test information;
if the copied data are different, outputting early warning information;
restarting the USB expansion equipment;
and circulating the steps according to preset times.
Preferably, before the reading of the preset data on the storage device, the method further includes:
initializing the USB expansion equipment;
and connecting the storage device with the receiving device through the USB expansion device.
Preferably, in the mth cycle, the reading of the preset data on the storage device specifically includes:
and reading the M +1 th preset data on the storage device as the preset data of this time.
Preferably, the outputting the early warning information specifically includes:
if one of the copied data is different from the other two or more copied data, recording one internal detection early warning, and carrying out probability statistics according to the internal detection early warning to obtain a probability statistical result;
and if the probability statistical result is greater than the probability statistical preset value, outputting early warning information.
Preferably, after the outputting the warning information, the method further includes:
recording an expansion interface corresponding to the copy data with difference as a priority interface;
the consistency verification of the N pieces of copy data specifically includes consistency comparison between the copy data corresponding to the priority interface and the copy data of other expansion interfaces;
if the two are consistent, consistency comparison is continuously carried out on other copy data;
if the two are different, alarm information is output and the test is finished.
Preferably, the reading of the M +1 th preset data on the storage device as the preset data of this time specifically includes:
judging the type of the M-th cycle output information;
if the output information is the test information, reading the M +1 th preset data on the storage equipment as the current preset data;
and if the output information is the early warning information, reading Mth preset data on the storage device as the current preset data.
A USB expansion device testing apparatus includes:
the reading module is used for reading preset data on the storage equipment;
the sending module is used for sending the preset data to the receiving equipment through N expansion interfaces of the USB expansion equipment;
an obtaining module, configured to obtain the N copy data received by the receiving device;
the verification module is used for carrying out consistency verification on the N copy data;
the output module is used for outputting information;
if the N copied data are consistent, the output module outputs test information;
if the copied data are different, the output module outputs early warning information;
and the restarting module is used for restarting the USB expansion equipment.
Preferably, the method further comprises the following steps:
the initial module is used for initializing the USB expansion equipment;
and the connecting module is used for connecting the storage equipment with the receiving equipment through USB expansion equipment.
A USB extended device testing system comprises any one of the USB extended device testing devices, and further comprises:
and the display screen is used for displaying the output information of the output module.
A storage medium stores a computer program, and the computer program is executed to realize any one of the USB expansion device testing methods.
The USB expansion equipment testing method provided by the invention stores preset data on a storage device in advance, sends the preset data to a receiving device through the USB expansion equipment to be tested, then carries out consistency verification on the copied data received by each expansion interface, outputs corresponding information according to a verification result, restarts the interface and carries out cycle testing for preset times. Whether the data copy of the USB expansion equipment is correct and effective is judged automatically, and the method is simple and effective.
Drawings
In order to more clearly illustrate the embodiments of the present application 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 application, 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 of a testing method for USB expansion devices according to an embodiment of the present invention;
fig. 2 is another schematic flow chart of a testing method for USB expansion devices according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a USB expansion device testing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a USB expansion device testing system according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all 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 application.
It should be understood that the structures, ratios, sizes, and the like shown in the drawings are only used for matching the disclosure of the specification, so as to be understood and read by those skilled in the art, and are not used to limit the practical limit conditions of the present application, so that the modifications of the structures, the changes of the ratio relationships, or the adjustment of the sizes, do not have the technical essence, and the modifications, the changes of the ratio relationships, or the adjustment of the sizes, are all within the scope of the technical contents disclosed in the present application without affecting the efficacy and the achievable purpose of the present application.
Embodiments of the present invention are written in a progressive manner.
The embodiment discloses a method for testing USB expansion equipment, which comprises the following steps:
s1, reading preset data on storage equipment;
s2, sending preset data to receiving equipment through N expansion interfaces of the USB expansion equipment;
s3, acquiring N copy data received by the receiving equipment;
s4, carrying out consistency verification on the N copied data;
s5, if the N copied data are consistent, outputting test information;
s6, if the copied data are different, outputting early warning information;
s7, restarting the USB expansion equipment;
and circulating the steps according to preset times.
The method for testing the USB expansion device provided in this embodiment stores preset data in a storage device in advance, sends the preset data to a receiving device through the USB expansion device to be tested, then performs consistency verification on the copied data received by each expansion interface, outputs corresponding information according to a verification result, restarts the interface, and performs a cycle test for a preset number of times. Whether the data copy of the USB expansion equipment is correct and effective is judged automatically, and the method is simple and effective.
Preferably, before reading the preset data on the storage device, the method further comprises:
s10, initializing USB expansion equipment;
and S11, connecting the storage equipment with the receiving equipment through the USB expansion equipment.
Before the preset data is read, in order to avoid the influence of some unknown factors of the USB expansion equipment, the USB expansion equipment is initialized, the influence of the unknown factors on the test is clear, and then the USB expansion equipment is used for directly connecting the storage equipment with the receiving equipment, so that the reliability of the test is guaranteed.
Preferably, in the mth cycle, reading the preset data on the storage device specifically includes:
and reading the M +1 th preset data on the storage device as the current preset data.
When the Mth cycle returns to the initial step, the M +1 th preset data is read, namely the preset data is replaced, so that the meaningless operation of the subsequent step caused by the error of the previous preset data can be avoided.
Preferably, the outputting of the early warning information specifically includes:
if one of the copied data is different from the other more than two copied data, recording one internal detection early warning, and carrying out probability statistics according to the internal detection early warning to obtain a probability statistical result;
and if the probability statistical result is greater than the probability statistical preset value, outputting early warning information.
For the situation that the copy data of one time are different due to external factors and the USB expansion device normally operates the next time, early warning operation does not need to be executed due to occasional changes, so that the copy data of one time are different and recorded as internal detection early warning, probability statistics is carried out according to the frequency of the internal detection early warning, and when the probability statistics result reaches a certain critical value, the situation that the internal detection early warning is not caused by the accidental external factors but the USB expansion device has problems is shown.
It can be understood that there are many statistical ways similar to the above, and the probability of sending out the internal detection early warning can be counted to judge whether the probability exceeds a certain preset value: whether the number of times of sending the internal detection early warning in the preset time exceeds a certain preset value can be judged: whether a preset number of internal detection early warnings are continuously received or not can be judged, and the specific implementation mode is not limited in a relevant mode, so long as false alarms caused by one-sidedness of a single early warning mode can be avoided.
Preferably, after the outputting the warning information, the method further includes:
recording an expansion interface corresponding to the copy data with the difference as a priority interface;
the consistency verification of the N pieces of copy data is specifically to compare the consistency of the copy data corresponding to the priority interface with the copy data of other expansion interfaces;
if the two are consistent, consistency comparison is continuously carried out on other copied data;
if the two are different, alarm information is output and the test is finished.
And when the consistency is verified, the priority interface is used as a first compared object to be compared with other expansion interfaces to compare the consistency of the copied data, and if the consistency is consistent, the other interfaces are continuously compared. Therefore, the suspicious interface can be tested again quickly in a targeted manner, and the processing time required by subsequent cycle test is reduced.
Preferably, the reading of the M +1 th preset data on the storage device is specifically as follows:
judging the type of the M-th cycle output information;
if the output information is the test information, reading the M +1 th preset data on the storage equipment as the current preset data;
and if the output information is early warning information, reading Mth preset data on the storage device as the current preset data.
Namely, if the last test result is normal, the last preset data is still adopted as the preset data of this time, and if the last test result is early warning, the next preset data is adopted as the preset data of this time, so that detection misjudgment caused by data errors can be avoided.
This embodiment also provides a USB extension device testing apparatus, including:
the reading module 1 is used for reading preset data on the storage device;
the sending module 2 is used for sending preset data to the receiving equipment through N expansion interfaces of the USB expansion equipment;
an obtaining module 3, configured to obtain N copy data received by a receiving device;
the verification module 4 is used for performing consistency verification on the N copy data;
the output module 5 is used for outputting information;
if the N copied data are consistent, the output module outputs test information;
if the copied data are different, the output module outputs early warning information;
and the restarting module 6 is used for restarting the USB expansion equipment.
Further, as shown in fig. 3, the method further includes:
an initial module 7, configured to initialize a USB expansion device;
and the connecting module 8 is used for connecting the storage device with the receiving device through the USB expansion device.
This embodiment further provides a USB expansion device testing system, including any one of the above USB expansion device testing apparatuses, as shown in fig. 4, further including:
and the display screen 9 is used for displaying the output information of the output module 5.
The embodiment also provides a storage medium, wherein the storage medium stores a computer program, and after the computer program is executed, the testing method of the USB expansion device is implemented.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, positional terms such as "upper", "lower", "left", "right", and the like are used solely to distinguish one object from another object without necessarily requiring or implying any actual positional limiting relationship between such objects. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A USB expansion equipment testing method is characterized by comprising the following steps:
reading preset data on the storage device;
sending the preset data to receiving equipment through N expansion interfaces of the USB expansion equipment;
acquiring N copy data received by the receiving device;
performing consistency verification on the N copied data;
if the N copied data are consistent, outputting test information;
if the copied data are different, outputting early warning information;
restarting the USB expansion equipment;
and circulating the steps according to preset times.
2. The method for testing the USB expansion device according to claim 1, further comprising, before the reading the preset data on the storage device:
initializing the USB expansion equipment;
and connecting the storage device with the receiving device through the USB expansion device.
3. The method for testing the USB expansion device according to claim 1, wherein in the mth cycle, the reading of the preset data on the storage device specifically includes:
and reading the M +1 th preset data on the storage device as the preset data of this time.
4. The method for testing the USB expansion device according to claim 1, wherein the outputting the warning information specifically includes:
if one of the copied data is different from the other two or more copied data, recording one internal detection early warning, and carrying out probability statistics according to the internal detection early warning to obtain a probability statistical result;
and if the probability statistical result is greater than the probability statistical preset value, outputting early warning information.
5. The method for testing the USB expansion device according to claim 3, further comprising, after the outputting the warning information:
recording an expansion interface corresponding to the copy data with difference as a priority interface;
the consistency verification of the N pieces of copy data specifically includes consistency comparison between the copy data corresponding to the priority interface and the copy data of other expansion interfaces;
if the two are consistent, consistency comparison is continuously carried out on other copy data;
if the two are different, alarm information is output and the test is finished.
6. The method for testing the USB expansion device according to claim 3, wherein the reading of the M +1 th preset data on the storage device is specifically performed as the preset data of this time:
judging the type of the M-th cycle output information;
if the output information is the test information, reading the M +1 th preset data on the storage equipment as the current preset data;
and if the output information is the early warning information, reading Mth preset data on the storage device as the current preset data.
7. A USB expansion device testing apparatus is characterized by comprising:
the reading module is used for reading preset data on the storage equipment;
the sending module is used for sending the preset data to the receiving equipment through N expansion interfaces of the USB expansion equipment;
an obtaining module, configured to obtain the N copy data received by the receiving device;
the verification module is used for carrying out consistency verification on the N copy data;
the output module is used for outputting information;
if the N copied data are consistent, the output module outputs test information;
if the copied data are different, the output module outputs early warning information;
and the restarting module is used for restarting the USB expansion equipment.
8. The USB expansion device testing apparatus according to claim 7, further comprising:
the initial module is used for initializing the USB expansion equipment;
and the connecting module is used for connecting the storage equipment with the receiving equipment through USB expansion equipment.
9. A USB expansion device test system comprising the USB expansion device test apparatus of claim 7 or claim 8, further comprising:
and the display screen is used for displaying the output information of the output module.
10. A storage medium storing a computer program, wherein the computer program is executed to implement the USB expansion device testing method according to any one of claims 1 to 6.
CN202011151773.1A 2020-10-23 2020-10-23 USB expansion equipment testing method, device, system and storage medium Pending CN112256509A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011151773.1A CN112256509A (en) 2020-10-23 2020-10-23 USB expansion equipment testing method, device, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011151773.1A CN112256509A (en) 2020-10-23 2020-10-23 USB expansion equipment testing method, device, system and storage medium

Publications (1)

Publication Number Publication Date
CN112256509A true CN112256509A (en) 2021-01-22

Family

ID=74261537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011151773.1A Pending CN112256509A (en) 2020-10-23 2020-10-23 USB expansion equipment testing method, device, system and storage medium

Country Status (1)

Country Link
CN (1) CN112256509A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714872A (en) * 2015-04-10 2015-06-17 南车株洲电力机车研究所有限公司 Performance test method for vehicle-mounted USB equipment
CN105630625A (en) * 2014-10-29 2016-06-01 国际商业机器公司 Method and device for detecting consistency between data copies
CN108009050A (en) * 2017-11-29 2018-05-08 郑州云海信息技术有限公司 A kind of memory node failure restart after service reliability test method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630625A (en) * 2014-10-29 2016-06-01 国际商业机器公司 Method and device for detecting consistency between data copies
CN104714872A (en) * 2015-04-10 2015-06-17 南车株洲电力机车研究所有限公司 Performance test method for vehicle-mounted USB equipment
CN108009050A (en) * 2017-11-29 2018-05-08 郑州云海信息技术有限公司 A kind of memory node failure restart after service reliability test method and device

Similar Documents

Publication Publication Date Title
CN109062809B (en) Online test case generation method and device and electronic equipment
US7971114B2 (en) Method for testing a memory device
CN110401580B (en) Webpage state monitoring method based on heartbeat mechanism and related equipment
CN111739575B (en) Storage chip quality detection method, device, equipment and readable storage medium
CN114039853A (en) Method, device, storage medium and electronic equipment for detecting security policy
CN111381748A (en) Image display method, device, equipment and storage medium
CN114996103A (en) Page abnormity detection method and device, electronic equipment and storage medium
CN110297764B (en) Vulnerability test model training method and device
CN109062793B (en) Test method and device of roller control and electronic equipment
CN110704311A (en) Application program testing method and device, electronic equipment and readable storage medium
CN107153608B (en) Code detection method and code detection device
CN113377650B (en) Automatic test case operation method and device, test equipment and storage medium
CN112256509A (en) USB expansion equipment testing method, device, system and storage medium
CN111968697A (en) Test method and device for solid state disk, computer equipment and storage medium
CN112420117A (en) Method and device for testing SRAM (static random Access memory), computer equipment and storage medium
CN106708705B (en) Terminal background process monitoring method and system
CN112256510A (en) USB interface test method, device, system and storage medium
CN112650684B (en) Verification method, device and equipment for webpage evidence obtaining and storage medium
CN110633196A (en) Automatic use case execution method and device of application program
CN107515821B (en) Control testing method and device
CN113360402A (en) Test method, electronic device, chip and storage medium
CN113342684A (en) Webpage testing method, device and equipment
CN109976996B (en) Keyboard controller test method
CN107451047B (en) Browser function testing method and system and electronic equipment
CN111258899A (en) Use case generation method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210122

RJ01 Rejection of invention patent application after publication