[go: up one dir, main page]

CN102087626B - Automatic test system and automatic test method thereof - Google Patents

Automatic test system and automatic test method thereof Download PDF

Info

Publication number
CN102087626B
CN102087626B CN 200910225594 CN200910225594A CN102087626B CN 102087626 B CN102087626 B CN 102087626B CN 200910225594 CN200910225594 CN 200910225594 CN 200910225594 A CN200910225594 A CN 200910225594A CN 102087626 B CN102087626 B CN 102087626B
Authority
CN
China
Prior art keywords
descriptor
computer
waiting time
automatic test
target
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.)
Expired - Fee Related
Application number
CN 200910225594
Other languages
Chinese (zh)
Other versions
CN102087626A (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.)
Primax Electronics Ltd
Original Assignee
Primax Electronics 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 Primax Electronics Ltd filed Critical Primax Electronics Ltd
Priority to CN 200910225594 priority Critical patent/CN102087626B/en
Publication of CN102087626A publication Critical patent/CN102087626A/en
Application granted granted Critical
Publication of CN102087626B publication Critical patent/CN102087626B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides an automatic test system and an automatic test method thereof. The automatic test system comprises a computer and a test device for testing the universal serial bus device. The automatic test system judges whether the universal serial bus device is completely configured with the computer by the method of the invention, and starts to test the universal serial bus device when the configuration is completed. The invention can automatically determine whether to start testing the universal serial bus device without depending on manpower, thereby improving the working efficiency.

Description

自动测试系统及其自动测试方法Automatic test system and its automatic test method

技术领域 technical field

本发明涉及自动测试系统及方法,尤其涉及一种对通用串行总线装置进行自动测试的自动测试系统及其自动测试方法。The invention relates to an automatic test system and method, in particular to an automatic test system and an automatic test method for automatically testing a universal serial bus device.

背景技术 Background technique

通用串行总线(Universal Series Bus,USB)装置由于具有随插随用的功能,因此被应用于许多领域上,较常见的为USB影音播放装置、USB储存装置、USB鼠标以及USB键盘等等。而在USB装置的制造过程中或制造完成时必须对USB装置进行测试,以确保USB装置的各功能可正常运行。Universal Serial Bus (USB) devices are used in many fields due to their plug-and-play functionality, and the more common ones are USB audio-visual playback devices, USB storage devices, USB mice, and USB keyboards. However, the USB device must be tested during the manufacturing process of the USB device or when the manufacturing is completed, so as to ensure that each function of the USB device can operate normally.

以USB键盘为例,最简单的键盘测试为连接USB键盘以及计算机,再由一测试人员按压每个按键,并观察按压按键后是否执行其按键功能,以判断按键是否正常。然而,以人力进行测试不仅测试速度缓慢且成本太高,除此之外,测试人员亦可能因长时间的测试而感到疲劳,故容易发生误触按键的情况。为解决这种情况,市面上推出一种键盘自动测试装置以对键盘进行自动测试,其运行情形如同台湾专利第00325905号公告案所述,而不多加说明。Taking a USB keyboard as an example, the simplest keyboard test is to connect the USB keyboard and a computer, and then a tester presses each button, and observes whether the button function is executed after pressing the button, so as to judge whether the button is normal. However, testing by manpower is not only slow and costly, but also the testers may feel tired due to long-time testing, so it is easy to touch the button by mistake. In order to solve this situation, a keyboard automatic testing device is introduced on the market to automatically test the keyboard, and its operation is as described in the Taiwan Patent No. 00325905 announcement, without further explanation.

在测试USB装置之前,必须将USB装置连接于计算机或者测试装置,而于其连接过程中,会产生装置改变(Device change)的讯息,此时,USB装置会传输USB协议描述至计算机,使计算机通过读取USB协议描述而辨识其USB装置的功能,该些USB协议描述为描述元(Descriptor),其中构成一USB装置所必须具备的描述元包括装置描述元(Device Descriptor)、配置描述元(Configuration Descriptor)、界面描述元(Interface Descriptor)、端点描述元(Endpoint Descriptor)。另外某些USB装置还包括字串描述元(StringDescriptor)、群组描述元(Class Descriptor)以及报告描述元(Report Descriptor)等,可依据USB装置的需求来增加或减少这些描述元。而计算机接收到该些描述元后会将此USB装置的该些描述元储存于一装置登录信息中,以便日后此USB装置再次与计算机连接时可侦测此USB装置并通过装置登录信息而辨识此USB装置且完成USB装置的配置(Configure)。Before testing the USB device, the USB device must be connected to the computer or the test device, and during the connection process, a device change (Device change) message will be generated. At this time, the USB device will transmit the USB protocol description to the computer, so that the computer Identify the function of the USB device by reading the USB protocol description. These USB protocol descriptions are described as Descriptors, and the Descriptors that constitute a USB device include Device Descriptor, Configuration Descriptor ( Configuration Descriptor), Interface Descriptor, Endpoint Descriptor. In addition, some USB devices also include string descriptors (String Descriptor), group descriptors (Class Descriptor), and report descriptors (Report Descriptor), etc. These descriptors can be increased or decreased according to the requirements of the USB device. After receiving these descriptors, the computer will store the descriptors of the USB device in a device registration information, so that the USB device can be detected and identified through the device registration information when the USB device is connected to the computer again in the future. The USB device and complete the configuration of the USB device (Configure).

一般而言,计算机的操作系统为Microsoft Windows。当USB装置连接于计算机或测试装置且传输描述元时,计算机的Windows操作系统将侦测计算机上所有的USB端口,使得USB装置的描述元会重复被计算机侦测到,因此必须等待计算机对所有的USB端口侦测完毕才可完成USB装置的配置以进行自动测试。虽然计算机可侦测所有的USB端口,却无法判断USB装置的配置是否完成,故计算机无法得知何时该开始进行自动测试,因此仍必须安排人力来判断USB装置的配置是否完成,并启动自动测试装置以进行自动测试。也就是说,自动测试装置仍必须凭借人力来进行测试。Typically, the computer's operating system is Microsoft Windows. When a USB device is connected to a computer or a test device and transmits descriptors, the Windows operating system of the computer will detect all USB ports on the computer, so that the descriptors of the USB device will be repeatedly detected by the computer, so it is necessary to wait for the computer to respond to all The configuration of the USB device for automatic testing can only be completed after the detection of the USB port of the device is completed. Although the computer can detect all USB ports, it cannot determine whether the configuration of the USB device is complete, so the computer cannot know when to start the automatic test, so it is still necessary to arrange manpower to determine whether the configuration of the USB device is complete and start the automatic test. Test fixtures for automatic testing. That is to say, the automatic test equipment must still rely on manpower to carry out the test.

发明内容 Contents of the invention

本发明要解决的技术问题在于,针对现有技术存在的上述不足,提供一种能够自动决定是否开始对通用串行总线装置进行测试的自动测试系统及其自动测试方法,无需凭借人力即可进行自动测试工作,工作效率高。The technical problem to be solved by the present invention is to provide an automatic test system and an automatic test method that can automatically determine whether to start testing a Universal Serial Bus device, and can be performed without manpower. Automatic testing work, high work efficiency.

本发明解决其技术问题所采用的技术方案是提供一种自动测试系统,用以对一通用串行总线装置进行自动测试,该自动测试系统包括计算机、测试装置、连接管理程序以及自动测试程序;测试装置连接于该计算机以及该通用串行总线装置,用以对该通用串行总线装置进行测试,其中当该通用串行总线装置与该测试装置连接时,该通用串行总线装置产生多个描述元并将该多个描述元传输至该计算机;连接管理程序安装于该计算机中,用以判断该多个描述元中的目标描述元是否被传输至该计算机;其中当该目标描述元被传输至该计算机,且该连接管理程序于一等待时间内侦测到该目标描述元再次被传输至该计算机时,该连接管理程序将该等待时间归零并重新计算该等待时间;当该目标描述元被传输至该计算机,且该连接管理程序于该等待时间内未侦测到该目标描述元再次被传输至该计算机时,输出一启动信号;以及,自动测试程序安装于该计算机中,用以根据该启动信号而启动该测试装置以对该通用串行总线装置进行自动测试。The technical solution adopted by the present invention to solve the technical problem is to provide an automatic test system for automatically testing a Universal Serial Bus device, the automatic test system includes a computer, a test device, a connection management program and an automatic test program; The testing device is connected to the computer and the USB device for testing the USB device, wherein when the USB device is connected to the testing device, the USB device generates a plurality of Descriptor and transmit the plurality of descriptors to the computer; the connection management program is installed in the computer to determine whether the target descriptor in the plurality of descriptors is transmitted to the computer; wherein when the target descriptor is transmitted to the computer, and the connection management program detects that the target descriptor is transmitted to the computer again within a waiting time, the connection management program resets the waiting time to zero and recalculates the waiting time; when the target when the descriptor is transmitted to the computer, and the connection management program does not detect that the target descriptor is transmitted to the computer again within the waiting time, an activation signal is output; and an automatic test program is installed in the computer, It is used for starting the test device according to the start signal to perform automatic test on the universal serial bus device.

该连接管理程序还包括一定时器,用以计算该等待时间。The connection management program also includes a timer for calculating the waiting time.

于该连接管理程序重新计算该等待时间之后,当该连接管理程序于重新计算的该等待时间内侦测到该目标描述元再次被传输至该计算机时,该连接管理程序再次将该等待时间归零并重新计算该等待时间;当该目标描述元再次被传输至该计算机,且该连接管理程序于重新计算的该等待时间内未侦测到该目标描述元被传输至该计算机时,输出该启动信号。After the connection management program recalculates the waiting time, when the connection management program detects that the target descriptor is transmitted to the computer again within the recalculated waiting time, the connection management program returns the waiting time to zero and recalculate the waiting time; when the target descriptor is transmitted to the computer again, and the connection management program does not detect that the target descriptor is transmitted to the computer within the recalculated waiting time, output the start signal.

该目标描述元为装置描述元(Device Descriptor)。The target descriptor is a device descriptor (Device Descriptor).

该装置描述元包括产品辨识码(Product ID,PID)以及厂商辨识码(VendorID,VID)。The device descriptor includes a product identification code (Product ID, PID) and a vendor identification code (VendorID, VID).

可选地,该目标描述元包括装置描述元、接口描述元(Interface Descriptor)以及报告描述元(Report Descriptor)。Optionally, the target descriptor includes a device descriptor, an interface descriptor (Interface Descriptor) and a report descriptor (Report Descriptor).

该装置描述元还包括产品辨识码以及厂商辨识码。The device description element also includes a product identification code and a manufacturer identification code.

该通用串行总线装置为USB接口鼠标或USB接口键盘等装置。The universal serial bus device is a device such as a mouse with a USB interface or a keyboard with a USB interface.

本发明还提供一种自动测试方法,用以判断通用串行总线装置与计算机是否配置完成,该方法包括以下步骤:The present invention also provides an automatic testing method for judging whether the configuration of the Universal Serial Bus device and the computer is completed, and the method includes the following steps:

S1:接收由该通用串行总线装置产生的多个描述元;S1: Receive multiple descriptors generated by the USB device;

S2:判断是否接收到该多个描述元中的目标描述元;其中当该目标描述元被接收,且于该目标描述元被接收后一等待时间内再次接收到该目标描述元时,将该等待时间归零并重新计算该等待时间;而当该目标描述元被接收,且于该目标描述元被接收后该等待时间内未再次接收到该目标描述元时,判定该通用串行总线装置与该计算机配置完成。S2: Judging whether the target descriptor in the plurality of descriptors is received; wherein when the target descriptor is received and the target descriptor is received again within a waiting time after the target descriptor is received, the The waiting time is reset to zero and the waiting time is recalculated; and when the target descriptor is received and the target descriptor is not received again within the waiting time after the target descriptor is received, it is determined that the Universal Serial Bus device And the computer configuration is complete.

于重新计算该等待时间之后,当该目标描述元于重新计算的该等待时间内再次被接收到时,将该等待时间归零并重新计算该等待时间;而当该目标描述元于重新计算的该等待时间内未再次被接收到时,判定该通用串行总线装置与该计算机配置完成。After recalculating the waiting time, when the target descriptor is received again within the recalculated waiting time, reset the waiting time to zero and recalculate the waiting time; and when the target descriptor is received within the recalculated waiting time If it is not received again within the waiting time, it is determined that the configuration of the USB device and the computer is completed.

该目标描述元为装置描述元。The target descriptor is a device descriptor.

该装置描述元包括产品辨识码以及厂商辨识码。The device descriptor includes a product identification code and a manufacturer identification code.

可选地,该目标描述元还包括装置描述元、接口描述元以及报告描述元。Optionally, the target descriptor further includes a device descriptor, an interface descriptor, and a report descriptor.

该装置描述元还包括产品辨识码以及厂商辨识码。The device description element also includes a product identification code and a manufacturer identification code.

该通用串行总线装置为USB接口鼠标或USB接口键盘等装置。The universal serial bus device is a device such as a mouse with a USB interface or a keyboard with a USB interface.

本发明自动测试系统及其自动测试方法,通过在等待时间内侦测目标描述元来判断是否仍有应该被传输的目标描述元,但却未被传输的目标描述元,借此以得知通用串行总线装置与计算机是否配置完成,而进行后续的工作。本发明自动测试系统及其自动测试方法,用以判断通用串行总线装置与计算机是否配置完成,可改善现有技术的缺陷而实现不需凭借人力而运作的自动测试工作,提高工作效率。The automatic test system and the automatic test method thereof of the present invention judge whether there are target descriptors that should be transmitted but are not transmitted by detecting the target descriptors within the waiting time, so as to know the universal Whether the configuration of the serial bus device and the computer is completed, and the follow-up work is carried out. The automatic test system and the automatic test method of the present invention are used to judge whether the configuration of the universal serial bus device and the computer is completed, which can improve the defects of the prior art and realize the automatic test work without relying on manpower to improve the work efficiency.

附图说明 Description of drawings

图1为本发明的自动测试方法较佳实施例的方块流程图。FIG. 1 is a block flow chart of a preferred embodiment of the automatic testing method of the present invention.

图2为本发明的自动测试系统较佳实施例的结构示意图。Fig. 2 is a schematic structural diagram of a preferred embodiment of the automatic testing system of the present invention.

具体实施方式 Detailed ways

为了确保计算机可得知应启动自动测试的时机,本发明提供一种用以判断通用串行总线装置与计算机是否配置完成的自动测试方法,请参阅图1,其为本发明的自动测试方法较佳实施例的方块流程图。该方法包括以下步骤S1:连接一测试装置以及一计算机,并连接一通用串行总线装置与测试装置以建立通用串行总线装置与计算机间的连接。步骤S2:通用串行总线装置传输多个描述元至计算机。步骤S3:判断是否接收到来自通用串行总线装置的一目标描述元。步骤S4:启动定时器,并判断于一等待时间内是否再次接收到目标描述元。步骤S5:将等待时间归零,并重新计算等待时间。步骤S6:判定通用串行总线装置与计算机配置完成。以及步骤S7:进行通用串行总线装置的自动测试。In order to ensure that the computer can know when the automatic test should be started, the present invention provides an automatic test method for judging whether the universal serial bus device and the computer are configured. Please refer to FIG. 1, which is a comparison of the automatic test method of the present invention. Block flow diagram of the preferred embodiment. The method includes the following step S1: connecting a testing device and a computer, and connecting a USB device and the testing device to establish a connection between the USB device and the computer. Step S2: The USB device transmits a plurality of descriptors to the computer. Step S3: Determine whether an object descriptor is received from the USB device. Step S4: Start a timer, and judge whether the target descriptor is received again within a waiting time. Step S5: Reset the waiting time to zero, and recalculate the waiting time. Step S6: Determine that the configuration of the USB device and the computer is completed. And step S7: performing an automatic test of the USB device.

需特别注意的是,进行步骤S3时,若未接收到目标描述元时,重复步骤S3;而若接收到目标描述元时,则进行步骤S4。而进行步骤S4时,若于等待时间内再次接收到目标描述元时,进行步骤S5;若于等待时间内未再次接收到目标描述元时,则进行步骤S6。而于完成步骤S5之后则再次进行步骤S4。It should be noted that when performing step S3, if the target descriptor is not received, repeat step S3; and if the target descriptor is received, then proceed to step S4. When step S4 is performed, if the target descriptor is received again within the waiting time, then step S5 is performed; if the target descriptor is not received again within the waiting time, then step S6 is performed. After step S5 is completed, step S4 is performed again.

接下来以完整的自动测试系统来说明判断通用串行总线装置与计算机是否配置完成的方法。请参阅图2,其为本发明的自动测试系统较佳实施例的结构示意图。自动测试系统1用以对一通用串行总线装置12进行自动测试,自动测试系统1包括一计算机10以及一测试装置11,测试装置11连接于计算机10以及通用串行总线装置12,用以对通用串行总线装置12进行测试,且测试装置11的结构以及运行情形如现有技术中所揭露的台湾专利第00325905号公告案所述,而不再赘述。Next, a complete automatic test system is used to illustrate the method of judging whether the configuration of the USB device and the computer is completed. Please refer to FIG. 2 , which is a schematic structural diagram of a preferred embodiment of the automatic testing system of the present invention. Automatic test system 1 is used for carrying out automatic test to a universal serial bus device 12, and automatic test system 1 comprises a computer 10 and a test device 11, and test device 11 is connected with computer 10 and universal serial bus device 12, in order to The USB device 12 performs the test, and the structure and operation of the test device 11 are as described in Taiwan Patent No. 00325905 disclosed in the prior art, and will not be repeated here.

计算机10具有一连接管理程序101以及用以执行自动测试的自动测试程序102,且连接管理程序101具有一定时器1011。而通用串行总线装置12为通过通用串行总线(USB)接口而连接的装置,于本较佳实施例中,通用串行总线装置12为USB键盘。The computer 10 has a connection management program 101 and an automatic test program 102 for performing automatic tests, and the connection management program 101 has a timer 1011 . The USB device 12 is a device connected through a Universal Serial Bus (USB) interface. In this preferred embodiment, the USB device 12 is a USB keyboard.

如现有技术中所述,将USB键盘12连接于计算机10或者测试装置11的连接过程中,USB键盘12会传输多个描述元D至计算机10,使计算机10通过读取多个描述元D而辨识其USB键盘12的功能,且多个描述元D被储存于计算机10中的登录编辑程序中。为了确保USB键盘12与计算机10已配置完成,设定多个描述元D中最后一组描述元为一目标描述元。本发明以目标描述元作为判断USB键盘12与计算机10是否配置完成的基准,而连接管理程序101则用以判断多个描述元D中的目标描述元是否被传输至计算机10。As described in the prior art, during the connection process of connecting the USB keyboard 12 to the computer 10 or the test device 11, the USB keyboard 12 will transmit multiple descriptors D to the computer 10, so that the computer 10 can read the multiple descriptors D And the function of its USB keyboard 12 is identified, and a plurality of descriptors D are stored in the log editing program in the computer 10 . In order to ensure that the configuration of the USB keyboard 12 and the computer 10 is completed, the last set of descriptors among the plurality of descriptors D is set as a target descriptor. The present invention uses the target descriptor as a criterion for judging whether the configuration of the USB keyboard 12 and the computer 10 is completed, and the connection management program 101 is used to judge whether the target descriptor among the multiple descriptors D is transmitted to the computer 10 .

目标描述元可为一装置描述元,而装置描述元包括一产品辨识码(ProductID,PID)以及一厂商辨识码(Vendor ID,VID)。或者目标描述元可包括一装置描述元、一接口描述元以及一报告描述元。于本较佳实施例中,目标描述元可包括装置描述元、接口描述元以及报告描述元,且目标描述元被储存于计算机的Windows操作系统的登录编辑程序中,而本较佳实施例中的目标描述元的格式为Vid_1234Pid_5678MI_05Col_09。The target descriptor can be a device descriptor, and the device descriptor includes a product identification code (ProductID, PID) and a vendor identification code (Vendor ID, VID). Or the object descriptor may include a device descriptor, an interface descriptor and a report descriptor. In this preferred embodiment, the target descriptor may include a device descriptor, an interface descriptor, and a report descriptor, and the target descriptor is stored in the login editing program of the Windows operating system of the computer, and in this preferred embodiment The format of the target descriptor is Vid_1234Pid_5678MI_05Col_09.

当本发明自动测试系统1开始运行时,连接测试装置11以及计算机10,并连接USB键盘12与测试装置11,以建立USB键盘12与计算机10间的连接(步骤S1)。接下来,USB键盘12传输多个描述元D至计算机10(步骤S2),此时,计算机10的连接管理程序101判断是否接收到来自USB键盘12的目标描述元(步骤S3),其中当连接管理程序101侦测到计算机10未接收到目标描述元时,继续接收目标描述元直至接收到目标描述元为止。而当连接管理程序101侦测到计算机10接收到目标描述元时,则启动定时器1011,并判断于等待时间内计算机10是否再次接收到目标描述元(步骤S4)。When the automatic test system 1 of the present invention starts running, connect the test device 11 and the computer 10, and connect the USB keyboard 12 and the test device 11 to establish the connection between the USB keyboard 12 and the computer 10 (step S1). Next, the USB keyboard 12 transmits a plurality of descriptors D to the computer 10 (step S2), at this time, the connection management program 101 of the computer 10 judges whether the target descriptor D from the USB keyboard 12 is received (step S3), wherein when the connection When the hypervisor 101 detects that the computer 10 has not received the target descriptor, it continues to receive the target descriptor until the target descriptor is received. When the connection management program 101 detects that the computer 10 has received the target descriptor, it starts the timer 1011 and determines whether the computer 10 receives the target descriptor again within the waiting time (step S4).

于步骤S4中,当连接管理程序101侦测到计算机10于等待时间内再次接收到目标描述元时,将等待时间归零,并重新计算等待时间(步骤S5),以再次进行步骤S4。而当连接管理程序101侦测到计算机10于等待时间内未再次接收到目标描述元时,则判定USB键盘12与计算机配置完成(步骤S6)并输出一启动信号E。接下来,自动测试程序102根据启动信号E而启动测试装置11,以使测试装置11对USB键盘12进行自动测试(步骤S7)。至于自动测试的运行过程则不再多加说明。In step S4, when the connection management program 101 detects that the computer 10 receives the target descriptor again within the waiting time, it resets the waiting time to zero and recalculates the waiting time (step S5) to perform step S4 again. And when the connection management program 101 detects that the computer 10 does not receive the target descriptor again within the waiting time, it determines that the configuration of the USB keyboard 12 and the computer is completed (step S6) and outputs an activation signal E. Next, the automatic test program 102 activates the test device 11 according to the start signal E, so that the test device 11 performs an automatic test on the USB keyboard 12 (step S7 ). As for the running process of the automatic test, no further explanation will be given.

需特别说明的是,本发明设定定时器1011以计算等待时间,主要是用以侦测是否仍有描述元D重复被传输,在本实施例中以目标描述元作为所有描述元D的代表,若侦测到于等待时间内有目标描述元被传输则表示计算机10尚未对所有的USB端口侦测完成,反之,若于等待时间内未接收到目标描述元,则表示USB键盘12与计算机10已配置完成而得以进行后续的自动测试工作。因此,等待时间的设定相当重要,若是等待时间被设定得太短,会使应该被侦测到的目标描述元被忽略,也就是说,连接管理程序101将因此而判断失误,导致后续的自动测试工作失败,因此需针对不同的USB装置进行测试并经过反复地实验而获得等待时间的设定。It should be noted that the present invention sets the timer 1011 to calculate the waiting time, which is mainly used to detect whether there is still a descriptor D to be transmitted repeatedly. In this embodiment, the target descriptor is used as the representative of all descriptors D If it is detected that the target descriptor is transmitted within the waiting time, it means that the computer 10 has not yet completed the detection of all USB ports. On the contrary, if the target descriptor is not received within the waiting time, it means that the USB keyboard 12 and the computer 10 has been configured so that subsequent automatic testing can be performed. Therefore, the setting of the waiting time is very important, if the waiting time is set too short, the target descriptor that should be detected will be ignored, that is to say, the connection management program 101 will therefore make a wrong judgment, resulting in subsequent The auto-test work fails, so it is necessary to test different USB devices and obtain the setting of the waiting time through repeated experiments.

根据上述较佳实施例可知,本发明自动测试系统及方法,通过在等待时间内侦测目标描述元来判断是否仍有应该被传输的目标描述元,但却未被传输的目标描述元,借此以得知通用串行总线装置与计算机是否配置完成,而进行后续的工作。因此,本发明自动测试系统及方法,用以判断通用串行总线装置与计算机是否配置完成,确实可改善现有技术的缺陷而实现不需凭借人力而进行的自动测试工作。According to the above-mentioned preferred embodiment, the automatic test system and method of the present invention judge whether there are still target descriptors that should be transmitted by detecting the target descriptors within the waiting time, but the target descriptors that have not been transmitted, by This is to know whether the configuration of the USB device and the computer is completed, and to carry out follow-up work. Therefore, the automatic test system and method of the present invention are used to judge whether the configuration of the USB device and the computer is completed, which can indeed improve the defects of the prior art and realize the automatic test work without manpower.

以上所述仅为本发明的较佳实施例,并非用以限定本发明的权利要求范围,因此凡其它未脱离本发明所揭示的精神下所完成的等效改变或修饰,均应包含于本发明的权利要求范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the scope of the claims of the present invention. Therefore, all other equivalent changes or modifications that do not deviate from the spirit disclosed in the present invention should be included in this disclosure. within the scope of the claimed invention.

Claims (15)

1.一种自动测试系统,用以对通用串行总线装置进行自动测试,其特征在于:该自动测试系统包括:1. an automatic test system, in order to carry out automatic test to universal serial bus device, it is characterized in that: this automatic test system comprises: 计算机;computer; 测试装置,连接于该计算机以及该通用串行总线装置,用以对该通用串行总线装置进行测试,其中当该通用串行总线装置与该测试装置连接时,该通用串行总线装置产生多个描述元并将该多个描述元传输至该计算机;A testing device, connected to the computer and the USB device, for testing the USB device, wherein when the USB device is connected to the testing device, the USB device generates multiple descriptors and transfer the plurality of descriptors to the computer; 连接管理程序,安装于该计算机中,用以判断该多个描述元中的目标描述元是否被传输至该计算机;其中当该目标描述元被传输至该计算机,且该连接管理程序于一等待时间内侦测到该目标描述元再次被传输至该计算机时,该连接管理程序将该等待时间归零并重新计算该等待时间;当该目标描述元被传输至该计算机,且该连接管理程序于该等待时间内未侦测到该目标描述元再次被传输至该计算机时,输出一启动信号;以及A connection management program installed in the computer to determine whether a target descriptor among the plurality of descriptors is transmitted to the computer; wherein when the target descriptor is transmitted to the computer, and the connection management program waits for When it is detected that the target descriptor is transmitted to the computer again, the connection management program resets the waiting time to zero and recalculates the waiting time; when the target descriptor is transmitted to the computer, and the connection management program outputting an activation signal when the target descriptor is not detected to be transmitted to the computer again within the waiting time; and 自动测试程序,安装于该计算机中,用以根据该启动信号而启动该测试装置以对该通用串行总线装置进行自动测试。The automatic test program is installed in the computer, and is used to start the test device according to the start signal to perform automatic test on the universal serial bus device. 2.如权利要求1所述的自动测试系统,其特征在于:该连接管理程序还包括一定时器,用以计算该等待时间。2. The automatic test system as claimed in claim 1, wherein the connection management program further comprises a timer for calculating the waiting time. 3.如权利要求1所述的自动测试系统,其特征在于:该连接管理程序重新计算该等待时间之后,当该连接管理程序于重新计算的该等待时间内侦测到该目标描述元再次被传输至该计算机时,该连接管理程序再次将该等待时间归零并重新计算该等待时间;当该目标描述元再次被传输至该计算机,且该连接管理程序于重新计算的该等待时间内未侦测到该目标描述元被传输至该计算机时,输出该启动信号。3. The automatic test system according to claim 1, wherein after the connection management program recalculates the waiting time, when the connection management program detects that the target descriptor is recalculated within the recalculated waiting time When transmitting to the computer, the connection management program resets the waiting time to zero again and recalculates the waiting time; when the target descriptor is transmitted to the computer again, and the connection management program fails to When it is detected that the target descriptor is transmitted to the computer, the activation signal is output. 4.如权利要求1所述的自动测试系统,其特征在于:该目标描述元为装置描述元。4. The automatic test system as claimed in claim 1, wherein the target descriptor is a device descriptor. 5.如权利要求4所述的自动测试系统,其特征在于:该装置描述元包括产品辨识码以及厂商辨识码。5. The automatic test system as claimed in claim 4, wherein the device descriptor includes a product identification code and a manufacturer identification code. 6.如权利要求1所述的自动测试系统,其特征在于:该目标描述元包括装置描述元、接口描述元以及报告描述元。6. The automatic test system according to claim 1, wherein the target descriptor includes a device descriptor, an interface descriptor and a report descriptor. 7.如权利要求6所述的自动测试系统,其特征在于:该装置描述元包括产品辨识码以及厂商辨识码。7. The automatic test system as claimed in claim 6, wherein the device descriptor includes a product identification code and a manufacturer identification code. 8.如权利要求1所述的自动测试系统,其特征在于:该通用串行总线装置为USB接口鼠标或USB接口键盘。8. The automatic test system as claimed in claim 1, wherein the USB device is a USB interface mouse or a USB interface keyboard. 9.一种自动测试方法,用以判断通用串行总线装置与计算机是否配置完成,其特征在于:该方法包括:9. An automatic test method, in order to judge whether the universal serial bus device and the computer have been configured, it is characterized in that: the method comprises: 接收由该通用串行总线装置产生的多个描述元;以及receiving a plurality of descriptors generated by the USB device; and 判断是否接收到该多个描述元中的目标描述元;其中当该目标描述元被接收,且于该目标描述元被接收后一等待时间内再次接收到该目标描述元时,将该等待时间归零并重新计算该等待时间;而当该目标描述元被接收,且于该目标描述元被接收后该等待时间内未再次接收到该目标描述元时,判定该通用串行总线装置与该计算机配置完成。judging whether the target descriptor in the plurality of descriptors is received; wherein when the target descriptor is received and the target descriptor is received again within a waiting time after the target descriptor is received, the waiting time Reset to zero and recalculate the waiting time; and when the target descriptor is received, and the target descriptor is not received again within the waiting time after the target descriptor is received, it is determined that the Universal Serial Bus device and the Computer configuration is complete. 10.如权利要求9所述的自动测试方法,其特征在于:于重新计算该等待时间之后,当该目标描述元于重新计算的该等待时间内再次被接收到时,将该等待时间归零并重新计算该等待时间;而当该目标描述元于重新计算的该等待时间内未再次被接收到时,判定该通用串行总线装置与该计算机配置完成。10. The automatic testing method according to claim 9, wherein after recalculating the waiting time, when the target descriptor is received again within the recalculated waiting time, the waiting time is reset to zero and recalculate the waiting time; and when the target descriptor is not received again within the recalculated waiting time, it is determined that the configuration of the USB device and the computer is completed. 11.如权利要求10所述的自动测试方法,其特征在于:该目标描述元为装置描述元。11. The automatic testing method according to claim 10, wherein the target descriptor is a device descriptor. 12.如权利要求11所述的自动测试方法,其特征在于:该装置描述元包括产品辨识码以及厂商辨识码。12. The automatic testing method according to claim 11, wherein the device descriptor includes a product identification code and a manufacturer identification code. 13.如权利要求9所述的自动测试方法,其特征在于:该目标描述元包括装置描述元、接口描述元以及报告描述元。13. The automatic testing method according to claim 9, wherein the object descriptor includes a device descriptor, an interface descriptor and a report descriptor. 14.如权利要求13所述的自动测试方法,其特征在于:该装置描述元包括产品辨识码以及厂商辨识码。14. The automatic testing method according to claim 13, wherein the device descriptor includes a product identification code and a manufacturer identification code. 15.如权利要求9所述的自动测试方法,其特征在于:该通用串行总线装置为USB接口鼠标或USB接口键盘。15. The automatic testing method according to claim 9, wherein the USB device is a USB interface mouse or a USB interface keyboard.
CN 200910225594 2009-12-07 2009-12-07 Automatic test system and automatic test method thereof Expired - Fee Related CN102087626B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910225594 CN102087626B (en) 2009-12-07 2009-12-07 Automatic test system and automatic test method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910225594 CN102087626B (en) 2009-12-07 2009-12-07 Automatic test system and automatic test method thereof

Publications (2)

Publication Number Publication Date
CN102087626A CN102087626A (en) 2011-06-08
CN102087626B true CN102087626B (en) 2013-04-10

Family

ID=44099442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910225594 Expired - Fee Related CN102087626B (en) 2009-12-07 2009-12-07 Automatic test system and automatic test method thereof

Country Status (1)

Country Link
CN (1) CN102087626B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631783B (en) * 2012-08-21 2018-09-04 百度在线网络技术(北京)有限公司 A kind of generation method and system of front end page
TWI676899B (en) * 2018-02-21 2019-11-11 Measuring instrument data collecting device and method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1504887A (en) * 2002-12-02 2004-06-16 英业达股份有限公司 Universal serial bus port testing device and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6948098B2 (en) * 2001-03-30 2005-09-20 Cirrus Logic, Inc. Circuits and methods for debugging an embedded processor and systems using the same
US20030056036A1 (en) * 2001-09-14 2003-03-20 Carlton Gary Don Apparatus and method for testing universal serial bus communication

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1504887A (en) * 2002-12-02 2004-06-16 英业达股份有限公司 Universal serial bus port testing device and method

Also Published As

Publication number Publication date
CN102087626A (en) 2011-06-08

Similar Documents

Publication Publication Date Title
CN109558282B (en) A PCIE link detection method, system, electronic device and storage medium
CN106844268B (en) USB equipment testing system, testing method and testing device
CN102176702A (en) Test system and test method
CN104216840B (en) The method and device that a kind of USB sets and operated to external equipment
CN103076888B (en) A kind of method that USB keyboard calls OSD switching channels in KVM equipment and the equipment
CN106649015A (en) Testing device and testing method of USB interface
CN101599035A (en) USB port proving installation and method
TW201327134A (en) Method and system for testing the function of SOL
CN115128429A (en) Chip testing system and testing method
US9846609B2 (en) System and method for testing configuration and operation of I/O devices
CN114384892A (en) Test equipment, state detection method and device of vehicle control unit and electronic equipment
TWI382307B (en) Automatic testing system and method for judging whether universal series bus device is configured to computer
CN116126613A (en) A method, device, electronic device, and storage medium for detecting the position of a PCIe device
CN102053898A (en) Test method for bus interface on PCIE slot of host and read-write test method thereof
CN102087626B (en) Automatic test system and automatic test method thereof
CN114740825A (en) Data measurement calibration method and device, vehicle controller, vehicle and medium
CN101661419A (en) Multi-test port test machine and test method thereof
CN111505531B (en) Board card test system
CN109254937B (en) USB hub, USB device enumeration exception detection method and computer storage medium
CN110825572A (en) Method, device and system for detecting I2C equipment address and electronic equipment
CN112346897B (en) Method and system for processing computer fault
CN117331769A (en) Test system, test method, test equipment and storage medium
CN215576583U (en) Universal serial bus port detection device
TWI296081B (en)
US11966299B2 (en) User terminal, debugging device, and data backup method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130410

Termination date: 20161207