TW202303388A - Device and method for identifying errors in a software application - Google Patents

Device and method for identifying errors in a software application Download PDF

Info

Publication number
TW202303388A
TW202303388A TW111122165A TW111122165A TW202303388A TW 202303388 A TW202303388 A TW 202303388A TW 111122165 A TW111122165 A TW 111122165A TW 111122165 A TW111122165 A TW 111122165A TW 202303388 A TW202303388 A TW 202303388A
Authority
TW
Taiwan
Prior art keywords
test
log
related information
presenting
error type
Prior art date
Application number
TW111122165A
Other languages
Chinese (zh)
Inventor
戈皮納斯 辛尼瓦桑
Original Assignee
新加坡商蝦皮Ip新加坡私人有限公司
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 新加坡商蝦皮Ip新加坡私人有限公司 filed Critical 新加坡商蝦皮Ip新加坡私人有限公司
Publication of TW202303388A publication Critical patent/TW202303388A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Aspects concern a method for identifying errors in a software application comprising obtaining a log of an execution of a plurality of test cases for a software application under test, searching for matches between regular expressions with strings in the log, wherein each regular expression is associated with an error type and, if a match of a regular expression with a string the log has been found, outputting information about the test for which the log contains the string and outputting the error type associated with the regular expression.

Description

軟體應用中鑑別錯誤的裝置及方法Device and method for identifying errors in software applications

本揭露之各種態樣涉及軟體應用中鑑別錯誤的裝置及方法。Various aspects of the present disclosure relate to devices and methods for identifying errors in software applications.

驗證與測試是開發軟體應用程式很重要的一環。尤其是,應鑑別出造成應用程式故障的錯誤,並修正之。目前存在各式各樣的工具,以運行開發中的應用程式之測試案例。這種測試工具通常產生日誌,指示應用程式在特定測試案例下的行為。通常,必須運行大量測試案例以確保應用程式在各種情況下皆正常運作。因此,創建出大量的日誌,且查閱這些日誌以尋找及修正故障的原因需要大量心力。Validation and testing is an important part of developing software applications. In particular, errors causing application failures should be identified and corrected. A variety of tools currently exist to run test cases for applications under development. Such testing tools typically generate logs indicating how the application behaved under certain test cases. Often, a large number of test cases must be run to ensure that the application functions correctly under various conditions. Therefore, a large number of logs are created, and reviewing these logs to find and correct the cause of the failure requires a lot of effort.

因此,希望有方法允許軟體應用程式中的錯誤之鑑別及修正更有效率。Therefore, it is desirable to have a method that allows the identification and correction of errors in software applications to be more efficient.

各種實施例涉及一種軟體應用中鑑別錯誤的方法,包括取得測試中軟體應用程式的複數個測試案例之執行的日誌,搜尋正規表達式與該日誌中字串的匹配處,其中每一正規表達式關聯於一錯誤類型,若找出正規表達式與日誌中字串的匹配處,輸出其日誌含有該字串的測試相關資訊,及輸出關聯於該正規表達式的該錯誤類型。Various embodiments relate to a method of identifying errors in a software application, comprising obtaining a log of the execution of a plurality of test cases of a software application under test, searching for a match between a regular expression and a string in the log, wherein each regular expression is associated with For an error type, if a match between the regular expression and the string in the log is found, output the test-related information whose log contains the string, and output the error type associated with the regular expression.

根據一實施例,取得日誌包括接收複數個測試案例的測試結果資料,及從測試結果資料剖析日誌。According to an embodiment, obtaining the log includes receiving test result data of a plurality of test cases, and parsing the log from the test result data.

根據一實施例,取得日誌包括根據複數個測試案例測試軟體應用程式。According to one embodiment, obtaining the logs includes testing the software application according to a plurality of test cases.

根據一實施例,上述方法包括判斷錯誤類型及正規表達式之間的關聯。According to an embodiment, the above method includes judging the relationship between the error type and the regular expression.

根據一實施例,測試相關資訊包括該測試案例之指示,或測試類別,或上述兩者。According to one embodiment, the test-related information includes an indication of the test case, or a test category, or both.

根據一實施例,輸出測試相關資訊及輸出錯誤類型包括將測試相關資訊及錯誤類型寫入報告日誌。According to an embodiment, outputting the test-related information and outputting the error type includes writing the test-related information and the error type into a report log.

根據一實施例,輸出測試相關資訊及輸出錯誤類型包括上傳報告日誌至伺服器。According to an embodiment, outputting test-related information and outputting error types includes uploading a report log to a server.

根據一實施例,輸出測試相關資訊及輸出錯誤類型包括呈現測試相關資訊及錯誤類型。According to an embodiment, outputting the test-related information and outputting the error type includes presenting the test-related information and the error type.

根據一實施例,呈現測試相關資訊包括呈現關聯於測試清單中的測試之資訊。According to one embodiment, presenting test-related information includes presenting information associated with tests in the test list.

根據一實施例,呈現測試相關資訊包括呈現分配至測試的故障根本原因。According to one embodiment, presenting test-related information includes presenting root causes of failures assigned to tests.

根據一實施例,上述方法包括響應於預先定義根本原因清單之使用者選擇,分配根本原因。According to an embodiment, the above method includes assigning a root cause in response to user selection of a predefined list of root causes.

根據一實施例,呈現測試相關資訊包括取得測試中軟體應用程式於錯誤發生時之使用者介面輸出之截圖,及呈現截圖。According to one embodiment, presenting the test-related information includes obtaining a screenshot of the user interface output of the software application under test when an error occurs, and presenting the screenshot.

根據一實施例,上述方法包括響應於對於截圖的使用者請求,呈現該截圖。According to an embodiment, the above method includes presenting the screenshot in response to a user request for the screenshot.

根據一實施例,呈現測試相關資訊包括呈現日誌之摘錄,摘錄包括日誌中已找出的匹配處之字串。According to one embodiment, the presentation test related information includes an excerpt of the presentation log, the excerpt including the found matches in the log.

根據一實施例,上述方法包括響應於日誌之摘錄的使用者請求,呈現日誌之摘錄。According to an embodiment, the above method includes presenting the excerpt of the diary in response to a user request for the excerpt of the diary.

根據一實施例,對於至少一錯誤類型而言,複數個正規表式關聯於該錯誤類型。According to one embodiment, for at least one error type, a plurality of regular expressions are associated with the error type.

根據一實施例,上述正規表達式是第一組正規表達式之正規表達式,上述方法更包括搜尋第二組正規表達式與日誌中字串的匹配處,其中第二組正規表達式之每一正規表達式關聯於至少一已通過測試案例、一故障測試案例及一測試案例之開端。According to an embodiment, the above-mentioned regular expression is a regular expression of the first set of regular expressions, and the above-mentioned method further includes searching for a match between the second set of regular expressions and the strings in the log, wherein each of the second set of regular expressions The regular expression is associated with at least one passed test case, one failed test case, and a start of a test case.

根據一實施例,搜尋第一組正規表達式之正規表達式與日誌中字串的匹配處,包括首先藉由搜尋第二組正規表達式之正規表達式關聯於測試案例之開端的匹配處,搜尋測試案例之開端,然後對該測試案例搜尋第一組正規表達式之正規表達式與日誌中字串之匹配處。According to one embodiment, searching for matches of the regular expressions of the first set of regular expressions to strings in the log includes first searching for matches of the regular expressions of the second set of regular expressions associated with the beginning of the test case, searching The beginning of the test case, and then search for the match between the regular expression of the first set of regular expressions and the string in the log for the test case.

根據一實施例,搜尋第一組正規表達式之正規表達式與日誌中字串之匹配處,包括首先藉由搜尋第二組正規表達式之正規表達式關聯於故障測試案例之匹配處,搜尋故障測試案例,然後對該測試案例搜尋第一組正規表達式之正規表達式與含有該測試案例的日誌中字串之匹配處。According to one embodiment, searching for a match between the regular expressions of the first set of regular expressions and the strings in the log includes first searching for the fault by searching for a match of the regular expressions of the second set of regular expressions associated with the fault test case test case, and then searches the test case for a match between the regular expression of the first set of regular expressions and the string in the log containing the test case.

根據一實施例,搜尋第一組正規表達式之正規表達式與日誌中字串之匹配處,包括查閱日誌,以及當找到日誌中字串與關聯於日誌結尾部分的正規表達式之匹配處則停止查閱日誌,上述日誌與搜尋正規表達式與日誌字串之匹配處有關。According to one embodiment, searching for a match between the regular expression of the first set of regular expressions and the string in the log includes consulting the log, and stopping the review when a match between the string in the log and the regular expression associated with the end of the log is found Logs, which are related to searching for matches between regular expressions and log strings.

根據一實施例,該等正規表達式包括至少一正規表達式關聯於預設錯誤類型,其中上述方法包括若找到至少一正規表達式與日誌之一行的匹配處,將預設錯誤類型輸出,除非在日誌的該行中也找到關聯於特定錯誤型態的正規表達式之匹配處。According to an embodiment, the regular expressions include at least one regular expression associated with a preset error type, wherein the method includes outputting the default error type if a match between at least one regular expression and a line of the log is found, unless Also find a match for the regular expression associated with the particular error type in that line of the log.

根據一實施例,提供一種伺服器電腦,其包括通訊界面、記憶體及處理單元,設置以根據上述實施例的其中一者執行方法。According to an embodiment, a server computer is provided, which includes a communication interface, a memory, and a processing unit, configured to execute the method according to one of the above embodiments.

根據一實施例,提供一種電腦程式元件,其包括程式指令,當被一或多個處理器執行時,致使一或多個處理器根據上述實施例的其中一者執行方法。According to one embodiment, there is provided a computer program element comprising program instructions which, when executed by one or more processors, cause the one or more processors to perform a method according to one of the above-mentioned embodiments.

根據一實施例,提供一種電腦可讀取媒體,包括程式指令,當被一或多個處理器執行時,致使一或多個處理器根據上述實施例的其中一者執行方法。According to one embodiment, there is provided a computer-readable medium comprising program instructions which, when executed by one or more processors, cause the one or more processors to perform a method according to one of the above-mentioned embodiments.

以下實施方式參考附加的圖示,圖式繪示本揭露可實施的特定細節及實施例。這些實施例被敘述足夠的細節,致能本技術領域中具有通常知識者可實施本揭露。在不脫離本揭露之範圍的前提下,可運用其他實施例,以及作出結構上、邏輯上的改變。各種實施例並不一定互斥,某些實施例可與一或多個其他實施例合併,以構成新的實施例。The following description refers to the accompanying drawings, which show specific details and examples in which the disclosure can be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the disclosure. Other embodiments may be utilized and structural and logical changes may be made without departing from the scope of the present disclosure. The various embodiments are not necessarily mutually exclusive, and some embodiments can be combined with one or more other embodiments to form new embodiments.

在其中一裝置或方法的說明中所敘述的實施例,對於其他裝置或方法而言也是類似地有效。同理,在裝置的說明中所敘述的實施例,對於系統或方法而言也是類似地有效,反之亦然。Embodiments described in the description of one of the devices or methods are similarly valid for the other devices or methods. Likewise, what is described in the description of an apparatus is similarly valid for a system or method, and vice versa.

在一實施例之說明中所敘述的特徵,可對應地應用於其他實施例中的相同或相似特徵。在一實施例之說明中所敘述的特徵,可對應地應用於其他實施例,即使在這些其他實施例中並沒有敘明。此外,如一實施例之說明中的特徵所敘述的添加及/或組合及/或替代,可對應地應用於其他實施例中的相同或相似的特徵。Features described in the description of one embodiment can be correspondingly applied to the same or similar features in other embodiments. Features described in the description of one embodiment can be correspondingly applied to other embodiments even if they are not described in these other embodiments. In addition, the additions and/or combinations and/or substitutions described for features in the description of one embodiment can be correspondingly applied to the same or similar features in other embodiments.

在各種實施例的說明中,關於特徵或元件所使用「一」與「該」的用詞,包含一或多個特徵或元件的參考。In the description of various embodiments, the use of "a" and "the" in relation to a feature or element includes references to one or more features or elements.

於此使用的「及/或」包含一或多個關於所列出項目的任何及或全部的組合。As used herein, "and/or" includes any and/or all combinations of one or more of the listed items.

以下將詳細敘述實施例。Examples will be described in detail below.

第1圖展示用以開發軟體應用程式的電腦100。FIG. 1 shows a computer 100 for developing software applications.

電腦100包括中央處理單元(CPU)101及系統記憶體(RAM)102。系統記憶體102是用以載入程式碼(即從硬碟103載入),CPU 101執行程式碼。The computer 100 includes a central processing unit (CPU) 101 and a system memory (RAM) 102 . The system memory 102 is used to load program codes (ie loaded from the hard disk 103 ), and the CPU 101 executes the program codes.

在本範例中,是假設使用者意圖使用電腦100開發軟體應用程式。In this example, it is assumed that the user intends to use the computer 100 to develop software applications.

為此,使用者將軟體開發環境104,例如像Xcode(針對iOS)之類的整合開發環境,執行在CPU 101上。To this end, the user executes a software development environment 104 , such as an integrated development environment like Xcode (for iOS), on the CPU 101 .

軟體開發環境104允許使用者為各種裝置106(例如智慧型手機)開發應用程式105,特別是智慧型手機。為此,CPU 101作為部分的軟體開發環境104,運行模擬器(simulator)以模擬應用程式所對應的裝置,例如Iphone。The software development environment 104 allows users to develop applications 105 for various devices 106 (eg, smartphones), especially smartphones. To this end, the CPU 101, as a part of the software development environment 104, runs a simulator (simulator) to simulate the device corresponding to the application program, such as an Iphone.

當使用者已成功開發應用程式,使用者可經由通訊網路107將應用程式發布給對應的裝置106,例如將應用程式上傳到應用程式商店(app store)以將其發布給智慧型手機。When the user has successfully developed the application program, the user can distribute the application program to the corresponding device 106 via the communication network 107, such as uploading the application program to an app store to distribute it to a smart phone.

然而在此之前,使用者應對應用程式105進行測試,以避免將無法正確運作的應用程式發布給裝置106。Before doing so, however, the user should test the application 105 to avoid distributing an application that does not work correctly to the device 106 .

為此,使用者更進一步在CPU 101上運行測試工具108,例如XC測試。藉由測試工具108,使用者可運行多個測試案例。因此,測試工具108將測試結果資料輸出在一或多個測試結果檔案中,例如XCRResult檔案,使用者可用其尋找應用程式105中的錯誤,並最終修正之。To this end, the user further runs a test tool 108 on the CPU 101 , such as an XC test. With the testing tool 108, the user can run multiple test cases. Therefore, the test tool 108 outputs the test result data in one or more test result files, such as XCRResult files, which the user can use to find errors in the application program 105 and finally correct them.

通常,會運行大量的測試。因此,會產生大量的測試結果資料,且查閱所有的結果資料對使用者而言,是很繁重的。Typically, a large number of tests are run. Therefore, a large amount of test result data will be generated, and it is very heavy for the user to check all the result data.

因此,根據各種實施例,提供一種處理測試結果資料的系統,允許更有效率地對測試結果進行分析。Accordingly, according to various embodiments, a system for processing test result data is provided that allows for more efficient analysis of test results.

第2圖根據一實施例展示測試系統200。FIG. 2 shows a test system 200 according to one embodiment.

主要組件可見於報告剖析器(parser)(或結果剖析器)201,以及具有報告前端(front end;FE)應用程式202(亦稱為根本原因分析(root cause analysus;RCA)FE應用程式)及報告後端(backend;BE)伺服器203(亦稱為RCA後端伺服器)的報告伺服器204。報告伺服器204可例如為一部份的雲,例如經由通訊網路100耦接至電腦100。The main components can be found in the Report Parser (or Results Parser) 201, and the Reporting Front End (FE) Application 202 (also known as the Root Cause Analyzes (RCA) FE Application) and The reporting server 204 of the reporting backend (BE) server 203 (also referred to as the RCA backend server). The reporting server 204 can be, for example, a part of a cloud, for example, coupled to the computer 100 via the communication network 100 .

報告剖析器201接收測試工具206在特定裝置(可如上述模擬的裝置)上測試軟體應用程式所產生的測試結果資料205(例如XCResult檔案)。測試工具206及報告剖析器201可例如是由電腦100所實作,但也可以是分配於多個機器。這些機器可例如是由Jenkins節點所實作。報告剖析器201將結果上傳至報告伺服器204。The report parser 201 receives the test result data 205 (such as XCResult file) generated by the test tool 206 to test the software application program on a specific device (such as the above-mentioned simulated device). The test tool 206 and the report parser 201 can be implemented by the computer 100, for example, but can also be distributed to multiple machines. These machines can be implemented, for example, by Jenkins nodes. The report parser 201 uploads the results to the report server 204 .

報告剖析器201及報告伺服器204進行測試結果的報告及測試結果的分析,並提供藉由結合多種技術(排除單純的HTML報告)以報告故障之根本原因的選項。尤其是,根據各種實施例,報告剖析器從測試結果資料剖析出資訊,以幫助使用者208輕易理解軟體應用程式故障的根本原因。使用者208可經由報告伺服器204獲取報告剖析器204之結果。The report parser 201 and the report server 204 perform test result reporting and test result analysis, and provide options for reporting root causes of failures by combining multiple techniques (excluding simple HTML reports). In particular, according to various embodiments, the report parser parses information from the test result data to help the user 208 easily understand the root cause of software application failures. The results of the report parser 204 can be obtained by the user 208 via the report server 204 .

舉例來說,報告剖析器剖析XCResult檔案,並以JSON或XML格式準備報告。RCA FE應用程式202以表格的格式展示報告。舉例來說,RCA FE應用程式202可持續上線及運行,讓使用者208得以持續存取。For example, the report parser parses XCResult files and prepares reports in JSON or XML format. The RCA FE application 202 presents reports in tabular format. For example, the RCA FE application 202 can continue to be online and running, so that the user 208 can continue to access it.

RCA BE伺服器203使用資料庫儲存報告。RCA BE伺服器203可具有充足的記憶體以儲存截圖(scrrenshot)及日誌,以及可具有充足的處理能力以同時服務許多請求。RCA BE伺服器203亦可持續上線及運行,讓使用者208得以持續存取。The RCA BE server 203 uses a database to store reports. The RCA BE server 203 may have sufficient memory to store scrrenshots and logs, and may have sufficient processing power to serve many requests simultaneously. The RCA BE server 203 can also go online and run continuously, so that the user 208 can keep accessing.

以下,將參考第3圖更詳細地敘述報告剖析器201的運作。Hereinafter, the operation of the report parser 201 will be described in more detail with reference to FIG. 3 .

第3圖展示報告剖析器300。FIG. 3 shows a report parser 300 .

如參考第2圖所解釋的,報告剖析器300接收測試結果檔案301。測試結果檔案301可以是不同裝置(可以是模擬的裝置)上的軟體應用程式測試的結果檔案,或是不同軟體應用程式測試的結果檔案。每一測試結果檔案可視為測試報告的原始版本。舉例來說,於測試案例之執行結束後,Xcode(iOS開發及測試的工具)以XCResult格式產生測試報告。測試報告可由Xcode UI及命令列(command line)工具所剖析。As explained with reference to FIG. 2 , report parser 300 receives test result file 301 . The test result file 301 may be a result file of a software application test on a different device (which may be a simulated device), or a result file of a different software application test. Each test result file can be regarded as the original version of the test report. For example, after the execution of the test case, Xcode (a tool for iOS development and testing) generates a test report in XCResult format. Test reports can be analyzed by Xcode UI and command line tools.

每一測試結果檔案301可包含測試案例的一或多個日誌。報告剖析器300從測試結果檔案301(例如XCResult檔案)提取測試案例的日誌,並於操作302剖析日誌。舉例來說,對於一XCResult檔案,報告剖析器300內部地使用Xcode命令列介面(command line interface;CLI)以剖析日誌及取得每一測試案例的測試類別、方法、狀態、持續時間等細節。於操作303,報告剖析器300將日誌上傳至RCA伺服器309(對應於報告伺服器204)。Each test result file 301 may contain one or more logs of a test case. The report parser 300 extracts test case logs from a test result file 301 (such as an XCResult file), and parses the logs at operation 302 . For example, for an XCResult file, the report parser 300 internally uses the Xcode command line interface (CLI) to parse the log and obtain details such as test type, method, status, duration, etc. of each test case. In operation 303, the report parser 300 uploads the logs to the RCA server 309 (corresponding to the report server 204).

報告剖析器300更一行行地讀取測試案例的日誌,並找出應用程式中的錯誤之類型(若測試案例碰上應用程式的故障)及測試案例遭遇故障時的操作(以幫助鑑別故障的可能原因)。報告剖析器300於操作304使用正規表示式(regular expression;regex)機制為之,也就是在日誌中尋找正規表示式的匹配處。然後,報告剖析器300準備報告311(包含使用regex機制剖析的結果),並將報告311上傳至RCA伺服器309,例如以JSON格式上傳。報告剖析器300可更產生Junit XML,以向Jenkins伺服器310報告。The report parser 300 reads the log of the test case more line by line, and finds out the type of error in the application (if the test case encounters a failure in the application) and the operation when the test case encounters a failure (to help identify the cause of the failure) Possible Causes). The report parser 300 uses a regular expression (regex) mechanism to do so in operation 304 , that is, finds a match of the regular expression in the log. Then, the report parser 300 prepares a report 311 (including the result of parsing using the regex mechanism), and uploads the report 311 to the RCA server 309 , eg in JSON format. The report parser 300 can further generate Junit XML for reporting to the Jenkins server 310 .

報告剖析器300可於操作307更尋找故障案例的測試結果資料中的截圖附件,並於操作308將截圖附件映射至各自的測試案例,以及將截圖上傳至RCA伺服器309。The report parser 300 can search for the screenshot attachment in the test result data of the fault case in operation 307 , map the screenshot attachment to the respective test case in operation 308 , and upload the screenshot to the RCA server 309 .

根據各種實施例,RCA FE應用程式202是網頁應用程式(例如基於React),以互動使用者介面(UI)展示報告剖析器300以表格格式上傳的報告311。舉例來說,可基於Material UI,但亦可使用任何其他的UI框架。According to various embodiments, the RCA FE application 202 is a web application (eg, based on React) that displays the reports 311 uploaded by the report analyzer 300 in a tabular format with an interactive user interface (UI). For example, it can be based on Material UI, but any other UI framework can also be used.

舉例來說,RCA FE應用程式202具有總結畫面,用以呈現報告總結(Reports Summary)及RCA總結。總結畫面以總結(日期及時間、測試類別、任務名稱、通過的測試案例之數目、故障的測試案例之數目及測試案例總數)展示報告311的清單,支援編頁(pagination),以RCA總結(有多少是出於伺服器問題、UI問題、腳本問題…等原因)展示報告的清單,並具有刪除每一報告的按鍵。For example, the RCA FE application 202 has a summary screen for displaying Reports Summary and RCA Summary. The summary screen displays a list of report 311 with summary (date and time, test category, task name, number of passed test cases, number of failed test cases, and total number of test cases), supports pagination, and uses RCA summary ( How many are due to server issues, UI issues, script issues...etc) displays a list of reports with a button to delete each report.

RCA FE應用程式202更具有報告細節畫面,以展示報告311中每一測試案例的詳細資訊。The RCA FE application 202 further has a report detail screen to display the detailed information of each test case in the report 311 .

第4圖展示RCA FE應用程式202所呈現的報告細節畫面400之範例。FIG. 4 shows an example of a report detail screen 400 presented by the RCA FE application 202 .

報告細節畫面展示每一測試案例之關鍵資訊,像是類別名稱401、方法名稱402、狀態403,及持續時間404。The report details screen shows key information of each test case, such as class name 401 , method name 402 , status 403 , and duration 404 .

此外,報告細節畫面400強調故障案例的故障標籤405,像是UI、功能面、框架…等。使用者可將游標停留在狀態上,使RCA FE應用程式202展示故障原因。In addition, the report detail screen 400 emphasizes the fault tab 405 of the fault case, such as UI, functional plane, framework, . . . . The user can hover the cursor over the status to make the RCA FE application 202 display the cause of the failure.

報告細節畫面400更為每一測試案例提供按鍵406,以呈現選取根本原因的下拉式選單。The report details screen 400 further provides a button 406 for each test case to present a drop-down menu for selecting a root cause.

第5圖以針對某一測試案例所呈現的下拉式選單,展示第4圖之報告細節畫面的一部分。Figure 5 shows a portion of the report detail screen in Figure 4 with a drop-down menu presented for a certain test case.

報告細節畫面400更具有每一測試案例的按鍵407以展示測試案例的截圖,以及具有按鍵408以展示測試案例的日誌。The report detail screen 400 further has a button 407 for each test case to display a screenshot of the test case, and a button 408 to display a log of the test case.

第6圖以針對某一測試案例所呈現的截圖,展示第4圖之報告細節畫面的一部分。Figure 6 shows a part of the report detail screen in Figure 4 with a screenshot presented for a certain test case.

截圖600展示所測試應用程式於故障時的使用者介面。Screenshot 600 shows the user interface of the tested application at the time of failure.

類似地,可呈現測試案例的日誌。Similarly, a log of a test case may be presented.

此外,報告細節畫面400具有按鍵409,以允許使用者為測試案例輸入評論。Additionally, the report details screen 400 has a button 409 to allow the user to enter comments for the test case.

根據各種實施例,RCA BE伺服器203是網頁伺服器。RCA BE伺服器203揭露表現層狀態轉換(Representational State Transfer;REST)呼叫的應用程式介面(Application Programming Interface;API)以上傳及取得報告。舉例來說,RCA BE伺服器203使用Django作框架,使用Django REST API框架、Gunicorn加Nginx作為部署設置,以及使用Mysql作為資料庫。According to various embodiments, the RCA BE server 203 is a web server. The RCA BE server 203 exposes an Application Programming Interface (API) for Representational State Transfer (REST) calls to upload and obtain reports. For example, RCA BE server 203 uses Django as framework, Django REST API framework, Gunicorn plus Nginx as deployment setup, and Mysql as database.

舉例來說,RCA BE伺服器203提供以下API: api/reports => 提供帶有細節資訊(包含案例細節)的報告清單 api/report => 為特定報告提供案例資訊 api/summary => 僅提供每一構件(build)的測試總結及RCA總結 api/update_rca => PUT呼叫以更新每一測試案例的RCA api/upload_logs => POST呼叫以將測試日誌(test log)文字檔上傳至伺服器 api/upload_screen_shot => POST呼叫以將截圖上傳至伺服器 media => 呼叫以存取先前已上傳的媒體(圖像或文字) For example, the RCA BE server 203 provides the following APIs: api/reports => provide a list of reports with detailed information (including case details) api/report => provide case information for a specific report api/summary => only provide test summary and RCA summary of each component (build) api/update_rca => PUT call to update RCA for each test case api/upload_logs => POST call to upload the test log text file to the server api/upload_screen_shot => POST call to upload screenshot to server media => call to access previously uploaded media (image or text)

舉例來說,在節點機器上執行測試案例的Jenkins任務從不同的測試裝置尋找測試結果檔案(例如XCResult檔案)。一旦發現原始報告(即測試結果檔案),Jenkins任務開始剖析原始報告,合併來自所有裝置的報告,並使用上述API將合併後的報告上傳至RCA伺服器。最後,使用者可藉由將網頁應用程式載入瀏覽器,以存取報告。報告瀏覽器可支援各種平台,並可提供比上述更多的資訊。For example, a Jenkins task that executes a test case on a node machine looks for test result files (such as XCResult files) from different test fixtures. Once the raw report (i.e. the test result file) is found, the Jenkins job starts to parse the raw report, merges the reports from all devices, and uploads the merged report to the RCA server using the above API. Finally, users can access reports by loading the web application into a browser. The report browser supports various platforms and can provide more information than the above.

如上所述,於操作304使用regex機制鑑別錯誤之類型(導致所測試應用程式於測試案例中的故障),是各種實施例之重要特徵。As mentioned above, using the regex mechanism at operation 304 to identify the type of error that caused the application under test to fail in the test case is an important feature of various embodiments.

第7圖展示流程圖700,繪示從測試日誌鑑別出錯誤類型。FIG. 7 shows a flowchart 700 illustrating identifying error types from test logs.

一旦收到測試結果檔案701(例如XCResult檔案),報告剖析器300於操作702剖析測試結果檔案701,以尋找測試結果檔案701中的測試案例之日誌。在測試結果檔案701是XCResult檔案的案例中,報告剖析器300可使用XCParse為之。Once the test result file 701 (such as the XCResult file) is received, the report parser 300 parses the test result file 701 to find logs of test cases in the test result file 701 at operation 702 . In the case where the test result file 701 is an XCResult file, the report parser 300 can use XCParse for it.

當報告剖析器300已找到日誌,會一行行地處理日誌,也就是於操作703開始以(外層)迴圈處理各行。於(外層)迴圈的每次反復中,報告剖析器300以下列方式使用正規表達式處理當下的行。When the report parser 300 has found the log, it processes the log line by line, that is, starts processing each line in an (outer) loop at operation 703 . On each iteration of the (outer) loop, report parser 300 processes the current line using regular expressions in the following manner.

在本範例中,是使用以下正規表達式,請參考以下的Regex 1至7。 正規表達式: 1.     test_start_regex = r'Test [Cc]ase \'\-\[(.+?)\s(.+?)\]\' started' 2.     passed_test_regex = r'Test [Cc]ase \'\-\[(.+?)\s(.+?)\]\' passed\s\((.+?)\)' 3.     failed_test_regex = r'Test [Cc]ase \'\-\[(.+?)\s(.+?)\]\' failed\s\((.+?)\)' 4.     assert_fail_regex = r'(.+?)\serror:\s(.+?) [Ff]ailed(.*)' 5.     cs_cmd_fail_regex = r'(.+?)\serror code=\s(.+?)' 6.     tear_down_regex = r'(.+?)Tear Down(.+?)' 7.     log_end_failed_regex = r'Test Suite \'RetryTestSuite\' failed at (.+?)' 8.     log_end_passed_regex = r'Test Suite \'RetryTestSuite\' passed at (.+?)' In this example, the following regular expressions are used, please refer to Regex 1 to 7 below. Regex: 1. test_start_regex = r'Test [Cc]ase \'\-\[(.+?)\s(.+?)\]\' started' 2. passed_test_regex = r'Test [Cc]ase \'\-\[(.+?)\s(.+?)\]\' passed\s\((.+?)\)' 3. failed_test_regex = r'Test [Cc]ase \'\-\[(.+?)\s(.+?)\]\' failed\s\((.+?)\)' 4. assert_fail_regex = r'(.+?)\serror:\s(.+?) [Ff]ailed(.*)' 5. cs_cmd_fail_regex = r'(.+?)\serror code=\s(.+?)' 6. tear_down_regex = r'(.+?)Tear Down(.+?)' 7. log_end_failed_regex = r'Test Suite \'RetryTestSuite\' failed at (.+?)' 8. log_end_passed_regex = r'Test Suite \'RetryTestSuite\' passed at (.+?)'

報告剖析器300於操作704檢查是否存在Regex 1的匹配處,於操作705檢查是否存在Regex 7的匹配處,以及於操作706檢查是否存在Regex 8的匹配處。The report parser 300 checks whether there is a match of Regex 1 in operation 704 , checks whether there is a match of Regex 7 in operation 705 , and checks whether there is a match of Regex 8 in operation 706 .

若存在Regex 7的匹配處,報告剖析器300停止迴圈,因為已達到日誌的結束(表示故障)。If there is a Regex 7 match, the report parser 300 stops looping because the end of the log has been reached (indicating a failure).

舉例來說,測試日誌中有一行「Test Suite 'RetryTestSuite' failed at 2020-11-04 16:49:06.060」,故存在Regex 7的匹配處。For example, there is a line in the test log "Test Suite 'RetryTestSuite' failed at 2020-11-04 16:49:06.060", so there is a Regex 7 match.

若存在Regex 8的匹配處,報告剖析器300停止迴圈,因為已達到日誌的結束(表示通過)。If there is a match for Regex 8, the report parser 300 stops looping because the end of the log has been reached (indicating a pass).

舉例來說,測試日誌中有一行「Test Suite 'RetryTestSuite' passed at 2020-11-04 16:49:06.060」,故存在Regex 8的匹配處。For example, there is a line "Test Suite 'RetryTestSuite' passed at 2020-11-04 16:49:06.060" in the test log, so there is a Regex 8 match.

若存在Regex 1的匹配處,報告剖析器300於操作707從當下的行中剖析出測試類別及測試案例。報告剖析器將結果寫入包括當下測試案例之內容的字典722,以將報告上傳給RCA伺服器309。If there is a match of Regex 1, the report parser 300 parses the test category and test case from the current line in operation 707 . The report parser writes the results to a dictionary 722 containing the content of the current test case to upload the report to the RCA server 309 .

舉例來說,測試日誌中有一行「Test Case '-[TestMicrositeTextComponent testTextContentAsSet]' started」,故存在Regex 1的匹配處。For example, there is a line "Test Case '-[TestMicrositeTextComponent testTextContentAsSet]' started" in the test log, so there is a match of Regex 1.

當報告剖析器300已在日誌中找到測試案例之開端(藉由尋找Regex 1的匹配處),報告剖析器300於操作708開始內部迴圈,以處理下一行。在內部迴圈的每次反復中,報告剖析器300於操作709檢查是否存在Regex 4的匹配處,於操作710檢查是否存在Regex 5的匹配處,於操作711檢查是否存在Regex 2的匹配處,於操作712檢查是否存在Regex 3的匹配處,以及於操作713檢查是否存在Regex 6的匹配處。When the report parser 300 has found the beginning of the test case in the log (by looking for a Regex 1 match), the report parser 300 starts an inner loop at operation 708 to process the next line. In each iteration of the inner loop, the report parser 300 checks at operation 709 for a Regex 4 match, at operation 710 for a Regex 5 match, and at operation 711 for a Regex 2 match, In operation 712 it is checked whether there is a match of Regex 3, and in operation 713 it is checked whether there is a match of Regex 6.

若找到Regex 4的匹配處,報告剖析器300於操作714檢查以下UI錯誤正規表達式是否有其中一者符合當下的行: ●query_fail_regex = r'Get number of matches for: Elements matching predicate \'(.+?)\'' ●query_fail_regex2 = r'Get all elements bound by index for: Elements matching predicate \'(.+?)\'' ●exits_fail = r'Checking existence of (.+?)' ●find_fails = r'Find: Elements matching predicate \'(.+?)\'' ●find_fails2 = r'Find the\s(.+?)' ●snap_shot_fails = r'Using snapshot previously cached by application' If a match of Regex 4 is found, the report parser 300 checks at operation 714 whether one of the following UI error regular expressions matches the current row: ● query_fail_regex = r'Get number of matches for: Elements matching predicate \'(.+?)\'' ●query_fail_regex2 = r'Get all elements bound by index for: Elements matching predicate \'(.+?)\'' ● exits_fail = r'Checking existence of (.+?)' ● find_fails = r'Find: Elements matching predicate \'(.+?)\'' ● find_fails2 = r'Find the\s(.+?)' ●snap_shot_fails = r'Using snapshot previously cached by application'

若這些正規表達式的其中一者符合,報告解析器300於操作715將這視為已發生的UI錯誤,並將”ui_err”寫入字典722。If one of these regular expressions matches, the report parser 300 considers this as a UI error that has occurred and writes “ui_err” to the dictionary 722 at operation 715 .

若這些正規表達式中沒有任何一者符合,報告解析器300於操作716將這視為另一類型的錯誤,並將”other”寫入字典722。If none of these regular expressions match, report parser 300 treats this as another type of error at operation 716 and writes “other” to dictionary 722 .

舉例來說,測試日誌中有一行「 t =   282.14s     Assertion Failure: TestMicrositeTextComponent.m:54: Failed to get matching snapshot: No matches found for Elements matching predicate 'identifier ==[c] "viewText"' from input {(」,故存在Regex 4的匹配處。For example, there is a line in the test log " t = 282.14s Assertion Failure: TestMicrositeTextComponent.m:54: Failed to get matching snapshot: No matches found for Elements matching predicate 'identifier ==[c] "viewText"' from input { (", so there is a match in Regex 4.

若找到Regex 5的匹配處,報告剖析器300於操作717將這視為核心伺服器(Core Server;CS)錯誤,並將”cs_err”寫入字典。If a match of Regex 5 is found, the report parser 300 regards this as a core server (Core Server; CS) error in operation 717 and writes "cs_err" into the dictionary.

舉例來說,測試日誌中有一行「2021-06-04 09:37:55.615466+0800 ShopeeSG-Runner[6735:1581092] Updating shop info failed , error code= 19」,故存在Regex 5的匹配處。For example, there is a line in the test log "2021-06-04 09:37:55.615466+0800 ShopeeSG-Runner[6735:1581092] Updating shop info failed , error code= 19", so there is a Regex 5 match.

若找到Regex 2的匹配處,報告剖析器300將測試案例視為已通過。報告剖析器300於操作718從日誌剖析出持續時間,並將狀態及持續時間寫入字典722。If a match of Regex 2 is found, the report parser 300 considers the test case passed. Report parser 300 parses the duration from the log and writes the status and duration to dictionary 722 at operation 718 .

舉例來說,測試日誌中有一行「Test Case '-[TestMicrositeTextComponent testTextContentAsSet]' passed (44.243 seconds)」,故存在Regex 2的匹配處。For example, there is a line "Test Case '-[TestMicrositeTextComponent testTextContentAsSet]' passed (44.243 seconds)" in the test log, so there is a match for Regex 2.

若找到Regex 3的匹配處,報告剖析器300將測試案例視為故障。報告剖析器300於操作719從日誌解析出持續時間,並將狀態及持續時間寫入字典722。此外,報告剖析器300於操作720解析對應於當下測試案例的截圖(展示所測試應用程式故障時所呈現的)。然後,報告剖析器300離開內部迴圈,並繼續進行外部迴圈操作703(以當下行的下一行,也就是內部迴圈所處理的行的下一行)。當整套測試案例皆已被剖析,字典722之內容(例如於操作721轉換為JSON及/或XML)以及截圖將於操作723被上傳至RCA伺服器309。If a match of Regex 3 is found, the report parser 300 treats the test case as a failure. Report parser 300 parses the duration from the log and writes the status and duration to dictionary 722 at operation 719 . In addition, the report parser 300 parses the screenshot corresponding to the current test case (presented when the tested application fails) at operation 720 . Then, the report parser 300 leaves the inner loop and continues with the outer loop operation 703 (to the next line down, ie, the line next to the line processed by the inner loop). When the entire set of test cases has been parsed, the contents of the dictionary 722 (eg, converted to JSON and/or XML at operation 721 ) and screenshots are uploaded to the RCA server 309 at operation 723 .

舉例來說,測試日誌中有一行「Test Case '-[TestMicrositeTextComponent testTextContentAsSet]' failed (283.255 seconds)」,故存在Regex 3的匹配處。For example, there is a line "Test Case '-[TestMicrositeTextComponent testTextContentAsSet]' failed (283.255 seconds)" in the test log, so there is a Regex 3 match.

報告解析器300判定Regex 3吻合,並可從此行解析出持續時間。The report parser 300 determines that the Regex 3 matches and can parse out the duration from this line.

若找到Regex 6的匹配處,報告解析器300離開內部迴圈,並繼續進行外部迴圈操作703(以當下行的下一行,也就是內部迴圈所處理的行的下一行)。舉例來說,測試日誌中有一行「t =   282.85s Tear Down」,故存在Regex 6的匹配處。If a match of Regex 6 is found, the report parser 300 leaves the inner loop, and proceeds to the outer loop operation 703 (to the next line that goes down, that is, the next line of the line processed by the inner loop). For example, there is a line "t = 282.85s Tear Down" in the test log, so there is a Regex 6 match.

上述實施例可加入更多特徵,像是 ●    執行測試 (即主動進行測試,而非僅接收測試結果) ●    與JIRA整合 ●    已填上RCA的電子郵件報告 ●    圖示測試套件健康 ●    使用者認證 The above embodiments can add more features, such as ● Execute tests (i.e. actively test instead of just receiving test results) ● Integration with JIRA ● Email report filled with RCA ● Graphical test suite health ● User authentication

整體而言,根據各種實施例,提供一種方法,如第8圖所繪示。Overall, according to various embodiments, a method is provided, as illustrated in FIG. 8 .

第8圖展示流程圖800,繪示軟體應用中鑑別錯誤的方法。FIG. 8 shows a flowchart 800 illustrating a method for identifying errors in a software application.

於步驟801,取得測試中軟體應用程式的複數個測試案例之執行的日誌。In step 801, execution logs of a plurality of test cases of the software application under test are obtained.

於步驟802,搜尋正規表達式與日誌中字串的匹配處,其中每一正規表達式關聯於一種錯誤類型。In step 802, matches of regular expressions and strings in the log are searched, wherein each regular expression is associated with an error type.

若找出正規表達式與日誌中字串的匹配處,則於步驟803輸出其日誌含有該字串的測試相關資訊,及輸出關聯於該正規表達式的錯誤類型。If a match between the regular expression and the string in the log is found, then in step 803, output the test-related information whose log contains the string, and output the error type associated with the regular expression.

根據各種實施例,換句話說,正規表達式是用以尋找測試日誌中,允許取得導致測試中軟體應用程式故障之錯誤類型的字串。當找到正規表達式的匹配處,相應的錯誤類型及測試相關資訊一起被輸出。According to various embodiments, in other words, regular expressions are used to find strings in test logs that allow for the type of error that caused the software application under test to fail. When a regular expression match is found, the corresponding error type is output along with test-related information.

第8圖的方法可如上述實施例之情境,例如用於將原始測試結果檔案(例如XCResult檔案)轉換為基於網頁的測試報告之工具,上述基於網頁的測試報告可將來自其他測試框架(例如Espresso + Junit and Selenium + Junit)的測試報告匯集成一個單獨的網頁應用程式,其中該工具提供分析及匯集故障原因的能力,以及發布測試報告的能力。藉此,該工具可實作演算法,將XCResult檔案轉換為基於網頁的報告,以及將來自多個平台的測試報告併入一個單獨的來源。The method in Fig. 8 can be used in the context of the above-mentioned embodiment, for example, as a tool for converting original test result files (such as XCResult files) into web-based test reports, and the above-mentioned web-based test reports can be obtained from other test frameworks (such as XCResult files) Espresso + Junit and Selenium + Junit) test reports into a single web application, where the tool provides the ability to analyze and collect failure causes, and the ability to publish test reports. With this, the tool implements algorithms to convert XCResult files into web-based reports, as well as consolidate test reports from multiple platforms into a single source.

藉此,該工具可統一來自iOS、Android及網頁自動化等自動化平台的報告,並可進行分析及找出故障的可能原因。此外,該工具可提供選項給使用者選取預先定義的根本原因,以及為每一故障提供自訂的評論。該工具可例如將(各種測試案例的)結果以報告及根本原因的表格呈現,並可支援對於舊報告的維護。In this way, the tool can unify reports from automation platforms such as iOS, Android, and web automation, and can analyze and find possible causes of failures. In addition, the tool provides options for users to select predefined root causes and provide custom comments for each failure. The tool can, for example, present the results (of various test cases) in a table of reports and root causes, and can support maintenance of old reports.

支援軟體應用程式之測試的根本原因分析,可減少人工作業的需求,並藉以幫助軟體開發週期的自動化。該工具提供詳細的測試報告,幫助開發者(使用者)於執行測試時非常快速地理解問題,並修復之。該工具藉由本身讀取日誌以尋找日誌中的錯誤跡象(例如使用regex(正規表達式)驗證),自動地鑑別出某些故障,故減少了報告分析的時間。根據日誌型態所定義的正規表達式,可用以解析日誌,以快速地找出所需資訊。Root cause analysis that supports testing of software applications reduces the need for manual work and thereby aids in the automation of the software development cycle. The tool provides detailed test reports to help developers (users) understand problems very quickly and fix them when executing tests. The tool automatically identifies certain failures by reading the logs itself to look for signs of errors in the logs (for example, using regex (regular expression) validation), thus reducing the time for report analysis. According to the regular expression defined by the log type, it can be used to parse the log to quickly find the required information.

第8圖的方法可用於不同種類的軟體應用程式測試,像是不同平台的UI自動化,及API自動化。根據各種實施例,提供一種工具,以藉由提供一個平台,其具備作為統一的測試自動化報告平台之能力,將測試結果視覺化及記錄,以提升自動化測試生命週期的生產力及效率。該工具可以被任何利用跨平台(網頁、行動、API)自動化測試的軟體公司所使用。The method in Figure 8 can be used for different types of software application testing, such as UI automation for different platforms, and API automation. According to various embodiments, a tool is provided to improve the productivity and efficiency of an automated testing life cycle by providing a platform capable of serving as a unified test automation reporting platform for visualizing and recording test results. The tool can be used by any software company utilizing cross-platform (web, mobile, API) automated testing.

舉例來說,第8圖的方法是由第9圖中所繪示的伺服器電腦所實施。For example, the method in FIG. 8 is implemented by the server computer shown in FIG. 9 .

第9圖根據一實施例展示伺服器電腦系統900。FIG. 9 shows a server computer system 900 according to one embodiment.

伺服器電腦系統600包含通訊界面601(例如設置以接收測試結果資料或測試日誌,及設置以輸出其日誌含有字串及錯誤類型的測試相關資訊)。伺服器電腦600更包含處理單元602及記憶體603。記憶體603可被處理單元602用以儲存例如待處理的資料,像是日誌。伺服器電腦設置以進行第8圖之方法。應注意的是,伺服器電腦系統900可以是包括複數個電腦的分散式系統。The server computer system 600 includes a communication interface 601 (for example, configured to receive test result data or test logs, and configured to output test-related information whose logs contain character strings and error types). The server computer 600 further includes a processing unit 602 and a memory 603 . The memory 603 can be used by the processing unit 602 to store, for example, data to be processed, such as logs. The server computer is set up to perform the method in Figure 8. It should be noted that the server computer system 900 may be a distributed system including a plurality of computers.

於此敘述的方法可由一或多個電路所進行,於此敘述的各種處理或運算單元、裝置及運算實體(例如處理單元602)可由一或多個電路所實作。在一實施例中,「電路」可理解為任何一種邏輯實作實體,可以是硬體、軟體、韌體或其任何組合。因此,在一實施例中,「電路」可以是硬線的(hard-wired)邏輯電路或可程式化邏輯電路,像是可程式化處理器,例如微控制器。「電路」也可以是處理器所執行或實作的軟體,例如任何一種電腦程式,例如使用虛擬機器編碼的電腦程式。根據替代的實施例,於此敘述的各自功能之任何其他種實作亦可理解為「電路」。The methods described herein may be performed by one or more circuits, and various processing or computing units, devices and computing entities described herein (such as the processing unit 602 ) may be implemented by one or more circuits. In one embodiment, a "circuit" can be understood as any kind of logical implementation entity, which can be hardware, software, firmware or any combination thereof. Thus, in one embodiment, a "circuit" may be a hard-wired logic circuit or a programmable logic circuit, such as a programmable processor, such as a microcontroller. A "circuit" may also be software executed or implemented by a processor, such as any computer program, such as a computer program coded using a virtual machine. According to alternative embodiments, any other implementation of the respective functions described herein may also be understood as a "circuit".

雖然本揭露已參考特定的實施例所具體展示及敘述,本領域具有通常知識者應理解,在不脫離附上的請求項所定義發明之精神及範圍的情況下,可在其中作出各種形式的變化及細節。因此,本發明之範圍是由附上的請求項所指示,意圖包含請求項的均等物之意義及範圍所帶來的所有變化。Although the present disclosure has been shown and described with reference to specific embodiments, it should be understood by those skilled in the art that various embodiments may be made therein without departing from the spirit and scope of the invention as defined in the appended claims. changes and details. Accordingly, the scope of the present invention is indicated by the appended claims and is intended to embrace all changes that come within the meaning and range of equivalents of the claims.

100:電腦 101:中央處理單元 102:系統記憶體 103:硬碟 104:軟體開發環境 105:應用程式 106:裝置 107:通訊網路 108:測試工具 200:測試系統 201:報告剖析器 202:報告前端應用程式 203:報告後端伺服器 204:報告伺服器 205:測試結果資料 206:測試工具 207:裝置 208:使用者 301:測試結果檔案 302-308:操作 309:RCA伺服器 310:Jenkins伺服器 311:報告 400:報告細節畫面 401:類別名稱 402:方法名稱 403:狀態 404:持續時間 405:故障標籤 406-409:按鍵 500:報告細節畫面的一部分 600:截圖 700:流程圖 701:測試結果檔案 702-721:操作 722:字典 723:操作 800:流程圖 801-803:步驟 900:伺服器電腦系統 901:通訊界面 902:處理單元 903:記憶體 100: computer 101:Central Processing Unit 102: System memory 103: hard disk 104:Software development environment 105: Apps 106: Device 107: Communication network 108:Test tools 200: Test System 201:Report Parser 202:Report front-end application 203:Report backend server 204:Report server 205: Test result information 206:Test tool 207: Device 208: user 301:Test result file 302-308: Operation 309:RCA server 310:Jenkins server 311: Report 400:Report detail screen 401: Category name 402: method name 403: Status 404: Duration 405: Fault label 406-409: button 500: Part of the report detail screen 600: screenshot 700: Flowchart 701:Test result file 702-721: Operation 722:Dictionary 723:Operation 800: flow chart 801-803: Steps 900: server computer system 901: communication interface 902: processing unit 903: Memory

本發明將可藉由參考說明書中的實施方式並搭配非限定的範例及附加的圖示,而更佳地理解,其中: 第1圖展示用以開發軟體應用程式的電腦。 第2圖根據一實施例展示測試系統。 第3圖根據一實施例展示報告剖析器。 第4圖根據一實施例展示所顯示的報告細節畫面之範例。 第5圖展示第4圖之報告細節畫面的一部份,附帶針對一測試案例所顯示的下拉式選單。 第6圖展示第4圖之報告細節畫面的一部份,附帶針對一測試案例所顯示的畫面。 第7圖根據一實施例展示一流程圖,繪示從測試日誌鑑別出錯誤類型。 第8圖根據一實施例展示一流程圖,繪示軟體應用中鑑別錯誤的方法。 第9圖根據一實施例展示伺服器電腦系統。 The present invention will be better understood by referring to the embodiments in the specification together with non-limiting examples and accompanying figures, wherein: Figure 1 shows a computer used to develop software applications. Figure 2 shows a test system according to one embodiment. Figure 3 shows a report parser, according to one embodiment. FIG. 4 shows an example of a report detail screen displayed according to one embodiment. Figure 5 shows a portion of the report details screen of Figure 4, with the drop-down menu displayed for a test case. Figure 6 shows a portion of the report detail screen of Figure 4, with the screen displayed for a test case. FIG. 7 shows a flowchart illustrating identifying error types from test logs according to an embodiment. FIG. 8 shows a flowchart illustrating a method for identifying errors in a software application according to an embodiment. Figure 9 shows a server computer system according to one embodiment.

800:流程圖 800: flow chart

801-803:步驟 801-803: Steps

Claims (18)

一種軟體應用中鑑別錯誤的方法,包括: 取得一測試中軟體應用程式的複數個測試案例之執行的一日誌; 搜尋正規表達式與該日誌中字串的匹配處,其中每一正規表達式關聯於一錯誤類型; 若找出一正規表達式與該日誌一字串的一匹配處,輸出其日誌含有該字串的測試相關資訊,及輸出關聯於該正規表達式的該錯誤類型; 其中取得該日誌包括接收複數個測試案例的測試結果資料,及從測試結果資料剖析該日誌; 其中該等正規表達式是第一組正規表達式之正規表達式,及該方法更包括搜尋第二組正規表達式與該日誌中字串的匹配處;以及 將該第二組正規表達式之每一正規表達式關聯於一已通過測試案例、一故障測試案例及一測試案例之開端,其中若該正規表達式關聯於該測試案例之開端,該方法更搜尋該錯誤類型。 A method for identifying errors in a software application, comprising: obtaining a log of the execution of a plurality of test cases of a software application under test; searching for matches of regular expressions with strings in the log, where each regular expression is associated with an error type; If a match between a regular expression and a character string of the log is found, output the test-related information whose log contains the character string, and output the error type associated with the regular expression; Obtaining the log includes receiving test result data of a plurality of test cases, and analyzing the log from the test result data; wherein the regular expressions are regular expressions of the first set of regular expressions, and the method further includes searching for matches of the second set of regular expressions with strings in the log; and associating each regular expression of the second set of regular expressions with a passed test case, a failing test case, and the beginning of a test case, wherein if the regular expression is associated with the beginning of the test case, the method further Search for this error type. 如請求項1之方法,其中取得該日誌包括根據該複數個測試案例測試該軟體應用程式。The method of claim 1, wherein obtaining the log includes testing the software application according to the plurality of test cases. 如請求項1或2之方法,包括判斷該錯誤類型及該等正規表達式之間的關聯。The method as claimed in claim 1 or 2, including judging the relationship between the error type and the regular expressions. 如請求項1至3任一項之方法,其中該測試相關資訊包括該測試案例之一指示,或一測試類別,或上述兩者。The method according to any one of claims 1 to 3, wherein the test-related information includes an indication of the test case, or a test category, or both. 如請求項1至4任一項之方法,其中輸出該測試相關資訊及輸出該錯誤類型包括將該測試相關資訊及該錯誤類型寫入一報告日誌。The method according to any one of claims 1 to 4, wherein outputting the test-related information and outputting the error type includes writing the test-related information and the error type into a report log. 如請求項5之方法,其中輸出該測試相關資訊及輸出該錯誤類型包括上傳該報告日誌至一伺服器。The method of claim 5, wherein outputting the test-related information and outputting the error type includes uploading the report log to a server. 如請求項1至6任一項之方法,其中輸出該測試相關資訊及輸出該錯誤類型包括呈現該測試相關資訊及該錯誤類型。The method according to any one of claims 1 to 6, wherein outputting the test-related information and outputting the error type includes presenting the test-related information and the error type. 如請求項7之方法,其中呈現該測試相關資訊包括呈現關聯於一測試清單中的測試之資訊。The method of claim 7, wherein presenting the test-related information includes presenting information associated with tests in a test list. 如請求項7或8之方法,其中呈現該測試相關資訊包括呈現分配至該測試的故障之一根本原因。The method of claim 7 or 8, wherein presenting the test-related information includes presenting a root cause of a failure assigned to the test. 如請求項9之方法,包括響應於一預先定義根本原因清單之一使用者選擇,分配該根本原因。The method of claim 9, comprising assigning the root cause in response to a user selection of a predefined list of root causes. 如請求項7至10任一項之方法,其中呈現該測試相關資訊包括取得該測試中軟體應用程式於錯誤發生時之使用者介面輸出之一截圖,及呈現該截圖。The method according to any one of claims 7 to 10, wherein presenting the test-related information includes obtaining a screenshot of the user interface output of the software application under test when an error occurs, and presenting the screenshot. 如請求項11之方法,包括響應於對於該截圖的使用者請求,呈現該截圖。The method of claim 11, comprising presenting the screenshot in response to a user request for the screenshot. 如請求項7至12任一項之方法,其中呈現該測試相關資訊包括呈現該日誌之一摘錄,該摘錄包括該日誌中已找出的該匹配處之該字串。The method according to any one of claims 7 to 12, wherein presenting the test-related information comprises presenting an excerpt of the log, the excerpt including the string of the match found in the log. 如請求項13之方法,包括響應於該日誌之該摘錄的使用者請求,呈現該日誌之該摘錄。The method of claim 13, comprising presenting the excerpt of the diary in response to a user request for the excerpt of the diary. 如請求項1至14任一項之方法,其中對於至少一錯誤類型而言,複數個正規表式關聯於該錯誤類型。The method of any one of claims 1 to 14, wherein for at least one error type, a plurality of regular expressions are associated with the error type. 一種伺服器電腦,包括一通訊界面、一記憶體及一處理單元,設置以執行請求項1至15任一項之方法。A server computer, including a communication interface, a memory, and a processing unit, configured to execute the method of any one of claim items 1 to 15. 一種電腦程式元件,包括程式指令,當被一或多個處理器執行時,致使該一或多個處理器執行請求項1至15任一項之方法。A computer program element, including program instructions, which, when executed by one or more processors, causes the one or more processors to perform the method of any one of claim items 1 to 15. 一種電腦可讀取媒體,包括程式指令,當被一或多個處理器執行時,致使該一或多個處理器執行請求項1至15任一項之方法。A computer-readable medium comprising program instructions which, when executed by one or more processors, cause the one or more processors to perform the method of any one of claims 1 to 15.
TW111122165A 2021-07-01 2022-06-15 Device and method for identifying errors in a software application TW202303388A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
SG10202107254R 2021-07-01
SG10202107254R 2021-07-01

Publications (1)

Publication Number Publication Date
TW202303388A true TW202303388A (en) 2023-01-16

Family

ID=84706481

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111122165A TW202303388A (en) 2021-07-01 2022-06-15 Device and method for identifying errors in a software application

Country Status (2)

Country Link
TW (1) TW202303388A (en)
WO (1) WO2023277802A2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117170984B (en) * 2023-11-02 2024-01-30 麒麟软件有限公司 Abnormal detection method and system for stand-by state of linux system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239158A (en) * 2013-06-07 2014-12-24 Sap欧洲公司 Analysis engine for automatic analysis and error log linking
US10756949B2 (en) * 2017-12-07 2020-08-25 Cisco Technology, Inc. Log file processing for root cause analysis of a network fabric
CN112740184B (en) * 2018-09-27 2023-12-22 美国西门子医学诊断股份有限公司 Method for deterministically reporting causes and effects in a software system
CN110223173A (en) * 2019-05-20 2019-09-10 深圳壹账通智能科技有限公司 Trade link abnormality eliminating method and relevant device
CN112306787B (en) * 2019-07-24 2022-08-09 阿里巴巴集团控股有限公司 Error log processing method and device, electronic equipment and intelligent sound box
CN112256532A (en) * 2020-11-10 2021-01-22 深圳壹账通创配科技有限公司 Test interface generation method and device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
WO2023277802A2 (en) 2023-01-05
WO2023277802A3 (en) 2023-02-02

Similar Documents

Publication Publication Date Title
US11675691B2 (en) System and method for performing automated API tests
CN110018955B (en) Generating automated test scripts by transforming manual test cases
US10127141B2 (en) Electronic technology resource evaluation system
US10552301B2 (en) Completing functional testing
AU2017258963B2 (en) Simultaneous multi-platform testing
US9218269B2 (en) Testing multiple target platforms
US9792203B2 (en) Isolated testing of distributed development projects
US10353807B2 (en) Application development management
US10067858B2 (en) Cloud-based software testing
US8839202B2 (en) Test environment managed within tests
US9069902B2 (en) Software test automation
US20060230319A1 (en) Automated migration of software instructions
US11138097B2 (en) Automated web testing framework for generating and maintaining test scripts
CN110825619A (en) Automatic generation method and device of interface test case and storage medium
US20160371173A1 (en) Diagnosis of test failures in software programs
US9342439B2 (en) Command coverage analyzer
US11449414B2 (en) Mapping test parameter data elements during heterogeneous component-based testing in a portable automation framework in both API mode and UI mode
CN115658529A (en) Automatic testing method for user page and related equipment
US9678856B2 (en) Annotated test interfaces
Li et al. ADAutomation: An activity diagram based automated GUI testing framework for smartphone applications
TW202303388A (en) Device and method for identifying errors in a software application
CN117632710A (en) Method, device, equipment and storage medium for generating test code
US20230195825A1 (en) Browser extension with automation testing support
US11734134B2 (en) Automatically locating resources using alternative locator expressions during heterogeneous component-based testing in a portable automation framework
TW202311947A (en) Device and method for re-executing of test cases in software application