201015299 九、發明說明: 【發明所屬之技術領域】 本發明係關於一種虛擬設備之測試方法,尤其係關於—種可 避免人工作業干預測試進程並可避免測試衝突的虛擬設傷之測試 方法。 【先前技術】201015299 IX. Description of the Invention: [Technical Field] The present invention relates to a test method for a virtual device, and more particularly to a test method for a virtual scratch that avoids manual work intervention in the test process and avoids test conflicts. [Prior Art]
現今,新型的伺服器(Server)都盡量設計成越小、越薄、越 不佔空間越好,因此,像光碟驅動器或軟碟驅動器這些設備在新 型的飼服ϋ上-艘不再配置。此_㈣若想_光碟驅動器 或軟碟驅動m使财卜接的USB絲驅邮或舰軟碟驅 動器,但有些伺服器可能被設計成僅予頁留了兩個舰蜂,用於外 接USB滑鼠/鍵盤’因而若想在這類伺服器上再使用外接的聰 光碟驅動i或USB軟雜魅_是彳W方便的,而且外接的 舰設備相對速練慢,資料讀取也不_定,姐,虛擬設備 (V娜Deviee)之技術便應運而生了。虛擬設備技術係利用網 路共動_鏡雜纽電顯料咖控彻⑽咖㈣, =擬的本地設備,例如:軟式磁碟⑽卿)' 可移動磁 ^ ㈣vableDlsk)、唯讀·光额位影音光碟⑴職财⑽ 傳統的針對虛錢備的顯方法係採用人工作 式,測試需要一台客戶(Client) 業的測試方 缒電腦實際連接到被測伺服 器上 5 201015299 ”、'後利用各戶端電耀的共用磁碟鏡像播案作成虛擬的咖設備, 、查至^伺服益上查找實際多出來的盤符,並實際打開此盤符來 二==備進行測試的目的。其中,虛擬設備的傳統創建方 而妙处台客戶端電腦從遠端連接到被測飼服器的管理介 ”、、後手動配置出虛擬設備,由於被湘麵財—些 ’其不允許自已連接自己的管理介面,這-點也就限 2傳相職方法必須彻另—台客戶端電腦進行虛擬設備的 ^用於製作虛擬設備的鏡像播案也必須放置在客戶端電 在傳統的虛擬設備之創建方法令,其最終的實現原理是將 電腦上手動配置的命令’透過咖1(可延伸標示語言) 八 力爾存,然後透過網路將此館存有盧擬設備配置入 =:Τ:!ΓΓ伺㈣的吻仏_飼= 備。μ μ,蝴針爾崎物建出虛擬設 參 是:然而,習知技㈣這_試方法存有諸多缺陷或限制,特別 物、__試方法f要人工干職,即,賴過 似人貝同哺作兩台電腦並對兩台電腦 要 斷,其測試流程複雜,測試步驟繁續,測試人工判 察獲取’無法實現全自動化地測試,且由於:法:=工觀 的失誤及缺少科學的判斷依據,因此,測試準確性^作業上 201015299 2、 傳統的測試方法f要至少兩 要一台被測電腦,以及& 可Κ丁測忒’即,需 用磁碟鏡像樓案的二㈣連f被測電腦並用以提供共 :_試時,“二:=:=:需 串列進行。若想平行測試 ”、此 腦,因此,測試成本太高。、,膝式人貝及多台客戶端電 ❹ ❹ 3、 傳統的測試n耗時過長。 4、 傳統酬試方法無法自動區 _一_行平行測試時會;生=與::: =剩試方法會受網路遠端連接數目的關,當多台制電腦利 衝^網路共_碟鏡像檔案製作虛擬設備進行測試時亦會產生 峨_轉输m输可執行測試。 6、不同的虛擬設備,如:卦 壤位影音光碟等,應採用;可移動磁碟、唯讀-光確 統軸㈣試’而傳 測試方案。 屈板°又備^供出-套完整和全面的 【發明内容】 為了解決上述習知技術中的問題與顧,本發明之目的在於 七、—種可避免人工作業干預測試進程並可避免測試衝突的虛擬 201015299 設備之測試方法。 本發明所提供之—種虛 ⑷以方法髮含以下步驟: 案放置於被測電腦之杨日^型之虛擬設備的共用磁碟鏡像槽 備之相_隨人入,域轉鱗有舰用戶紋虛擬設 為被送至被測電吻^ ❹ 唯讀-光碟/數位影音光碟設備進行識別械^腦之虛擬 式磁碟/可移動_1備 WS ’ G)對被測電腦之虛擬軟 光碟/數位影音辆職=!:=對被糊之虛擬唯讀-讀-光碟她影伽綠之魏是===虛擬唯 :-:::^ 虛Γ式磁碟/可移動磁碟設備之功能是否正常。 …上所述,本發明之優點在於: 1、本發明之虛擬設備之測試 出了—整套全面的自動化測試方宰虛擬設備的功能提 人工干預,測試結果依據電腦二=單,測試過程無^ 工於I, 飞斷传出,因此,避f 了 / ”的失誤’提升了測試的科學性與準確性。 、 /、本㈣之虛紐叙職妓,細試 知即可’因此,簡化了 _境,降低了麵本。°?測" 明之虛賴之物封U雜測試時間。 、本發明之虛擬設備之戰方法可自動識別出虛擬設備,避 201015299 免了與USB及錯存設備進 而且,本發明之顺產生的測試街突問題c 行職的需求,其㈣不:/對多台被測電腦同時進 A °x、又網路延端連接數目的限制,避免了爹 口被測電網路共_碟鏡 、 試時所產生的衝突問題。 卞衣作織又備進一 $本發明之虛擬設備之測續古、土 行測試,而無峨任何物具/伽置聰控制器進 測試之虛擬設傷之測試方法,提供了一套完整和全面的 別與齡,、了物___取不_試流程進行識 【實施方式】 配合圖示作較佳實施例詳細說 有關本發明之特徵與實作,茲 明如下。 '種虛擬設備之測 方法1圖」’此圖為本發明—實施例之紐設備之測試 方法的整體步·^^如圖所示,本發明之 試方法,係包含以下步驟: 置二=,二'曰疋類型之虛擬設備的共用磁象槽案放 :=本地,並透過將儲存有創建用戶指定虛擬設備之 測電腦創物目應的虛_碟設備(步驟⑽).#為被 對被測電腦之虛擬唯讀·光碟/數位影音光碟設備進行識別(步 201015299 驟 101); 對被測電腦 102); 之虛擬軟式磁碟/可移動_設備進行識別 (步驟 對被測電腦之虛擬唯讀_光 立 試,藉以判斷被測電腦#“先碟設備進行讀測 ip / ^麵麵光__彡音練聽之功能 疋否正常(步驟103);以及Today, the new servers are designed to be as small as possible, thinner, and less space-efficient. Therefore, devices such as CD-ROM drives or floppy disk drives are no longer available on new feeders. This _ (four) if you want _ CD drive or floppy drive m to make the USB cable drive or ship floppy drive, but some servers may be designed to leave only two ship bees for external USB Mouse/keyboard' Therefore, if you want to use an external CD drive or USB soft embezzle on this type of server, it is convenient, and the external ship equipment is relatively slow and slow, and the data is not read. The technology of Ding, Sister, and Virtual Equipment (V Na Deviee) came into being. Virtual device technology uses network co-movement _ mirror hybrid electric control material control (10) coffee (four), = proposed local equipment, such as: floppy disk (10) Qing) 'removable magnetic ^ (four) vableDlsk), read only Video and Audio CD (1) Business (10) The traditional method for virtual money is based on human work. The test requires a client (Client) tester. The computer is actually connected to the server under test. 5 201015299 ”, 'After Use the shared disk image broadcast case of each terminal to make a virtual coffee device, and check the servo number to find the actual more drive letter, and actually open the drive letter to the second == for testing purposes. Among them, the traditional creation of the virtual device is wonderfully connected to the client computer from the remote end to the management device of the measured feeding device, and then manually configure the virtual device, because it is not allowed to self- Connect to your own management interface, this - point is limited to 2 pass-through methods must be another - the client computer for the virtual device ^ used to make the virtual device's image broadcast must also be placed in the client's electricity in the traditional virtual Device creation Method, the ultimate realization principle is to manually configure the command on the computer 'through the coffee 1 (extensible markup language) 八力尔存, and then through the network to store the museum with the installation of the device == Τ:! ΓΓ ( (4) kiss 仏 _ feeding = preparation. μ μ, the needle is set in the virtual setting: However, the traditional method (4) has many defects or limitations, special items, __ test method f to do manual work, that is, People are feeding two computers and shutting down two computers. The test process is complicated, the test steps are numerous, and the test is judged to obtain 'cannot achieve fully automated test, and because: law: = work view error and Lack of scientific judgment basis, therefore, test accuracy ^ operation on 201015299 2, the traditional test method f to at least two to be tested computer, and & can be measured 忒 即, that is, need to use the disk mirror project The second (four) even f computer is used to provide a total of: _ test, "two: =: =: need to be carried out in series. If you want to parallel test", this brain, therefore, the test cost is too high. , Knee-style shellfish and multiple client computers ❹ 3, the traditional test n takes too long. 4, the traditional reward test method can not be automatic zone _ a _ line parallel test will be; raw = and ::: = = the remaining test method will be affected by the number of remote connections on the network, when the multi-system computer is rushed _ Mirror image file creation virtual device for testing will also produce 峨 _ transfer m input executable test. 6, different virtual devices, such as: 壤 soil video and audio CD, etc., should be used; removable disk, read-only - optical axis (four) test and pass the test program. In order to solve the problems and problems in the above-mentioned prior art, the object of the present invention is to avoid manual intervention in the test process and avoid test conflicts. The test method for the virtual 201015299 device. The invention provides a virtual (4) method comprising the following steps: The case is placed on the computer of the computer to be tested, and the virtual disk mirroring slot of the virtual device of the type of the computer is _ _ _ _ _ The virtual pattern is set to be sent to the tested electric kiss ^ 唯 Read-only - CD/digital audio and video disc device for identification device ^ Brain virtual disk / removable _1 WS ' G) virtual soft disc for the computer under test /Digital audio and video service =!:= 对 之 之 虚拟 - 读 读 读 读 读 她 她 她 她 她 她 她 她 她 她 她 她 她 她 她 她 她 她 她 她 她 她 她 她 她 她 她 她 = = = = = = = = = = Whether the function is normal. As described above, the advantages of the present invention are as follows: 1. The virtual device of the present invention has been tested - a comprehensive set of automated testing methods for slaughtering virtual devices to provide manual intervention, the test results are based on the computer two = single, the test process is not ^ Working at I, flying off and forth, therefore, avoiding the "fault" of "following" improves the scientificity and accuracy of the test. / /, this (four) of the virtual new narration, you can try it out 'so, simplify The _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ In addition, the requirements of the present invention for the test of the problem of the occurrence of the problem, (4) no: / for the number of computers tested simultaneously into the A °x, and the number of network extensions limit, to avoid 爹The mouth is measured by the grid road _ disc mirror, the conflicts caused by the test. 卞 作 又 又 又 又 本 本 本 本 本 本 本 本 本 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟 虚拟Test method for virtual damage of the controller into the test, provided A complete and comprehensive set of ages, and the contents of the invention are described in detail with reference to the drawings. DETAILED DESCRIPTION OF THE INVENTION The features and implementations of the present invention are described in detail below. 'Measurement method of virtual device 1'. This figure is an overall step of the test method of the new device of the present invention. As shown in the figure, the test method of the present invention comprises the following steps: The common magnetic image slot of the virtual device of the second type is: local, and is stored by the virtual disk device (step (10)) which is stored in the computer creation object of the user-specified virtual device (step (10)). Identify the virtual CD-ROM/CD-ROM device of the computer under test (step 201015299, step 101); identify the virtual floppy disk/movable_device of the computer 102 to be tested (step to the computer under test) Virtual only reading _ light test, in order to judge the computer under test # "first disc device to read and test ip / ^ face light __ voice listening function is normal (step 103);
對破測t敵錢軟式磁碟河移動_設備進行讀測試盘寫 ,試,藉以判斷被測電腦之虛擬軟式磁碟河移動磁碟設備之功能 是否正常(步驟104)。 現在β參考「第2圖」,此圖為本發明之虛麟備之測試方法 虛擬。又備創建方去之流程圖,如圖所示,本發明之測試方法中 虛擬設備之自動化創建方法係包含以下步驟: 獲取用戶指定本次測試所需創建的虛擬USB設備之類型(步 _ 驟200)’例如.虛擬軟式磁碟(Virtual Floppy)設備、虛擬可移 動磁碟(Virtual Removable Disk)設備、虛擬唯讀-光碟/數位影音 光碟(Virtual CD/DVD-R0M)設備等; 驗證用於創建甩戶指定類型之虛擬設備的共用磁碟鏡像檔案 疋否存在(步驟201 ),若存在,則檢測此鏡像檔案中儲存的“虛擬 設備標誌檔案”與用戶指定要創建的虛擬設備類型是否相符(步驟 202),若不存在’則報錯並退出創建; 如果“虛擬設備標誌檔案,,與用戶指定要創建的虛擬設備類型 10 201015299 二、檢測田刎系統中是否已經存在虛擬磁碟設備(步驟203 ), ""斷開§ 4系統中已經存在的虛擬磁碟設備之連接(步 」杏 而後,創建幻^丨檔案(步驟2〇5),此xml檔案中儲存有 ' ^關戶指定虛擬設備_關配置命令,若不存在,則直接執行 y 如果虛擬設備標誌、檔案,,與用戶指定要創建的虛擬設備 類型不相符,則報錯並退出創建; ‘ Λ應的观丨杈案到被測電腦之Gromit管理晶片,藉以實 ©現插入虛擬磁碟鏡像檔案,,之功能(步驟應); “/、:應的趣1槽案到被測電腦之Gromit管理晶片,藉以實 人的虛擬磁碟鏡像齡創建出相應的虛擬磁碟設備,,之 功能(步騍207) ; 磁統中#前的磁碟設備資訊’監湖斷是否創建出虛擬 ^又(步驟2G8),如果是’則結束創建並準備執行後續步驟, 如果否,則報錯並退出創建。 上述本發贿提供之虛擬設備之自動化創建方法,其只需 4_亚將用於製作虛擬設備的鏡像檔案放置在被測電 咖扣咖觸顯_觀類型,自 擬設備配置命令的-槽案,並直接發送此峋 ^Ur^'Gromit^a^5 利用Γ連接自已的管理介面,、限制,這樣便可以達到僅 细一口電腦完成整個創建過程的目的。而且此種 11 201015299 於製作虛擬§5:備的磁碟鏡彳緖案係位於被測電腦之本地,因此不 會出現多台電腦_同-個磁碟鏡像健進行測試而產生測試衝 突的問題,也不會受網路遠端連接數目的限制。 本發明之虛擬設備之測試方法巾,對虛擬設備的自動識別係 主要利用δχ備盤4掃描、儲存設備彳轉遍歷、usb匯赫遍歷、 虛擬設備標额案遍歷來實現。對於不隨獅虛擬設備,其自 動識別的方法會有所不同。 現在明參考「第3圖」,此圖為本發明之虛擬鋪之測試方法 虛擬唯讀光碟/數位影音光碟(Vi福1 C膽协尺⑽)設備識 別方法之流賴’如圖卿,本發明之淑方种虛擬修光碟/ 數位影音細設備之自_财法係包含町步驟: 掃描出系統中當前存在的所有盤符(步驟则); 杈則掃V出的第η個盤符的設備類型是否為drive_cd/d 峨(步驟3()1) ’若是,則繼續執行步驟迎,若不是,則跳轉 遍歷USB S &排’檢測掃描出的第n健符賴應的設備是 ^掛f在USB匯流排上(步驟3()2),若是,則繼續執行步驟期, 右不是’則跳轉到步驟3〇5 ; 檢測掃描出的第 (步驟303),若是, 驟 305 ; η個盤符中是否存在“虛擬設備標誌檔案” 則繼續執行娜3G4,料是,則跳轉到步 12 201015299 將此盤符記錄到Virtual CD/DVD-ROM設備列表中(步驟 304); 判斷系統中是否還存在未檢測的盤符(步驟3〇5),若是,則 ‘返回到步驟301,繼續對其他盤符進行檢測,若不是,則執行步驟 306 ; 檢測Virtual CD/DVD-Rom設備列表中存在的盤符數目(步 驟3〇6)’若盤符數目為〇,則報錯:未檢測到^血^ c ©設備(步驟307),然後結束;若盤符數目大於i,則警告:檢測 到過多的Virtual CD/DVD-ROM設備〔步驟308),然後結束;若 盤付數目為1,則提示··成功檢測到一個Virtual cd/dvd初m設 備(步驟3〇9)。(注:在正常情況下,系統中僅會存在—個輪^ CD/DVD-ROM 設備。) 現在請參考「第4圖」,此®為本發明之虛擬設備之測試方法 中虛擬軟式磁碟河移動磁碟(Vl血al F1〇ppy/Rem〇vabie臟)設 :備識财法之餘圖,如圖所示,本發明之測財法巾虛擬軟式 磁碟河移動_設歡自_财法縣細下步驟: 描出系統中當前存在的所有盤符(步驟400); 檢測掃描出的第n個盤符的設備類型是否為 DRIVf—REMOVABLE (步驟 401 ),若是,魏·行步驟 4〇2, 若不是,則跳轉到步驟407 ; 遍歷USB匯流排,檢卿描出的第n個盤符所對應的設備是 13 201015299 否掛接在USB匯流排上(步驟4〇2),若是,則繼續執行步驟4〇3, 若不是,則跳轉到步驟407 ; 檢測掃描出的第n個盤符中是否存在“虛擬設備標誌檔案,,(步 -驟403 )’若是,則繼續執行步驟404,若不是,則跳轉到步驟407 ; 將此盤付5己錄到虛擬可移動設備(Devjce) 列表中(步驟404); 判斷用戶是否要求區分出詳細的虛擬設備類型(步驟他), ❺右用戶要求區分出詳細的虛擬設備類型,則可透過遍歷註冊表及 獲取磁碟容量的方式區分出此次遍歷到的虛擬可移動設備是虛擬 服附設備還是虛擬U盤設備(步驟406),若用戶不要求區分出 詳細的虛擬設備類型,則跳轉到步驟4〇7 ; 判斷系統中是否還存在未檢測的盤符(步驟407),若是,則 返回到步驟4〇1,繼續對其他盤符進行檢測,若不是,則執行步驟 ,測虛擬可移動設備列表中存在的盤符數目(步驟顿), 為Γ則報錯:未檢測到虛擬可移動設備(步驟啊 二符數目大於1,_: 5又備(步驟41G)’然後結束;若盤符數 測到一個虛擬可移動設備(步驟411)。(注;在正;^不·成办 中僅會存在-個虛擬可移動設備。) “况下’糸》 本發明之顧賴之戦枝中,對顧賴之自動測試, 201015299 採用如下的幾種測試方法來實現· (一)、虛擬設備快速捌試方法 此决速測4方法將不會區分虛麟制類型,即 類型的虛擬設備均採用相同的_方案。請參考「第5_ = 為本發明之歧設備之崎妓中虛擬設職速峨方圖 圖,如圖师’本發明之_方法中虛擬設備之快速崎方= 包含以下步驟: 々去係 ❹ 掃描並記錄系統中當前存在的所有盤符(步驟500); 創建虛擬設備(步驟5〇1); 再-人谭描亚記錄系統中當前存在的所有盤符(步驟奶); 判斷第二次掃描過程中是否有新的盤符產生(步驟舶)… 有’則繼續執行步驟504,若、力^, 冷 右/又,旖的盤付產生,則説明此被蜊你 腦的虛擬設備舰不正常,報錯並; 〇 &測^"田出的新盤符中是否存在“虛擬設備標諸權案,,(步噼 504),若存在,則繼續執行步驟5〇5,若不存在,則説明此被須卜 腦的虛擬設備功能不正常,報錯並退出測試; 气 .㈣㈣符巾齡㈣料資訊是何以成功訪問(步蹲 305) ’若可訪問,則説明此被測電腦的虛擬設備功能正常,可缽 束測忒,若不可訪問,則説明此被測電腦的虛擬設備功能不正常5 報錯並退出測試。 上述之快速測試方法的優點在於測試速度較快,但不能根趫 15 201015299 虛擬設備的屬性進行測試,因此測試還不夠全面。 (二)、虛擬設備高級測試方法 此高級測試方法與上賴速測試方法之區別在於:其將根據 •虛擬設備的具體類型、設備的讀寫屬性等資訊採取不同的測試方 .案,即’對於不同類型的虛擬設備,其自動測試的方法也會有所 不同。 1虛擬唯4-光碟/數位影音光碟(viltuai cd/dyq—rom )設 Q 備之高級測試方法 由於Virtual CD/DVD-ROM設備均為唯讀設備,因此針對此 類虛擬設備的測試,僅進行讀測試即可。本發明之測試方法中 Virtual CD/DVD_R〇M設備之高級測試方法係包含以下步驟: ⑴以用戶指定的鏡像檔案創建出一個Virtual CD/mm-ROM 設備; , (2) 調用“虛擬CD/DVD-ROM設備自動識別,,程式模組,藉以 ® 監測是否創建出Virtual CD/DVD-ROM設備,若沒有創建出vir^ CD/DVD-ROM設備或創建出了多個Virtual CD/DVD-ROM設備, 則説明此被測電腦的虛擬設備功能不正常,報錯並退出測試; (3) 獲取創建出的Virtual CD/DVD-ROM設備所對應的盤符資 訊; (4) 打開用戶指定的用於製作Virtual CD/DVD-ROM設備的鏡 像,從中選擇任意一個檔案,將其内容讀取到記憶體A中; 16 201015299 ())打開創建出的Virtual CD/DVD-ROM設備,從中查找在步 驟(4)中述疋的檔案是否存在,若存在則將此檔案的内容讀取到記 憶體B中’若不存在則説明此被測電腦的虛擬設備功能不正常, 報錯並退出測試; (6)比較記憶體A中的資料與記憶體B中的資料是否完全一 致,若不一致則説明此被測電腦的虛擬設備功能不正常,報錯並 退出測試; ⑩ (7)若用戶需要全面測試,則返回到步驟(4),選擇鏡像中的其 他檔案進行讀取比較測試,直至鏡像中的全部檔案均與創建出的 Virtual CD/DVD-ROM設備中的相應檔案進行過讀取比較測試; (8)銷毀創建的VirtualCD/DVD-ROM設備,然後結束測試。 2、虛擬軟式磁碟/可移動磁碟(Virtual F1〇ppy/Rem〇vable Disk ) 設備之南級測試方法 由於Virtual Floppy/Removable Disk設備為可讀寫設備,所以 參針對此類虛擬設備的測試需要在上述Virtual CD/DVD-ROM設備 之高級測試方法的基礎上增加寫測試流程。本發明中Virtual Floppy/Reniovable Disk設備之高級測試方法可分為讀測試與寫測 試兩個部份,係分別包含以下步驟: 言買測試. 對Virtual Floppy/Removable Disk設備的讀測試方案與上述之 對Virtual CD/DVD-ROM設備的讀測試方案基本相同,只是用於 17 201015299 創建虛擬設備所使用的鏡像檔案不同,以及所調用的虛擬設備自 動識別程式模組不同(在對Virtual Floppy/Removable Disk設備進 行讀測試時需調用“虛擬Floppy/Removable Disk設備自動識別”程 式模組),因此不再贅述。 寫測試(如「第6圖」所示): 以用戶指定的鏡像檔案創建出一個虛擬可移動設備(virtual Removable Device)(步驟600),其中,此虛擬可移動設備可以是 Ο 虛擬軟式磁碟(Virtual Fk>Pf>y)設備或虛擬可移動磁碟(Virtual Removable Disk)設備; 調用“虛擬Floppy/Removab丨e Disk設備自動識別,,程式模組, 藉以監測是否創建出虛擬可移動設備(步驟6〇1),若沒有創建出 虛擬可移動設備或創建出了多個虛擬可移動設備,則說明此被測 電腦的虛擬設備功能不正常,報錯並退出測試; 檢測創建㈣虛擬可移動設備妓否存在“虛擬設備標諸棺 參案,,(步驟),若不存在則説明此被測電腦的虛擬設備功能不正 常,報錯並退出測試; 打開“虛擬賴赌顯”並觸其㈣崎與賴建的虛擬 :設備類働相符(步驟叫如不相符物此被測電 細的虛擬设備功能不正常,報錯並退出蜊試; 18 201015299 驟 605); 將測試槽案巾的資觸出,* 比較,看兩者是否完全相符(步驟6〇6),如;==式進行 電腦的虛擬設備功能不正常,報錯並退出測試;月此被測 鎖毀已創建的虛擬可移動設 -個新的触鍋辦(步雜7);⑽·綱再次創建For the test of the t-money soft disk river mobile _ device to read the test disk write, try to determine whether the function of the virtual floppy disk mobile disk device of the computer under test is normal (step 104). Now, β refers to "Fig. 2", which is a virtual test method for the virtual lining of the present invention. The flow chart of the creation side is also prepared. As shown in the figure, the automatic creation method of the virtual device in the test method of the present invention comprises the following steps: obtaining the type of the virtual USB device that the user needs to create for the test (step _ 200) 'For example, Virtual Floppy device, Virtual Removable Disk device, Virtual CD-ROM/Virtual CD/DVD-R0M device, etc.; Verification for Creating a shared disk image file of the virtual device of the specified type of the account (step 201), if yes, detecting whether the "virtual device flag file" stored in the image file matches the virtual device type specified by the user to be created (Step 202), if there is no 'error, and exit the creation; if the virtual device logo file, and the user specifies the virtual device type to be created 10 201015299 2. Check whether the virtual disk device already exists in the field system (step 203 ), ""Disconnect the virtual disk device that already exists in the § 4 system (step) and then create a magic File (step 2〇5), this xml file stores the '^Customer specified virtual device_off configuration command. If it does not exist, it directly executes y if the virtual device logo, file, and user specify the virtual device to be created. If the types do not match, the error will be reported and the creation will be quit; 'The response of the file to the Gromit management chip of the computer under test, and the function of the virtual disk image file (the step should be); "/,: The interesting 1 slot case to the Gromit management chip of the computer under test, to create the corresponding virtual disk device by the real virtual disk mirror age, the function (step 207); Device information 'Where is the establishment of the virtual ^^ (step 2G8), if it is 'then the end of the creation and preparation to perform the next steps, if not, then report the error and exit the creation. The above-mentioned automatic creation method of the virtual device provided by the bribe , it only needs 4_A to be used to make the virtual device's mirror file placed in the measured electric coffee cookie touch _ view type, self-designed device configuration command - slot case, and directly send this 峋 ^Ur^'Gromit ^a^5 Utilization ΓConnect your own management interface, and limit, so that you can achieve the purpose of completing the entire creation process with only a single computer. And this kind of 11 201015299 is used to make virtual §5: the disk mirror is in the computer under test. Local, so there will be no problem that multiple computers _ the same disk mirror will test to generate test conflicts, and will not be limited by the number of remote connections of the network. The automatic identification of the virtual device is mainly realized by using the χ spare disk 4 scan, the storage device traversal traversal, the usb HF traversal, and the virtual device quota traversal. For VR virtual devices, the method of automatic identification will be different. Now refer to "3rd figure", which is a test method of the virtual shop of the present invention. The virtual CD-ROM/digital audio-visual disc (Vi Fu 1 C-learning ruler (10)) device identification method is as follows. The invention of the virtual type of CD-ROM / digital audio and video equipment from the _ wealth system contains the steps: scan out all the drive letters currently in the system (steps); 杈 sweeps out the nth drive letter of the V Whether the device type is drive_cd/d 峨 (step 3 () 1) 'If yes, continue to perform the step welcome, if not, then jump through the USB S & row 'detect the scan of the nth health care device depends on the device ^ Hang f on the USB bus (step 3 () 2), if yes, continue to execute the step period, right does not 'then jump to step 3〇5; detect the scanned first (step 303), and if so, step 305; η If there is a “virtual device logo file” in the drive letter, continue to execute Na 3G4. If yes, go to step 12 201015299 and record the drive letter in the Virtual CD/DVD-ROM device list (step 304); Is there still an undetected drive letter (step 3〇5), and if so, then ' Going back to step 301, continue to detect other drive letters. If not, execute step 306; detect the number of drive letters existing in the Virtual CD/DVD-Rom device list (step 3〇6) 'If the number of drive letters is 〇, Report an error: no blood is detected ^ c © device (step 307), and then ends; if the number of drive letters is greater than i, then warning: excessive Virtual CD / DVD-ROM device is detected [step 308), and then end; If the number of reconciliations is 1, then the prompt ·· successfully detected a Virtual cd/dvd initial m device (steps 3〇9). (Note: Under normal circumstances, there will only be one round of CD/DVD-ROM devices in the system.) Now refer to "Figure 4", which is the virtual floppy disk in the test method of the virtual device of the present invention. River mobile disk (Vl blood a F1〇ppy/Rem〇vabie dirty) set: the remaining map of the financial method, as shown in the figure, the virtual money disk of the invention of the virtual law disk mobile _ set from _ Wealth County steps: describe all the drive letters currently in the system (step 400); detect whether the device type of the scanned nth drive letter is DRIVf-REMOVABLE (step 401), and if so, Wei line step 4 〇2, if not, then go to step 407; traverse the USB bus, the device corresponding to the nth drive letter traced by the prosecutor is 13 201015299 is not attached to the USB bus (step 4〇2), and if so, Then, proceed to step 4〇3, if not, go to step 407; detect whether there is a “virtual device flag file in the scanned nth drive letter, (step-403)”. If yes, proceed to step 404. If not, then go to step 407; pay 5 to record the virtual removable device (Devjce) in the list (step 404); determine whether the user requires to distinguish the detailed virtual device type (step him), and the right user request to distinguish the detailed virtual device type, then traverse the registry and obtain the disk capacity The method distinguishes whether the virtual mobile device traversed by the virtual attached device is a virtual attached device or a virtual USB disk device (step 406). If the user does not require to distinguish the detailed virtual device type, the process jumps to step 4〇7; Is there still an undetected drive letter (step 407), and if yes, return to step 4〇1 to continue detecting other drive letters, and if not, perform steps to measure the number of drive letters present in the virtual removable device list (Steps), for the error: no virtual removable device is detected (the number of steps is greater than 1, _: 5 is ready (step 41G)' and then ends; if the drive number is measured to a virtual removable device (Step 411). (Note; in the positive; ^ not · in the process will only exist - a virtual mobile device.) "Under the condition" 本 本 本 本 本 本 本 本 本 本 本 本 本 本 本 本, 201015299 The following several test methods are used to implement (1), virtual device quick test method. This fast test 4 method will not distinguish the virtual lining type, that is, the type of virtual devices use the same _ plan. Refer to "5th__ = the virtual installation speed map of the rugged equipment of the present invention, as shown in the figure of the invention. The method of the invention is as follows: 快速 ❹ ❹ 扫描And record all the drive letters currently in the system (step 500); create a virtual device (step 5〇1); then - all the drive letters currently present in the system (step milk); determine the second scan Is there a new drive letter generated (step ship)... If there is 'continue to perform step 504, if, force ^, cold right / again, the disk payment is generated, it means that the virtual device ship that is smashed by your brain is not normal. </ br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> Explain that this virtual device function of the brain is not Often, the error is reported and the test is withdrawn; gas. (4) (4) The age of the scarf (four) information is why the information is successfully accessed (step 305) 'If accessible, the virtual device of the computer under test is functioning properly, and can be tested. If the access is successful, the virtual device function of the computer under test is abnormal. 5 Reports an error and exits the test. The advantage of the above quick test method is that the test speed is faster, but it cannot be tested according to the properties of the 15 201015299 virtual device, so the test is not comprehensive enough. (B), virtual equipment advanced test method The difference between this advanced test method and the test method is that it will take different test methods according to the specific type of virtual device, the read and write attributes of the device, etc. For different types of virtual devices, the method of automatic testing will be different. 1 Virtual 4-CD/Digital Video CD (viltuai cd/dyq-rom) Advanced Test Method for Virtual Device Since Virtual CD/DVD-ROM devices are read-only devices, testing for such virtual devices is only performed. Read the test. The advanced test method of the Virtual CD/DVD_R〇M device in the test method of the present invention comprises the following steps: (1) creating a Virtual CD/mm-ROM device with a user-specified image file; (2) calling "virtual CD/DVD" -ROM device automatically recognizes, the program module, to monitor whether to create a Virtual CD/DVD-ROM device, if no vir^ CD/DVD-ROM device is created or multiple Virtual CD/DVD-ROM devices are created , indicating that the virtual device function of the tested computer is abnormal, reporting an error and exiting the test; (3) obtaining the drive letter information corresponding to the created Virtual CD/DVD-ROM device; (4) opening the user-specified for making Virtual CD/DVD-ROM device image, select any file from it, and read its contents into memory A; 16 201015299 ()) Open the created Virtual CD/DVD-ROM device and find it in step (4) Whether the file in the middle of the file exists, if it exists, the content of the file is read into the memory B. If it does not exist, the virtual device function of the computer under test is abnormal, and the error is reported and the test is exited; (6) Compare Data in memory A Whether the data in the memory B is completely consistent. If the data is inconsistent, the virtual device function of the computer under test is abnormal, and the error is reported and the test is exited. 10 (7) If the user needs to perform a comprehensive test, return to step (4) and select The other files in the image are read and compared until all the files in the image have been read and compared with the corresponding files in the created Virtual CD/DVD-ROM device; (8) Destroy the created VirtualCD/DVD- ROM device, and then end the test. 2. Virtual F1/ppy/Rem〇vable Disk The southern test method of the device. Because the Virtual Floppy/Removable Disk device is a readable and writable device, Testing for such virtual devices requires adding a write test flow based on the advanced test method of the above Virtual CD/DVD-ROM device. The advanced test method of the Virtual Floppy/Reniovable Disk device in the present invention can be divided into read test and write test. The two parts contain the following steps: Buy the test. Read the test plan for the Virtual Floppy/Removable Disk device and the above mentioned Virtual CD The read test scheme of the /DVD-ROM device is basically the same, except that the image file used for creating the virtual device is different for 17 201015299, and the virtual device automatic recognition program module is called differently (reading the Virtual Floppy/Removable Disk device) The "Virtual Floppy/Removable Disk Device Automatic Identification" program module is called during the test, so it will not be described again. Write test (as shown in Figure 6): Create a virtual removable device (step 600) with a user-specified image file, where the virtual removable device can be a virtual floppy disk (Virtual Fk>Pf>y) device or Virtual Removable Disk device; invokes "Virtual Floppy/Removab丨e Disk device auto-recognition, program module to monitor whether a virtual removable device is created ( Step 6〇1), if no virtual removable device is created or multiple virtual removable devices are created, the virtual device function of the tested computer is abnormal, the error is reported and the test is exited; the detection is created (4) the virtual removable device妓No “The virtual device is marked with 棺,, (step), if it does not exist, the virtual device function of the computer under test is abnormal, and the error is reported and the test is exited; the “virtual gambling display” is opened and touched (four) It is consistent with Lai Jian's virtual: device class ( (steps are called non-conformity. The virtual device function that is measured is not normal, error is reported and exits the test; 18 2010152 99 Step 605); Take out the test slot case, * Compare, see if the two are completely consistent (step 6〇6), such as; == for the virtual device function of the computer is not normal, report the error and exit the test; This month, the measured lock destroys the virtual removable device that has been created - a new touch pot office (step 7); (10) · Gang created again
重新掃描新創建出的虛擬可移動設備(步驟 ==出的虛擬可移動設備中是否存在娜 的别5式檔案(步驟6〇9),芒 ^ )右不存在,則報錯並退出測試; 次進模式再 則=二:乂判斷兩者是否完全相符(步驟610),如不相符, 此麵%腦的虛擬設備功能不正常,報錯並退出測試; 叫如則刪除虛擬可移動設備中存在的測試槽案(步驟 鎖毁創建的虛擬可移動設備(步驟612),紐結束測試。 至此本發明之虛擬设備之測試方法全面得以實現。 〜雖然本發·讀述之較佳實施方_露如上,鮮並非用以 疋本發明。本領域之技術人員應當意識到在不脫離本發明所附 之申請專概_揭示之本發日狀顧和精神之情況下,所為之 絲與、顯,均屬本發明之專娜護範圍之内。關於本發明所界 疋之保護範圍請參考所附之申請專利範圍。 19 201015299 【圖式簡單說明] 第I圖為本實_之虛 流程圖; 料整體步帮 第2圖為本料之虛錢叙㈣ 之流程圖; 法中屋擬設備創建方法 第3圖為本發明之益擬設傷之 位影音光碟設備識別方法之流程. 仏中屋擬唯讀-光碟/數 ❹ 圖; 第4圖為本發明之虛擬設備、 ‘礤磲/可移 動磁碟設備識別方法之流程圖;^方去中虛擬軟式 第5圖為本發明之虛擬設備之測 方法之流程圖;以及 '妨法中虛擬設備快迷測試 第6圖為本發明中虛擬軟式礙 方法中之寫測試流程圖。 〜。夕動磁碟6又備之❸級測試 【主要元件符號說明】Re-scan the newly created virtual mobile device (step == whether the virtual portable device has the other type 5 file (step 6〇9), mang ^) right does not exist, then report the error and exit the test; Into the mode then = two: 乂 to determine whether the two are completely consistent (step 610), if not, the virtual device function of this face% brain is abnormal, report error and exit the test; call to delete the existence of the virtual mobile device The test slot case (steps to destroy the created virtual removable device (step 612), the new end test. The test method of the virtual device of the present invention has been fully realized. ~ Although the preferred embodiment of the present invention is described The above is not intended to be used in the present invention. It will be appreciated by those skilled in the art that the present invention is not limited by the scope of the application and the spirit of the present invention. All of them are within the scope of the invention. For the scope of protection of the invention, please refer to the attached patent application scope. 19 201015299 [Simple description of the drawing] Figure I is a virtual flow chart of the actual _; Overall material Figure 2 is a flow chart of the virtual money (four) of the material; the third method of the method of creating the equipment in the law is the flow of the identification method of the audio-visual disc device of the invention. Read-disc/number ❹ diagram; Figure 4 is a flow chart of the virtual device of the present invention, '礤磲/removable disk device identification method; ^方去中虚软式第5图 is the virtual device of the present invention The flow chart of the method; and the virtual device fast test in the method of Fig. 6 is the flow chart of the writing test in the virtual soft obstacle method of the invention. ~. The magnetic disk 6 is also prepared for the level test [main component symbol] Description]