200941211 九、發明說明: 【發明所屬之技術領域】 本發明涉及一種測試系統及方法,尤指一種用以對喪入 , 式設備進行測試之測試系統及方法。 【先前技術】 礙入式設備一般係指具有計算功能但又不稱之為電腦 之δ又備’其作業系統與應用程式係以勃體(firmware)之形式 預先燒錄於該設備中。測試時,該嵌入式設備連接到一電腦 ©上,然後手動地將該電腦上之測試程式拷貝到該嵌入式設備 中,再手動地啟動該測試程式,以對該嵌入設備進行測試。 該測試方法於測試時需人工干預,測試過程繁瑣,並且會大 大地延長測試時間,降低測試效率。一種改進之測試方法係 於該嵌入式設備之韌體中加入特定之指令,藉由該指令使該 測試於拷貝到該嵌入式設備中時自動運行。該種改進之測試 方法雖能使測試過程自動化,節省測試時間,提高效率,然, 其會改變該嵌入式設備之原有韌體,且,對於不同之測試程 ©式,所對應之指令亦不同,通用性差。 【發明内容】 馨於以上内谷,有必要提供一種節省測試時間、提高測 试效率且不需改變待測試嵌入式設備之原有韌體之嵌入式 設備測試系統及方法。 一種嵌入式設備測試系統,對一具有網路標識之嵌入式 設備進行測試,該嵌入式設備具有一串列介面及一網路介 面,a亥測试系統包括一主機,該主機包括一串列介面、一網 路介面及一存儲裝置,該存儲裝置儲存一監控程式、一自動 200941211 運行腳本及一測試程式,該主機之串列介面與該嵌入式設備 之串列介面連接形成一串列埠連接,該主機之網路介面與該 嵌入式設備之網路介面連接形成一網路連接,該監控程式用 於監測該嵌入式設備之啟動資訊,並於監測到該嵌入式設備 之啟動貧訊後精由該串列璋連接獲得該散入式設備網路標 識,然後將該測試程式藉由該網路連接拷貝到該嵌入式設備 中,該測試程式根據該自動運行腳本對該嵌入式設備進行測 試。 〇 一種嵌入式設備測試方法,包括以下步驟: 電腦主機藉由一串列埠連接獲得待測嵌入式設備之啟 動資訊及網路標識; 電腦主機獲得嵌入式設備之啟動資訊及網路標識後,藉 由一網路連接拷貝一測試程式到所述之嵌入式設備;及 該測試程式根據電腦主機之一自動運行腳本對項所述 之嵌入式設備進行測試。 與習知技術相比,本發明嵌入式設備測試系統及方法藉 ©由該自動運行腳本實現測試自動化,提高測試效率,且無需 改變該嵌入式設備之原有韌體,且,利用相互連接之嵌入式 設備之網路介面與該主機之網路介面進行傳輸,提高測試速 度,節省測試時間。 【實施方式】 請參閱圖1,本發明嵌入式設備測試系統之較佳實施方 式包括一電腦20、一串列埠線30及一網線40,用以對一嵌 入式設備10進行測試。 該嵌入式設備10以韌體之形式預先燒錄有作業系統及 200941211 應用程式,並設有一串列介面12及一網路介面14。 該電腦20包括一顯示器22及一主機24。該顯示器22 與該主機24電性連接,並可用以顯示測試過程及測試結果。 該主機24包括一主機板242、一與該主機板242電性連接之 存儲裝置244、一與該主機板242電性連接之串列介面246 及一與該主機板242電性連接之網路介面248。請參閱圖2, 該存儲裝置244儲存一監控程式2442、一配置文檔2444及 一用以對該嵌入式設備10進行測試之測試程式2448。該配 ❹置文檔2444中預設有登錄用戶名、登錄密碼及一自動運行 腳本2446。該測試程式2448可按照該自動運行腳本2446 對該嵌入式設備10進行測試。該自動運行腳本2446設定該 嵌入式設備10進行測試之測試項目及測試順序。該監控程 式2442具有一自動測試模式及一手動測試模式,兩種模式 之區別在於:處於自動測試模式時,將使用該配置文檔2444 中之預設登錄用戶名及登錄密碼進行登錄,且不能對該等串 列介面12、246及網路介面14、248之參數進行修改,而處 ❹於手動測試模式時,可對登錄用戶名、登錄密碼及該等串列 介面12、246及網路介面14、248之參數進行手動修改。 該串列埠線30將該嵌入式設備10之串列介面12與該 主機24之串列介面246連接,並因此形成一串列埠連接, 該網線40將該嵌入式設備10之網路介面14與該主機24之 網路介面248連接,並因此形成一網路連接。 請參閱圖3,使用上述測試系統對該嵌入式設備10進行 測試,包括以下步驟: S01 :啟動該電腦20,並運行該監控程式2442,並於該 200941211 顯示器22上顯示該監控程式2442之執行晝面及監測到之資 訊; ' S02 :裝載該配置文檔2444 ; - S03:啟動該嵌入式設備10,該監控程式2442監測到該 嵌入式設備10藉由該串列埠連接向該主機24發送之啟動資 訊; S04 :判斷該嵌入式設備10是否啟動完成,如果是,則 執行S05步驟;如果否,則重新啟動該嵌入式設備10 ; 〇 S05 :輸入登錄用戶名及登錄密碼並進行判斷,如果兩 者均正確,則藉由該串列埠連接登錄到該嵌入式設備10;如 果輸入登錄用戶名及登錄密碼兩者之一有誤,則重新輸入; 506 :登錄後,該監控程式2442藉由該串列埠連接獲得 該嵌入式設備10之網路標識,如MAC位址或IP位址,並 於該顯示器22上顯示; 507 :啟動網路連接,該監控程式2442藉由該網路連接 將該測試程式2448拷貝到該嵌入式設備10中; G S08 :運行該測試程式2448,並按照該配置文檔2444 中之自動運行腳本2446對該嵌入式設備10進行測試,同 時,該監控程式2442監測到藉由該網路連接傳送到該主機 24之測試進程資訊,並顯示於該顯示器22上; S09 :測試完成後,該監控程式2442將測試結果顯示於 該顯示器22上。 上述測試過程中,如果該監控程式2442選擇自動測試 模式,那麼,於執行S05步驟時,則自動輸入該配置文檔2444 中預設之登錄用戶名及登錄密碼;如果該監控程式2442選 200941211 擇自動測試模式手動模式時,則需手動輸入登錄用戶名及登 錄密碼。 由於本發明嵌入式設備測試系統於對該嵌入式設備10 測試時,係藉由相互連接之網路介面14,248將儲存於該主 機24之存儲裝置244上之測試程式2448拷貝到該嵌入式設 備10中,並藉由儲存於該主機24上之自動運行腳本2446 啟動該測試程式2448之運行,因此,無需於該嵌入式設備 10之韌體中加入特定之指令來啟動與運行該測試程式 〇 2448,不會改變該嵌入式設備10之原有韌體。 此外,本發明嵌入式設備測試系統於對該嵌入式設備1〇 測試時,係藉由相互連接之網路介面14、248(即該網路連接) 來傳輸,而不是藉由相互連接之串列介面12、246(即該串列 埠連接)來傳輸,且,由於網路傳輸之速度一般要比串列埠 傳輸快,故,可提高測試速度,節省測試時間。 【圖式簡單說明】 圖1係本發明嵌入式設備測試系統之較佳實施方式之硬 C)體構成圖。 圖2係圖1之存儲裝置之硬體構成圖。 圖3係本發明嵌入式設備測試方法之較佳實施方式之流 程圖。 【主要元件符號說明】 嵌入式設備 10 串列介面 12 網路介面 14 電腦 20 顯示器 22 主機 24 11 200941211 主機板 242 存儲裝置 244 監控程式 2442 配置文檔 2444 自動運行腳本 2446 測試程式 2448 串列介面 246 網路介面 248200941211 IX. INSTRUCTIONS: [Technical Field] The present invention relates to a test system and method, and more particularly to a test system and method for testing a mourning device. [Prior Art] An intrusive device generally refers to a device that has a computing function but is not called a computer. Its operating system and application program are pre-programmed in the device in the form of a firmware. During the test, the embedded device is connected to a computer, and then manually copy the test program on the computer to the embedded device, and then manually start the test program to test the embedded device. This test method requires manual intervention during the test. The test process is cumbersome and greatly prolongs the test time and reduces the test efficiency. An improved test method is to add a specific instruction to the firmware of the embedded device, by which the test is automatically run when copied to the embedded device. The improved test method can automate the test process, save test time and improve efficiency. However, it will change the original firmware of the embedded device, and for different test procedures, the corresponding instructions are also Different, the versatility is poor. SUMMARY OF THE INVENTION It is necessary to provide an embedded device test system and method that saves test time, improves test efficiency, and does not need to change the original firmware of the embedded device to be tested. An embedded device testing system for testing an embedded device having a network identifier, the embedded device having a serial interface and a network interface, the ahai test system including a host, the host including a serial An interface, a network interface, and a storage device, the storage device stores a monitoring program, an automatic 200941211 running script, and a test program, and the serial interface of the host is connected with the serial interface of the embedded device to form a serial port. Connecting, the network interface of the host and the network interface of the embedded device form a network connection, the monitoring program is used for monitoring startup information of the embedded device, and monitoring the startup of the embedded device After the serial connection is obtained by the serial port connection, the mobile device identifier is obtained, and then the test program is copied to the embedded device by using the network connection, and the test program is based on the automatic running script to the embedded device. carry out testing. The method for testing an embedded device includes the following steps: The host computer obtains the startup information and the network identifier of the embedded device to be tested by using a serial connection; the host computer obtains the startup information and the network identifier of the embedded device. Copying a test program to the embedded device by using a network connection; and the test program automatically runs a script to test the embedded device according to the item according to one of the host computers. Compared with the prior art, the embedded device testing system and method of the present invention realizes test automation by the automatic running script, improves testing efficiency, and does not need to change the original firmware of the embedded device, and utilizes interconnection. The network interface of the embedded device is transmitted with the network interface of the host to improve the test speed and save test time. [Embodiment] Referring to Figure 1, a preferred embodiment of the embedded device test system of the present invention includes a computer 20, a serial cable 30 and a network cable 40 for testing an embedded device 10. The embedded device 10 pre-programs the operating system and the 200941211 application in the form of a firmware, and has a serial interface 12 and a network interface 14. The computer 20 includes a display 22 and a host 24. The display 22 is electrically connected to the host 24 and can be used to display test procedures and test results. The host device 24 includes a motherboard 242, a storage device 244 electrically connected to the motherboard 242, a serial interface 246 electrically connected to the motherboard 242, and a network electrically connected to the motherboard 242. Interface 248. Referring to FIG. 2, the storage device 244 stores a monitoring program 2442, a configuration file 2444, and a test program 2448 for testing the embedded device 10. The login file 2444 is pre-configured with a login user name, a login password, and an autorun script 2446. The test program 2448 can test the embedded device 10 in accordance with the autorun script 2446. The autorun script 2446 sets the test items and test sequences for the embedded device 10 to test. The monitoring program 2442 has an automatic test mode and a manual test mode. The difference between the two modes is that when the automatic test mode is used, the default login user name and login password in the configuration file 2444 are used to log in, and the The parameters of the serial interfaces 12, 246 and the network interfaces 14, 248 are modified, and in the manual test mode, the login user name, the login password, and the serial interfaces 12, 246 and the network interface are available. The parameters of 14,248 are manually modified. The serial connection 30 connects the serial interface 12 of the embedded device 10 to the serial interface 246 of the host 24 and thus forms a series of connections, the network 40 of the embedded device 10 The interface 14 is coupled to the network interface 248 of the host 24 and thus forms a network connection. Referring to FIG. 3, testing the embedded device 10 by using the above test system includes the following steps: S01: booting the computer 20, and running the monitoring program 2442, and displaying the execution of the monitoring program 2442 on the 200941211 display 22. Information and monitoring information; 'S02: loading the configuration document 2444; - S03: starting the embedded device 10, the monitoring program 2442 monitoring the embedded device 10 to send to the host 24 by the serial port connection Startup information; S04: determining whether the embedded device 10 is booted, if yes, executing step S05; if not, restarting the embedded device 10; 〇S05: inputting the login user name and login password and making a determination, If both are correct, log in to the embedded device 10 by the serial port connection; if one of the login user name and the login password is incorrect, re-enter; 506: after login, the monitoring program 2442 Obtaining a network identifier of the embedded device 10, such as a MAC address or an IP address, by the serial port connection, and displaying the display on the display 22; 507: starting a network connection, the monitoring The program 2442 copies the test program 2448 to the embedded device 10 by using the network connection; G S08: running the test program 2448, and performing the embedded device 10 according to the automatic running script 2446 in the configuration document 2444. At the same time, the monitoring program 2442 monitors the test process information transmitted to the host 24 via the network connection and displays it on the display 22; S09: after the test is completed, the monitoring program 2442 displays the test result on the display. On display 22. During the above test, if the monitoring program 2442 selects the automatic test mode, then when the step S05 is executed, the login user name and login password preset in the configuration document 2444 are automatically input; if the monitoring program 2442 selects 200941211, the automatic selection is performed. When testing the manual mode, you need to manually enter the login user name and login password. Since the embedded device test system of the present invention tests the embedded device 10, the test program 2448 stored on the storage device 244 of the host 24 is copied to the embedded device through the interconnected network interfaces 14, 248. In the device 10, the running of the test program 2448 is started by the automatic running script 2446 stored on the host 24. Therefore, it is not necessary to add a specific instruction to the firmware of the embedded device 10 to start and run the test program. 〇 2448, does not change the original firmware of the embedded device 10. In addition, the embedded device test system of the present invention transmits the interconnected device through the interconnected network interfaces 14, 248 (ie, the network connection), rather than by connecting to each other. The serial interface 12, 246 (ie, the serial port connection) is transmitted, and since the network transmission speed is generally faster than the serial port transmission, the test speed can be improved and the test time can be saved. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a diagram showing the configuration of a hard C) body of a preferred embodiment of the embedded device test system of the present invention. 2 is a view showing a hardware configuration of the storage device of FIG. 1. Figure 3 is a flow diagram of a preferred embodiment of the embedded device testing method of the present invention. [Main component symbol description] Embedded device 10 Serial interface 12 Network interface 14 Computer 20 Display 22 Host 24 11 200941211 Motherboard 242 Storage device 244 Monitor program 2442 Configuration document 2444 Automatic running script 2446 Test program 2448 Serial interface 246 Road interface 248
1212