[go: up one dir, main page]

TWI912821B - Apparatus, method, and recording medium for generating test case - Google Patents

Apparatus, method, and recording medium for generating test case

Info

Publication number
TWI912821B
TWI912821B TW113125231A TW113125231A TWI912821B TW I912821 B TWI912821 B TW I912821B TW 113125231 A TW113125231 A TW 113125231A TW 113125231 A TW113125231 A TW 113125231A TW I912821 B TWI912821 B TW I912821B
Authority
TW
Taiwan
Prior art keywords
steps
keywords
generating
page
electronic device
Prior art date
Application number
TW113125231A
Other languages
Chinese (zh)
Other versions
TW202601384A (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 韓商韓領有限公司
Publication of TW202601384A publication Critical patent/TW202601384A/en
Application granted granted Critical
Publication of TWI912821B publication Critical patent/TWI912821B/en

Links

Abstract

本發明提出了一種用以產生測試案例之電子裝置。本發明之電子裝置包括一個以上之處理器;及一個以上之記憶體,其等儲存有藉由上述一個以上之處理器執行之命令;且上述一個以上之處理器以如下方式構成:於執行上述命令時,與測試一個以上之頁面之動作之過程中可能產生之測試步驟及驗證步驟關聯地產生一個以上之關鍵詞,產生要分配給上述所產生之一個以上之關鍵詞各者的一個以上之標籤,基於上述所產生之一個以上之標籤與屬於上述一個以上之頁面之頁面元素間之映射,產生包括至少一個步驟之測試案例之腳本。This invention proposes an electronic device for generating test cases. The electronic device of this invention includes one or more processors; and one or more memories storing commands executed by the one or more processors; and the one or more processors are configured such that, when executing the commands, they generate one or more keywords in association with test steps and verification steps that may occur during the process of testing one or more pages, generate one or more tags to be assigned to each of the one or more generated keywords, and generate a script for test cases including at least one step based on the mapping between the one or more generated tags and page elements belonging to the one or more pages.

Description

用以產生測試案例之裝置、方法及記錄媒體Devices, methods, and recording media for generating test cases

本發明係關於一種用以產生測試案例之技術。更具體而言,本發明係關於一種向與測試步驟及驗證步驟關聯地產生之關鍵詞映射標籤來產生測試案例之腳本的技術。This invention relates to a technique for generating test cases. More specifically, this invention relates to a technique for generating test case scripts by mapping keywords generated in association with test steps and verification steps.

軟體測試係表示驗證軟體是否按照開發者之意圖正確動作之作業。近年來,於軟體開發流程中,自動化測試之重要性越來越大。軟體自動化測試可包括自動產生測試案例之技術。自動化測試可於無人為干預之情況下實行可重複之測試作業,從而大幅提高測試效率。又,自動化測試不僅提高了測試之準確性與可靠性,而且於縮短測試週期、降低相關成本方面亦發揮了較大作用。現有之測試案例編寫方式主要係測試工程師手動編寫測試案例之腳本。然而,此種手動過程不僅耗時長,而且測試覆蓋率可能不足,可能產生測試案例之質量因人而異之問題。Software testing refers to the process of verifying whether software functions correctly as intended by the developer. In recent years, automated testing has become increasingly important in the software development process. Software automated testing can include techniques for automatically generating test cases. Automated testing can perform repeatable testing tasks without human intervention, thereby significantly improving testing efficiency. Furthermore, automated testing not only improves the accuracy and reliability of tests but also plays a significant role in shortening testing cycles and reducing related costs. Current test case writing methods primarily involve test engineers manually writing test case scripts. However, this manual process is not only time-consuming but may also result in insufficient test coverage and inconsistent test case quality.

[發明所欲解決之問題]本發明係關於一種用以產生測試案例之技術。[解決問題之技術手段][Problem to be Solved by the Invention] This invention relates to a technique for generating test cases. [Technical Means for Solving the Problem]

本發明可提出一種用以產生測試案例之方法。本發明之一實施例之方法可包括如下步驟:與測試一個以上之頁面之動作之過程中可能產生之測試步驟及驗證步驟關聯地產生一個以上之關鍵詞;產生要分配給上述所產生之一個以上之關鍵詞各者的一個以上之標籤;及基於上述所產生之一個以上之標籤與屬於上述一個以上之頁面之頁面元素間之映射,產生包括至少一個檢查步驟之測試案例之腳本。This invention provides a method for generating test cases. One embodiment of the invention may include the following steps: generating one or more keywords in association with test steps and verification steps that may occur during the process of testing one or more pages; generating one or more tags to be assigned to each of the generated one or more keywords; and generating a script for test cases including at least one check step based on the mapping between the generated one or more tags and page elements belonging to the one or more pages.

於一實施例中,產生上述一個以上之關鍵詞之步驟可包括如下步驟:對應於單個測試步驟或單個驗證步驟產生原子性關鍵詞;及對應於包括用以驗證頁面之功能之複數個檢查步驟之單個場景,產生場景關鍵詞;上述場景關鍵詞由複數個原子性關鍵詞構成。In one embodiment, the steps of generating one or more of the above keywords may include the following steps: generating atomic keywords corresponding to a single test step or a single verification step; and generating scenario keywords corresponding to a single scenario that includes a plurality of check steps for verifying the functionality of the page; the scenario keywords are composed of a plurality of atomic keywords.

於一實施例中,一個測試步驟可與屬於上述一個以上之頁面之一個頁面元素對應,且產生上述一個以上之關鍵詞之步驟可包括如下步驟:以包括表示與上述一個測試步驟對應之上述一個頁面元素之資訊之方式產生原子性關鍵詞。In one embodiment, a test step may correspond to a page element belonging to one or more of the aforementioned pages, and the step of generating one or more of the aforementioned keywords may include the following steps: generating atomic keywords in a manner that includes information representing the aforementioned page element corresponding to the aforementioned test step.

於一實施例中,屬於上述一個以上之頁面之頁面元素可表示構成上述一個以上之頁面之各者所顯示之用戶介面的單個組件。In one embodiment, a page element belonging to one or more of the aforementioned pages may represent a single component constituting the user interface displayed by each of the aforementioned pages.

於一實施例中,產生上述一個以上之標籤之步驟可包括如下步驟:基於屬於上述一個以上之頁面之頁面元素,對上述所產生之一個以上之關鍵詞進行分組;及針對根據上述分組之結果而所產生之一個以上之組,向屬於各組之關鍵詞分配相同之標籤。In one embodiment, the steps of generating one or more tags may include the following steps: grouping the generated one or more keywords based on page elements belonging to one or more pages; and assigning the same tag to the keywords belonging to each group of the group generated based on the grouping results.

於一實施例中,產生上述一個以上之標籤之步驟可包括如下步驟:於一個測試步驟伴隨一個以上之驗證步驟之情形時,向與上述一個測試步驟及上述一個以上之驗證步驟關聯地產生之複數個關鍵詞分配相同之標籤。In one embodiment, the step of generating one or more of the above-mentioned tags may include the following steps: when a test step is accompanied by one or more verification steps, assigning the same tag to a plurality of keywords generated in association with the test step and the one or more verification steps.

於一實施例中,產生上述一個以上之標籤之步驟可包括如下步驟:將上述一個以上之關鍵詞中之一個關鍵詞逐一單詞地進行解析,並使用所解析之單詞中之至少一部分來產生將向上述一個關鍵詞分配之標籤。In one embodiment, the steps of generating one or more of the above-mentioned tags may include the following steps: parsing one of the above-mentioned keywords word by word, and using at least a portion of the parsed words to generate a tag to be assigned to the above-mentioned keyword.

於一實施例中,產生上述測試案例之腳本之步驟可包括如下步驟:將上述所產生之一個以上之標籤之各者與屬於上述一個以上之頁面之頁面元素中之一者進行映射;接收用以產生上述測試案例之至少一個用戶輸入;及識別與上述至少一個用戶輸入對應之至少一個頁面元素,並識別與上述所識別出之至少一個頁面元素映射之至少一個標籤,產生上述測試案例之腳本。In one embodiment, the steps of generating the script for the test cases may include the following steps: mapping each of the generated tags to one of the page elements belonging to the page; receiving at least one user input for generating the test cases; and identifying at least one page element corresponding to the at least one user input, and identifying at least one tag mapped to the identified at least one page element, thereby generating the script for the test cases.

於一實施例中,接收上述至少一個用戶輸入之步驟可包括如下步驟:將上述用戶之用戶終端連接至裝置場(device farm),該裝置場為上述電子裝置運行之環境;向上述用戶之裝置傳輸上述一個以上之頁面;及基於上述一個以上之頁面在上述用戶終端中渲染(rendering),而自上述用戶終端接收上述至少一個用戶輸入。In one embodiment, the step of receiving the at least one user input may include the following steps: connecting the user's user terminal to a device farm, which is the environment in which the electronic device operates; transmitting the one or more pages to the user's device; and rendering the one or more pages on the user terminal, thereby receiving the at least one user input from the user terminal.

於一實施例中,產生上述測試案例之腳本之步驟可包括如下步驟:針對上述至少一個標籤之各者,識別被分配上述各標籤之至少一個關鍵詞,並組合與上述至少一個關鍵詞對應之代碼來產生臨時腳本;及組合針對上述至少一個標籤各者所產生之臨時腳本來產生上述測試案例之腳本。In one embodiment, the steps for generating the script for the test cases may include the following steps: for each of the at least one tag, identifying at least one keyword assigned to each of the at least one tag, and combining the code corresponding to the at least one keyword to generate a temporary script; and combining the temporary script generated for each of the at least one tag to generate the script for the test cases.

於一實施例中,產生上述臨時腳本之步驟可包括如下步驟:於被分配上述各標籤之關鍵詞為複數個之情形時,藉由將與被分配上述各標籤之複數個關鍵詞各者對應之代碼,按照與上述複數個關鍵詞各者對應之測試的執行順序進行組合,而產生與上述各標籤對應之臨時腳本。In one embodiment, the steps for generating the aforementioned temporary script may include the following steps: when there are multiple keywords assigned to the aforementioned tags, by combining the code corresponding to each of the multiple keywords assigned to the aforementioned tags in the execution order of the tests corresponding to each of the multiple keywords, a temporary script corresponding to the aforementioned tags is generated.

於一實施例中,產生上述測試案例之腳本之步驟可包括如下步驟:基於上述至少一個用戶輸入之輸入順序,確定上述至少一個頁面元素之動作順序;及藉由將對應於上述至少一個標籤各者而產生之臨時腳本按照對應之頁面元素的動作順序進行組合,而產生上述測試案例之腳本。In one embodiment, the steps for generating the script for the above test case may include the following steps: determining the action order of the at least one page element based on the input order of the at least one user input; and generating the script for the above test case by combining the temporary scripts generated corresponding to each of the at least one tag according to the action order of the corresponding page elements.

於一實施例中,產生上述一個以上之關鍵詞之步驟可包括如下步驟:藉由針對上述一個以上之頁面執行預先儲存之複數個測試案例,而獲得構成上述複數個測試案例之各者之檢查步驟。In one embodiment, the steps to generate one or more of the above keywords may include the following steps: obtaining the checking steps for each of the above multiple test cases by performing a pre-stored plurality of test cases on the one or more of the above pages.

本發明可提出一種用以產生測試案例之裝置。本發明之電子裝置可包括:一個以上之處理器;及一個以上之記憶體,其等儲存有藉由上述一個以上之處理器執行之命令。上述一個以上之處理器能夠以如下方式構成:於執行上述命令時,與測試一個以上之頁面之動作之過程中可能產生之測試步驟及驗證步驟關聯地產生一個以上之關鍵詞,並產生要分配給上述所產生之一個以上之關鍵詞各者的一個以上之標籤,基於上述所產生之一個以上之標籤與屬於上述一個以上之頁面之頁面元素間之映射,產生包括至少一個檢查步驟之測試案例之腳本。The present invention provides an apparatus for generating test cases. The electronic apparatus of the present invention may include: one or more processors; and one or more memories storing commands executed by the one or more processors. The one or more processors are configured to: generate one or more keywords in association with test steps and verification steps that may occur during the execution of the commands, and generate one or more tags to be assigned to each of the generated keywords; and generate a script for test cases including at least one check step based on the mapping between the generated tags and page elements belonging to the one or more pages.

本發明可提出一種非暫時性電腦可讀記錄媒體,其係記錄用以管理與測試案例之執行相關之測試資料之命令者。本發明之一實施例之記錄媒體中所記錄之命令可為用以藉由一個以上之處理器執行或於電腦上實行之命令。該等命令能夠於由一個以上之處理器執行時,由一個以上之處理器與測試一個以上之頁面之動作之過程中可能產生之測試步驟及驗證步驟關聯地產生一個以上之關鍵詞,並產生要分配給上述所產生之一個以上之關鍵詞各者的一個以上之標籤,基於上述所產生之一個以上之標籤與屬於上述一個以上之頁面之頁面元素間之映射,產生包括至少一個檢查步驟之測試案例之腳本。[發明之效果]The present invention provides a non-transitory computer-readable recording medium that records commands for managing and executing test data related to test cases. The commands recorded in the recording medium of one embodiment of the present invention can be commands that can be executed by one or more processors or implemented on a computer. These commands, when executed by one or more processors, can generate one or more keywords in association with test and verification steps that may occur during the process of testing one or more pages, and generate one or more tags to be assigned to each of the generated keywords. Based on the mapping between the generated tags and page elements belonging to the one or more pages, scripts for test cases including at least one check step are generated. [Effects of the Invention]

根據本發明,由於可接收用以選擇屬於頁面之頁面元素之用戶輸入來產生測試案例之腳本,故可大幅縮短產生測試案例所需之時間。According to this invention, since the script can receive user input to select page elements belonging to the page to generate test cases, the time required to generate test cases can be greatly reduced.

根據本發明,可基於頁面元素來對一個以上之關鍵詞進行分組,並將相同之標籤分配給相同之組中所包括之關鍵詞,藉此產生能夠與頁面元素一一對應之作為參數之標籤。According to the present invention, one or more keywords can be grouped based on page elements, and the same tags can be assigned to the keywords included in the same group, thereby generating tags that can correspond one-to-one with page elements as parameters.

根據本發明,藉由映射屬於一個以上之頁面之頁面元素與標籤,可使用映射至用戶所選擇之頁面元素之標籤來識別測試案例中包括之測試步驟或驗證步驟。According to this invention, by mapping page elements and tags belonging to more than one page, the test steps or verification steps included in the test case can be identified using tags mapped to the page elements selected by the user.

基於本發明之技術思想之效果並不限制於以上提及之效果,普通技術人員可根據說明書之記載清楚地理解未提及之其他效果。The effects based on the technical concept of this invention are not limited to the effects mentioned above. Those skilled in the art can clearly understand other effects not mentioned based on the description in the manual.

本文所記載之各種實施例係以明確說明本發明之技術思想為目的而例示者,並不意欲將其限定為特定實施方式。本發明之技術思想包括本文記載之各實施例之各種變更(modifications)、均等物(equivalents)、替代物(alternatives)及選擇性地組合各實施例之全部或一部分所得之實施例。又,本發明之技術思想之權利範圍並不限定於以下提出之各種實施例或對其的具體說明。The various embodiments described herein are illustrated for the purpose of clearly illustrating the technical concept of the present invention and are not intended to limit them to any particular embodiment. The technical concept of the present invention includes various modifications, equivalents, alternatives, and embodiments obtained by selectively combining all or part of the embodiments described herein. Furthermore, the scope of the technical concept of the present invention is not limited to the various embodiments presented below or their specific descriptions.

關於本發明中使用之用語,包括技術性或科學性用語,除非另外定義,否則應具有本發明所屬技術領域中具有常識者通常理解之含義。The terms used in this invention, including technical or scientific terms, shall, unless otherwise defined, have the meanings commonly understood by a person of common knowledge in the field to which this invention pertains.

關於本發明中使用之如「包括」、「可包括」、「具備」、「可具備」、「具有」、「可具有」等表述,意味著存在對象特徵(例如,功能、動作或構成要素等),不排除其他追加性特徵之存在。即,如上所述之表述應理解為具有包括其他實施例之可能性之開放型用語(open-ended terms)。The use of terms such as "including," "may include," "possibly possess," "has," "may have," and "may have" in this invention implies the presence of object features (e.g., functions, actions, or constituent elements), and does not exclude the existence of other additional features. That is, the above-mentioned expressions should be understood as open-ended terms that have the possibility of including other embodiments.

關於本文中使用之單數型表述,除非上下文中另有說明,否則可包括複數型之含義,這同樣適用於申請專利範圍中記載之單數型表述。The singular expressions used herein may include the meaning of the plural forms unless the context otherwise requires, and this also applies to the singular expressions recorded in the scope of the patent application.

關於本說明書中使用之「第1」、「第2」或「第一」、「第二」等表述,除非另有提及,否則係用於在指代複數個同類對象之情形時將一個對象與其他對象區分開來,而非用以限定該等對象之順序或重要度。The terms “first,” “second,” “first,” “second,” etc., used in this specification are, unless otherwise specified, used to distinguish one object from others when referring to multiple objects of the same kind, and not to define the order or importance of such objects.

本發明中使用之「A、B及C」、「A、B或C」、「A、B及/或C」或「A、B及C中至少一者」、「A、B或C中至少一者」、「A、B及/或C中至少一者」等表述可指列出之各個項目或列出之項目的所有可能之組合。例如,「A或B中之至少一者」可指(1)至少一個A、(2)至少一個B、(3)至少一個A及至少一個B。The expressions “A, B and C”, “A, B or C”, “A, B and/or C”, “at least one of A, B and C”, “at least one of A, B or C”, “at least one of A, B and/or C”, etc., used in this invention may refer to each of the listed items or all possible combinations of the listed items. For example, “at least one of A or B” may refer to (1) at least one A, (2) at least one B, (3) at least one A and at least one B.

本文中使用之「基於~」之表述用以敍述對包括該表述之語句或文中敍述之確定、判斷之行為或動作造成影響之一個以上之因素,該表述並不排除對該確定、判斷之行為或動作造成影響之追加因素。The phrase “based on” as used in this document is used to describe one or more factors that influence the determination or judgment made in the statement or text, but does not exclude additional factors that influence the determination or judgment made.

本發明中使用之某個構成要素(例如,第1構成要素)「連接」或「連結」於另一構成要素(例如,第2構成要素)之表述,不僅可指上述某個構成要素直接連接或連結於上述另一構成要素,亦可指以新的其他構成要素(例如,第3構成要素)為介質而連接或連結於上述另一構成要素。The expression used in this invention to say that a certain constituent element (e.g., the first constituent element) is "connected" or "linked" to another constituent element (e.g., the second constituent element) may not only mean that the aforementioned constituent element is directly connected or linked to the aforementioned other constituent element, but may also mean that it is connected or linked to the aforementioned other constituent element through a new other constituent element (e.g., the third constituent element).

本發明中使用之表述「以~方式構成(configured to)」,根據上下文,可具有「以~方式設定」、「具有~之能力」、「以~方式變更」、「以~方式製成」、「可進行~」等含義。該表述不限定於「硬體上特別設計」之含義,例如,所謂以執行特定動作之方式構成之處理器可指藉由執行軟體而可實行特定動作之通用處理器(generic purpose processor)、或藉由程式構造化以實行該特定動作之特殊用途電腦(special purpose computer)。The phrase "configured to" as used in this invention can have meanings such as "configured in a ~ manner," "possessing ~ capabilities," "modified in a ~ manner," "made in a ~ manner," and "capable of ~ operations," depending on the context. This phrase is not limited to the meaning of "specially designed in hardware." For example, a processor configured to perform a specific action can refer to a general-purpose processor that can perform a specific action by executing software, or a special-purpose computer that performs that specific action through programming.

以下,參照附圖,對本發明中記載之各種實施例進行說明。於附圖及附圖說明中,對相同或實質上等同(substantially equivalent)之構成要素賦予相同之參照符號。又,於以下各種實施例之說明中,可省略對相同或對應之構成要素之重複敍述,但這並不意味著該構成要素不包括於該實施例中。The various embodiments described in this invention will now be described with reference to the accompanying drawings. In the drawings and their descriptions, identical or substantially equivalent constituent elements are assigned the same reference numerals. Furthermore, in the following descriptions of the embodiments, repeated descriptions of identical or corresponding constituent elements may be omitted, but this does not mean that the constituent element is not included in that embodiment.

圖1示出了可應用本發明之一實施例之電子裝置之環境。Figure 1 illustrates the environment in which an electronic device of one embodiment of the present invention can be applied.

測試案例可包括或表示用以驗證軟體是否符合特定設計規範而設計之一系列作業、動作、條件及/或變量。Test cases may include or represent a series of operations, actions, conditions and/or variables designed to verify whether the software conforms to specific design specifications.

一實施例之電子裝置110可為產生並儲存一個以上之測試案例之裝置。電子裝置110可藉由一個以上之計算裝置來實現。例如,電子裝置110之所有功能皆可利用單一之計算裝置來實現。又例如,電子裝置110之第1功能可利用第1計算裝置實現,第2功能可利用第2計算裝置實現。作為另一例,可使用分別實現電子裝置110之所有功能或特定功能之複數個計算裝置。上述計算裝置可為桌上型電腦(Desktop Computer)、膝上型電腦(Laptop Computer)、應用程式伺服器(Application Server)、代理伺服器(Proxy Server)或雲伺服器(Cloud Server)等,但並不侷限於此,具備計算功能之所有種類之裝置皆可為計算裝置。An embodiment of the electronic device 110 may be a device for generating and storing one or more test cases. The electronic device 110 may be implemented using one or more computing devices. For example, all functions of the electronic device 110 may be implemented using a single computing device. As another example, a first function of the electronic device 110 may be implemented using a first computing device, and a second function may be implemented using a second computing device. As another example, a plurality of computing devices may be used to implement all or specific functions of the electronic device 110. The aforementioned computing devices may be desktop computers, laptop computers, application servers, proxy servers, or cloud servers, but are not limited to these; all types of devices with computing capabilities may be computing devices.

於一實施例中,用戶終端120可連接至裝置場(device farm),該裝置場為運行電子裝置110之環境。可考慮產生電子裝置110對應用程式進行測試之測試案例。用戶終端120可自電子裝置110接收應用程式提供之頁面。用戶終端120可對接收到之頁面進行渲染(rendering)。用戶終端120可自輸入部接收用戶之輸入,並將接收到之用戶輸入傳輸至電子裝置110。電子裝置110可識別與自用戶終端120接收到之用戶輸入對應之頁面元素(page element),且可使用所識別之頁面元素來產生測試案例。In one embodiment, user terminal 120 may be connected to a device farm, which is the environment in which electronic device 110 operates. Test cases for testing applications using electronic device 110 may be generated. User terminal 120 may receive pages provided by the application from electronic device 110. User terminal 120 may render the received pages. User terminal 120 may receive user input from an input unit and transmit the received user input to electronic device 110. Electronic device 110 may identify page elements corresponding to the user input received from user terminal 120 and may use the identified page elements to generate test cases.

於一實施例中,電子裝置110與用戶終端120可利用一個裝置執行動作。用戶終端120可作為電子裝置110之全部或一部分構成要素包括於電子裝置110中。於此情形時,例如,電子裝置110與用戶終端120間藉由網路收發之各種資訊可為於一個裝置中之各構成要素間收發之各種資訊。In one embodiment, electronic device 110 and user terminal 120 can perform actions using a single device. User terminal 120 may be included in electronic device 110 as all or part of its constituent elements. In this case, for example, various information exchanged between electronic device 110 and user terminal 120 via a network may be various information exchanged between the constituent elements of a single device.

於一實施例中,用戶終端120可實現為能夠藉由網路與電子裝置110收發各種資訊之終端。例如,用戶終端120可為電腦、膝上型電腦(laptop)、攜帶用通訊終端(智慧型手機等)、攜帶用多媒體裝置、可穿戴裝置或HMD(Head Mounted Display,頭戴式顯示器)中之一者。然而,用戶終端120之類型並不限定於此,用戶終端120可為如下之任意裝置:包括可由用戶輸入資訊或向用戶輸出資訊之輸入/輸出介面,可藉由網路而與電子裝置110或其他裝置實行通訊。In one embodiment, user terminal 120 may be implemented as a terminal capable of sending and receiving various information with electronic device 110 via a network. For example, user terminal 120 may be one of a computer, laptop, portable communication terminal (smartphone, etc.), portable multimedia device, wearable device, or HMD (Head Mounted Display). However, the type of user terminal 120 is not limited to these, and user terminal 120 may be any device including an input/output interface that allows the user to input or output information, and can communicate with electronic device 110 or other devices via a network.

於一實施例中,用戶終端120可向用戶提供自電子裝置110接收到之資訊,且可自用戶接收輸入並將其傳輸至電子裝置110。具體而言,用戶終端120可自用戶獲得表示各種頁面呼叫之輸入,並產生對應於所獲得之輸入而表示各種頁面之呼叫之命令。用戶終端120可向電子裝置110傳輸表示各種頁面之呼叫之命令。自用戶所獲得之輸入可包括利用滑鼠之點擊、利用觸控面板或觸控屏之觸控、語音識別、其他電子輸入等各種形態之輸入。用戶終端120可自電子裝置110接收各種頁面,並輸出接收到之各種頁面。In one embodiment, user terminal 120 can provide information received from electronic device 110 to a user, and can receive input from the user and transmit it to electronic device 110. Specifically, user terminal 120 can obtain input from the user representing various page calls, and generate commands corresponding to the obtained input representing various page calls. User terminal 120 can transmit commands representing various page calls to electronic device 110. Input obtained from the user may include various forms of input such as mouse clicks, touch controls using a touch panel or touchscreen, voice recognition, and other electronic inputs. User terminal 120 can receive various pages from electronic device 110 and output the received pages.

網路可發揮將電子裝置110與用戶終端120或其他外部裝置連接之作用。例如,網路可提供連結路徑,以使用戶終端120或其他外部裝置可與電子裝置110連接而與電子裝置110收發封包資料。網路例如可實現為如區域網路(Local Area Network,LAN)、廣域網路(Wide Area Network,WAN)、行動無線電通訊網路(Mobile Radio Communication Network)、Wibro(Wireless Broadband Internet,無線寬頻網際網路)等所有種類之有線或無線網路。The network serves to connect electronic device 110 to user terminal 120 or other external devices. For example, the network provides connection paths so that user terminal 120 or other external devices can connect to electronic device 110 and send and receive packet data with electronic device 110. The network can be implemented as any type of wired or wireless network, such as a Local Area Network (LAN), a Wide Area Network (WAN), a Mobile Radio Communication Network, or Wibro (Wireless Broadband Internet).

圖2係本發明之一實施例之電子裝置之方塊圖。電子裝置200(例如,圖1之電子裝置110)可產生並儲存一個以上之測試案例。於一實施例中,電子裝置200可包括一個以上之處理器210、一個以上之記憶體220及通訊介面230作為構成要素。於一實施例中,可省略電子裝置200之構成要素中之至少一者、或將其他構成要素追加至電子裝置200。於一實施例中,可附加地或替代地(alternatively)整合一部分構成要素來實現、或以單個或複數個個體來實現。於本發明中,可將一個以上處理器210表述為處理器210。若未於文中明確地進行不同之表述,則處理器210之表述可指一個或一個以上之處理器之集合。於本發明中,一個以上記憶體220可表述為記憶體220。若未於文中明確地進行不同之表述,則記憶體220之表述可指一個或一個以上之記憶體之集合。於一實施例中,電子裝置200之內部/外部之構成要素中之至少一部分構成要素藉由匯流排、GPIO(General Purpose Input/Output,通用目的輸入/輸出)、SPI(Serial Peripheral Interface,串列周邊介面)或MIPI(Mobile Industry Processor Interface,行動產業處理器介面)等而彼此連接,從而可收發資訊(資料、信號等)。Figure 2 is a block diagram of an electronic device according to one embodiment of the present invention. The electronic device 200 (e.g., the electronic device 110 of Figure 1) can generate and store more than one test case. In one embodiment, the electronic device 200 may include one or more processors 210, one or more memory units 220, and a communication interface 230 as constituent elements. In one embodiment, at least one of the constituent elements of the electronic device 200 may be omitted, or other constituent elements may be added to the electronic device 200. In one embodiment, some constituent elements may be additionally or alternatively integrated, or implemented as a single or multiple entities. In the present invention, one or more processors 210 may be referred to as processor 210. Unless otherwise expressly stated herein, the term "processor 210" may refer to a collection of one or more processors. In this invention, one or more memory units 220 may be referred to as memory 220. Unless otherwise expressly stated herein, the term "memory unit 220" may refer to a collection of one or more memory units. In one embodiment, at least some of the internal/external components of the electronic device 200 are interconnected via buses, GPIO (General Purpose Input/Output), SPI (Serial Peripheral Interface), or MIPI (Mobile Industry Processor Interface), thereby enabling the transmission and reception of information (data, signals, etc.).

於一實施例中,處理器210可藉由驅動軟體(例如,命令、程式等)來控制連接至處理器210之電子裝置200之至少一個構成要素。又,處理器210可實行與本發明相關之各種動作,例如運算、處理、資料產生、加工等。處理器210可自記憶體220載入資料等或將資料等儲存於記憶體220。於一實施例中,處理器210可控制通訊介面230,向用戶終端(例如,圖1之用戶終端120)請求各種資訊,並自用戶終端接收各種資訊。In one embodiment, processor 210 can control at least one component of electronic device 200 connected to processor 210 via driver software (e.g., commands, programs, etc.). Furthermore, processor 210 can perform various actions related to the present invention, such as calculation, processing, data generation, and manipulation. Processor 210 can load data from memory 220 or store data in memory 220. In one embodiment, processor 210 can control communication interface 230 to request various information from a user terminal (e.g., user terminal 120 in FIG. 1) and receive various information from the user terminal.

於一實施例中,記憶體220可儲存各種資訊(資料)。儲存於記憶體220中之資訊係藉由電子裝置200之至少一個構成要素而獲得、處理或使用之資訊,可包括軟體(例如,命令、程式等)。記憶體220可包括揮發性及/或非揮發性記憶體。於本發明中,命令或程式係儲存於記憶體220中之軟體,可包括用以控制電子裝置200之資源之操作系統、應用程式及/或向應用程式提供各種功能以便應用程式可利用電子裝置200之資源之中間軟體等。於一實施例中,記憶體220可儲存命令,該命令於由處理器210執行時使處理器210實行運算。記憶體220可儲存藉由通訊介面230自資料庫接收到之資訊及/或藉由通訊介面230發送至資料庫之資訊中之至少一部分。具體而言,記憶體220可儲存藉由處理器210執行之命令。In one embodiment, memory 220 may store various information (data). The information stored in memory 220 is information acquired, processed, or used by at least one component of electronic device 200, and may include software (e.g., commands, programs, etc.). Memory 220 may include volatile and/or non-volatile memory. In this invention, commands or programs are software stored in memory 220, and may include an operating system for controlling the resources of electronic device 200, applications, and/or intermediate software that provides various functions to applications so that applications can utilize the resources of electronic device 200. In one embodiment, memory 220 may store commands that, when executed by processor 210, cause processor 210 to perform calculations. Memory 220 may store at least a portion of information received from a database via communication interface 230 and/or information sent to a database via communication interface 230. Specifically, memory 220 may store commands executed by processor 210.

於一實施例中,通訊介面(communication interface)230可實行電子裝置200與資料庫或其他外部電子裝置間之無線或有線通訊。例如,通訊介面230可藉由eMBB(enhanced Mobile Broadband,增強型行動寬頻)、URLLC(Ultra Reliable Low-Latency Communications,超可靠性低延遲通訊)、MMTC(Massive Machine Type Communications,大規模機器型通訊)、LTE(Long-Term Evolution,長期演進)、LTE-A(LTE Advance,進階長期演進)、NR(New Radio,新無線)、UMTS(Universal Mobile Telecommunications System,通用行動通訊系統)、GSM(Global System for Mobile communications,全球行動通訊系統)、CDMA(Code Division Multiple Access,碼分多重存取)、WCDMA(Wideband CDMA,寬頻碼分多重存取)、WiBro(Wireless Broadband,無線寬頻)、WiFi(Wireless Fidelity,無線保真)、藍牙(Bluetooth)、NFC(Near Field Communication,近場通訊)、GPS(Global Positioning System,全球定位系統)或GNSS(Global Navigation Satellite System,全球導航衛星系統)等方式實行無線通訊。例如,通訊介面230可藉由如下方式實行有線通訊,上述方式係指:USB(Universal Serial Bus,通用串列匯流排)、HDMI(High Definition Multimedia Interface,高清晰度多媒體介面)、RS-232(Recommended Standard-232,推薦標準-232)或POTS(Plain Old Telephone Service,簡易老式電話業務)等。於一實施例中,電子裝置200亦可與其他裝置整合而實現。於此情形時,通訊介面230可作為連接電子裝置200與相應之其他裝置之連結電路或介面發揮作用。In one embodiment, the communication interface 230 enables wireless or wired communication between the electronic device 200 and a database or other external electronic device. For example, the communication interface 230 can utilize eMBB (enhanced Mobile Broadband), URLLC (Ultra Reliable Low-Latency Communications), MMTC (Massive Machine Type Communications), LTE (Long-Term Evolution), LTE-A (LTE Advance), NR (New Radio), UMTS (Universal Mobile Telecommunications System), GSM (Global System for Mobile communications), CDMA (Code Division Multiple Access), WCDMA (Wideband CDMA), WiBro (Wireless Broadband), WiFi (Wireless Fidelity), Bluetooth, NFC (Near Field Communication), and GPS (Global System for Mobile Communications). Wireless communication can be implemented using methods such as Positioning System (GPS) or GNSS (Global Navigation Satellite System). For example, communication interface 230 can implement wired communication via methods such as USB (Universal Serial Bus), HDMI (High Definition Multimedia Interface), RS-232 (Recommended Standard-232), or POTS (Plain Old Telephone Service). In one embodiment, electronic device 200 can also be integrated with other devices. In this case, communication interface 230 can function as a connection circuit or interface connecting electronic device 200 to corresponding other devices.

以下,圖3至圖9中說明為藉由電子裝置實行之動作可理解成由圖2中說明之電子裝置200之處理器210實行。The actions described below in Figures 3 to 9 as being performed by an electronic device can be understood as being performed by the processor 210 of the electronic device 200 described in Figure 2.

圖3係說明本發明之一實施例之電子裝置產生測試案例之過程的流程圖。Figure 3 is a flowchart illustrating the process of generating test cases by an electronic device according to one embodiment of the present invention.

於動作S310中,電子裝置110可與測試一個以上之頁面之動作之過程中可能產生之測試步驟及驗證步驟關聯地產生一個以上之關鍵詞。In action S310, electronic device 110 may generate one or more keywords in association with the test steps and verification steps that may occur during the process of testing one or more pages.

於一實施例中,電子裝置110可對應用程式進行軟體測試。電子裝置110可測試(或檢查)於應用程式之一個以上之頁面中提供之動作,每個頁面可能需要進行各種動作之測試。為了測試應用程式之各頁面中提供之動作,測試步驟或驗證步驟可藉由測試案例執行。換言之,測試案例可由一個以上之檢查步驟(例如,測試步驟、驗證步驟)構成。執行測試案例可表示執行構成測試案例之一個以上之檢查步驟。In one embodiment, electronic device 110 can perform software testing on an application. Electronic device 110 can test (or inspect) actions provided on more than one page of the application, each page potentially requiring testing of various actions. To test the actions provided on each page of the application, test steps or verification steps can be performed using test cases. In other words, a test case can consist of more than one inspection step (e.g., a test step, a verification step). Executing a test case can mean executing more than one inspection step that constitutes the test case.

於本說明書中,「測試步驟」可表示確認與屬於應用程式之頁面之頁面元素(page element)交互作用之動作是否正常實行的步驟。頁面元素可表示構成特定頁面上所顯示之用戶介面之單個組件(component)。例如,頁面元素可表示網頁內所顯示之按鈕(button)或圖標(icon)等特定部分。測試步驟係模擬與頁面元素之交互作用,例如點擊按鈕、點擊圖標、點擊鏈接及輸入文本等動作,可確認該動作是否按照預期作動。換言之,測試步驟之目的在於確認特定頁面元素是否對用戶之交互作用做出正常反應。又,「驗證步驟」可表示確認與屬於應用程式頁面之頁面元素交互作用之動作之實行結果是否與預測之結果一致的步驟。例如,藉由測試步驟點擊頁面上所顯示之特定按鈕後,可確認特定資訊是否顯示於該頁面上,或移動至其他頁面顯示特定資訊。於驗證步驟中,可藉由比較預測之輸出與實際之輸出來評估結果之可靠性。In this specification, "test steps" refer to the steps taken to verify whether interactions with page elements belonging to an application's page are performed correctly. A page element represents a single component that constitutes the user interface displayed on a specific page. For example, a page element may represent a specific part of a webpage, such as a button or icon. Test steps simulate interactions with page elements, such as clicking buttons, clicking icons, clicking links, and entering text, to verify whether the action is performed as expected. In other words, the purpose of test steps is to verify whether a specific page element responds correctly to user interactions. Furthermore, a "verification step" can represent a step to confirm whether the result of an interaction with a page element belonging to the application page matches the predicted result. For example, by clicking a specific button displayed on the page in the test step, it can be confirmed whether specific information is displayed on that page, or whether the specific information is displayed when moving to another page. In the verification step, the reliability of the result can be evaluated by comparing the predicted output with the actual output.

於一實施例中,電子裝置110可藉由針對應用程式之一個以上之頁面執行預先儲存之複數個測試案例,而獲得構成複數個測試案例之各者之檢查步驟。例如,電子裝置110可自外部裝置(例如,用戶終端120)接收並儲存一個以上之頁面之複數個測試案例。再例如,電子裝置110可自行產生並儲存單個檢查步驟。電子裝置110可識別屬於應用程式之一個以上之頁面之頁面元素,並產生與每個已識別之頁面元素對應之檢查步驟。In one embodiment, electronic device 110 can obtain inspection steps for each of the multiple test cases by executing a pre-stored plurality of test cases for one or more pages of an application. For example, electronic device 110 can receive and store a plurality of test cases for one or more pages from an external device (e.g., user terminal 120). Alternatively, electronic device 110 can generate and store a single inspection step itself. Electronic device 110 can identify page elements belonging to one or more pages of an application and generate an inspection step corresponding to each identified page element.

於一實施例中,電子裝置110可產生與單個檢查步驟(例如,測試步驟、驗證步驟)對應之原子性關鍵詞(atomic keyword),且可產生與包括複數個檢查步驟之場景對應之場景關鍵詞(scenario keyword)。換言之,一個關鍵詞(例如,原子性關鍵詞、場景關鍵詞)可表示一個以上之檢查步驟。In one embodiment, the electronic device 110 can generate atomic keywords corresponding to a single check step (e.g., a testing step, a verification step) and scenario keywords corresponding to a scenario including multiple check steps. In other words, a keyword (e.g., an atomic keyword, a scenario keyword) can represent more than one check step.

於動作S320中,電子裝置110可產生要分配給所產生之一個以上之關鍵詞各者的一個以上之標籤。於一實施例中,電子裝置110可對一個關鍵詞分配一個標籤。又,電子裝置110可對複數個關鍵詞分配相同之標籤。具體而言,電子裝置110可基於頁面元素對與一個以上之頁面關聯地產生之一個以上之關鍵詞進行分組,且可將相同之標籤分配給相同之組中所包括之關鍵詞。例如,電子裝置110可將與相同之頁面元素相關之檢查步驟分組為一個組,但並不限定於此。In action S320, electronic device 110 can generate more than one tag to be assigned to each of the generated keywords. In one embodiment, electronic device 110 can assign one tag to one keyword. Furthermore, electronic device 110 can assign the same tag to a plurality of keywords. Specifically, electronic device 110 can group more than one keyword generated in association with more than one page based on page elements, and can assign the same tag to keywords included in the same group. For example, electronic device 110 can group check steps associated with the same page element into one group, but is not limited to this.

於動作S330中,電子裝置110可基於所產生之一個以上之標籤與屬於一個以上之頁面之頁面元素間之映射,自動產生包括至少一個步驟之測試案例之腳本。換言之,電子裝置110可將所產生之一個以上之標籤之各者與一個頁面元素進行映射。In action S330, electronic device 110 can automatically generate a script containing at least one step of test cases based on the mapping between one or more generated tags and page elements belonging to one or more pages. In other words, electronic device 110 can map each of the one or more generated tags to a page element.

於一實施例中,電子裝置110可自用戶終端120接收用以產生特定測試案例之用戶輸入。此時,用戶輸入可表示屬於應用程式之一個以上之頁面之頁面元素。電子裝置110可分析接收到之用戶輸入所表示之頁面元素,並識別與所分析之頁面元素進行映射之標籤。此後,電子裝置110可使用被分配所識別出之標籤之關鍵詞而產生特定測試案例之腳本。例如,電子裝置110可藉由組合被分配所識別出之標籤之關鍵詞之代碼(code)而自動產生特定測試案例之腳本。In one embodiment, electronic device 110 may receive user input from user terminal 120 for generating specific test cases. The user input may represent a page element belonging to one or more pages of an application. Electronic device 110 may analyze the page element represented by the received user input and identify tags mapped to the analyzed page element. Electronic device 110 may then generate scripts for specific test cases using keywords assigned to the identified tags. For example, electronic device 110 may automatically generate scripts for specific test cases by combining the codes of the keywords assigned to the identified tags.

圖4係說明本發明之一實施例之電子裝置與測試步驟及驗證步驟關聯地產生一個以上之關鍵詞之過程的圖。Figure 4 is a diagram illustrating the process by which an electronic device of one embodiment of the present invention generates one or more keywords in conjunction with testing and verification steps.

於一實施例中,電子裝置110可與測試一個以上之頁面之動作之過程中可能產生之測試步驟及驗證步驟關聯地產生一個以上之關鍵詞。但並不限定於此,電子裝置110可基於自用戶終端120接收到之資訊來產生關鍵詞,亦可接收並儲存由用戶終端120產生之關鍵詞。於以下說明書中,主要說明電子裝置110產生關鍵詞之實施例。In one embodiment, electronic device 110 may generate one or more keywords in association with test steps and verification steps that may occur during the process of testing one or more pages. However, it is not limited to this; electronic device 110 may generate keywords based on information received from user terminal 120, and may also receive and store keywords generated by user terminal 120. The following description mainly describes embodiments of keyword generation by electronic device 110.

於一實施例中,電子裝置110可對應於單個測試步驟或單個驗證步驟而產生原子性關鍵詞420。換言之,電子裝置110可對應於一個檢查步驟而產生一個原子性關鍵詞420。原子性關鍵詞420可表示一個檢查步驟(例如,測試步驟、驗證步驟)。電子裝置110可對應於測試應用程式之頁面上所提供之動作過程中可能產生之單個測試步驟或單個驗證步驟,產生一個原子性關鍵詞420。例如,參照圖4,電子裝置110可對應於確認在頁面410中點擊提醒圖標421之動作的測試步驟而產生一個原子性關鍵詞420。此時,該測試步驟可表示為與提醒圖標421,即頁面410之頁面元素對應。再例如,電子裝置110可對應於確認在頁面410中點擊檢索圖標422或點擊超市圖標423之動作的各測試步驟而產生各原子性關鍵詞420。In one embodiment, electronic device 110 may generate an atomic keyword 420 corresponding to a single test step or a single verification step. In other words, electronic device 110 may generate an atomic keyword 420 corresponding to a check step. The atomic keyword 420 may represent a check step (e.g., a test step, a verification step). Electronic device 110 may generate an atomic keyword 420 corresponding to a single test step or a single verification step that may occur during the actions provided on a page of a testing application. For example, referring to Figure 4, electronic device 110 may generate an atomic keyword 420 corresponding to a test step confirming the action of clicking the alert icon 421 on page 410. In this case, the test step may be represented as corresponding to the alert icon 421, i.e., a page element of page 410. As another example, electronic device 110 may generate each atomic keyword 420 corresponding to a test step confirming the action of clicking the search icon 422 or the supermarket icon 423 on page 410.

於一實施例中,電子裝置110可對應於包括用以驗證應用程式之頁面之功能之複數個檢查步驟的單個場景,而產生場景關鍵詞430。場景關鍵詞430可由複數個原子性關鍵詞420構成,各原子性關鍵詞420可對應於構成場景之各檢查步驟。換言之,場景關鍵詞430可表示兩個以上之檢查步驟。In one embodiment, electronic device 110 may correspond to a single scenario including a plurality of check steps for verifying the functionality of a page used to apply an application, and generate scenario keywords 430. Scenario keywords 430 may consist of a plurality of atomic keywords 420, each atomic keyword 420 corresponding to a check step constituting the scenario. In other words, scenario keywords 430 may represent two or more check steps.

場景可表示應用程式之一個以上之頁面所提供之特定功能。例如,可能存在表示登入功能之場景。表示登入功能之場景可包括點擊登入框之測試步驟、於登入框中輸入用戶名及密碼之測試步驟、及確認是否輸出藉由輸入之用戶名及密碼而登入之頁面之驗證步驟等。此時,與構成場景之複數個檢查步驟之各者相關之頁面無需全部相同。即,於構成場景之複數個步驟中,與第1檢查步驟相關之頁面及與第2檢查步驟相關之頁面可不同。於本說明書中,與檢查步驟相關之頁面可表示提供檢查步驟要測試之動作之頁面。A scenario can represent a specific function provided by one or more pages in an application. For example, there might be a scenario representing a login function. A scenario representing a login function might include test steps for clicking a login box, test steps for entering a username and password in the login box, and verification steps for confirming whether to output a page showing login using the entered username and password. In this case, the pages associated with each of the multiple check steps constituting the scenario do not need to be all the same. That is, the pages associated with the first check step and the pages associated with the second check step may be different among the multiple steps constituting the scenario. In this specification, the pages associated with check steps may represent the pages that provide the actions to be tested in the check steps.

例如,參照圖4,電子裝置110可對應於表示自頁面410移動至應用程式之主頁面之功能之第1場景,來產生第1場景關鍵詞。第1場景可包括點擊頁面410上所顯示之主頁按鈕431之測試步驟、及確認根據點擊主頁按鈕431所載入之頁面是否為主頁面之驗證步驟。即,對應於第1場景而產生之第1場景關鍵詞可表示一個測試步驟及一個驗證步驟。再例如,電子裝置110可對應於表示自頁面410移動至應用程式之檢索頁面之功能之第2場景,來產生第2場景關鍵詞。第2場景可包括點擊檢索按鈕432之測試步驟、及確認根據點擊檢索按鈕432所載入之頁面是否為檢索頁面之驗證步驟。For example, referring to Figure 4, electronic device 110 can generate first-scene keywords corresponding to a first scenario representing the function of moving from page 410 to the homepage of the application. The first scenario may include a test step of clicking the homepage button 431 displayed on page 410 and a verification step of confirming whether the page loaded by clicking the homepage button 431 is the homepage. That is, the first-scene keywords generated corresponding to the first scenario can represent a test step and a verification step. As another example, electronic device 110 can generate second-scene keywords corresponding to a second scenario representing the function of moving from page 410 to the search page of the application. The second scenario may include a test step of clicking the search button 432, and a verification step of confirming whether the page loaded by clicking the search button 432 is the search page.

圖5係說明本發明之一實施例之電子裝置產生與測試步驟及驗證步驟相關之關鍵詞之例示的圖。Figure 5 is an illustration of the keywords related to the generation, testing and verification steps of an electronic device according to one embodiment of the present invention.

於一實施例中,於測試應用程式之一個以上之頁面所提供之動作之過程中可能產生的測試步驟可與屬於一個以上之頁面之一個頁面元素對應。例如,參照圖5,確認點擊應用程式之閘道頁面510中之檢索圖標511之動作之第1測試步驟,可與檢索圖標511,即屬於閘道頁面510之頁面元素對應。In one embodiment, test steps that may occur during the process of testing actions provided on more than one page of an application can correspond to a page element belonging to more than one page. For example, referring to Figure 5, confirming that the first test step of clicking the search icon 511 on the gate page 510 of the application can correspond to the search icon 511, which is a page element belonging to the gate page 510.

於一實施例中,電子裝置110可產生與相應測試步驟對應之原子性關鍵詞,以包括表示與測試步驟相關之頁面之資訊。又,電子裝置110可產生與相應測試步驟對應之原子性關鍵詞,以包括表示與測試步驟對應之頁面元素之資訊。表示頁碼及頁碼之資訊可表示說明各頁面之單詞及說明頁面元素之單詞,但並不一定限定於此。然而,於以下說明書中,為了便於說明,主要說明了表示頁面及頁面元素之資訊為單詞之實施例。In one embodiment, electronic device 110 can generate atomic keywords corresponding to a corresponding test step, including information representing the page associated with the test step. Furthermore, electronic device 110 can generate atomic keywords corresponding to a corresponding test step, including information representing the page element associated with the test step. Information representing page numbers and page numbers may represent words describing each page and words describing page elements, but is not necessarily limited to this. However, for ease of explanation, the following description primarily focuses on an embodiment where the information representing pages and page elements is in the form of words.

例如,參照圖5,電子裝置110可對應於第1測試步驟來產生一個原子性關鍵詞420,該第1測試步驟係確認應用程式之閘道頁面510中點擊檢索圖標511之動作。表示與第1測試步驟相關之閘道頁面510之資訊可包括諸如「閘道(gateway)」及「頁面(page)」之單詞。又,表示檢索圖標511,即與第1測試步驟對應之頁面元素之資訊可包括諸如「檢索(search)」及「圖標(icon)」之單詞。於此情形時,與第1測試步驟對應之原子性關鍵詞420可包括諸如「於閘道網頁中點擊檢索圖標(click search icon in gateway page)」之上述所有單詞來產生,但並不限定於此。For example, referring to Figure 5, electronic device 110 may generate an atomic keyword 420 corresponding to a first test step, which verifies the action of clicking the search icon 511 on the application's gateway page 510. Information indicating the gateway page 510 associated with the first test step may include words such as "gateway" and "page". Similarly, information indicating the search icon 511, i.e., the page element corresponding to the first test step, may include words such as "search" and "icon". In this case, the atomic keyword 420 corresponding to the first test step may include, but is not limited to, all of the above-mentioned words such as "click search icon in gateway page".

例如,可根據於應用程式之閘道頁面510中點擊檢索圖標511來輸出檢索頁面520。電子裝置110可對應於第2測試步驟來產生一個原子性關鍵詞420,該第2測試步驟係確認檢索頁面520中向檢索框521輸入檢索關鍵詞之動作。表示與第2測試步驟相關之檢索頁面520之資訊可包括諸如「檢索(search)」及「頁面(page)」之單詞。又,表示檢索框521,即與第2測試步驟對應之頁面元素之資訊可包括諸如「檢索(search)」及「框(box)」之單詞。於此情形時,對應於第2測試步驟之原子性關鍵詞420可包括諸如「於檢索網頁之檢索框中輸入檢索關鍵詞(input search keyword into search box in search page)」等上述所有單詞來產生,但並不限定於此。類似地,電子裝置110可對應於第3測試步驟來產生諸如「於檢索網頁中點擊檢索圖標(click search icon in search page)」之原子性關鍵詞420,該第3測試步驟係確認檢索頁面520中點擊檢索圖標522之動作。For example, a search page 520 can be output by clicking the search icon 511 on the application's gateway page 510. The electronic device 110 can generate an atomic keyword 420 corresponding to a second test step, which confirms the action of entering a search keyword into the search box 521 in the search page 520. Information indicating the search page 520 associated with the second test step may include words such as "search" and "page". Similarly, information indicating the search box 521, the page element corresponding to the second test step, may include words such as "search" and "box". In this case, the atomic keyword 420 corresponding to the second test step may include, but is not limited to, all of the aforementioned words such as "input search keyword into search box in search page". Similarly, the electronic device 110 may generate an atomic keyword 420 such as "click search icon in search page" in the third test step, which confirms the action of clicking search icon 522 on search page 520.

於一實施例中,於測試應用程式之一個以上之頁面中提供之動作之過程中可能產生的驗證步驟可與屬於一個以上之頁面之一個以上之頁面元素對應。驗證步驟可與測試特定動作之過程中最後所選擇之頁面元素對應,但並不限定於此。例如,當驗證步驟於測試特定動作之過程中,與複數個頁面元素交互作用之情形時,亦可與複數個頁面元素對應。參照圖5,確認藉由於應用程式之檢索頁面520中點擊檢索圖標522後輸出之關鍵詞結果頁面530的第1驗證步驟,可與檢索圖標522,即檢索頁面520中最後所選擇之頁面元素對應。In one embodiment, validation steps that may occur during the process of testing an action provided on one or more pages of an application can correspond to one or more page elements belonging to one or more pages. A validation step can correspond to the page element finally selected during the testing of a specific action, but is not limited to this. For example, when a validation step interacts with multiple page elements during the testing of a specific action, it can also correspond to multiple page elements. Referring to Figure 5, it is confirmed that the first validation step of the keyword results page 530 output after clicking the search icon 522 on the application's search page 520 corresponds to the search icon 522, i.e., the page element finally selected on the search page 520.

於一實施例中,電子裝置110可產生與驗證步驟對應之原子性關鍵詞,以包括表示與驗證步驟有關之頁面之資訊。又,電子裝置110可產生與驗證步驟對應之原子性關鍵詞,以包括表示與驗證步驟對應之頁面元素之資訊。例如,電子裝置110可於檢索頁面520之檢索框521中被輸入特定檢索關鍵詞後,對應於確認藉由點擊檢索圖標522而輸出之關鍵詞結果頁面530是否符合特定檢索關鍵詞之第1驗證步驟,產生原子性關鍵詞420。表示與第1驗證步驟相關之檢索頁面520之資訊可包括諸如「檢索(search)」及「頁面(page)」之單詞,表示檢索圖標522,即與第1驗證步驟對應之頁面元素之資訊可包括諸如「檢索(search)」及「圖標(icon)」之單詞。於此情形時,對應於第1驗證步驟之原子性關鍵詞420可包括諸如「於檢索網頁中點擊檢索圖標確認檢索結果(check search result by clicking search icon in search page)」之上述所有單詞而產生。In one embodiment, electronic device 110 can generate atomic keywords corresponding to verification steps, including information representing the page related to the verification steps. Furthermore, electronic device 110 can generate atomic keywords corresponding to verification steps, including information representing the page elements corresponding to the verification steps. For example, after a specific search keyword is entered into the search box 521 of the search page 520, electronic device 110 can generate atomic keyword 420 corresponding to confirming whether the keyword results page 530 output by clicking the search icon 522 meets the first verification step for the specific search keyword. Information indicating the search page 520 related to the first verification step may include words such as "search" and "page". Information indicating the search icon 522, i.e., the page element corresponding to the first verification step, may include words such as "search" and "icon". In this case, the atomic keyword 420 corresponding to the first verification step may be generated by all of the above-mentioned words such as "check search result by clicking search icon in search page".

於另一實施例中,電子裝置110不包括與驗證步驟相關之頁面、及表示與驗證步驟對應之頁面元素之資訊,可僅包括表示驗證步驟之資訊來產生與驗證步驟對應之原子性關鍵詞420。於此情形時,對應於第1驗證步驟之原子性關鍵詞420可簡化為「確認檢索結果(check the search result)」。In another embodiment, the electronic device 110 does not include a page associated with the verification step, nor information indicating the page elements corresponding to the verification step. Instead, it may only include information indicating the verification step to generate the atomic keyword 420 corresponding to the verification step. In this case, the atomic keyword 420 corresponding to the first verification step can be simplified to "check the search result".

圖6係說明本發明之一實施例之電子裝置產生要分配給關鍵詞之標籤之過程的圖。Figure 6 is a diagram illustrating the process by which an electronic device of one embodiment of the present invention generates tags to be assigned to keywords.

於一實施例中,電子裝置110可基於屬於應用程式之一個以上之頁面之頁面元素,對所產生之一個以上之關鍵詞進行分組。電子裝置110可藉由對所產生之一個以上之關鍵詞進行分組來產生一個以上之組,且可對各組中所包括之一個以上之關鍵詞全部分配相同之標籤。In one embodiment, electronic device 110 can group one or more generated keywords based on page elements belonging to one or more pages of an application. Electronic device 110 can generate one or more groups by grouping the generated keywords, and can assign the same tag to all keywords included in each group.

於一實施例中,電子裝置110可識別與屬於一個以上之頁面之一個以上之頁面元素對應之一個以上之檢查步驟,且可將表示所識別出之一個以上之檢查步驟之各者之原子性關鍵詞分組為一個組。又,與一個頁面元素相關之場景關鍵詞亦可被分組為相同之組。此處,於場景關鍵詞表示之兩個以上之檢查步驟皆對應一個頁面元素之情形時,場景關鍵詞可表示與一個頁面元素相關。例如,參照圖5,電子裝置110可將分別表示確認點擊屬於檢索頁面520之檢索圖標之動作之第3測試步驟、及確認根據點擊檢索圖標522而輸出之關鍵詞結果頁面530是否符合特定檢索關鍵詞之第1驗證步驟的原子性關鍵詞分組為相同之組。於另一實施例中,電子裝置110亦可將與兩個以上之頁面元素之各者對應之檢查步驟所表示之原子性關鍵詞、及與兩個以上之頁面元素相關之場景關鍵詞分組為相同之組。將與兩個以上之頁面元素相關之關鍵詞分組為相同之組,可表示兩個以上之頁面元素係彼此相關之頁面元素。例如,參照圖5,於選擇了檢索圖標511時,檢索框521會自動激活,因此可將與檢索圖標511及檢索框521相關之關鍵詞分組為相同之組。然而,即便兩個以上之頁面元素彼此相關,亦可如現有之實施例般,以獨立之組之形式產生與各頁面元素相關之關鍵詞。In one embodiment, the electronic device 110 can identify one or more check steps corresponding to one or more page elements belonging to one or more pages, and can group the atomic keywords representing each of the identified check steps into a group. Furthermore, scene keywords associated with a page element can also be grouped into the same group. Here, when two or more check steps represented by a scene keyword both correspond to a page element, the scene keyword can represent association with a page element. For example, referring to Figure 5, the electronic device 110 can group the atomic keywords of the third test step, which respectively confirms the action of clicking the search icon belonging to the search page 520, and the first verification step, which confirms whether the keyword result page 530 output based on clicking the search icon 522 meets the specific search keywords, into the same group. In another embodiment, the electronic device 110 can also group the atomic keywords represented by the check steps corresponding to each of two or more page elements, and the scenario keywords associated with the two or more page elements into the same group. Grouping the keywords associated with two or more page elements into the same group indicates that the two or more page elements are related to each other. For example, referring to Figure 5, when search icon 511 is selected, search box 521 is automatically activated, so keywords related to search icon 511 and search box 521 can be grouped into the same group. However, even if two or more page elements are related to each other, keywords related to each page element can be generated in independent groups, as in existing embodiments.

於一實施例中,在一個檢查步驟伴隨其他檢查步驟之情形時,電子裝置110可將一個檢查步驟及其他檢查步驟分組為相同之組。一個檢查步驟伴隨其他檢查步驟可表示於執行一個檢查步驟時,還必須執行其他檢查步驟。例如,其他檢查步驟可為一個以上之檢查步驟。例如,電子裝置110可自外部裝置(或測試工程師)接收關於一個檢查步驟伴隨其他檢查步驟之資訊。In one embodiment, when a check step is accompanied by other check steps, the electronic device 110 may group the check step and the other check steps into the same group. A check step accompanied by other check steps may mean that when performing one check step, other check steps must also be performed. For example, the other check steps may be more than one check step. For example, the electronic device 110 may receive information about the check step accompanied by other check steps from an external device (or a test engineer).

於一實施例中,一個測試步驟可伴隨一個以上之驗證步驟。例如,確認點擊閘道頁面510中之檢索圖標511之動作之第1測試步驟,可伴隨確認對應於點擊檢索圖標511而輸出之檢索頁面520是否與預測輸出頁面一致之驗證步驟。於一個測試步驟伴隨一個以上之驗證步驟之情形時,電子裝置110可將相同之標籤分配給與一個測試步驟及一個以上之驗證步驟關聯地產生之複數個關鍵詞。In one embodiment, a test step may be accompanied by more than one verification step. For example, a first test step that verifies the action of clicking the search icon 511 on the gate page 510 may be accompanied by a verification step that verifies whether the search page 520 output corresponding to clicking the search icon 511 matches the predicted output page. When a test step is accompanied by more than one verification step, the electronic device 110 may assign the same label to a plurality of keywords generated in association with the test step and more than one verification step.

於一實施例中,電子裝置110可產生要分配給一個關鍵詞之標籤。電子裝置110可將一個關鍵詞逐一單詞地進行解析(parsing),並使用解析出之單詞中之至少一部分來產生要分配給該關鍵詞之標籤。電子裝置110可以包括如下資訊之方式產生要分配給一個關鍵詞之標籤,上述資訊表示一個關鍵詞所表示之檢查步驟進行測試或驗證之動作、或一個關鍵詞所表示之場景進行測試或驗證之功能。例如,參照圖6,電子裝置110可於應用程式之地址頁面(address page)之檢索框中輸入檢索關鍵詞,來產生要分配給與追加地址之第4測試步驟對應之原子性關鍵詞611之標籤621。第4測試步驟要進行測試之動作係追加地址之動作,可以包括表示「地址」之「Address」之單詞的方式,產生要分配給原子性關鍵詞611之標籤621。再例如,電子裝置110可於地址頁面之檢索框中輸入檢索關鍵詞,產生要分配給與確認所輸出之結果是否與檢索關鍵詞一致之第2驗證步驟對應的原子性關鍵詞612之標籤621。此時,第2驗證步驟伴隨於第4測試步驟,因此可將和分配給與第4測試步驟對應之原子性關鍵詞611之標籤621相同的標籤,分配給與第2驗證步驟對應之原子性關鍵詞612。類似地,電子裝置110可產生標籤622,該標籤622將會分配給與在應用程式之登入頁面中關閉登入底部表單(bottom sheet)之第3場景對應之場景關鍵詞613。此時,第3場景要測試之功能係關閉登入底部表格之功能,可以包括表示「登入下端表單」之「登入(login)」、「底部(bottom)」、「表單(sheet)」等單詞的方式,產生要分配給場景關鍵詞613之標籤622。In one embodiment, electronic device 110 can generate tags to be assigned to a keyword. Electronic device 110 can parse a keyword word by word and use at least a portion of the parsed words to generate tags to be assigned to the keyword. Electronic device 110 may generate tags to be assigned to a keyword in a manner that includes information indicating an action to test or verify a check step represented by the keyword, or a function to test or verify a scenario represented by the keyword. For example, referring to Figure 6, the electronic device 110 can enter search keywords in the search box of the application's address page to generate a label 621 corresponding to the atomicity keyword 611 to be assigned to the fourth test step for appending the address. The action to be tested in the fourth test step is the action of appending the address, which can include the word "Address" to represent "address," generating the label 621 to be assigned to the atomicity keyword 611. As another example, the electronic device 110 can enter search keywords in the search box of the address page to generate a label 621 corresponding to the atomicity keyword 612 to be assigned to the second verification step for verifying whether the output result matches the search keywords. At this point, the second verification step accompanies the fourth testing step, so the same label 621, which is assigned to the atomic keyword 611 corresponding to the fourth testing step, can be assigned to the atomic keyword 612 corresponding to the second verification step. Similarly, the electronic device 110 can generate a label 622, which will be assigned to the scenario keyword 613 corresponding to the third scenario of closing the login bottom sheet on the application's login page. At this point, the function to be tested in the third scene is to disable the function of logging into the bottom form. This can include words such as "login", "bottom", and "sheet" to represent "login to the bottom form", generating a label 622 to be assigned to scene keyword 613.

於一實施例中,電子裝置110可於對一個以上之關鍵詞進行分組之後,刪除各組內之特定關鍵詞。具體而言,特定組同時包括場景關鍵詞及原子性關鍵詞,場景關鍵詞表示之複數個檢查步驟可包括原子性關鍵詞表示之檢查步驟。於此情形時,電子裝置110可刪除表示特定組內重複之場景關鍵詞與重複之檢查步驟之原子類型關鍵詞。In one embodiment, electronic device 110 can delete specific keywords within each group after grouping more than one keyword. Specifically, a specific group includes both scenario keywords and atomic keywords, where the scenario keywords represent multiple check steps, and the atomic keywords represent check steps. In this case, electronic device 110 can delete atomic type keywords representing duplicate scenario keywords and duplicate check steps within a specific group.

圖7係例示性地表示本發明之一實施例之電子裝置將一個以上之標籤與屬於一個以上之頁面之頁面元素彼此進行映射而獲得之映射圖的圖。Figure 7 is an illustrative diagram of a mapping obtained by an electronic device according to an embodiment of the present invention by mapping one or more labels to page elements belonging to one or more pages.

於一實施例中,電子裝置110可與測試一個以上之頁面之動作過程中產生之各種檢查步驟關聯地產生一個以上之關鍵詞,且可產生要分配給一個以上之關鍵詞之各者之一個以上之標籤。電子裝置110可將所產生之一個以上之標籤之各者與屬於一個以上之頁面之頁面元素中之一者進行映射。更具體而言,電子裝置110可將對應於特定頁面元素之與一個以上之檢查步驟相關之關鍵詞分組為一個組,且可將分配給屬於該組之關鍵詞之標籤與一個頁面元素相互進行映射。例如,參照圖7之表700,第1標籤可映射至第1頁面元素,第2標籤可映射至第2頁面元素。這意味著一個標籤可與一個頁面元素一對一進行映射。In one embodiment, electronic device 110 can generate one or more keywords in association with various check steps generated during the process of testing one or more pages, and can generate one or more tags to be assigned to each of the one or more keywords. Electronic device 110 can map each of the one or more generated tags to one of the page elements belonging to one or more pages. More specifically, electronic device 110 can group the keywords corresponding to a specific page element and related to one or more check steps into a group, and can map the tags assigned to the keywords belonging to that group to a page element. For example, referring to Table 700 of FIG7, the first tag can be mapped to the first page element, and the second tag can be mapped to the second page element. This means that a tag can be mapped one-to-one to a page element.

於另一實施例中,一個標籤可與兩個以上之頁面元素進行映射。如圖6中所作說明,電子裝置110亦可將與兩個以上之頁面元素對應之一個以上之檢查步驟相關的關鍵詞分組為一個組。於此情形時,可將分配給屬於該組之關鍵詞之標籤映射至兩個以上之頁面元素。In another embodiment, a tag can be mapped to two or more page elements. As illustrated in Figure 6, the electronic device 110 can also group keywords associated with one or more check steps corresponding to two or more page elements into a group. In this case, the tag assigned to the keyword belonging to that group can be mapped to two or more page elements.

圖8係說明本發明之一實施例之電子裝置基於用戶輸入而產生測試案例之腳本之過程的流程圖。於一實施例中,電子裝置110可藉由自用戶終端120接收到之用戶輸入而產生特定測試案例之腳本。Figure 8 is a flowchart illustrating the process by which an electronic device of one embodiment of the present invention generates scripts for test cases based on user input. In one embodiment, electronic device 110 can generate scripts for specific test cases by means of user input received from user terminal 120.

於動作S810中,電子裝置110可將用戶終端120連接至運行電子裝置110之環境,即裝置場(device farm),來傳輸應用程式之一個以上之頁面。裝置場可表示為了測試軟體應用程式而提供之測試基礎建設。In action S810, electronic device 110 can connect user terminal 120 to the environment running electronic device 110, i.e., device farm, to transmit one or more pages of the application. Device farm can represent a test infrastructure provided for testing software applications.

於動作S820中,電子裝置110可自用戶終端120接收用於產生測試案例之至少一個用戶輸入。於一實施例中,電子裝置110可基於在用戶終端120中渲染一個以上之頁面,而自用戶終端120接收至少一個用戶輸入。於用戶終端120中,可於顯示器上顯示應用程式之特定頁面,用戶可操作特定頁面以產生特定測試案例。於此過程中,用戶終端120可接收與屬於特定頁面之一個以上之頁面元素交互作用之至少一個用戶輸入。用戶終端120可將所接收到之至少一個用戶輸入傳輸至電子裝置110。例如,參照圖5,閘道頁面510可於用戶終端120上渲染,用戶終端120可接收點擊檢索圖標511之動作,並傳輸至電子裝置110。In action S820, electronic device 110 may receive at least one user input from user terminal 120 for generating test cases. In one embodiment, electronic device 110 may receive at least one user input from user terminal 120 based on rendering more than one page in user terminal 120. In user terminal 120, a specific page of the application may be displayed on a display, and the user may interact with the specific page to generate a specific test case. During this process, user terminal 120 may receive at least one user input that interacts with more than one page element belonging to the specific page. User terminal 120 may transmit the received at least one user input to electronic device 110. For example, referring to Figure 5, the gate page 510 can be rendered on the user terminal 120, and the user terminal 120 can receive the action of clicking the search icon 511 and transmit it to the electronic device 110.

於動作S830中,電子裝置110可識別與對應於至少一個用戶輸入之至少一個頁面元素進行映射之一個以上之標籤。In action S830, electronic device 110 can identify and map one or more tags corresponding to at least one page element of at least one user input.

於一實施例中,電子裝置110可識別與至少一個用戶輸入之各者對應之至少一個頁面元素。例如,用戶終端120可將與各用戶輸入表示之頁面元素有關之資訊傳輸至電子裝置110。電子裝置110可識別與所識別出之至少一個頁面元素進行映射而獲得之一個以上之標籤。例如,於一個標籤與一個頁面元素一對一映射之情形時,存在與特定頁面元素(例如,第1頁面元素)進行映射而獲得之特定標籤(例如,第1標籤)。於此情形時,電子裝置110可識別與各頁面元素映射之一個標籤。再例如,可能會有特定標籤與複數個頁面元素進行映射之情形。此時,複數個頁面元素可為彼此相關之元素。因此,於特定用戶輸入與複數個頁面元素中之一者對應之情形時,電子裝置110可將特定標籤識別為與特定用戶輸入對應之頁面元素。又,當特定用戶輸入之後連續之用戶輸入與複數個頁面元素中之一者對應之情形時,電子裝置110可忽略該用戶輸入。In one embodiment, electronic device 110 can identify at least one page element corresponding to each of at least one user input. For example, user terminal 120 can transmit information related to the page elements represented by each user input to electronic device 110. Electronic device 110 can identify more than one tag obtained by mapping to the identified at least one page element. For example, in the case of a one-to-one mapping between a tag and a page element, there exists a specific tag (e.g., the first tag) obtained by mapping to a specific page element (e.g., the first page element). In this case, electronic device 110 can identify a tag mapped to each page element. As another example, there may be a case where a specific tag is mapped to a plurality of page elements. At this time, the multiple page elements can be related to each other. Therefore, when a specific user input corresponds to one of the multiple page elements, the electronic device 110 can identify the specific tag as the page element corresponding to the specific user input. Furthermore, when subsequent user inputs following the specific user input correspond to one of the multiple page elements, the electronic device 110 can ignore the user input.

於動作840中,電子裝置110可識別被分配所識別出之一個以上之標籤之各者的關鍵詞,可組合與所識別出之關鍵詞對應之代碼來產生特定測試案例之腳本。In action 840, electronic device 110 can identify the keywords of each of the identified tags, and can combine the codes corresponding to the identified keywords to generate scripts for specific test cases.

於一實施例中,電子裝置110可針對所識別出之一個以上之標籤之各者,識別被分配了各標籤之至少一個關鍵詞,且可組合與所識別之至少一個關鍵詞對應之代碼來產生與各標籤對應之臨時腳本。於此,與關鍵詞對應之代碼可為表示關鍵詞表示之一個以上之檢查步驟之代碼。於被分配各標籤之關鍵詞為複數個之情形時,電子裝置110可根據複數個關鍵詞之各者表示之檢查步驟之執行順序來組合與複數個關鍵詞之各者對應之代碼,而產生與各標籤對應之臨時腳本。In one embodiment, the electronic device 110 can identify at least one keyword assigned to each of the identified more than one tag, and can combine the code corresponding to the identified at least one keyword to generate temporary scripts corresponding to each tag. Here, the code corresponding to the keyword can be code representing one or more check steps for the keyword representation. When there are multiple keywords assigned to each tag, the electronic device 110 can combine the code corresponding to each of the multiple keywords according to the execution order of the check steps representing each of the multiple keywords to generate temporary scripts corresponding to each tag.

於一實施例中,電子裝置110可針對所識別出之一個以上之標籤之各者,組合所產生之臨時腳本,產生特定測試案例之腳本。電子裝置110可基於至少一個用戶輸入之輸入順序,來確定至少一個頁面元素之動作順序。電子裝置110可根據各標籤與所映射之頁面元素之動作順序來組合與所識別出之一個以上之標籤之各者對應之臨時腳本,從而產生特定測試案例之腳本。此種方式可提高自動產生及管理測試案例之效率。In one embodiment, electronic device 110 can generate scripts for specific test cases by combining the generated temporary scripts for each of the identified one or more tags. Electronic device 110 can determine the action sequence of at least one page element based on the input sequence of at least one user input. Electronic device 110 can generate scripts for specific test cases by combining the temporary scripts corresponding to each of the identified one or more tags according to the action sequence of each tag and its mapped page element. This approach improves the efficiency of automatically generating and managing test cases.

本發明之方法可為利用電腦實現之方法。電腦可包括例如能夠實行處理之電子裝置。於本發明中,依序對該方法之各步驟進行了說明,但除依次實行各步驟以外,亦可按照任意組合之順序來實行。本發明之與順序圖或流程圖相關之說明並不排除對方法或演算法實施變更或修正,且並不意味著任一動作為必需者或較佳者。於一實施例中,可並列、反覆或啟發性地實行至少一部分步驟。於一實施例中,可省略至少一部分步驟、或追加其他步驟。The method of this invention can be implemented using a computer. The computer may include, for example, an electronic device capable of processing. In this invention, the steps of the method are described sequentially, but in addition to performing the steps sequentially, they may also be performed in any combination of orders. The descriptions of this invention related to sequence diagrams or flowcharts do not preclude changes or modifications to the method or algorithm, and do not imply that any action is necessary or preferred. In one embodiment, at least some steps may be performed in parallel, repeatedly, or heuristically. In one embodiment, at least some steps may be omitted, or other steps may be added.

本發明之各種實施例可以記錄於機器(Machine)可讀記錄媒體(Machine-Readable Storage Medium)中之軟體之形式實現。軟體可為用以實現本發明之各種實施例之軟體。本發明所屬之技術領域內之程式設計師可根據本發明記載之各種實施例而推測出軟體。例如,軟體可為包括機器可讀命令(例如,代碼或代碼段)之程式。機器係可根據自記錄媒體呼叫之命令而動作之裝置,例如可為電腦。於一實施例中,機器可為本發明之實施例之電子裝置。於一實施例中,機器之處理器執行所呼叫之命令,從而可使機器之構成要素實行與該命令對應之功能。於一實施例中,處理器可為本發明之實施例之處理器。記錄媒體可指能夠由機器讀取且儲存資料之所有種類之記錄媒體(Recording Medium)。記錄媒體例如可包括ROM(Read only memory,唯讀記憶體)、RAM(Random-access memory,隨機存取記憶體)、CD-ROM(Compact Disc Read-Only Memory,光碟唯讀記憶體)、磁帶、軟碟、光學資料儲存裝置等。於一實施例中,記錄媒體可為記憶體。於一實施例中,記錄媒體能夠以分散於與網路連接之電腦系統等之形態實現。軟體可分散儲存於電腦系統等來執行。記錄媒體可為非暫時性(non-transitory)記錄媒體。非暫時性記錄媒體係指無關於半永久或係臨時性儲存資料而實際存在之媒體(Tangible Medium),不包括暫時(transitory)傳播之信號(Signal)。Various embodiments of the present invention can be implemented in the form of software recorded on a machine-readable storage medium. The software can be any software used to implement the various embodiments of the present invention. Programmers in the art to which the present invention pertains can infer the software based on the various embodiments described in the present invention. For example, the software can be a program that includes machine-readable commands (e.g., code or code segments). A machine is a device capable of operating according to commands called from a recording medium, such as a computer. In one embodiment, the machine can be an electronic device of an embodiment of the present invention. In one embodiment, the machine's processor executes the called commands, thereby enabling the machine's components to perform functions corresponding to those commands. In one embodiment, the processor may be the processor of the embodiment of the present invention. The recording medium may refer to all types of recording medium capable of being read and storing data by a machine. Recording media may include, for example, ROM (Read-only memory), RAM (Random-access memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, optical data storage device, etc. In one embodiment, the recording medium may be memory. In one embodiment, the recording medium can be implemented in a form distributed across computer systems connected to a network. Software can be distributed and executed within computer systems, etc. Recording media can be non-transitory. Non-transitory recording media refers to media that actually exist without relation to semi-permanent or temporary data storage (Tangible Medium), excluding transiently transmitted signals.

以上,根據各種實施例對本發明之技術思想進行了說明,但本發明之技術思想包括能夠於本發明所屬之技術領域內具有常識者可理解之範圍內實現之各種置換、變化及變更。又,應理解此種置換、變化及變更可包括於隨附之發明申請專利範圍內。The technical concept of the present invention has been described above based on various embodiments. However, the technical concept of the present invention includes various substitutions, changes, and modifications that can be implemented within the scope of the art to which the present invention pertains and are understandable to a person of ordinary skill. Furthermore, it should be understood that such substitutions, changes, and modifications may be included within the scope of the appended invention claims.

110:電子裝置120:用戶終端200:電子裝置210:處理器220:記憶體230:通訊介面410:頁面420:原子性關鍵詞421:提醒圖標422:檢索圖標423:超市圖標430:場景關鍵詞510:閘道頁面511:檢索圖標520:檢索頁面521:檢索框522:檢索圖標530:關鍵詞結果頁面611:原子性關鍵詞612:原子性關鍵詞613:場景關鍵詞621:標籤622:標籤700:表S310:步驟S320:步驟S330:步驟S810:步驟S820:步驟S830:步驟S840:步驟110: Electronic Device 120: User Terminal 200: Electronic Device 210: Processor 220: Memory 230: Communication Interface 410: Page 420: Atomicity Keyword 421: Alert Icon 422: Search Icon 423: Supermarket Icon 430: Scene Keyword 510: Gate Page 511: Search Icon 520: Search Page 5 21: Search Box 522: Search Icon 530: Keyword Results Page 611: Atomic Keywords 612: Atomic Keywords 613: Scene Keywords 621: Tags 622: Tags 700: Table S310: Steps S320: Steps S330: Steps S810: Steps S820: Steps S830: Steps S840: Steps

圖1示出可應用本發明之一實施例之電子裝置之環境。圖2係本發明之一實施例之電子裝置之方塊圖。圖3係說明本發明之一實施例之電子裝置產生測試案例之過程的流程圖。圖4係說明本發明之一實施例之電子裝置與測試步驟及驗證步驟關聯地產生一個以上之關鍵詞之過程的圖。圖5係說明本發明之一實施例之電子裝置與測試步驟及驗證步驟關聯地產生關鍵詞之例示的圖。圖6係說明本發明之一實施例之電子裝置產生要分配給關鍵詞之標籤之過程的圖。圖7係例示性地表示本發明之一實施例之電子裝置將一個以上之標籤與屬於一個以上之頁面之頁面元素彼此進行映射而獲得之映射圖的圖。圖8係說明本發明之一實施例之電子裝置基於用戶輸入而產生測試案例之腳本之過程的流程圖。Figure 1 illustrates the environment in which an electronic device of one embodiment of the present invention can be applied. Figure 2 is a block diagram of the electronic device of one embodiment of the present invention. Figure 3 is a flowchart illustrating the process of generating test cases by the electronic device of one embodiment of the present invention. Figure 4 is a diagram illustrating the process of generating one or more keywords in conjunction with the test and verification steps of the electronic device of one embodiment of the present invention. Figure 5 is an illustration illustrating the generation of keywords in conjunction with the test and verification steps of the electronic device of one embodiment of the present invention. Figure 6 is a diagram illustrating the process of generating tags to be assigned to keywords by the electronic device of one embodiment of the present invention. Figure 7 is an illustrative diagram showing the mapping obtained by an electronic device according to an embodiment of the present invention by mapping one or more tags to page elements belonging to one or more pages. Figure 8 is a flowchart illustrating the process by which an electronic device according to an embodiment of the present invention generates test case scripts based on user input.

S310: 步驟 S320: 步驟 S330: 步驟 S310: Steps S320: Steps S330: Steps

Claims (15)

一種用以產生測試案例之方法,其係藉由電子裝置而執行者,包括如下步驟:與測試一個以上之頁面之動作之過程中可能產生之測試步驟及驗證步驟關聯地產生一個以上之關鍵詞;產生要分配給上述所產生之一個以上之關鍵詞各者的一個以上之標籤;及基於上述所產生之一個以上之標籤與屬於上述一個以上之頁面之頁面元素間之映射,產生包括至少一個檢查步驟之測試案例之腳本。A method for generating test cases, performed by an electronic device, includes the following steps: generating one or more keywords in association with test steps and verification steps that may occur during the process of testing one or more pages; generating one or more tags to be assigned to each of the generated one or more keywords; and generating a script for test cases including at least one check step based on the mapping between the generated one or more tags and page elements belonging to the one or more pages. 如請求項1之方法,其中產生上述一個以上之關鍵詞之步驟包括如下步驟:對應於單個測試步驟或單個驗證步驟產生原子性關鍵詞;及對應於包括用以驗證頁面之功能之複數個檢查步驟之單個場景,產生場景關鍵詞;上述場景關鍵詞由複數個原子性關鍵詞構成。The method of claim 1, wherein the steps for generating one or more of the above-mentioned keywords include the following steps: generating atomic keywords corresponding to a single test step or a single verification step; and generating scenario keywords corresponding to a single scenario including a plurality of check steps for verifying the functionality of a page; wherein the scenario keywords consist of a plurality of atomic keywords. 如請求項2之方法,其中一個測試步驟與屬於上述一個以上之頁面之一個頁面元素對應,且產生上述一個以上之關鍵詞之步驟包括如下步驟:以包括表示與上述一個測試步驟對應之上述一個頁面元素之資訊之方式產生原子性關鍵詞。As in the method of claim 2, one of the test steps corresponds to a page element belonging to one or more of the aforementioned pages, and the step of generating one or more of the aforementioned keywords includes the following steps: generating atomic keywords in a manner that includes information representing the aforementioned page element corresponding to the aforementioned test step. 如請求項1之方法,其中屬於上述一個以上之頁面之頁面元素表示構成上述一個以上之頁面各者所顯示之用戶介面的單個組件。As in the method of Request 1, a page element belonging to one or more of the aforementioned pages represents a single component constituting the user interface displayed by each of the aforementioned pages. 如請求項1之方法,其中產生上述一個以上之標籤之步驟包括如下步驟:基於屬於上述一個以上之頁面之頁面元素,對上述所產生之一個以上之關鍵詞進行分組;及針對根據上述分組之結果而產生之一個以上之組,向屬於各組之關鍵詞分配相同之標籤。The method of claim 1, wherein the step of generating the above-mentioned one or more tags includes the following steps: grouping the above-mentioned one or more keywords based on page elements belonging to the above-mentioned one or more pages; and assigning the same tag to the keywords belonging to each group for the one or more groups generated according to the above-mentioned grouping results. 如請求項1之方法,其中產生上述一個以上之標籤之步驟包括如下步驟:於一個測試步驟伴隨一個以上之驗證步驟之情形時,向與上述一個測試步驟及上述一個以上之驗證步驟關聯地產生之複數個關鍵詞分配相同之標籤。The method of claim 1, wherein the step of generating one or more of the above-mentioned tags includes the following steps: when a test step is accompanied by one or more verification steps, assigning the same tag to a plurality of keywords generated in association with the test step and the one or more of the verification steps. 如請求項1之方法,其中產生上述一個以上之標籤之步驟包括如下步驟:將上述一個以上之關鍵詞中之一個關鍵詞逐一單詞地進行解析,並使用所解析之單詞中之至少一部分來產生將向上述一個關鍵詞分配之標籤。The method of claim 1, wherein the step of generating one or more of the above-mentioned tags includes the following steps: parsing one of the above-mentioned keywords word by word, and using at least a portion of the parsed words to generate a tag to be assigned to the above-mentioned keyword. 如請求項1之方法,其中產生上述測試案例之腳本之步驟包括如下步驟:將上述所產生之一個以上之標籤之各者與屬於上述一個以上之頁面之頁面元素中之一者進行映射;接收用以產生上述測試案例之至少一個用戶輸入;及識別與上述至少一個用戶輸入對應之至少一個頁面元素,並識別與上述所識別之至少一個頁面元素映射之至少一個標籤,產生上述測試案例之腳本。The method of claim 1, wherein the step of generating the script for the test case includes the following steps: mapping each of the generated tags to one of the page elements belonging to the page; receiving at least one user input for generating the test case; and identifying at least one page element corresponding to the at least one user input, and identifying at least one tag mapped to the identified at least one page element, thereby generating the script for the test case. 如請求項8之方法,其中接收上述至少一個用戶輸入之步驟包括如下步驟:將上述用戶之一用戶終端連接至裝置場,該裝置場為上述電子裝置運行之環境;向上述用戶之裝置傳輸上述一個以上之頁面;及基於上述一個以上之頁面在上述用戶終端中渲染,而自上述用戶終端接收上述至少一個用戶輸入。The method of claim 8, wherein the step of receiving the at least one user input includes the following steps: connecting one of the user's user terminals to a device field, the device field being the environment in which the electronic device operates; transmitting the one or more pages to the user's device; and rendering the one or more pages in the user terminal, thereby receiving the at least one user input from the user terminal. 如請求項8之方法,其中產生上述測試案例之腳本之步驟包括如下步驟:針對上述至少一個標籤之各者,識別被分配上述各標籤之至少一個關鍵詞,並組合與上述至少一個關鍵詞對應之代碼來產生臨時腳本;及組合針對上述至少一個標籤各者所產生之臨時腳本來產生上述測試案例之腳本。As in the method of claim 8, the steps of generating the script for the test cases include the following steps: for each of the at least one tag, identifying at least one keyword assigned to each of the at least one tag, and combining the code corresponding to the at least one keyword to generate a temporary script; and combining the temporary script generated for each of the at least one tag to generate the script for the test cases. 如請求項10之方法,其中產生上述臨時腳本之步驟包括如下步驟:於被分配上述各標籤之關鍵詞為複數個之情形時,藉由將與被分配上述各標籤之複數個關鍵詞各者對應之代碼,按照與上述複數個關鍵詞各者對應之測試的執行順序進行組合,而產生與上述各標籤對應之臨時腳本。The method of claim 10, wherein the steps for generating the aforementioned temporary scripts include the following steps: when there are multiple keywords assigned to the aforementioned tags, by combining the codes corresponding to each of the multiple keywords assigned to the aforementioned tags in the execution order of the tests corresponding to each of the multiple keywords, a temporary script corresponding to each of the aforementioned tags is generated. 如請求項10之方法,其中產生上述測試案例之腳本之步驟包括如下步驟:基於上述至少一個用戶輸入之輸入順序,確定上述至少一個頁面元素之動作順序;及藉由將對應於上述至少一個標籤各者而產生之臨時腳本按照對應之頁面元素的動作順序進行組合,而產生上述測試案例之腳本。The method of claim 10, wherein the steps for generating the script for the above test cases include the following steps: determining the action order of the at least one page element based on the input order of the at least one user input; and generating the script for the above test cases by combining the temporary scripts generated corresponding to each of the at least one tag according to the action order of the corresponding page elements. 如請求項1之方法,其中產生上述一個以上之關鍵詞之步驟包括如下步驟:藉由針對上述一個以上之頁面執行預先儲存之複數個測試案例,而獲得構成上述複數個測試案例之各者之檢查步驟。The method of Request 1, wherein the steps for generating one or more of the above keywords include the following steps: obtaining the inspection steps for each of the above multiple test cases by performing a pre-stored plurality of test cases on the one or more of the above pages. 一種電子裝置,其包括:一個以上之處理器;及一個以上之記憶體,其等儲存有藉由上述一個以上之處理器執行之命令;且上述一個以上之處理器以如下方式構成:於執行上述命令時,執行如請求項1至13中任一項之方法。An electronic device includes: one or more processors; and one or more memories storing commands to be executed by the one or more processors; and the one or more processors are configured to perform the method of any one of claims 1 to 13 when executing the commands. 一種非暫時性電腦可讀記錄媒體,其係記錄藉由一個以上之處理器而執行時使上述一個以上之處理器實行動作之命令者,上述命令以如下方式構成:使上述一個以上之處理器執行如請求項1至13中任一項之方法。A non-temporary computer-readable recording medium that records commands that, when executed by one or more processors, cause the one or more processors to perform actions, wherein the commands are configured to cause the one or more processors to perform any of the methods described in claims 1 to 13.
TW113125231A 2024-06-25 2024-07-05 Apparatus, method, and recording medium for generating test case TWI912821B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2024-0082526 2024-06-25

Publications (2)

Publication Number Publication Date
TW202601384A TW202601384A (en) 2026-01-01
TWI912821B true TWI912821B (en) 2026-01-21

Family

ID=

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200104241A1 (en) 2018-09-28 2020-04-02 Sap Se Behavior driven development integration with test tool

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200104241A1 (en) 2018-09-28 2020-04-02 Sap Se Behavior driven development integration with test tool

Similar Documents

Publication Publication Date Title
US9910941B2 (en) Test case generation
US10387292B2 (en) Determining application test results using screenshot metadata
US8793660B2 (en) Automated testing of programming code for a web service
CN113704110B (en) Automatic testing method and device for user interface
US10705946B2 (en) Techniques for real time server testing in a production environment
CN111209202A (en) Terminal application testing method and device
CN105159833A (en) Automatic testing device and method
CN113360365B (en) Flow test method and flow test system
CN107404418B (en) Internet product testing method, device, equipment and storage medium
CN112363938A (en) Data processing method and device, electronic equipment and storage medium
CN113886216A (en) Interface test and tool configuration method, device, electronic equipment and storage medium
CN112817853A (en) Automatic test method, system and electronic equipment
CN114911770B (en) Database migration assessment method, device, equipment and medium
TWI912821B (en) Apparatus, method, and recording medium for generating test case
CN112084114B (en) Method and apparatus for testing interfaces
CN114490337A (en) Commissioning method, commissioning platform, equipment and storage medium
TW202601384A (en) Apparatus, method, and recording medium for generating test case
CN112948269B (en) Information processing method, information processing apparatus, electronic device, and readable storage medium
KR20260000167A (en) Apparatus, method, and recording medium for generating test case
CN116719735A (en) Test case generation method and device
TWI905825B (en) Apparatus, method, and recording medium for managing test data related to the execution of test case
CN108170557B (en) Method and apparatus for outputting information
TWI911647B (en) Electronic device, method performed by electronic device, and non-transitory computer-readable recording medium for managing keyword related to execution of test case
TWI897203B (en) Method, electronic device and recording medium for deployment automation of computer program
KR20250178016A (en) Apparatus, method, and recording medium for managing test data related to the execution of test case