TWI512594B - Graphic user interface testing method and testing apparatus - Google Patents

Graphic user interface testing method and testing apparatus Download PDF

Info

Publication number
TWI512594B
TWI512594B TW102144217A TW102144217A TWI512594B TW I512594 B TWI512594 B TW I512594B TW 102144217 A TW102144217 A TW 102144217A TW 102144217 A TW102144217 A TW 102144217A TW I512594 B TWI512594 B TW I512594B
Authority
TW
Taiwan
Prior art keywords
picture
electronic device
instructions
test
pictures
Prior art date
Application number
TW102144217A
Other languages
Chinese (zh)
Other versions
TW201523415A (en
Inventor
Ying Dar Lin
Soto Jose Francisco Rojas
Tsung Hsien Chu
Yuan Cheng Lai
Original Assignee
Univ Nat Chiao Tung
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 Univ Nat Chiao Tung filed Critical Univ Nat Chiao Tung
Priority to TW102144217A priority Critical patent/TWI512594B/en
Publication of TW201523415A publication Critical patent/TW201523415A/en
Application granted granted Critical
Publication of TWI512594B publication Critical patent/TWI512594B/en

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Debugging And Monitoring (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Description

圖形使用者介面測試方法及測試裝置Graphic user interface test method and test device

本發明是有關於一種測試方法及測試裝置,且特別是有關於一種圖形使用者介面測試方法及測試裝置。The invention relates to a test method and a test device, and in particular to a graphical user interface test method and test device.

自動化圖形使用者介面(Graphic User Interface,GUI)測試的工具的設計目的在於盡可能地降低測試人員在測試GUI時所需付出的人力。然而,現今常見的自動化GUI測試工具的設計方向大致是朝測試電腦應用程式的方向來進行設計,而非朝向手持裝置或是手持裝置的應用程式來進行設計。因此,這些常見的自動化GUI測試工具並無法適用於具有異質特性(heterogeneous nature)的手持裝置。The tools for automated graphical user interface (GUI) testing are designed to minimize the manpower required by testers to test the GUI. However, today's common automated GUI test tools are designed in the direction of testing computer applications, rather than being designed for handheld or handheld applications. Therefore, these common automated GUI testing tools are not suitable for handheld devices with heterogeneous nature.

然而,即便已有設計者針對不同的手持裝置設計對應的測試機制及測試程式碼,但此方式的效率較低,且尤其不適合用於測試黑盒子(black application)應用程式。此外,這些機制通常亦不是針對圖形使用者介面而設計的。並且,這些機制通常只能在開發中階段(development build)使用,而不能在產品階段 (development build)使用(亦即,無法應用在真實的手持裝置上)。在此情況下,即便手持裝置的功能性測試結果為正常,亦不能保證手持裝置的GUI能夠正常運作。However, even if a designer has designed a corresponding test mechanism and test code for different handheld devices, this method is less efficient and is particularly unsuitable for testing black application applications. In addition, these mechanisms are generally not designed for graphical user interfaces. And, these mechanisms can usually only be used in the development build, not in the product phase. (development build) use (ie, cannot be applied to real handheld devices). In this case, even if the functional test result of the handheld device is normal, there is no guarantee that the GUI of the handheld device can operate normally.

有鑑於此,本發明提供一種圖形使用者介面測試方法及測試裝置,其可高效率地測試各式各樣的手持裝置。In view of this, the present invention provides a graphical user interface test method and test apparatus that can efficiently test a wide variety of handheld devices.

本發明提供一種圖形使用者介面測試方法,適於測試裝置測試電子裝置,所述方法包括下列步驟:控制攝影裝置擷取電子裝置反應於多個第一指令而顯示的多個第一畫面,並記錄所述多個第一指令至儲存單元,其中,當所述多個第一畫面中的第i個第一畫面與第i-1個第一畫面之間的差異度大於第一門限值時,設置對應於所述第i個第一畫面的查核點;對電子裝置輸入相同於所述多個第一指令的多個第二指令;控制攝影裝置擷取電子裝置反應於所述多個第二指令而顯示的多個第二畫面;當所述多個第二畫面中的當前畫面對應於查核點時,計算當前畫面與所述第i個第一畫面之間的相似度;當相似度低於第二門限值時,停止測試電子裝置,並回報測試錯誤結果。The present invention provides a graphical user interface test method suitable for testing device testing electronic devices, the method comprising the steps of: controlling a photographing device to capture a plurality of first images displayed by the electronic device in response to the plurality of first instructions, and Recording the plurality of first instructions to the storage unit, wherein a difference degree between the ith first picture and the i-1th first picture in the plurality of first pictures is greater than a first threshold And setting a check point corresponding to the ith first picture; inputting a plurality of second instructions that are the same as the plurality of first instructions to the electronic device; and controlling the photographic device to capture the electronic device to react to the plurality of a plurality of second pictures displayed by the second instruction; when the current picture of the plurality of second pictures corresponds to the check point, calculating a similarity between the current picture and the ith first picture; When the degree is lower than the second threshold, the test electronics is stopped and the test error result is reported.

在本發明之一實施例中,所述多個第一指令為由測試裝置輸入至電子裝置的多個腳本語言。In an embodiment of the invention, the plurality of first instructions are a plurality of scripting languages input by the testing device to the electronic device.

在本發明之一實施例中,在控制攝影裝置擷取電子裝置反應於所述多個第一指令而顯示的所述多個第一畫面的步驟之 前,更包括控制攝影裝置擷取初始畫面,並設置對應於初始畫面的初始查核點。In an embodiment of the present invention, the step of controlling the photographing device to capture the plurality of first screens displayed by the electronic device in response to the plurality of first instructions Before, it further includes controlling the photographing device to capture the initial screen and setting an initial check point corresponding to the initial screen.

在本發明之一實施例中,在對電子裝置輸入相同於所述多個第一指令的所述多個第二指令的步驟之前,更包括控制攝影裝置擷取結束畫面,並設置對應於結束畫面的結束查核點。In an embodiment of the present invention, before the step of inputting the plurality of second instructions that are the same as the plurality of first instructions to the electronic device, the method further includes: controlling the capturing device to capture the end screen, and setting the corresponding end Check the end of the screen.

在本發明之一實施例中,查核點為所述第i個第一畫面的索引值,而所述當前畫面為具有索引值的所述多個第二畫面的其中之一。In an embodiment of the present invention, the check point is an index value of the ith first picture, and the current picture is one of the plurality of second pictures having an index value.

本發明提供一種測試裝置,包括儲存單元以及處理單元。儲存單元儲存多個模組。處理單元耦接儲存單元,存取所述多個模組以執行下列1步驟:控制攝影裝置擷取電子裝置反應於多個第一指令而顯示的多個第一畫面,並記錄所述多個第一指令至儲存單元,其中,當所述多個第一畫面中的第i個第一畫面與第i-1個第一畫面之間的差異度大於第一門限值時,設置對應於所述第i個第一畫面的查核點;對電子裝置輸入相同於所述多個第一指令的多個第二指令;控制攝影裝置擷取電子裝置反應於所述多個第二指令而顯示的多個第二畫面;當所述多個第二畫面中的當前畫面對應於查核點時,計算當前畫面與所述第i個第一畫面之間的相似度;當相似度低於第二門限值時,停止測試電子裝置,並回報測試錯誤結果。The invention provides a testing device comprising a storage unit and a processing unit. The storage unit stores a plurality of modules. The processing unit is coupled to the storage unit, and accesses the plurality of modules to perform the following steps: controlling the photographing device to capture the plurality of first screens displayed by the electronic device in response to the plurality of first instructions, and recording the plurality of a first instruction to the storage unit, wherein when the degree of difference between the ith first picture and the i-1th first picture in the plurality of first pictures is greater than the first threshold, the setting corresponds to a check point of the i-th first picture; inputting a plurality of second instructions identical to the plurality of first instructions to the electronic device; and controlling the photographing device to capture the electronic device to display in response to the plurality of second instructions a plurality of second pictures; when the current picture of the plurality of second pictures corresponds to the check point, calculating a similarity between the current picture and the ith first picture; when the similarity is lower than the second At the threshold, the test electronics is stopped and the test error results are reported.

在本發明之一實施例中,所述多個第一指令為由測試裝置輸入至電子裝置的多個腳本語言。In an embodiment of the invention, the plurality of first instructions are a plurality of scripting languages input by the testing device to the electronic device.

在本發明之一實施例中,處理單元更控制攝影裝置擷取初始畫面,並設置對應於初始畫面的初始查核點。In an embodiment of the invention, the processing unit further controls the photographing device to capture the initial screen and set an initial checkpoint corresponding to the initial screen.

在本發明之一實施例中,處理單元更控制攝影裝置擷取結束畫面,並設置對應於結束畫面的結束查核點。In an embodiment of the present invention, the processing unit further controls the photographing device to capture the end screen and sets an end check point corresponding to the end screen.

在本發明之一實施例中,查核點為所述第i個第一畫面的索引值,而所述當前畫面為具有索引值的所述多個第二畫面的其中之一。In an embodiment of the present invention, the check point is an index value of the ith first picture, and the current picture is one of the plurality of second pictures having an index value.

基於上述,本發明實施例提出的圖形使用者介面測試方法及其系統可透過攝影裝置擷取電子裝置反應於兩個相同指令(例如是第一指令及相同於第一指令的第二指令)所顯示的兩個畫面(例如是第一畫面及第二畫面),並依據所述兩個畫面之間的相似度來判斷電子裝置的圖形使用者介面是否出現異常。Based on the above, the graphical user interface test method and system thereof according to the embodiments of the present invention can capture electronic devices through two photographic devices (for example, a first instruction and a second instruction identical to the first instruction) through the photographic device. The displayed two screens (for example, the first screen and the second screen) determine whether an abnormality occurs in the graphical user interface of the electronic device according to the similarity between the two images.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。The above described features and advantages of the invention will be apparent from the following description.

100‧‧‧圖形使用者介面測試系統100‧‧‧Graphic User Interface Test System

110‧‧‧測試裝置110‧‧‧Testing device

112‧‧‧儲存單元112‧‧‧storage unit

114‧‧‧處理單元114‧‧‧Processing unit

120‧‧‧攝影裝置120‧‧‧Photographing device

130‧‧‧電子裝置130‧‧‧Electronic devices

S210~S250、S310~S370‧‧‧步驟S210~S250, S310~S370‧‧‧ steps

圖1是依據本發明之一實施例繪示的圖形使用者介面測試系統的示意圖。1 is a schematic diagram of a graphical user interface test system in accordance with an embodiment of the present invention.

圖2是依據本發明之一實施例繪示的圖形使用者介面測試方法流程圖。2 is a flow chart of a graphical user interface test method according to an embodiment of the invention.

圖3A是依據本發明之一實施例繪示的圖形使用者介面測試 方法的記錄階段流程圖。FIG. 3A is a graphical user interface test according to an embodiment of the invention. The recording phase of the method flow chart.

圖3B是依據本發明之一實施例繪示的圖形使用者介面測試方法的重播階段流程圖。FIG. 3B is a flowchart of a replay phase of a graphical user interface test method according to an embodiment of the invention.

圖1是依據本發明之一實施例繪示的圖形使用者介面測試系統的示意圖。在本實施例中,圖形使用者介面測試系統100包括測試裝置110以及攝影裝置120。測試裝置110例如是個人電腦、筆記型電腦、工作站、伺服器或是其他的電腦裝置,但本發明的可實施方式不限於此。測試裝置110包括儲存單元112以及處理單元114。儲存單元112例如是記憶體、硬碟或是其他任何可用於儲存資料的元件,而可用以記錄多個程式碼或模組。處理單元114連接儲存單元112。處理單元114可為一般用途處理器、特殊用途處理器、傳統的處理器、數位訊號處理器、多個微處理器(microprocessor)、一個或多個結合數位訊號處理器核心的微處理器、控制器、微控制器、特殊應用集成電路(Application Specific Integrated Circuit,ASIC)、場可程式閘陣列電路(Field Programmable Gate Array,FPGA)、任何其他種類的積體電路、狀態機、基於進階精簡指令集機器(Advanced RISC Machine,ARM)的處理器以及類似品。1 is a schematic diagram of a graphical user interface test system in accordance with an embodiment of the present invention. In the present embodiment, the graphical user interface test system 100 includes a test device 110 and a photographing device 120. The test device 110 is, for example, a personal computer, a notebook computer, a workstation, a server, or other computer device, but the embodiments of the present invention are not limited thereto. The test device 110 includes a storage unit 112 and a processing unit 114. The storage unit 112 is, for example, a memory, a hard disk, or any other component that can be used to store data, and can be used to record a plurality of code or modules. The processing unit 114 is connected to the storage unit 112. The processing unit 114 can be a general purpose processor, a special purpose processor, a conventional processor, a digital signal processor, a plurality of microprocessors, one or more microprocessors combined with a digital signal processor core, and a control , Microcontroller, Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA), any other kind of integrated circuit, state machine, based on advanced reduced instructions Advanced RISC Machine (ARM) processors and similar products.

攝影裝置120例如是以電荷耦合元件(Charge Coupled Device,CCD)及/或互補金氧半導體(Complementary Metal Oxide Semiconductor,CMOS)實現的影像擷取元件。在本實施例中,攝影裝置120可以是透過通用序列匯流排(Universal Serial Bus,USB)介面連接至測試裝置110的攝影機。並且,攝影裝置120可受控於測試裝置110而對電子裝置130拍攝畫面。The photographing device 120 is, for example, a Charge Coupled Device (CCD) and/or a Complementary Metal Oxide (Complementary Metal Oxide). Image capture components implemented by Semiconductor, CMOS). In this embodiment, the photographing device 120 may be a camera connected to the test device 110 through a Universal Serial Bus (USB) interface. Also, the photographing device 120 can be controlled by the test device 110 to take a picture of the electronic device 130.

電子裝置130例如是智慧型手機、平板電腦、個人數位助理(Personal Digital Assistant,PDA)、或是其他具有可顯示圖形使用者介面的螢幕的裝置,但本發明的可實施方式不限於此。電子裝置130亦可透過例如USB介面與測試裝置110連接。The electronic device 130 is, for example, a smart phone, a tablet computer, a personal digital assistant (PDA), or other device having a screen capable of displaying a graphical user interface, but embodiments of the present invention are not limited thereto. The electronic device 130 can also be connected to the testing device 110 via, for example, a USB interface.

在本實施例中,處理單元114可存取儲存單元112所儲存的多個模組以執行下圖2所提出的圖形使用者介面(Graphic User Interface,GUI)測試方法的各個步驟,進而測試電子裝置130的GUI。概略而言,在本實施例的方法中,測試裝置110可先控制攝影裝置120擷取電子裝置130反應於多個指令而顯示的多個第一畫面。接著,當測試裝置110對電子裝置130再次輸入所述多個指令時,測試裝置110可藉由判斷電子裝置130所顯示的當前畫面是否一致於對應於此當前畫面的第一畫面來判斷電子裝置130的GUI功能是否正常。In this embodiment, the processing unit 114 can access multiple modules stored in the storage unit 112 to perform various steps of the graphical user interface (GUI) test method proposed in FIG. 2, and then test the electronic The GUI of device 130. In summary, in the method of the embodiment, the testing device 110 may first control the photographing device 120 to capture a plurality of first screens displayed by the electronic device 130 in response to a plurality of commands. Then, when the test device 110 inputs the plurality of instructions to the electronic device 130 again, the test device 110 can determine the electronic device by determining whether the current screen displayed by the electronic device 130 is consistent with the first screen corresponding to the current screen. Is the GUI function of 130 normal?

圖2是依據本發明之一實施例繪示的圖形使用者介面測試方法流程圖。本實施例提出的方法可由圖1的圖形使用者介面測試系統100,以下即搭配圖1所示的各個裝置來說明本方法的各個步驟細節。2 is a flow chart of a graphical user interface test method according to an embodiment of the invention. The method proposed in this embodiment can be illustrated by the graphical user interface test system 100 of FIG. 1, and the following is a description of the various steps of the method.

在步驟S210中,處理單元114可控制攝影裝置120擷取 電子裝置130反應於多個第一指令而顯示的多個第一畫面,並記錄所述多個第一指令至儲存單元112。在一實施例中,所述多個第一指令例如是由使用者對電子裝置130所輸入的指令(例如是滑動操作或是點擊操作等)。In step S210, the processing unit 114 can control the photographing device 120 to capture The electronic device 130 reflects the plurality of first pictures displayed by the plurality of first instructions, and records the plurality of first instructions to the storage unit 112. In an embodiment, the plurality of first instructions are, for example, instructions input by the user to the electronic device 130 (eg, a sliding operation or a click operation, etc.).

在其他實施例中,所述多個第一指令亦可以是由測試裝置110輸入至電子裝置的多個腳本語言(script)。詳細而言,為了讓攝影裝置120能夠清楚地擷取電子裝置130的GUI所顯示的所述多個第一畫面,測試裝置110可模擬使用者輸入的指令(例如滑動操作)而產生對應的腳本語言。因此,當測試裝置110將這些腳本語言輸入至電子裝置130時,電子裝置130仍可如同接收到使用者輸入的指令一般地顯示所述多個第一畫面。如此一來,攝影裝置120所擷取到的多個第一畫面即不會被使用者的手或是觸控筆等物體干擾。In other embodiments, the plurality of first instructions may also be a plurality of scripts input by the testing device 110 to the electronic device. In detail, in order for the photographing device 120 to clearly capture the plurality of first screens displayed by the GUI of the electronic device 130, the testing device 110 may simulate an instruction input by the user (eg, a sliding operation) to generate a corresponding script. Language. Therefore, when the test device 110 inputs these scripting languages to the electronic device 130, the electronic device 130 can still generally display the plurality of first pictures as received by the user. In this way, the plurality of first images captured by the photographing device 120 are not interfered by the user's hand or an object such as a stylus.

在本實施例中,在攝影裝置120擷取所述多個第一畫面的過程中,處理單元114可計算連續兩個第一畫面之間的差異度。舉例而言,當攝影裝置120擷取到第i個第一畫面(i為任意整數值)時,處理單元114可計算第i個第一畫面與第i-1個第一畫面之間的差異度。In the present embodiment, in the process of capturing the plurality of first pictures by the photographing device 120, the processing unit 114 may calculate the degree of difference between the two consecutive first pictures. For example, when the photographing device 120 captures the i-th first screen (i is an arbitrary integer value), the processing unit 114 may calculate the difference between the i-th first screen and the i-th first screen. degree.

在一實施例中,處理單元114可基於加速強健特徵擷取(Speeded Up Robust Features,SURF)演算法來計算所述差異度。具體而言,處理單元114可先計算第i個第一畫面與第i-1個第一畫面之間的第一相似度。所述相似度可表徵為(100×α)/β,其中 α代表第i個第一畫面與第i-1個第一畫面之間匹配的特徵(feature)數量,而β則代表在第i個第一畫面與第i-1個第一畫面上所偵測到的平均特徵數量。在得到所述第一相似度之後,處理單元114可藉由1-(100×α)/β來計算所述差異度。當第i個第一畫面與第i-1個第一畫面之間的差異度大於第一門限值(例如80%)時,處理單元114可設置對應於第i個第一畫面的查核點(checkpoint)。換言之,當處理單元114判斷電子裝置130的畫面出現較大幅度的改變時,處理單元114可對應地設置查核點。在其他實施例中,所述查核點可表徵為第i個第一畫面的索引值(亦即,i),但本發明的可實施方式不限於此。In an embodiment, processing unit 114 may calculate the degree of difference based on a Speeded Up Robust Features (SURF) algorithm. Specifically, the processing unit 114 may first calculate a first similarity between the i-th first picture and the i-1th first picture. The similarity can be characterized as (100 x α) / β, wherein α represents the number of features matched between the i-th first picture and the i-1th first picture, and β represents the detection on the i-th first picture and the i-th first picture The average number of features measured. After the first similarity is obtained, the processing unit 114 may calculate the degree of difference by 1-(100×α)/β. When the degree of difference between the ith first picture and the i-1th first picture is greater than the first threshold (eg, 80%), the processing unit 114 may set a check point corresponding to the ith first picture. (checkpoint). In other words, when the processing unit 114 determines that a significant change in the picture of the electronic device 130 occurs, the processing unit 114 may correspondingly set the check point. In other embodiments, the checkpoint may be characterized as an index value of the i-th first picture (ie, i), but embodiments of the present invention are not limited thereto.

在其他實施例中,在步驟S220之後,使用者可將電子裝置130的GUI回復至處理單元114執行步驟S210之前的運作狀態。或者,處理單元114亦可在執行步驟S210之前記錄電子裝置130當下的運作狀態,並且在執行完步驟S210之後將電子裝置130的GUI回復至處理單元114執行步驟S210之前的運作狀態,但本發明的可實施方式不限於此。In other embodiments, after step S220, the user can return the GUI of the electronic device 130 to the operating state before the processing unit 114 performs the step S210. Alternatively, the processing unit 114 may also record the current operating state of the electronic device 130 before performing step S210, and return the GUI of the electronic device 130 to the operating state before the step S210 is performed after the step S210 is performed, but the present invention The implementation manner is not limited to this.

之後,在步驟S220中,處理單元114可對電子裝置130輸入相同於所述多個第一指令的多個第二指令。並且,在步驟S230中,處理單元114可控制攝影裝置120擷取電子裝置130反應於所述多個第二指令而顯示的多個第二畫面。Thereafter, in step S220, the processing unit 114 may input a plurality of second instructions identical to the plurality of first instructions to the electronic device 130. Moreover, in step S230, the processing unit 114 can control the photographing device 120 to capture a plurality of second screens that the electronic device 130 displays in response to the plurality of second instructions.

在步驟S240中,當所述多個第二畫面中的當前畫面對應於查核點時,處理單元114可計算當前畫面與所述第i個第一畫面 之間的相似度。在一實施例中,所述當前畫面例如是在處理單元114開始對電子裝置130輸入所述多個第二指令之後,攝影裝置120所擷取到的第i個第二畫面。換言之,所述當前畫面可視為是與所述第i個第一畫面具有相同索引值(即,i)的第二畫面。In step S240, when the current picture in the plurality of second pictures corresponds to the check point, the processing unit 114 may calculate the current picture and the ith first picture. The similarity between the two. In an embodiment, the current screen is, for example, an i-th second screen captured by the photographing device 120 after the processing unit 114 starts inputting the plurality of second commands to the electronic device 130. In other words, the current picture can be regarded as a second picture having the same index value (ie, i) as the i-th first picture.

在一實施例中,處理單元114亦可基於前述的SURF演算法來計算當前畫面與所述第i個第一畫面之間的相似度,但本發明的可實施方式不限於此。In an embodiment, the processing unit 114 may also calculate the similarity between the current picture and the ith first picture based on the foregoing SURF algorithm, but the embodiments of the present invention are not limited thereto.

在步驟S250中,當相似度低於第二門限值(例如是80%)時,處理單元114停止測試電子裝置130,並回報測試錯誤結果。所述測試錯誤結果例如可代表電子裝置130的GUI已出現異常的情形。詳細而言,由於處理單元114輸入至電子裝置130的所述多個第二指令相同於所述多個第一指令,因此電子裝置130所顯示的多個第二畫面應當相同於所述多個第二畫面。換言之,當所述當前畫面與所述第i個第一畫面之間的相似度過低時,即代表電子裝置130的GUI已出現異常,因此處理單元113可不再接續輸入剩餘的第二指令至電子裝置130而直接回報測試錯誤結果。在一實施例中,處理單元114可控制測試裝置110的使用者介面單元(未繪示)顯示關聯於所述測試錯誤結果的資訊,但本發明的可實施方式不限於此。In step S250, when the similarity is lower than the second threshold (for example, 80%), the processing unit 114 stops the test electronic device 130 and reports the test error result. The test error result may, for example, represent a situation in which the GUI of the electronic device 130 has abnormality. In detail, since the plurality of second instructions input by the processing unit 114 to the electronic device 130 are the same as the plurality of first instructions, the plurality of second pictures displayed by the electronic device 130 should be the same as the plurality of The second picture. In other words, when the similarity between the current picture and the ith first picture is too low, that is, the GUI representing the electronic device 130 has an abnormality, the processing unit 113 may not continuously input the remaining second instruction to The electronic device 130 directly reports the test error result. In an embodiment, the processing unit 114 can control the user interface unit (not shown) of the testing device 110 to display information related to the test error result, but the embodiments of the present invention are not limited thereto.

在其他實施例中,若所有的第二畫面與對應的第一畫面之間的相似度皆未低於第二門限值時,處理單元114可回報測試成功結果。在一實施例中,處理單元114可控制測試裝置110的 使用者介面單元(未繪示)顯示關聯於所述測試成功結果的資訊,但本發明的可實施方式不限於此。In other embodiments, if the similarity between all the second pictures and the corresponding first picture is not lower than the second threshold, the processing unit 114 may report the test success result. In an embodiment, the processing unit 114 can control the testing device 110 The user interface unit (not shown) displays information associated with the successful result of the test, but embodiments of the present invention are not limited thereto.

概略而言,本發明實施例提出的方法可視為包括一記錄階段(record phase)以及一重播階段(replay phase)。在所述記錄階段(即,步驟S210)中,測試裝置110可記錄電子裝置130反應於多個第一指令而顯示的多個第一畫面,並且在特定的時機設置查核點。接著,在所述重播階段(即,步驟S220~S250)中,測試裝置114可再次對電子裝置130輸入相同於所述多個第一指令的多個第二指令,並觀察電子裝置130反應於所述多個第二指令所顯示的多個第二畫面是否一致於所述多個第一畫面。此外,由於測試裝置110可只比較對應至同一個查核點的第一畫面以及第二畫面,而不需逐一比對所有的第一及第二畫面,因而可使得整體圖形化介面測試機制的效率有效地提高。In summary, the method proposed by the embodiment of the present invention can be regarded as including a record phase and a replay phase. In the recording phase (ie, step S210), the testing device 110 may record a plurality of first screens displayed by the electronic device 130 in response to the plurality of first instructions, and set a checkpoint at a specific timing. Then, in the replay phase (ie, steps S220-S250), the testing device 114 may input a plurality of second instructions identical to the plurality of first instructions to the electronic device 130 again, and observe that the electronic device 130 reacts Whether the plurality of second pictures displayed by the plurality of second instructions are consistent with the plurality of first pictures. In addition, since the test apparatus 110 can compare only the first picture and the second picture corresponding to the same check point without comparing all the first and second pictures one by one, the efficiency of the overall graphical interface test mechanism can be made. Effectively improve.

並且,由於本發明實施例是透過電子裝置130外部的攝影裝置114來記錄電子裝置130所顯示的各個畫面,因而不會對電子裝置130產生額外的負載。此外,由於本發明實施例是透過攝影裝置120來擷取電子裝置130所顯示的各個畫面,因而具有高度的重複使用性(reusability)。換言之,本發明實施例提出的方法可用於測試各種具有圖形使用者介面的電子裝置。Moreover, since the embodiment of the present invention records the respective screens displayed by the electronic device 130 through the photographing device 114 outside the electronic device 130, no additional load is generated on the electronic device 130. In addition, since the embodiment of the present invention captures each screen displayed by the electronic device 130 through the photographing device 120, it has a high degree of reusability. In other words, the method proposed by the embodiment of the present invention can be used to test various electronic devices having a graphical user interface.

值得注意的是,雖然圖1將測試裝置110以及攝影裝置120是繪示為兩個裝置,但在其他實施例中,設計者亦可藉由測試裝置110內建的取像單元(例如鏡頭)來實現本發明實施例中所 提及的各種關聯於攝影裝置120的技術方案。It should be noted that although FIG. 1 shows the test device 110 and the photographing device 120 as two devices, in other embodiments, the designer may also use an image capturing unit (such as a lens) built in the test device 110. To implement the embodiment of the present invention The various technical solutions associated with the photographic device 120 are mentioned.

圖3A是依據本發明之一實施例繪示的圖形使用者介面測試方法的記錄階段流程圖。本實施例提出的方法可由圖1的圖形使用者介面測試系統100,以下即搭配圖1所示的各個裝置來說明本方法的各個步驟細節。FIG. 3A is a flow chart of a recording phase of a graphical user interface test method according to an embodiment of the invention. The method proposed in this embodiment can be illustrated by the graphical user interface test system 100 of FIG. 1, and the following is a description of the various steps of the method.

在步驟S310中,處理單元114可控制攝影裝置120擷取初始畫面,並設置對應於初始畫面的初始查核點。在步驟S320中,處理單元114可控制攝影裝置120擷取電子裝置130反應於多個第一指令而顯示的多個第一畫面,並記錄所述多個第一指令至儲存單元112。步驟S320的細節可參照圖2的步驟S210,在此不再贅述。在步驟S330中,處理單元114可控制攝影裝置120擷取結束畫面,並設置對應於結束畫面的結束查核點。In step S310, the processing unit 114 may control the photographing device 120 to capture the initial screen and set an initial check point corresponding to the initial screen. In step S320, the processing unit 114 may control the photographing device 120 to capture a plurality of first screens displayed by the electronic device 130 in response to the plurality of first instructions, and record the plurality of first instructions to the storage unit 112. For details of step S320, refer to step S210 of FIG. 2, and details are not described herein again. In step S330, the processing unit 114 may control the photographing device 120 to capture the end screen and set an end check point corresponding to the end screen.

在步驟S330之後,使用者可將電子裝置130的GUI回復至處理單元114執行步驟S310之前的運作狀態。或者,處理單元114亦可在執行步驟S310之前記錄電子裝置130當下的運作狀態,並且在執行完步驟S330之後將電子裝置130的GUI回復至處理單元114執行步驟S310之前的運作狀態,但本發明的可實施方式不限於此。接著,測試裝置110可接續執行下圖3所示的各個步驟。After step S330, the user can return the GUI of the electronic device 130 to the operating state before the processing unit 114 performs step S310. Alternatively, the processing unit 114 may also record the current operating state of the electronic device 130 before performing step S310, and return the GUI of the electronic device 130 to the operating state before the step S310 is performed after the step S330 is performed, but the present invention The implementation manner is not limited to this. Next, the testing device 110 can continue to perform the various steps shown in FIG. 3 below.

請參照圖3B,圖3B是依據本發明之一實施例繪示的圖形使用者介面測試方法的重播階段流程圖。在步驟S340中,當電子裝置130目前顯示的畫面相同於初始畫面時,處理單元114可 對電子裝置130輸入相同於所述多個第一指令的多個第二指令。換言之,在處理單元114對電子裝置130輸入所述多個第二指令之前,處理單元114可先判斷電子裝置130目前顯示的畫面與步驟S310所記錄的初始畫面是否一致。若是,則處理單元114可接續對電子裝置130輸入所述多個第二指令。若電子裝置130目前顯示的畫面與所述初始畫面不一致,則處理單元114可判定電子裝置130的GUI並未回復至處理單元114執行步驟S310之前的運作狀態,進而回報測試錯誤結果。Please refer to FIG. 3B. FIG. 3B is a flowchart of a replay phase of a graphical user interface test method according to an embodiment of the invention. In step S340, when the screen currently displayed by the electronic device 130 is the same as the initial screen, the processing unit 114 may A plurality of second instructions identical to the plurality of first instructions are input to the electronic device 130. In other words, before the processing unit 114 inputs the plurality of second instructions to the electronic device 130, the processing unit 114 may first determine whether the screen currently displayed by the electronic device 130 is consistent with the initial screen recorded in step S310. If so, the processing unit 114 can continue to input the plurality of second instructions to the electronic device 130. If the currently displayed screen of the electronic device 130 does not match the initial screen, the processing unit 114 may determine that the GUI of the electronic device 130 does not return to the operating state before the processing unit 114 performs step S310, thereby reporting the test error result.

接著,在步驟S350中,處理單元114可控制攝影裝置120擷取電子裝置130反應於所述多個第二指令而顯示的多個第二畫面。在步驟S360中,當所述多個第二畫面中的當前畫面對應於查核點時,處理單元114可計算當前畫面與所述第i個第一畫面之間的相似度。在步驟S370中,當相似度低於第二門限值時,處理單元114可停止測試電子裝置130,並回報測試錯誤結果。Next, in step S350, the processing unit 114 can control the photographing device 120 to capture a plurality of second screens that the electronic device 130 displays in response to the plurality of second instructions. In step S360, when the current picture of the plurality of second pictures corresponds to the check point, the processing unit 114 may calculate the similarity between the current picture and the ith first picture. In step S370, when the similarity is lower than the second threshold, the processing unit 114 may stop testing the electronic device 130 and report the test error result.

在其他實施例中,若所有的第二畫面與對應的第一畫面之間的相似度皆未低於第二門限值時,處理單元114可更判斷電子裝置130目前顯示的畫面與步驟S330中所擷取結束畫面是否一致。若是,則處理單元114可回報測試成功結果。In other embodiments, if the similarity between all the second pictures and the corresponding first picture is not lower than the second threshold, the processing unit 114 may further determine the picture currently displayed by the electronic device 130 and step S330. Whether the end screen captured in the middle is consistent. If so, processing unit 114 can report the test success.

綜上所述,本發明實施例提出的圖形使用者介面測試方法及其系統可透過攝影裝置擷取電子裝置反應於兩個相同指令(例如是第一指令及相同於第一指令的第二指令)所顯示的兩個畫面(例如是第一畫面及第二畫面),並依據所述兩個畫面之間的 相似度來判斷電子裝置的圖形使用者介面是否出現異常。此外,由於測試裝置可只比較對應至同一個查核點的第一畫面以及第二畫面,而不需逐一比對所有的第一及第二畫面,因而可使得整體圖形化介面測試機制的效率有效地提高。由於本發明實施例是透過攝影裝置來擷取電子裝置所顯示的各個畫面,因而具有高度的重複使用性,進而可用於測試各種具有圖形使用者介面的電子裝置。In summary, the graphical user interface test method and system thereof according to the embodiments of the present invention can capture electronic devices through two photographic devices (for example, a first instruction and a second instruction identical to the first instruction). The two screens displayed (for example, the first screen and the second screen), and according to the two screens The similarity is used to determine whether an abnormality occurs in the graphical user interface of the electronic device. In addition, since the test device can compare only the first picture and the second picture corresponding to the same check point without comparing all the first and second pictures one by one, the efficiency of the overall graphical interface test mechanism can be effectively Improve the ground. Since the embodiment of the present invention captures each picture displayed by the electronic device through the photographing device, it has high reusability and can be used to test various electronic devices having a graphical user interface.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention, and any one of ordinary skill in the art can make some changes and refinements without departing from the spirit and scope of the present invention. The scope of the invention is defined by the scope of the appended claims.

S210~S250‧‧‧步驟S210~S250‧‧‧Steps

Claims (10)

一種圖形使用者介面測試方法,適於一測試裝置測試一電子裝置,所述方法包括下列步驟:控制一攝影裝置擷取該電子裝置反應於多個第一指令而顯示的多個第一畫面,並記錄該些第一指令至一儲存單元,其中,當該些第一畫面中的第i個第一畫面與第i-1個第一畫面之間的一差異度大於一第一門限值時,設置對應於所述第i個第一畫面的一查核點;對該電子裝置輸入相同於該些第一指令的多個第二指令;控制該攝影裝置擷取該電子裝置反應於該些第二指令而顯示的多個第二畫面;當該些第二畫面中的一當前畫面對應於該查核點時,計算該當前畫面與所述第i個第一畫面之間的一相似度;以及當該相似度低於一第二門限值時,停止測試該電子裝置,並回報一測試錯誤結果。A graphical user interface test method, which is suitable for testing a electronic device by a test device, the method comprising the steps of: controlling a camera device to capture a plurality of first images displayed by the electronic device in response to a plurality of first commands, Recording the first instructions to a storage unit, wherein a difference between the ith first picture and the i-1th first picture in the first pictures is greater than a first threshold And setting a check point corresponding to the ith first picture; inputting a plurality of second instructions that are the same as the first instructions to the electronic device; and controlling the photographic device to capture the electronic device to react to the a plurality of second pictures displayed by the second instruction; when a current picture of the second pictures corresponds to the check point, calculating a similarity between the current picture and the ith first picture; And when the similarity is lower than a second threshold, stopping testing the electronic device and reporting a test error result. 如申請專利範圍第1項所述的方法,其中該些第一指令為由該測試裝置輸入至該電子裝置的多個腳本語言。The method of claim 1, wherein the first instructions are a plurality of scripting languages input by the testing device to the electronic device. 如申請專利範圍第1項所述的方法,其中在控制該攝影裝置擷取該電子裝置反應於該些第一指令而顯示的該些第一畫面的步驟之前,更包括:控制該攝影裝置擷取一初始畫面,並設置對應於該初始畫面的一初始查核點。The method of claim 1, wherein before the step of controlling the photographing device to capture the first screens displayed by the electronic device in response to the first instructions, the method further comprises: controlling the photographing device. An initial picture is taken and an initial check point corresponding to the initial picture is set. 如申請專利範圍第3項所述的方法,其中在對該電子裝置輸入相同於該些第一指令的該些第二指令的步驟之前,更包括:控制該攝影裝置擷取一結束畫面,並設置對應於該結束畫面的一結束查核點。The method of claim 3, wherein before the step of inputting the second instructions that are the same as the first instructions to the electronic device, the method further comprises: controlling the camera to capture an end screen, and An end check point corresponding to the end screen is set. 如申請專利範圍第1項所述的方法,其中該查核點為所述第i個第一畫面的一索引值,而所述當前畫面為具有該索引值的該些第二畫面的其中之一。The method of claim 1, wherein the checkpoint is an index value of the i-th first picture, and the current picture is one of the second pictures having the index value. . 一種測試裝置,包括一儲存單元,儲存多個模組;以及一處理單元,耦接該儲存單元,存取該些模組以執行下列步驟:控制一攝影裝置擷取一電子裝置反應於多個第一指令而顯示的多個第一畫面,並記錄該些第一指令至一儲存單元,其中,當該些第一畫面中的第i個第一畫面與第i-1個第一畫面之間的一差異度大於一第一門限值時,設置對應於所述第i個第一畫面的一查核點;對該電子裝置輸入相同於該些第一指令的多個第二指令;控制該攝影裝置擷取該電子裝置反應於該些第二指令而顯示的多個第二畫面;當該些第二畫面中的一當前畫面對應於該查核點時,計算該當前畫面與所述第i個第一畫面之間的一相似度;以及 當該相似度低於一第二門限值時,停止測試該電子裝置,並回報一測試錯誤結果。A testing device includes a storage unit for storing a plurality of modules; and a processing unit coupled to the storage unit to access the modules to perform the following steps: controlling a camera device to capture an electronic device to react to multiple a plurality of first pictures displayed by the first instruction, and recording the first instructions to a storage unit, wherein, when the ith first picture and the i-1th first picture in the first pictures are When a difference degree is greater than a first threshold value, setting a check point corresponding to the ith first picture; inputting a plurality of second instructions identical to the first instructions to the electronic device; and controlling The photographing device captures a plurality of second screens displayed by the electronic device in response to the second commands; and when a current screen of the second screens corresponds to the checkpoint, calculating the current screen and the first a similarity between i first pictures; When the similarity is lower than a second threshold, the electronic device is stopped from being tested and a test error result is reported. 如申請專利範圍第6項所述的測試裝置,其中該些第一指令為由該測試裝置輸入至該電子裝置的多個腳本語言。The test device of claim 6, wherein the first instructions are a plurality of script languages input by the test device to the electronic device. 如申請專利範圍第6項所述的測試裝置,其中該處理單元更控制該攝影裝置擷取一初始畫面,並設置對應於該初始畫面的一初始查核點。The test apparatus of claim 6, wherein the processing unit further controls the photographing apparatus to capture an initial screen and set an initial check point corresponding to the initial screen. 如申請專利範圍第8項所述的測試裝置,其中該處理單元更控制該攝影裝置擷取一結束畫面,並設置對應於該結束畫面的一結束查核點。The test device of claim 8, wherein the processing unit further controls the photographing device to capture an end screen and set an end check point corresponding to the end screen. 如申請專利範圍第6項所述的測試裝置,其中該查核點為所述第i個第一畫面的一索引值,而所述當前畫面為具有該索引值的該些第二畫面的其中之一。The test apparatus of claim 6, wherein the check point is an index value of the ith first picture, and the current picture is one of the second pictures having the index value. One.
TW102144217A 2013-12-03 2013-12-03 Graphic user interface testing method and testing apparatus TWI512594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW102144217A TWI512594B (en) 2013-12-03 2013-12-03 Graphic user interface testing method and testing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW102144217A TWI512594B (en) 2013-12-03 2013-12-03 Graphic user interface testing method and testing apparatus

Publications (2)

Publication Number Publication Date
TW201523415A TW201523415A (en) 2015-06-16
TWI512594B true TWI512594B (en) 2015-12-11

Family

ID=53935690

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102144217A TWI512594B (en) 2013-12-03 2013-12-03 Graphic user interface testing method and testing apparatus

Country Status (1)

Country Link
TW (1) TWI512594B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6587543B1 (en) * 2000-08-21 2003-07-01 Sprint Communications Company L.P. System and method for the automated testing of a telecommunications system
US20040078692A1 (en) * 2002-03-05 2004-04-22 Jackson Walter A. Test configuration method and system
US6819586B1 (en) * 2003-10-24 2004-11-16 Hewlett-Packard Development Company, L.P. Thermally-assisted magnetic memory structures
TWI295012B (en) * 2005-12-08 2008-03-21 Via Tech Inc Auto testing method and system
US7398469B2 (en) * 2004-03-12 2008-07-08 United Parcel Of America, Inc. Automated test system for testing an application running in a windows-based environment and related methods
TWI344617B (en) * 2007-09-07 2011-07-01 Inventec Corp System and method for testing default configuration folder
TWI373711B (en) * 2008-10-09 2012-10-01 Primax Electronics Ltd Method for testing controls of application software automatically

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6587543B1 (en) * 2000-08-21 2003-07-01 Sprint Communications Company L.P. System and method for the automated testing of a telecommunications system
US20040078692A1 (en) * 2002-03-05 2004-04-22 Jackson Walter A. Test configuration method and system
US6819586B1 (en) * 2003-10-24 2004-11-16 Hewlett-Packard Development Company, L.P. Thermally-assisted magnetic memory structures
US7398469B2 (en) * 2004-03-12 2008-07-08 United Parcel Of America, Inc. Automated test system for testing an application running in a windows-based environment and related methods
TWI295012B (en) * 2005-12-08 2008-03-21 Via Tech Inc Auto testing method and system
TWI344617B (en) * 2007-09-07 2011-07-01 Inventec Corp System and method for testing default configuration folder
TWI373711B (en) * 2008-10-09 2012-10-01 Primax Electronics Ltd Method for testing controls of application software automatically

Also Published As

Publication number Publication date
TW201523415A (en) 2015-06-16

Similar Documents

Publication Publication Date Title
TWI510913B (en) Testing device and testing method thereof
JP6868119B2 (en) Holographic anti-counterfeit code inspection method and equipment
WO2019019628A1 (en) Test method, apparatus, test device and medium for mobile application
CN107909569B (en) Screen-patterned detection method, screen-patterned detection device and electronic equipment
CN109951635B (en) Photographing processing method and device, mobile terminal and storage medium
CN112258507B (en) Target object detection method and device of internet data center and electronic equipment
CN104115097A (en) Automated perceptual quality assessment of touch screen devices
WO2022095359A1 (en) Anti-screen-capturing-based information security protection method and apparatus, electronic device and medium
CN112559341A (en) Picture testing method, device, equipment and storage medium
CN111324352A (en) Code generation method of application page and related equipment
CN114996103A (en) Page abnormity detection method and device, electronic equipment and storage medium
WO2018205392A1 (en) Control response area display control method, electronic apparatus, and storage medium
US9298312B2 (en) Automated perceptual quality assessment of touchscreen devices
CN110648314B (en) Method, device and equipment for identifying flip image
TWI512594B (en) Graphic user interface testing method and testing apparatus
TWI519166B (en) A video recording system, device and the method of the data accessing
CN112051270B (en) Power transmission line defect detection method, system, equipment and medium
US20210239737A1 (en) Annotated decode of oscilloscope signals
CN111124862B (en) Intelligent device performance testing method and device and intelligent device
CN112559340A (en) Picture testing method, device, equipment and storage medium
WO2017107173A1 (en) Technologies for automated application testing coverage and results evaluation
CN114461479A (en) Method and device for debugging multimedia processing chip, storage medium and electronic equipment
JP2021140459A (en) Image processing system
CN110569184A (en) test method and terminal equipment
TWI581174B (en) Method and system for displaying system information

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees