TWI750849B - Automatic test system and method for testing application of device under test - Google Patents

Automatic test system and method for testing application of device under test Download PDF

Info

Publication number
TWI750849B
TWI750849B TW109135679A TW109135679A TWI750849B TW I750849 B TWI750849 B TW I750849B TW 109135679 A TW109135679 A TW 109135679A TW 109135679 A TW109135679 A TW 109135679A TW I750849 B TWI750849 B TW I750849B
Authority
TW
Taiwan
Prior art keywords
test
information
verification
command
device under
Prior art date
Application number
TW109135679A
Other languages
Chinese (zh)
Other versions
TW202217571A (en
Inventor
謝尚霖
楊繡如
劉賀任
Original Assignee
中華電信股份有限公司
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 中華電信股份有限公司 filed Critical 中華電信股份有限公司
Priority to TW109135679A priority Critical patent/TWI750849B/en
Application granted granted Critical
Publication of TWI750849B publication Critical patent/TWI750849B/en
Publication of TW202217571A publication Critical patent/TW202217571A/en

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

An automatic test system and a method for testing an application of a device under test (DUT) are provided. The method includes: obtaining a test script by a test device, wherein the test script includes at least one test command and at least one verification command; obtaining interpretation information from a cloud server by the test device; executing the at least one test command according to the interpretation information to operate the application of the DUT by the test device, and obtaining a first parameter set of the application; pre-storing a plurality of verification information, selecting a first verification information from the plurality of verification information by executing the at least one verification command according to the interpretation information, and determining if the first parameter set matching the first verification information to generate a test report; and outputting the test report by the test device.

Description

測試待測裝置的應用程式的自動測試系統和方法Automated test system and method for testing device-under-test applications

本發明是有關於一種用於測試待測裝置的應用程式的自動測試系統和方法。The present invention relates to an automatic testing system and method for testing an application program of a device under test.

為了滿足用戶需求,終端裝置所使用的應用程式(application,APP)需經常性地更新。為了確保應用程式的品質,廠商需要利用測試程式來測試應用程式。廠商需要根據終端裝置的不同(例如:作業系統、硬體配置或軟體配置的不同)而撰寫不同的測試程式。一般來說,測試程式需要具有專業技術的測試人員來撰寫,故廠商需要花費大量的成本在人力資源。此外,隨著應用程式頻繁地改版,測試人員也需要花費大量的時間重新撰寫測試程式。因此,如何將測試應用程式的流程自動化,是本領域人員致力的目標之一。In order to meet user needs, the application (application, APP) used by the terminal device needs to be updated frequently. In order to ensure the quality of the application, the manufacturer needs to use the test program to test the application. Manufacturers need to write different test programs according to different terminal devices (for example, different operating systems, hardware configurations or software configurations). Generally speaking, test programs need to be written by testers with professional skills, so manufacturers need to spend a lot of costs on human resources. In addition, with the frequent revision of the application, the tester also needs to spend a lot of time rewriting the test program. Therefore, how to automate the process of testing applications is one of the goals of those in the art.

本發明提供一種自動測試系統和方法,可自動地測試待測裝置(device under test,DUT)的應用程式,令使用者可將心力集中於改善應用程式的功能。The present invention provides an automatic testing system and method, which can automatically test the application program of the device under test (DUT), so that the user can concentrate on improving the function of the application program.

本發明的一種用於測試待測裝置的應用程式的自動測試系統,包含雲端伺服器以及測試裝置。測試裝置包含處理器、儲存媒體以及收發器。收發器通訊連接至雲端伺服器以及待測裝置。儲存媒體儲存多個模組。處理器耦接儲存媒體以及收發器,並且存取和執行多個模組,其中多個模組包含資料收集模組、執行模組、驗證模組以及輸出模組。資料收集模組通過收發器取得測試腳本,並且自雲端伺服器取得解譯資訊,其中測試腳本包含至少一測試指令以及至少一驗證指令。執行模組根據解譯資訊執行至少一測試指令以操作待測裝置的應用程式,並且取得應用程式的第一參數集合。驗證模組預存多個驗證資訊,根據解譯資訊執行至少一驗證指令以自多個驗證資訊選出第一驗證資訊,並且判斷第一參數集合與第一驗證資訊是否匹配以產生測試報告。輸出模組通過收發器輸出測試報告。An automatic testing system for testing an application program of a device to be tested of the present invention includes a cloud server and a testing device. The test apparatus includes a processor, a storage medium, and a transceiver. The transceiver communicates with the cloud server and the device under test. The storage medium stores multiple modules. The processor is coupled to the storage medium and the transceiver, and accesses and executes a plurality of modules, wherein the plurality of modules includes a data collection module, an execution module, a verification module and an output module. The data collection module obtains the test script through the transceiver, and obtains the interpretation information from the cloud server, wherein the test script includes at least one test command and at least one verification command. The execution module executes at least one test command according to the interpretation information to operate the application program of the device under test, and obtains the first parameter set of the application program. The verification module pre-stores a plurality of verification information, executes at least one verification command according to the interpretation information to select first verification information from the plurality of verification information, and determines whether the first parameter set matches the first verification information to generate a test report. The output module outputs the test report through the transceiver.

在本發明的一實施例中,上述的資料收集模組通過收發器取得通用腳本,其中通用腳本包含至少一通用指令,其中執行模組根據解譯資訊執行至少一通用指令以操作待測裝置的應用程式以取得第一參數集合。In an embodiment of the present invention, the above-mentioned data collection module obtains a general script through the transceiver, wherein the general script includes at least one general command, and the execution module executes the at least one general command according to the interpretation information to operate the device under test. application to obtain the first parameter set.

在本發明的一實施例中,上述的解譯資訊包含對應於第一作業系統的第一解譯資訊,其中資料收集模組通過收發器以自待測裝置取得裝置資訊,其中執行模組根據裝置資訊以從解譯資訊中選擇與裝置資訊匹配的第一解譯資訊,並且根據第一解譯資訊執行至少一測試指令以操作應用程式。In an embodiment of the present invention, the above-mentioned interpretation information includes first interpretation information corresponding to the first operating system, wherein the data collection module obtains the device information from the device under test through the transceiver, and the execution module according to The device information is used to select the first interpretation information matching the device information from the interpretation information, and execute at least one test command to operate the application program according to the first interpretation information.

在本發明的一實施例中,上述的驗證模組根據裝置資訊以從解譯資訊中選擇與裝置資訊匹配的第一解譯資訊,並且根據第一解譯資訊執行至少一驗證指令以自多個驗證資訊選出第一驗證資訊。In an embodiment of the present invention, the above-mentioned verification module selects the first interpretation information matching the device information from the interpretation information according to the device information, and executes at least one verification command according to the first interpretation information to multiple The first verification information is selected from the verification information.

在本發明的一實施例中,上述的執行模組預存多個外部測試腳本,其中至少一測試指令指示執行模組呼叫外部測試腳本中的第一外部測試腳本,並且根據第一外部測試腳本操作待測裝置的應用程式。In an embodiment of the present invention, the above-mentioned execution module pre-stores a plurality of external test scripts, wherein at least one test instruction instructs the execution module to call a first external test script in the external test scripts, and operate according to the first external test script The app for the device under test.

在本發明的一實施例中,上述的收發器通訊連接至第二待測裝置,其中執行模組根據解譯資訊執行至少一測試指令操作第二待測裝置的第二應用程式,並且取得對應於第二應用程式的第二參數集合,其中驗證模組判斷第二參數集合與第一驗證資訊是否匹配以產生第二測試報告,其中輸出模組通過收發器輸出第二測試報告。In an embodiment of the present invention, the above-mentioned transceiver is communicatively connected to the second device under test, wherein the execution module executes at least one test command according to the interpretation information to operate the second application program of the second device under test, and obtains the corresponding In the second parameter set of the second application, the verification module determines whether the second parameter set matches the first verification information to generate a second test report, and the output module outputs the second test report through the transceiver.

本發明的一種用於測試待測裝置的應用程式的方法,適用於包含雲端伺服器以及測試裝置的自動測試系統,其中自動測試方法包含:由測試裝置取得測試腳本,其中測試腳本包含至少一測試指令以及至少一驗證指令;由測試裝置自雲端伺服器取得解譯資訊;由測試裝置根據解譯資訊執行至少一測試指令以操作待測裝置的應用程式,並且取得應用程式的第一參數集合;由測試裝置預存多個驗證資訊,根據解譯資訊執行至少一驗證指令以自多個驗證資訊選出第一驗證資訊,並且判斷第一參數集合與第一驗證資訊是否匹配以產生測試報告;以及由測試裝置輸出測試報告。A method for testing an application program of a device under test of the present invention is suitable for an automatic test system including a cloud server and a test device, wherein the automatic test method includes: obtaining a test script from the test device, wherein the test script includes at least one test instruction and at least one verification instruction; the test device obtains the interpretation information from the cloud server; the test device executes at least one test instruction according to the interpretation information to operate the application program of the device under test, and obtains the first parameter set of the application program; Pre-store a plurality of verification information by the test device, execute at least one verification command according to the interpretation information to select first verification information from the plurality of verification information, and determine whether the first parameter set matches the first verification information to generate a test report; and The test device outputs a test report.

基於上述,本發明的自動測試系統可基於易於撰寫的腳本來產生用於測試待測裝置之應用程式的指令。雲端伺服器可將針對不同作業系統的解譯資訊提供給測試裝置下載。測試裝置可利用解譯資訊讀取腳本的內容,從而根據腳本中的流程來測試應用程式。針對不同的應用程式,測試裝置可儲存不同的驗證資訊。測試裝置可根據腳本來選擇對應於測試中的應用程式的驗證資訊,並且根據驗證資訊判斷測試結果是否正常。Based on the above, the automatic test system of the present invention can generate instructions for testing the application program of the device under test based on an easy-to-write script. The cloud server can provide interpretation information for different operating systems to the test device for download. The test device can read the content of the script by using the interpretation information, so as to test the application program according to the flow in the script. For different applications, the test device can store different verification information. The testing device can select verification information corresponding to the application under test according to the script, and judge whether the test result is normal according to the verification information.

為了使本發明之內容可以被更容易明瞭,以下特舉實施例作為本發明確實能夠據以實施的範例。另外,凡可能之處,在圖式及實施方式中使用相同標號的元件/構件/步驟,係代表相同或類似部件。In order to make the content of the present invention more comprehensible, the following specific embodiments are given as examples according to which the present invention can indeed be implemented. Additionally, where possible, elements/components/steps using the same reference numerals in the drawings and embodiments represent the same or similar parts.

圖1根據本發明的一實施例繪示一種用於測試待測裝置的應用程式的自動測試系統10的示意圖,其中自動測試系統10可用以測試安裝於待測裝置中的應用程式,其中待測裝置例如是具有運算能力的電子裝置。自動測試系統10可包含測試裝置100以及雲端伺服器200。測試裝置100通訊連接至雲端伺服器200。雲端伺服器200可具有處理單元(例如:處理器但不限於此)、通訊單元(例如:各類通訊晶片、行動通訊晶片、藍芽晶片、WiFi晶片等但不限於此)及儲存單元(例如:可移動隨機存取記憶體、快閃記憶體、硬碟等但不限於此)等運行雲端伺服器200的必要構件。圖2根據本發明的一實施例繪示測試裝置100的示意圖。測試裝置100可包含處理器110、儲存媒體120以及收發器130。1 is a schematic diagram of an automatic test system 10 for testing an application program of a device under test according to an embodiment of the present invention, wherein the automatic test system 10 can be used to test the application program installed in the device under test, wherein the test program The device is, for example, an electronic device with computing capabilities. The automatic testing system 10 may include a testing device 100 and a cloud server 200 . The test device 100 is communicatively connected to the cloud server 200 . The cloud server 200 may have a processing unit (such as a processor but not limited thereto), a communication unit (such as various communication chips, mobile communication chips, bluetooth chips, WiFi chips, etc., but not limited thereto) and a storage unit (such as : removable random access memory, flash memory, hard disk, etc. (but not limited to) and other necessary components to run the cloud server 200 . FIG. 2 is a schematic diagram of the testing device 100 according to an embodiment of the present invention. The testing apparatus 100 may include a processor 110 , a storage medium 120 and a transceiver 130 .

處理器110例如是中央處理單元(central processing unit,CPU),或是其他可程式化之一般用途或特殊用途的微控制單元(micro control unit,MCU)、微處理器(microprocessor)、數位信號處理器(digital signal processor,DSP)、可程式化控制器、特殊應用積體電路(application specific integrated circuit,ASIC)、圖形處理器(graphics processing unit,GPU)、影像訊號處理器(image signal processor,ISP)、影像處理單元(image processing unit,IPU)、算數邏輯單元(arithmetic logic unit,ALU)、複雜可程式邏輯裝置(complex programmable logic device,CPLD)、現場可程式化邏輯閘陣列(field programmable gate array,FPGA)或其他類似元件或上述元件的組合。處理器110可耦接至儲存媒體120以及收發器130,並且存取和執行儲存於儲存媒體120中的多個模組和各種應用程式。The processor 110 is, for example, a central processing unit (CPU), or other programmable general-purpose or special-purpose micro control unit (micro control unit, MCU), microprocessor (microprocessor), digital signal processing digital signal processor (DSP), programmable controller, application specific integrated circuit (ASIC), graphics processor (graphics processing unit, GPU), image signal processor (image signal processor, ISP) ), image processing unit (IPU), arithmetic logic unit (ALU), complex programmable logic device (CPLD), field programmable gate array (field programmable gate array) , FPGA) or other similar elements or a combination of the above. The processor 110 may be coupled to the storage medium 120 and the transceiver 130 , and access and execute a plurality of modules and various application programs stored in the storage medium 120 .

儲存媒體120例如是任何型態的固定式或可移動式的隨機存取記憶體(random access memory,RAM)、唯讀記憶體(read-only memory,ROM)、快閃記憶體(flash memory)、硬碟(hard disk drive,HDD)、固態硬碟(solid state drive,SSD)或類似元件或上述元件的組合,而用於儲存可由處理器110執行的多個模組或各種應用程式。在本實施例中,儲存媒體120可儲存包括資料收集模組121、執行模組122、驗證模組123以及輸出模組124等多個模組,其功能將於後續說明。The storage medium 120 is, for example, any type of fixed or removable random access memory (random access memory, RAM), read-only memory (ROM), and flash memory (flash memory). , a hard disk drive (HDD), a solid state drive (SSD), or similar components or a combination of the above components for storing a plurality of modules or various application programs executable by the processor 110 . In this embodiment, the storage medium 120 can store a plurality of modules including a data collection module 121 , an execution module 122 , a verification module 123 , and an output module 124 , the functions of which will be described later.

收發器130以無線或有線的方式傳送及接收訊號。收發器130還可以執行例如低噪聲放大、阻抗匹配、混頻、向上或向下頻率轉換、濾波、放大以及類似的操作。測試裝置100可通過收發器130以通訊連接至雲端伺服器200以及待測裝置。The transceiver 130 transmits and receives signals in a wireless or wired manner. Transceiver 130 may also perform operations such as low noise amplification, impedance matching, frequency mixing, up or down frequency conversion, filtering, amplification, and the like. The test device 100 can be communicatively connected to the cloud server 200 and the device under test through the transceiver 130 .

資料收集模組121可通過收發器130取得用以測試待測裝置的應用程式的通用腳本以及測試腳本,並可通過收發器130以自雲端伺服器200取得解譯資訊。解譯資訊可用以解碼通用腳本以及測試腳本,輔助測試裝置100了解通用腳本以及測試腳本中的指令的意義。本實施例的通用腳本以及測試腳本由諸如Excel等具有文字編輯功能的軟體所產生的文字檔案。相較於撰寫諸如C語言等程式語言,撰寫本實施例之通用腳本以及測試腳本的門檻較低。換句話說,就算使用者並不具有程式編寫的背景,使用者也可以很輕易地撰寫本實施例的通用腳本以及測試腳本。使用者可為特定待測裝置的特定應用程式撰寫專屬的測試腳本。基於待測裝置的設備類型、作業環境或系統參數佈署等因素的不同,測試腳本的內容可有所不同。The data collection module 121 can obtain the general script and the test script for testing the application program of the device under test through the transceiver 130 , and can obtain the interpretation information from the cloud server 200 through the transceiver 130 . The interpretation information can be used to decode the general script and the test script, and assist the testing apparatus 100 to understand the meaning of the general script and the instructions in the test script. The general script and the test script of this embodiment are text files generated by software with a text editing function such as Excel. Compared with writing programming languages such as C language, the threshold for writing general scripts and test scripts of this embodiment is lower. In other words, even if the user does not have a programming background, the user can easily write the general script and the test script of this embodiment. Users can write their own test scripts for a specific application of a specific device under test. The content of the test script may vary based on factors such as the device type of the device under test, the operating environment, or the deployment of system parameters.

資料收集模組121可自雲端伺服器200取得分別對應於多種作業系統(或多種應用程式)的多種解譯資訊,並可通過收發器130以自待測裝置取得待測裝置的裝置資訊。取得多種解譯資訊可確保每種測試裝置100具有每種應用程式的專屬演算函式以處理各個應用程式。裝置資訊可包含例如硬體設備資訊(例如:待測裝置的識別碼、相連的伺服器的位置)、作業系統或應用程式環境(例如:應用程式的路徑或名稱)等資訊。執行模組122可根據待測裝置的裝置資訊來選擇適用於待測裝置的解譯資訊。舉例來說,執行模組122可響應於第一解譯資訊所對應的作業系統以及裝置配置所記載的作業系統匹配而從多種解譯資訊中選擇第一解譯資訊。受選的第一解譯資訊可用於執行待測裝置的測試流程。The data collection module 121 can obtain various interpretation information corresponding to various operating systems (or various application programs) from the cloud server 200 , and can obtain the device information of the device under test from the device under test through the transceiver 130 . Obtaining multiple interpretation information ensures that each test device 100 has a dedicated algorithm for each application to process each application. Device information can include information such as hardware device information (eg: the ID of the device under test, the location of the connected server), operating system or application environment (eg: the path or name of the application). The execution module 122 can select interpretation information suitable for the device under test according to the device information of the device under test. For example, the execution module 122 may select the first interpretation information from a variety of interpretation information in response to the matching of the operating system corresponding to the first interpretation information and the operating system recorded in the device configuration. The selected first interpretation information can be used to execute the test process of the device under test.

通用腳本可記載適用於多種待測裝置或多種應用程式的至少一通用指令。測試腳本可記載專用於特定的待測裝置或特定的應用程式的至少一測試指令和至少一驗證指令。在一實施例中,通用腳本或測試腳本還可記載針對應用程式的測試次數。在資料收集模組121取得解譯資訊、通用腳本以及測試腳本後,資料收集模組121可將通用腳本以及測試腳本排入一工作佇列中。執行模組122可依序執行工作佇列中的腳本。當輪到執行通用腳本以及測試腳本時(例如:測試裝置100通過收發器130尋找到待測裝置時),執行模組122可根據解譯資訊執行通用腳本中的至少一通用指令以及測試腳本中的至少一測試指令,藉以根據至少一通用指令以及至少一測試指令操作待測裝置的應用程式。The generic script can record at least one generic command applicable to a variety of devices under test or a variety of applications. The test script can record at least one test command and at least one verification command dedicated to a specific device under test or a specific application. In one embodiment, the general script or test script may also record the number of tests for the application. After the data collection module 121 obtains the interpretation information, the general script and the test script, the data collection module 121 can arrange the general script and the test script into a work queue. The execution module 122 can execute the scripts in the work queue in sequence. When it is the turn to execute the general script and the test script (for example, when the test device 100 finds the device under test through the transceiver 130 ), the execution module 122 can execute at least one general command in the general script and one of the test scripts according to the interpretation information. The at least one test command is used to operate the application program of the device under test according to at least one general command and at least one test command.

表1為通用指令的範例。執行模組122可執行通用指令「RunExcel」。基於執行方法「excelName」,執行模組122可根據檔案名稱選擇所要開啟的測試腳本,並且選擇測試腳本中的對應於動作「sheetName」的欄位中的函數。接著,執行模組122可將屬性值「sheetValue」輸入至所述函數以執行相應的動作。 表1 指令 執行方法 動作 屬性值 RunExcel excelName sheetName sheetValue Table 1 is an example of general commands. The execution module 122 can execute the general command "RunExcel". Based on the execution method "excelName", the execution module 122 can select the test script to be opened according to the file name, and select the function in the field corresponding to the action "sheetName" in the test script. Next, the execution module 122 can input the attribute value "sheetValue" to the function to execute the corresponding action. Table 1 instruction execution method action attribute value RunExcel excelName sheetName sheetValue

表2為測試指令的範例。在一實施例中,執行模組122可預存一或多個外部測試腳本。執行模組122可執行測試指令「Script」以開啟與執行方法「methodName」匹配的外部測試腳本,從而執行所述外部測試腳本中的指令以操作待測裝置的應用程式。Table 2 is an example of the test command. In one embodiment, the execution module 122 may pre-store one or more external test scripts. The execution module 122 can execute the test instruction "Script" to open an external test script matching the execution method "methodName", so as to execute the instructions in the external test script to operate the application program of the device under test.

執行模組122可執行測試指令「Object」。基於執行方法「byXPath」,執行模組122可尋找路徑與屬性值「xpathValue」匹配的應用程式中的元件,並且操作所述元件。或者,執行模組122可尋找名稱與屬性值「idValue」匹配的應用程式中的元件,並且操作所述元件。舉例來說,執行模組122可根據動作「click」點擊所述元件,可根據動作「sendKeys」輸入資訊至所述元件中,或可根據動作「longPress」長按所述元件。The execution module 122 can execute the test instruction "Object". Based on the execution method "byXPath", the execution module 122 may find elements in the application whose paths match the attribute value "xpathValue", and operate on the elements. Alternatively, the execution module 122 may look for a component in the application whose name matches the attribute value "idValue", and operate on the component. For example, the execution module 122 can click on the element according to the action "click", can input information into the element according to the action "sendKeys", or can long press the element according to the action "longPress".

執行模組122可執行測試指令「Coordinate」。執行模組122可根據屬性值「xValue, yValue」定位顯示應用程式的圖形使用者介面(graphical user interface,GUI)中的座標,並且操作座標上的元件,其中圖形使用者介面例如可由待測裝置的顯示介面所顯示。舉例來說,執行模組122可根據動作「click」點擊座標上的元件,可根據動作「swipe」滑動座標上的元件,可根據動作「dragAndDrop」將座標上的元件移動拖放至他處,或可根據動作「longPress」長按座標上的元件。 表2 指令 執行方法 動作 屬性值 Script methodName     Object byXPath, byID click sendKeys longPress xpathValue, idValue Coordinate   click swipe dragAndDrop longPress xValue, yValue The execution module 122 can execute the test command "Coordinate". The execution module 122 can locate the coordinates in the graphical user interface (GUI) of the display application according to the attribute values "xValue, yValue", and operate the components on the coordinates, wherein the GUI can be, for example, the device under test. displayed on the display interface. For example, the execution module 122 can click the component on the coordinate according to the action "click", slide the component on the coordinate according to the action "swipe", and move and drag the component on the coordinate to other places according to the action "dragAndDrop", Or you can long press the component on the coordinates according to the action "longPress". Table 2 instruction execution method action attribute value Script methodName Object byXPath, byID click sendKeys longPress xpathValue, idValue Coordinate click swipe dragAndDrop longPress xValue, yValue

在執行模組122根據通用腳本或測試腳本中的至少一通用指令或至少一測試指令操作完應用程式後,應用程式的參數集合將會響應於操作而更新。執行模組122可自應用程式取得更新後的參數集合。After the execution module 122 operates the application program according to at least one general command or at least one test command in the general script or the test script, the parameter set of the application program will be updated in response to the operation. The execution module 122 can obtain the updated parameter set from the application.

在執行模組122自應用程式取得更新的參數集合後,驗證模組123可驗證應用程式的參數集合是否符合使用者的預期。具體來說,驗證模組123可預存多個驗證資訊。驗證模組123可根據解譯資訊執行測試腳本中的至少一驗證指令以從多個驗證資訊中選出適用待測裝置的應用程式的驗證資訊。表3為驗證指令的範例。驗證模組123可執行驗證指令「Validate」,從而基於執行方法「methodName」從多個驗證資訊中選出測試腳本指定的驗證資訊。 表3 指令 執行方法 動作 屬性值 Validate methodName     After the execution module 122 obtains the updated parameter set from the application, the verification module 123 can verify whether the parameter set of the application meets the user's expectation. Specifically, the verification module 123 can pre-store a plurality of verification information. The verification module 123 can execute at least one verification command in the test script according to the interpretation information to select verification information suitable for the application program of the device under test from a plurality of verification information. Table 3 is an example of the verification command. The verification module 123 can execute the verification instruction "Validate", so as to select the verification information specified by the test script from a plurality of verification information based on the execution method "methodName". table 3 instruction execution method action attribute value Validate methodName

驗證模組123可判斷應用程式輸出的參數集合是否與驗證資訊匹配以產生測試報告。驗證模組123可根據例如正規表示法來比對參數集合以及驗證資訊。舉例來說,若應用程式輸出的參數集合與驗證資訊不匹配,則測試報告可記載待測裝置的應用程式的測試結果不如預期。若應用程式輸出的參數集合與驗證資訊匹配,則測試報告可記載待測裝置的應用程式通過測試。輸出模組124可通過收發器130輸出測試報告以供使用者參考。The verification module 123 can determine whether the parameter set output by the application program matches the verification information to generate a test report. The verification module 123 can compare the parameter sets and verify the information according to, for example, regular notation. For example, if the set of parameters output by the application does not match the verification information, the test report may record that the test results of the application of the device under test are not as expected. If the set of parameters output by the application matches the verification information, the test report can record that the application of the device under test passed the test. The output module 124 can output the test report through the transceiver 130 for the user's reference.

在一實施例中,測試裝置100的儲存媒體120可預存應用程式的測試次數。測試裝置100可根據測試次數對待測裝置的應用程式進行多次測試並產生相應的測試報告。In one embodiment, the storage medium 120 of the testing apparatus 100 can pre-store the number of tests of the application. The test device 100 can perform multiple tests on the application program of the device under test according to the number of tests and generate corresponding test reports.

在一實施例中,測試裝置100可通過收發器130通訊連接至多個待測裝置,藉以同時測試多個待測裝置的每一者的應用程式。測試裝置100可通過相同或相異的腳本來測試多個應用程式。舉例來說,測試裝置100可通訊連接至第一待測裝置以及第二待測裝置。執行模組122可根據自雲端伺服器200所取得的解譯資訊執行通用腳本中的至少一通用指令以及測試腳本中的至少一測試指令以操作對應於第一待測裝置的第一應用程式以及對應於第二待測裝置的第二應用程式,並且取得對應於第一應用程式的第一參數集合以及對應於第二應用程式的第二參數集合。驗證模組123可根據測試腳本中的至少一驗證指令從多個驗證資訊中選出一驗證資訊。驗證模組123可判斷第一參數集合與驗證資訊是否匹配以產生第一待測裝置的第一測試報告,並可判斷第二參數集合與驗證資訊是否匹配以產生第二待測裝置的第二測試報告。輸出模組124可通過收發器130輸出第一測試報告以及第二測試報告。In one embodiment, the test device 100 may be communicatively connected to a plurality of devices under test through the transceiver 130, thereby simultaneously testing applications of each of the plurality of devices under test. The testing device 100 can test multiple applications through the same or different scripts. For example, the test device 100 can be communicatively connected to the first device under test and the second device under test. The execution module 122 can execute at least one general command in the general script and at least one test command in the test script according to the interpretation information obtained from the cloud server 200 to operate the first application corresponding to the first device under test and A second application program corresponding to the second device under test, and a first parameter set corresponding to the first application program and a second parameter set corresponding to the second application program are obtained. The verification module 123 can select one verification information from a plurality of verification information according to at least one verification command in the test script. The verification module 123 can determine whether the first parameter set matches the verification information to generate the first test report of the first device under test, and can determine whether the second parameter set matches the verification information to generate the second test report of the second device under test. testing report. The output module 124 can output the first test report and the second test report through the transceiver 130 .

圖3根據本發明的一實施例繪示一種用於測試待測裝置的應用程式的方法的流程圖,其中所述方法可由如圖1所示的自動測試系統10實施。在步驟S301中,由測試裝置取得測試腳本,其中測試腳本包括至少一測試指令以及至少一驗證指令。在步驟S302中,由測試裝置自雲端伺服器取得解譯資訊。在步驟S303中,由測試裝置根據解譯資訊執行至少一測試指令以操作待測裝置的應用程式,並且取得應用程式的第一參數集合。在步驟S304中,由測試裝置預存多個驗證資訊,根據解譯資訊執行至少一驗證指令以自多個驗證資訊選出第一驗證資訊,並且判斷第一參數集合與第一驗證資訊是否匹配以產生測試報告。在步驟S305中,由測試裝置輸出測試報告。FIG. 3 is a flowchart illustrating a method for testing an application program of a device under test according to an embodiment of the present invention, wherein the method may be implemented by the automatic test system 10 as shown in FIG. 1 . In step S301, a test script is obtained from the test device, wherein the test script includes at least one test command and at least one verification command. In step S302, the test device obtains the interpretation information from the cloud server. In step S303, the test device executes at least one test command according to the decoded information to operate the application program of the device under test, and obtains a first parameter set of the application program. In step S304, the testing device pre-stores a plurality of verification information, executes at least one verification command according to the interpretation information to select the first verification information from the plurality of verification information, and determines whether the first parameter set matches the first verification information to generate testing report. In step S305, a test report is output by the test device.

綜上所述,本發明具有以下特點。(1)邏輯業務分離可獨立,撰寫測試腳本不需再撰寫程式碼。(2)能使用諸如Excel等可進行文字編輯的程式來撰寫測試腳本,降低測試人員對自動化測試的門檻。(3)可為不同作業系統(例如:iOS或Android)的待測裝置測試應用程式。(4)不同的應用程式可供用部分腳本。(5)可同時測試多台待測裝置的應用程式。(6)可針對每個待測裝置產生獨立的測試報告。In summary, the present invention has the following features. (1) Logical business separation can be independent, and writing test scripts does not need to write code. (2) Can use text editing programs such as Excel to write test scripts, lowering the testers' threshold for automated testing. (3) Test applications for devices under test with different operating systems (eg iOS or Android). (4) Some scripts are available for different applications. (5) An application program that can test multiple devices under test at the same time. (6) An independent test report can be generated for each device to be tested.

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

10:自動測試系統 100:測試裝置 110:處理器 120:儲存媒體 121:資料收集模組 122:執行模組 123:驗證模組 124:輸出模組 130:收發器 200:雲端伺服器 S301、S302、S303、S304、S305:步驟 10: Automatic test system 100: Test device 110: Processor 120: Storage Media 121: Data Collection Module 122: Execution mod 123: Verification Module 124: output module 130: Transceiver 200: Cloud server S301, S302, S303, S304, S305: Steps

圖1根據本發明的一實施例繪示一種用於測試待測裝置的應用程式的自動測試系統的示意圖。 圖2根據本發明的一實施例繪示測試裝置的示意圖。 圖3根據本發明的一實施例繪示一種用於測試待測裝置的應用程式的方法的流程圖。 FIG. 1 is a schematic diagram of an automatic test system for testing an application program of a device under test according to an embodiment of the present invention. FIG. 2 is a schematic diagram of a testing device according to an embodiment of the present invention. 3 is a flowchart illustrating a method for testing an application of a device under test according to an embodiment of the present invention.

S301、S302、S303、S304、S305:步驟 S301, S302, S303, S304, S305: Steps

Claims (7)

一種用於測試待測裝置的應用程式的自動測試系統,包括:雲端伺服器;以及測試裝置,包括:收發器,通訊連接至所述雲端伺服器以及所述待測裝置;儲存媒體,儲存多個模組;以及處理器,耦接所述儲存媒體以及所述收發器,並且存取和執行所述多個模組,其中所述多個模組包括:資料收集模組,通過所述收發器取得測試腳本,並且自所述雲端伺服器取得解譯資訊,其中所述測試腳本包括至少一測試指令以及至少一驗證指令;執行模組,根據所述解譯資訊執行所述至少一測試指令以操作所述待測裝置的所述應用程式,並且取得所述應用程式的第一參數集合;驗證模組,預存多個驗證資訊,根據所述解譯資訊執行所述至少一驗證指令以自所述多個驗證資訊選出第一驗證資訊,並且判斷所述第一參數集合與所述第一驗證資訊是否匹配以產生測試報告;以及輸出模組,通過所述收發器輸出所述測試報告。 An automatic test system for testing an application program of a device under test, comprising: a cloud server; and a test device, including: a transceiver, communicating with the cloud server and the device under test; a storage medium, storing multiple a module; and a processor, coupled to the storage medium and the transceiver, and accessing and executing the multiple modules, wherein the multiple modules include: a data collection module, through which the transceiver The device obtains a test script, and obtains interpretation information from the cloud server, wherein the test script includes at least one test command and at least one verification command; the execution module executes the at least one test command according to the interpretation information to operate the application program of the device under test, and obtain a first parameter set of the application program; the verification module pre-stores a plurality of verification information, and executes the at least one verification command according to the interpretation information to automatically The plurality of verification information selects first verification information, and determines whether the first parameter set matches the first verification information to generate a test report; and an output module outputs the test report through the transceiver. 如請求項1所述的自動測試系統,其中所述資料收集模組通過所述收發器取得通用腳本,其中所述通用腳本包括至少 一通用指令,其中所述執行模組根據所述解譯資訊執行所述至少一通用指令以操作所述待測裝置的所述應用程式以取得所述第一參數集合。 The automatic testing system of claim 1, wherein the data collection module obtains a generic script through the transceiver, wherein the generic script includes at least a general-purpose instruction, wherein the execution module executes the at least one general-purpose instruction according to the interpretation information to operate the application program of the device under test to obtain the first parameter set. 如請求項1所述的自動測試系統,其中所述解譯資訊包括對應於第一作業系統的第一解譯資訊,其中所述資料收集模組通過所述收發器以自所述待測裝置取得裝置資訊,其中所述執行模組根據所述裝置資訊以從所述解譯資訊中選擇與所述裝置資訊匹配的所述第一解譯資訊,並且根據所述第一解譯資訊執行所述至少一測試指令以操作所述應用程式。 The automatic test system of claim 1, wherein the interpretation information includes first interpretation information corresponding to a first operating system, wherein the data collection module passes the transceiver to the device under test Obtaining device information, wherein the execution module selects the first interpretation information matching the device information from the interpretation information according to the device information, and executes the execution according to the first interpretation information The at least one test command is used to operate the application. 如請求項3所述的自動測試系統,其中所述驗證模組根據所述裝置資訊以從所述解譯資訊中選擇與所述裝置資訊匹配的所述第一解譯資訊,並且根據所述第一解譯資訊執行所述至少一驗證指令以自所述多個驗證資訊選出所述第一驗證資訊。 The automatic test system of claim 3, wherein the verification module selects the first interpretation information matching the device information from the interpretation information according to the device information, and according to the device information The first interpretation information executes the at least one verification command to select the first verification information from the plurality of verification information. 如請求項1所述的自動測試系統,其中所述執行模組預存多個外部測試腳本,其中所述至少一測試指令指示所述執行模組呼叫所述外部測試腳本中的第一外部測試腳本,並且根據所述第一外部測試腳本操作所述待測裝置的所述應用程式。 The automatic testing system according to claim 1, wherein the execution module pre-stores a plurality of external test scripts, wherein the at least one test instruction instructs the execution module to call a first external test script among the external test scripts , and operate the application program of the device under test according to the first external test script. 如請求項1所述的自動測試系統,其中所述收發器通訊連接至第二待測裝置,其中所述執行模組根據所述解譯資訊執行所述至少一測試指令操作所述第二待測裝置的第二應用程式,並且取得對應於所述第二 應用程式的第二參數集合,其中所述驗證模組判斷所述第二參數集合與所述第一驗證資訊是否匹配以產生第二測試報告,其中所述輸出模組通過所述收發器輸出所述第二測試報告。 The automatic test system of claim 1, wherein the transceiver is communicatively connected to a second device under test, wherein the execution module executes the at least one test command to operate the second device under test according to the interpretation information test the second application of the device, and obtain the second application corresponding to the second A second set of parameters for the application, wherein the verification module determines whether the second set of parameters matches the first verification information to generate a second test report, wherein the output module outputs all the data through the transceiver. the second test report. 一種用於測試待測裝置的應用程式的方法,適用於包括雲端伺服器以及測試裝置的自動測試系統,其中所述方法包括:由所述測試裝置取得測試腳本,其中所述測試腳本包括至少一測試指令以及至少一驗證指令;由所述測試裝置自所述雲端伺服器取得解譯資訊;由所述測試裝置根據所述解譯資訊執行所述至少一測試指令以操作所述待測裝置的所述應用程式,並且取得所述應用程式的第一參數集合;由所述測試裝置預存多個驗證資訊,根據所述解譯資訊執行所述至少一驗證指令以自所述多個驗證資訊選出第一驗證資訊,並且判斷所述第一參數集合與所述第一驗證資訊是否匹配以產生測試報告;以及由所述測試裝置輸出所述測試報告。 A method for testing an application program of a device under test, suitable for an automatic test system including a cloud server and a test device, wherein the method comprises: obtaining a test script from the test device, wherein the test script includes at least one A test command and at least one verification command; the test device obtains interpretation information from the cloud server; the test device executes the at least one test command according to the interpretation information to operate the device under test the application program, and obtain a first parameter set of the application program; a plurality of verification information are pre-stored by the test device, and the at least one verification command is executed according to the interpretation information to select from the plurality of verification information generating first verification information, and judging whether the first parameter set matches the first verification information to generate a test report; and outputting the test report by the testing device.
TW109135679A 2020-10-15 2020-10-15 Automatic test system and method for testing application of device under test TWI750849B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109135679A TWI750849B (en) 2020-10-15 2020-10-15 Automatic test system and method for testing application of device under test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109135679A TWI750849B (en) 2020-10-15 2020-10-15 Automatic test system and method for testing application of device under test

Publications (2)

Publication Number Publication Date
TWI750849B true TWI750849B (en) 2021-12-21
TW202217571A TW202217571A (en) 2022-05-01

Family

ID=80681330

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109135679A TWI750849B (en) 2020-10-15 2020-10-15 Automatic test system and method for testing application of device under test

Country Status (1)

Country Link
TW (1) TWI750849B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI803376B (en) * 2022-06-30 2023-05-21 神達數位股份有限公司 A test method and device for an android mobile device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8984339B2 (en) * 2012-01-31 2015-03-17 Bank Of America Corporation System and method for test case generation using components
TW201721434A (en) * 2015-12-01 2017-06-16 Chunghwa Telecom Co Ltd Computer program product applicable to automatic generation of software testing data and method thereof capable of making sure each functional module can access accurate testing data for testing
TW201723847A (en) * 2015-12-30 2017-07-01 Chunghwa Telecom Co Ltd System and method for automatic testing environment deployment and testing on cloud virtual machine simulating multiple client ends with limited hardware
TW201937371A (en) * 2018-02-22 2019-09-16 中華電信股份有限公司 Automation testing management process based on Docker and Jenkins technology which dresses the problem arising from only one single independent testing environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8984339B2 (en) * 2012-01-31 2015-03-17 Bank Of America Corporation System and method for test case generation using components
TW201721434A (en) * 2015-12-01 2017-06-16 Chunghwa Telecom Co Ltd Computer program product applicable to automatic generation of software testing data and method thereof capable of making sure each functional module can access accurate testing data for testing
TW201723847A (en) * 2015-12-30 2017-07-01 Chunghwa Telecom Co Ltd System and method for automatic testing environment deployment and testing on cloud virtual machine simulating multiple client ends with limited hardware
TW201937371A (en) * 2018-02-22 2019-09-16 中華電信股份有限公司 Automation testing management process based on Docker and Jenkins technology which dresses the problem arising from only one single independent testing environment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI803376B (en) * 2022-06-30 2023-05-21 神達數位股份有限公司 A test method and device for an android mobile device

Also Published As

Publication number Publication date
TW202217571A (en) 2022-05-01

Similar Documents

Publication Publication Date Title
US10956291B2 (en) Method, computer apparatus, and user interface for performing automatic test upon storage devices
US8645912B2 (en) System and method for use in replaying software application events
TWI510913B (en) Testing device and testing method thereof
US8793578B2 (en) Automating execution of arbitrary graphical interface applications
CN107807881B (en) Code coverage rate testing method and device and computer equipment
US20130311827A1 (en) METHOD and APPARATUS for automatic testing of automation software
TWI566090B (en) Debugging firmware / software to produce tracking systems and methods, recording media and computer program products
TWI622877B (en) System and method for recording and replaying mouse behavior, recording media and program products
US10521335B2 (en) Context-based device testing
US8752023B2 (en) System, method and program product for executing a debugger
CN104199767B (en) Test method and device
US9792402B1 (en) Method and system for debugging a system on chip under test
CN112328305B (en) Eye pattern testing method and device, electronic equipment and readable storage medium
KR102105753B1 (en) Method and system for automatic configuration test case generation of mobile application
TWI592798B (en) Inspection system adjusting the sequence of testing items in diagnostic program through log file and method thereof
WO2019056935A1 (en) Ft4222-based testing system and method for spi flash
CN106294172B (en) App self-testing methods based on terminal device and device
CA2811617C (en) Commit sensitive tests
CN111814354B (en) Simulation test method, system, medium and electronic device for instrument performance
TWI750849B (en) Automatic test system and method for testing application of device under test
JP2009176186A (en) Program test device and program
CN113377586B (en) Automatic detection method and device for server and storage medium
US8904236B2 (en) High quality logic verification stress test generation using two-stage randomization
JP2011203857A (en) Circuit operation verification system and verification environment configuration method
TWI685791B (en) Method of generating bios-change record