TW202311947A - Device and method for re-executing of test cases in software application - Google Patents

Device and method for re-executing of test cases in software application Download PDF

Info

Publication number
TW202311947A
TW202311947A TW111122167A TW111122167A TW202311947A TW 202311947 A TW202311947 A TW 202311947A TW 111122167 A TW111122167 A TW 111122167A TW 111122167 A TW111122167 A TW 111122167A TW 202311947 A TW202311947 A TW 202311947A
Authority
TW
Taiwan
Prior art keywords
test
test case
state
cases
execution
Prior art date
Application number
TW111122167A
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 TW202311947A publication Critical patent/TW202311947A/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/3688Test management for test execution, e.g. scheduling of test suites

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

A method for re-executing of test cases including obtaining (i) a first status of an execution of a test case, (ii) re-executing the test case if the first status of the execution of the test case indicates a fail status, obtaining a second status of the re-execution of the test case, repeating steps (i) and (ii) for each test case in a plurality of test cases, obtaining a log of a plurality of first statuses of a plurality of test cases and at least one second status of at least one re-executed test case, searching for matches between test case names of the plurality of test cases and the at least one re-executed test case and if a match between the test case names has been found, changing the first status of the match to a skip status and using the second status as a final status of the match.

Description

軟體應用中重新執行測試用例之裝置和方法Apparatus and method for re-executing test cases in software applications

本揭露之各種態樣涉及重新執行軟體應用程式中的測試案例之裝置及方法。Aspects of the present disclosure relate to apparatus and methods for re-executing test cases in software applications.

驗證與測試是開發軟體應用程式很重要的一環。目前存在各式各樣的工具,以運行開發中的應用程式之測試案例。在微服務(micro service)環境中,測試案例執行通常是在不同機器或不同網路中。測試執行可能因為微服務網路時延(network delay)、延遲、虛擬機器或Docker實例(instance)等問題而故障。因此,測試案例應是可重複且決定性的。Validation and testing is an important part of developing software applications. A variety of tools currently exist to run test cases for applications under development. In a micro service environment, test cases are usually executed on different machines or in different networks. Test execution may fail due to issues such as microservice network delay, latency, virtual machine or Docker instance. Therefore, test cases should be repeatable and conclusive.

通常,Go語言(Golang)測試框架並不支援故障測試案例的自動化重新測試。由於沒有自動化重新執行的功能,當進行故障分類時,需要手動重新執行每一故障案例,因而需要大量心力重新執行故障測試案例。在這種情況下,當運行複數個Golang測試案例時,為了達成良好的投資報酬率(return on investment;ROI)及較高的測試效率,支援測試案例之重新執行是至關重要的。Usually, the Go language (Golang) testing framework does not support automated retesting of failed test cases. Since there is no automatic re-execution function, when fault classification is performed, each fault case needs to be manually re-executed, thus requiring a lot of effort to re-execute fault test cases. In this case, when running multiple Golang test cases, in order to achieve a good return on investment (ROI) and high test efficiency, it is crucial to support test case re-execution.

因此,希望有途徑可使軟體應用程式中的測試案例之鑑別、重新執行及管理更有效率。Therefore, it is desirable to have a way to make the identification, re-execution and management of test cases in software applications more efficient.

各種實施例關注一種用於重新執行軟體應用程式中的測試案例的方法,包含(i)取得測試案例執行的第一狀態;(ii)若測試案例執行之第一狀態指示故障狀態,重新執行測試案例,並取得測試案例重新執行之第二狀態;對複數個測試案例之每一測試案例,重複步驟(i)及(ii);取得複數個測試案例之複數個第一狀態及至少一已重新執行測試案例之至少一第二狀態的日誌;搜尋複數個測試案例之測試案例名稱與至少一已重新執行測試案例之測試案例名稱的匹配處,若有找到測試案例名稱之間的匹配處,將匹配處的第一狀態改變為略過狀態,將第二狀態用作為匹配處之最終狀態。Various embodiments are directed to a method for re-executing a test case in a software application, comprising (i) obtaining a first state of test case execution; (ii) re-executing the test if the first state of test case execution indicates a failure state case, and obtain the second state of the test case re-execution; for each test case of the plurality of test cases, repeat steps (i) and (ii); obtain the plurality of first states of the plurality of test cases and at least one of the re-executed Execute the log of at least one second state of the test case; search for a match between the test case name of the plurality of test cases and the test case name of at least one re-executed test case, and if a match between the test case names is found, the The first state of the match is changed to the skipped state, and the second state is used as the final state of the match.

根據一實施例,方法包含將日誌中帶有略過狀態的測試案例移除。According to an embodiment, the method includes removing test cases with a status of skipped from the log.

根據一實施例,方法包含檢查測試案例之重新運行旗標狀態。According to an embodiment, the method includes checking a rerun flag status of a test case.

根據一實施例,方法包含若測試案例執行之第一狀態指示故障狀態且重新運行旗標狀態指示測試案例在重新運行模式下,重新執行測試案例。According to an embodiment, the method includes re-executing the test case if the first state of test case execution indicates a failure state and the rerun flag state indicates that the test case is in rerun mode.

根據一實施例,軟體應用程式是以Golang撰寫。According to one embodiment, the software application is written in Golang.

根據一實施例,取得日誌包含接收複數個測試案例之測試結果資料,及從測試結果資料解析出日誌。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 an embodiment, the method includes outputting test-related information by writing the test-related information to a report log.

根據一實施例,方法包含若測試案例執行之第一狀態指示故障狀態,判斷錯誤來源。According to an embodiment, the method includes determining the source of the error if the first state of the test case execution indicates a failure state.

根據一實施例,方法包含輸出錯誤來源相關資訊。According to an embodiment, the method includes outputting information about the source of the error.

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

根據一實施例,輸出測試相關資訊及輸出錯誤類型包含顯示測試相關資訊及錯誤來源。According to an embodiment, outputting test-related information and outputting error types includes displaying test-related information and error sources.

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

根據一實施例,提供一種伺服器電腦,包含通訊界面、記憶體及處理單元,設置以執行根據上述其中一實施例的方法。According to an embodiment, a server computer is provided, including 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, including program instructions, which, when executed by one or more processors, cause one or more processors to execute the method according to one of the above-mentioned embodiments.

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

以下詳細敘述,是參考以繪圖方式展示出特定細節及實施例的附圖,本揭露可實現於所述實施例中。這些實施例被充分詳細地敘述,以使本領域中具有通常知識者得以實現本揭露。亦可運用其他實施例,並且可以在不脫離本揭露之範圍的前提下,作出邏輯上的改變。各種實施例並不一定是互斥的,某些實施例可以與一或多個其他實施例合併,以形成新的實施例。The following detailed description refers to the accompanying drawings that diagrammatically show specific details and embodiments in which the present disclosure can be practiced. These examples are described in sufficient detail to enable those of ordinary skill in the art to practice the present disclosure. Other embodiments may be utilized 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 context of one device or method are similarly valid for other devices or methods. Likewise, embodiments described in the context of a device are similarly valid for a system or method, and vice versa.

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

在各種實施例之情境中,關於特徵或元件所使用「一」與「該」的用詞,包含一或多個特徵或元件的參考。In the context of the various embodiments, the terms "a" and "the" when used with reference to a feature or element include 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。系統記憶體(例如隨機存取記憶體(RAM))102是用以載入程式碼(例如從硬碟(即HDD)103載入),CPU 101執行程式碼。The computer 100 includes a central processing unit (CPU) 101 and a system memory (RAM) 102 . The system memory (for example, random access memory (RAM)) 102 is used to load program codes (for example, from a hard disk (ie, HDD) 103 ), and the CPU 101 executes the program codes.

在本範例中,是假設使用者意圖使用電腦100開發軟體應用程式。為此,使用者將軟體開發環境104執行在CPU 101上。使用者可使用電腦語言,像是Golang這種靜態型(statically typed)、已編譯的程式語言,以開發應用程式。In this example, it is assumed that the user intends to use the computer 100 to develop software applications. To this end, the user executes the software development environment 104 on the CPU 101 . Users can use computer languages, such as Golang, a statically typed, compiled programming language, to develop applications.

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

當使用者已成功開發應用程式,使用者可經由通訊網路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。為此,使用者更進一步在CPU 101上運行測試工具108,例如在異質環境中使用Golang測試框架(Golang testing framework)以進行自動化測試應用程式介面(Application Programming Interfaces;API)上的表現層狀態轉換(Representational State Transfer;REST)。異質環境可意指具有硬體及源自不同廠商之系統軟體的系統。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 . To this end, the user further runs the testing tool 108 on the CPU 101, for example, using the Golang testing framework (Golang testing framework) in a heterogeneous environment to perform automatic testing of the presentation layer state transition on the Application Programming Interfaces (API) (Representational State Transfer; REST). A heterogeneous environment may mean a system with hardware and system software from different vendors.

現行的Golang測試框架僅支援測試案例的三種測試狀態:通過(PASS)、故障(FAIL)及略過(SKIPPED)。不存在代表「重新執行(RERUN)」的方式。這可能導致測試的低效率,因為可能需要手動測試以重新執行測試案例。The current Golang test framework only supports three test states of test cases: pass (PASS), failure (FAIL) and skip (SKIPPED). There is no way to represent "RERUN". This can lead to inefficiencies in testing as manual testing may be required to re-execute test cases.

在典型的自動化測試中,使用者可簡單地將所有測試案例部署在相同的環境或網路中,比起將測試案例部署在異質環境中,較不複雜。這不可避免地使得複雜度及間歇性故障的可能性呈指數地增加。為了在異質環境中追求更高的自動化ROI及測試效率,會非常希望有重新執行或重新運行的特徵。In typical automated testing, users can simply deploy all test cases in the same environment or network, which is less complicated than deploying test cases in heterogeneous environments. This inevitably increases the complexity and the possibility of intermittent failures exponentially. In order to pursue higher automation ROI and test efficiency in heterogeneous environments, it is very desirable to have the feature of re-execution or re-run.

因此,根據各種實施例,展示一種重新執行測試案例的系統。這使得測試效率更佳。Thus, according to various embodiments, a system for re-executing test cases is presented. This makes testing more efficient.

在各種實施例中,測試工具108可用以重新執行軟體應用程式中的測試案例。測試工具108可取得測試中軟體應用程式之測試案例執行的第一狀態。第一狀態可例如為通過狀態或故障狀態。In various embodiments, the testing tool 108 can be used to re-execute test cases in a software application. The testing tool 108 can obtain a first state of test case execution of the software application under test. The first status may eg be a pass status or a fault status.

若測試案例執行之第一狀態指示故障狀態,測試工具108可重新執行測試案例。If the first state of test case execution indicates a failure state, the test tool 108 may re-execute the test case.

測試工具108可取得測試案例重新執行之第二狀態。第二狀態可例如為通過狀態或故障狀態。The testing tool 108 can obtain the second status of the test case re-execution. The second status may eg be a pass status or a fault status.

若複數個測試案例中的每一測試案例之初始執行指示故障狀態,測試工具108可重複測試案例的執行步驟及測試案例的重新執行。If the initial execution of each of the plurality of test cases indicates a failure condition, the test tool 108 may repeat the execution steps of the test case and the re-execution of the test case.

測試工具108可取得複數個測試案例之複數個第一狀態及至少一已重新執行測試案例之至少一第二狀態之日誌(或報告)。測試工具108可搜尋複數個測試案例之測試案例名稱與至少一已重新執行測試案例之測試名稱的匹配處。若有找出測試案例名稱的匹配處,該匹配處的第一狀態可改變為略過狀態,第二狀態可用作為該匹配處的最終狀態。The testing tool 108 can obtain logs (or reports) of a plurality of first states of a plurality of test cases and at least a second state of at least one re-executed test case. The testing tool 108 may search for a match between the test case names of the plurality of test cases and the test name of at least one re-executed test case. If a match of the test case name is found, the first state of the match can be changed to the skipped state, and the second state can be used as the final state of the match.

於此所使用的用語「重新執行(re-execution)」可以與「重新運行(re-run)」互相替換。As used herein, the term "re-execution" can be used interchangeably with "re-run".

在各種實施例中,電腦100可將日誌中帶有略過狀態的測試案例移除。由於日誌中帶有略過狀態的測試案例已被重新執行,藉由移除略過的測試案例,可簡化日誌而使資料管理更有效率。In various embodiments, the computer 100 may remove test cases with skipped status from the log. Since the test cases with skipped status in the log have been re-executed, the log can be simplified to make data management more efficient by removing the skipped test cases.

在各種實施例中,電腦100可檢查測試案例的重新運行旗標之狀態。重新運行旗標可指示測試案例是在重新運行模式之下,或者不是在重新運行模式之下。舉例來說,若重新運行旗標被設為「1」則可觸發重新運行模式,當重新運行旗標被設為「0」時則可撤銷重新運行模式。In various embodiments, computer 100 may check the status of the test case's rerun flag. The rerun flag may indicate whether the test case is in rerun mode, or not in rerun mode. For example, if the rerun flag is set to "1", the rerun mode may be triggered, and when the rerun flag is set to "0", the rerun mode may be deactivated.

在各種實施例中,若測試案例執行的第一狀態指示故障狀態,且重新運行旗標之狀態指示測試案例是在重新運行模式之下,電腦100可重新執行測試案例。In various embodiments, the computer 100 may re-execute the test case if the first state of the test case execution indicates a failure state, and the state of the re-run flag indicates that the test case is in re-run mode.

在各種實施例中,取得日誌包含接收複數個測試案例的測試結果資料,以及從測試結果資料解析出日誌。在一實施例中,從測試結果資料解析出日誌可包含來自測試結果資料的錯誤偵測或錯誤來源分析。In various embodiments, obtaining the logs includes receiving test result data of a plurality of test cases, and parsing the logs from the test result data. In one embodiment, parsing the logs from the test result data may include error detection or error source analysis from the test result data.

在各種實施例中,電腦100可藉由將測試相關資訊寫入日誌,輸出測試相關資訊。舉例來說,測試相關資訊可被寫入XML格式的日誌。日誌可以表格的格式展示。In various embodiments, the computer 100 can output test-related information by writing the test-related information into a log. For example, test-related information can be written to logs in XML format. Logs can be displayed in table format.

在各種實施例中,若測試案例執行的第一狀態指示故障狀態,電腦100可判斷錯誤來源。In various embodiments, if the first state of the test case execution indicates a failure state, the computer 100 can determine the source of the error.

在各種實施例中,電腦100可輸出關於錯誤來源相關資訊。錯誤來源可例如為間歇性故障或產品編碼問題。In various embodiments, the computer 100 can output relevant information about the source of the error. Sources of errors could be, for example, intermittent failures or product coding issues.

在各種實施例中,輸出錯誤相關資訊及錯誤來源可包含將報告日誌上傳至伺服器。在各種實施例中,輸出測試相關資訊及錯誤型態包含顯示測試相關資訊及錯誤來源。在各種實施例中,顯示測試相關資訊包含顯示測試清單或表格中關聯於測試的資訊。In various embodiments, outputting error-related information and error sources may include uploading a report log to a server. In various embodiments, outputting test-related information and error types includes displaying test-related information and error sources. In various embodiments, displaying test-related information includes displaying information associated with the test in a test list or table.

在各種實施例中,提供一種伺服器電腦,其包含通訊介面、記憶體及處理單元,設置以根據上述其中一實施例進行方法。In various embodiments, a server computer is provided, which includes a communication interface, a memory, and a processing unit, configured to perform the method according to one of the above-mentioned embodiments.

在各種實施例中,提供一種伺服器電腦元件,其包含程式指令,當程式指令被一或多個處理器執行時,致使一或多個處理器根據上述其中一實施例進行方法。In various embodiments, a server computer component is provided, which includes program instructions that, 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.

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

第2圖根據一實施例展示流程圖200,其繪示測試案例之重新執行。FIG. 2 shows a flowchart 200 illustrating re-execution of test cases, according to one embodiment.

在流程圖200中,於步驟202,開始軟體應用程式的測試套件(即驗證套件)之執行。In flowchart 200, at step 202, the execution of the test suite (ie, the verification suite) of the software application begins.

於步驟204,測試套件中的每個測試案例,將會從第一個測試案例開始,遞迴地運行。於步驟205,若測試案例(例如第一測試案例)通過,將不會觸發重新運行,並將因此(回到步驟203)繼續下一測試案例(如果有)。於步驟206,檢查重新運行旗標是否被設為「重新運行」。若重新運行旗標被設為「重新運行」,相同的案例(即故障案例)將於步驟204再次觸發。於步驟206,若尚未設定重新運行旗標,故障案例將會被記錄為「故障」狀態,且系統將於步驟203繼續進行下一測試案例。若測試案例於步驟205通過,則觸發步驟207,檢查測試套件是否已結束。若測試套件尚未結束,系統將於步驟203繼續進行下一測試案例。若測試套件已結束,程序結束於步驟208。In step 204, each test case in the test suite will be run recursively starting from the first test case. At step 205, if the test case (eg, the first test case) passes, a rerun will not be triggered and will therefore (return to step 203) proceed to the next test case (if any). In step 206, it is checked whether the rerun flag is set to "rerun". If the rerun flag is set to "rerun", the same case (ie failure case) will be triggered again in step 204 . In step 206, if the re-run flag has not been set, the failure case will be recorded as a "failure" status, and the system will proceed to the next test case in step 203 . If the test case is passed in step 205, step 207 is triggered to check whether the test suite has ended. If the test suite is not finished, the system will proceed to the next test case in step 203 . If the test suite is finished, the process ends at step 208 .

在各種實施例中,測試案例之重新執行的範例原始碼可如下: func runTests(matchString func(pat, str string) (bool, error), tests []InternalTest) (ran, ok bool) { rerunFlag := false reran := false if strings.ToUpper(os.Getenv("RERUN")) == "TRUE" { rerunFlag = true } ok = true for _, procs := range cpuList { runtime.GOMAXPROCS(procs) for i := uint(0); i < *count; i++ { if shouldFailFast() { break } ctx := newTestContext(*parallel, newMatcher(matchString, *match, "-test.run")) t := &T{ common: common{ signal:  make(chan bool), barrier: make(chan bool), w:       os.Stdout, chatty:  *chatty, }, context: ctx, } tRunner(t, func(t *T) { for _, test := range tests { r := t.Run(test.Name, test.F) if rerunFlag && !r { time.Sleep(5 * time.Second) reran = true t.reReunFailed = !t.Run(test.Name, test.F) } } // Run catching the signal rather than the tRunner as a separate // goroutine to avoid adding a goroutine during the sequential // phase as this pollutes the stacktrace output when aborting. go func() { <-t.signal }() }) if !rerunFlag { ok = ok && !t.Failed() } else { if !reran { ok = ok && !t.Failed() } else { ok = ok && !t.reReunFailed } } ran = ran || t.ran } } return ran, ok }. In various embodiments, an example source code for re-execution of a test case may be as follows: func runTests(matchString func(pat, str string) (bool, error), tests []InternalTest) (ran, ok bool) { rerunFlag := false reran := false if strings.ToUpper(os.Getenv("RERUN")) == "TRUE" { rerunFlag = true } ok = true for _, procs := range cpuList { runtime.GOMAXPROCS(procs) for i := uint(0); i < *count; i++ { if shouldFailFast() { break } ctx := newTestContext(*parallel, newMatcher(matchString, *match, "-test.run")) t := &T{ common: common{ signal: make(chan bool), barrier: make(chan bool), w: os.Stdout, chatty: *chatty, }, context: ctx, } tRunner(t, func(t *T) { for _, test := range tests { r := t.Run(test.Name, test.F) if rerunFlag && !r { time. Sleep(5 * time. Second) reran = true t.reReunFailed = !t.Run(test.Name, test.F) } } // Run catching the signal rather than the tRunner as a separate // goroutine to avoid adding a goroutine during the sequential // phase as this pollutes the stacktrace output when aborting. go func() { <-t.signal }() }) if !rerunFlag { ok = ok && !t.Failed() } else { if !reran { ok = ok && !t.Failed() } else { ok = ok && !t.reReunFailed } } ran = ran || t.ran } } return ran, ok }.

在以上的範例原始碼中,系統檢查是否已設定重新運行旗標。若尚未設定重新運行旗標,測試案例將不會重新運行。舉例來說,範例原始碼可以是「rerun flag := false, rerun := false」。若已設定重新運行旗標且測試案例故障,測試案例將會重新運行。舉例來說,範例原始碼可以是「!rerunFlag { ok = ok && !t.Failed()」。測試程序可以是以迴圈(例如For迴圈)為形式,並可為測試套件之每一測試案例所實作。測試程序亦可包含條件陳述(conditional statement)(例如if else陳述)以處理具有已設定或未設定的重新運行旗標,以及具有測試案例之狀態為通過或故障等不同情境。In the sample source code above, the system checks to see if the rerun flag is set. If the rerun flag has not been set, the test case will not be rerun. For example, an example source code could be "rerun flag := false, rerun := false". If the rerun flag is set and the test case fails, the test case will be rerun. For example, the sample source code could be "!rerunFlag { ok = ok && !t.Failed()". The test program can be in the form of a loop (such as a For loop), and can be implemented for each test case of the test suite. Test procedures can also contain conditional statements (such as if else statements) to handle different scenarios with rerun flags set or not set, and with test case status passing or failing.

第3圖根據一實施例展示流程圖300,其繪示測試案例之報告清除。FIG. 3 shows a flowchart 300 illustrating report cleanup of a test case, according to one embodiment.

於步驟301,測試套件301結束並產生日誌(XML檔)。於步驟302,將觸發日誌(報告)清除,以清除日誌。於步驟303,將處理日誌中測試套件之每一測試案例。於步驟304,測試工具檢查每一測試案例之測試案例名稱是否與下一測試案例相同。若是,則於步驟305將當下的測試案例標記為「略過」。否則,測試案例之狀態(例如通過/故障)維持原樣,且系統繼續進行步驟306以檢查當下的測試案例是否為最後的測試案例。換句話說,系統檢查是否還有待處理的測試案例。若當下測試案例並非最後的案例,系統繼續進行步驟303以處理新的測試案例。若當下測試案例是最後的案例,程序結束於步驟307。In step 301, the test suite 301 ends and a log (XML file) is generated. In step 302, log (report) clearing is triggered to clear the log. In step 303, each test case of the test suite in the log will be processed. In step 304, the test tool checks whether the test case name of each test case is the same as the next test case. If yes, mark the current test case as "skip" in step 305 . Otherwise, the status of the test case (eg pass/fail) remains the same, and the system proceeds to step 306 to check whether the current test case is the last test case. In other words, the system checks if there are any pending test cases. If the current test case is not the last case, the system proceeds to step 303 to process a new test case. If the current test case is the last case, the procedure ends at step 307 .

在各種實施例中,報告清除之範例原始碼可如下: for i := 0; i < len(suites.Suites); i++ { for j := 0; j < len(suites.Suites[i].TestCases); j++ { if suites.Suites[i].TestCases[j].Failure != nil { //fmt.Println(k.Name) if j+1 < len(suites.Suites[i].TestCases) { if suites.Suites[i].TestCases[j].Name == suites.Suites[i].TestCases[j+1].Name { suites.Suites[i].TestCases[j].SkipMessage = &JUnitSkipMessage{Message: "RERUN: " + suites.Suites[i].TestCases[j].Failure.Contents} suites.Suites[i].TestCases[j].Failure = nil } } } } }. In various embodiments, sample source code for reporting cleanup may be as follows: for i := 0; i < len(suites.Suites); i++ { for j := 0; j < len(suites.Suites[i].TestCases); j++ { if suites.Suites[i].TestCases[j].Failure != nil { //fmt.Println(k.Name) if j+1 < len(suites.Suites[i].TestCases) { if suites.Suites[i].TestCases[j].Name == suites.Suites[i].TestCases[j+1].Name { suites.Suites[i].TestCases[j].SkipMessage = &JUnitSkipMessage{Message: "RERUN: " + suites.Suites[i].TestCases[j].Failure.Contents} suites.Suites[i].TestCases[j].Failure = nil } } } } }.

在以上範例原始碼中,系統檢查當下的測試案例是否與下一測試案例具有相同的測試案例名稱。若是,當下的測試案例將被標記為「略過」。舉例來說,將當下的測試案例標記為「略過」的範例原始碼可以是「if suites.Suites[i].TestCase[j].Name == suites.Suites[i].TestCase[j+1].Name { suites.Suites[i].TestCase[j].SkipMessage」。清除程序可以是以迴圈(例如For迴圈)為形式,並可為日誌中的每一測試案例項目所實作。清除程序亦可包含條件陳述(例如if else陳述)以處理具有相同或不同測試案例名稱等不同情境。In the above sample source code, the system checks whether the current test case has the same test case name as the next test case. If so, the current test case will be marked as "Skipped". For example, the sample source code to mark the current test case as "skip" could be "if suites.Suites[i].TestCase[j].Name == suites.Suites[i].TestCase[j+1 ].Name { suites.Suites[i].TestCase[j].SkipMessage". The cleanup procedure can be in the form of a loop (eg For loop) and can be implemented for each test case item in the log. Cleanup procedures can also contain conditional statements (such as if else statements) to handle different scenarios with the same or different test case names.

第4A圖根據一實施例展示報告中的表格400,其展示測試案例之範例狀態。FIG. 4A shows a table 400 in a report showing an example status of a test case, according to one embodiment.

在範例表格400中,對於每一測試案例(例如測試案例A 406、測試案例B 408及測試案例C 410)而言,可以有第一狀態402(即初始運行之狀態)及/或第二狀態404(即重新運行之狀態)。In the example table 400, for each test case (e.g., test case A 406, test case B 408, and test case C 410), there may be a first state 402 (i.e., an initial run state) and/or a second state 404 (that is, the status of re-running).

在範例中,當測試案例(例如測試案例A 406)的第一狀態402為通過狀態,則可不需要重新運行,第二狀態404可被標記為空(nil)狀態。如另一範例,當測試案例(例如測試案例B 408或測試案例C 410)的第二狀態402為故障狀態,則可重新運行測試案例(例如測試案例B 408或測試案例C 410)。如範例所示,第二狀態404可以是通過狀態或故障狀態。在一實施例中,若第二狀態404為故障狀態,系統可允許測試案例更進一步重新運行。In an example, when the first status 402 of the test case (eg, test case A 406 ) is a pass status, rerun may not be required, and the second status 404 may be marked as a nil status. As another example, when the second state 402 of the test case (eg, test case B 408 or test case C 410 ) is a failure state, the test case (eg, test case B 408 or test case C 410 ) may be rerun. As shown by example, the second state 404 may be a pass state or a fail state. In one embodiment, if the second state 404 is a failure state, the system may allow the test case to be further rerun.

第4B圖根據一實施例展示報告中的表格420,其展示清除前即清除後的測試案例之範例狀態。FIG. 4B shows a table 420 in a report showing an example status of test cases before and after cleaning according to one embodiment.

在範例表格420中,對於每一測試案例而言,可以有清除前狀態422及/或清除後狀態424。In the example table 420, for each test case, there may be a pre-clear state 422 and/or a post-clear state 424.

舉例來說,對於測試案例A 426而言,由於清除前狀態422為通過狀態,可不需要重新運行,且清除後狀態424亦反映通過狀態。如另一範例,對於初始運行測試案例B 428A而言,初始運行可展示清除前的故障狀態,而重新運行測試案例B 428B可展示清除前重新運行中的通過狀態。由於初始運行測試案例B 428A及重新運行測試案例B 428B具有相同的名稱(即測試案例B),初始運行測試案例B 428A可具有「略過」的清除後狀態424。如另一範例,對於初始運行測試案例C 430A而言,初始運行可展示清除前故障狀態,而重新運行測試案例C 430B可展示清除前重新運行中的故障狀態。由於初始運行測試案例C 430A即重新運行測試案例C 430B具有相同的名稱(即測試案例C),初始運行測試案例C 430A可具有「略過」的清除後狀態424。換句話說,若初始測試案例與重新運行測試案例具有相同的測試案例名稱,初始測試案例將具有「略過」狀態,無論重新運行測試案例是呈現出通過或故障狀態。For example, for the test case A 426 , since the pre-clearing state 422 is a pass state, there is no need to re-run, and the post-clearing state 424 also reflects the pass state. As another example, for an initial run of test case B 428A, the initial run may show a fail status before clearing, while re-running test case B 428B may show a pass status in a rerun before clearing. Since the initial run test case B 428A and the rerun test case B 428B have the same name (ie, test case B), the initial run test case B 428A may have a post-clear status 424 of "skipped". As another example, for an initial run of test case C 430A, the initial run may demonstrate a pre-clear fault condition, while re-running test case C 430B may demonstrate a pre-clear fault condition in re-run. Since the initial run of test case C 430A and the re-run of test case C 430B have the same name (ie, test case C), the initial run of test case C 430A may have a post-clear status 424 of "skipped". In other words, if the initial test case and the rerun test case have the same test case name, the initial test case will have a status of "Skip", regardless of whether the rerun test case exhibits a pass or fail status.

第5A圖根據一實施例展示示意圖500,其繪示沒有重新執行功能之情況下的範例故障百分比。FIG. 5A shows a schematic diagram 500 illustrating an example failure percentage without re-execution of the function, according to one embodiment.

在範例示意圖500中,於10,000個測試中案例502中有9900個通過案例504(或者說99%為通過案例),有100個故障506(或者說1%為故障)。在100個故障506中,有80個間歇性故障508(或者說0.8%為間歇性故障),有20個產品編碼問題510(或者說有0.2%為產品編碼問題)。In the example diagram 500, there are 9900 pass cases 504 (or 99% pass cases) and 100 fail cases 506 (or 1% fail cases) out of 10,000 test cases 502. Among the 100 failures 506, there are 80 intermittent failures 508 (or 0.8% intermittent failures) and 20 product coding issues 510 (or 0.2% product coding issues).

第5B圖根據一實施例展示示意圖550,其繪示帶有重新運行功能之情況下的範例故障百分比。FIG. 5B shows a schematic diagram 550 illustrating example failure percentages with rerun functionality, according to one embodiment.

在範例示意圖550中,在10,000個測試中案例552中有9970個通過案例554(或者說99.7%為通過案例),有30個故障556(或者說0.3%為故障)。在30個故障556中,有10個間歇性故障558(或者說0.1%為間歇性故障),有20個產品編碼問題560(或者說有0.2%為產品編碼問題)。In the example schematic 550 , there are 9970 pass cases 554 (or 99.7% pass cases) and 30 fail cases 556 (or 0.3% fail cases) out of 10,000 test cases 552 . Of the 30 failures 556, there were 10 intermittent failures 558 (or 0.1% intermittent failures) and 20 product coding issues 560 (or 0.2% product coding issues).

在各種實施例中,若每一案例需要5分鐘作分類,無重新運行之系統將需要500分鐘(8小時)來解決其中的故障。在帶有重新運行功能的情況下,間歇性故障558可減少至0.1%,有效地節省每天約6小時的解決錯誤時間。因此,這可使得工程生產力更佳,並且達到更佳的工程ROI,因為分類測試故障可能是耗時的。在異質環境中,測試案例可能因為網路不穩定、作業系統(OS)不穩定,及/或第三方間接性運行中斷等因素而故障。當測試案例在先前運行中故障時,擁有支援測試案例重新運行的工具,可提更測試穩定度,及改善工程生產力。In various embodiments, if each case takes 5 minutes to sort, the system without reruns will take 500 minutes (8 hours) to resolve the failures therein. With the re-run function, the intermittent fault 558 can be reduced to 0.1%, effectively saving about 6 hours of troubleshooting time per day. Therefore, this can result in better engineering productivity and achieve better engineering ROI, since triaging test failures can be time consuming. In a heterogeneous environment, test cases may fail due to factors such as network instability, operating system (OS) instability, and/or third-party indirect outages. Having tools that support test case reruns when a test case failed in a previous run improves test stability and improves engineering productivity.

總體而言,根據各種實施例,如第6圖所繪示,提供一種方法。In general, according to various embodiments, as depicted in FIG. 6 , a method is provided.

第6圖展示流程圖600,其繪示一種重新執行軟體應用程式中的測試案例之方法。FIG. 6 shows a flowchart 600 illustrating a method of re-executing test cases in a software application.

於602,可取得測試中軟體應用程式之測試案例執行的第一狀態。At 602, a first status of a test case execution of a software application under test can be obtained.

於604,若測試案例執行的第一狀態指示故障狀態,則可重新執行測試案例,以及可取得測試案例重新執行之第二狀態。At 604, the test case may be re-executed if the first status of the test case execution indicates a failure status, and the second status of the test case re-execution may be obtained.

於606,可為複數個測試案例中的每一者重複步驟602及604。At 606, steps 602 and 604 may be repeated for each of the plurality of test cases.

於608,可取得複數個測試案例之複數個第一狀態的日誌,以及至少一已重新執行測試案例之至少一第二狀態。At 608, logs of a plurality of first states of a plurality of test cases and at least a second state of at least one re-executed test case may be obtained.

於610,可搜尋複數個測試案例之測試案例名稱與至少一重新執行測試案例之測試案例名稱的匹配處。At 610, a match may be searched for the test case name of the plurality of test cases and the test case name of at least one re-executed test case.

於612,若有找到測試案例名稱之匹配處,可將匹配處的第一狀態改變為略過狀態。At 612, if a match is found for the test case name, the first state of the match may be changed to a skipped state.

步驟602至612是以特定的順序所示,然而亦可以是其他安排。步驟亦可被合併成某些案例。步驟602至612可以使用任何合適的順序。Steps 602 to 612 are shown in a particular order, however other arrangements are possible. Steps can also be combined into certain cases. Steps 602 through 612 may be in any suitable order.

第6圖的途徑可用於不同種類的軟體自動化測試,像是不同平台的API自動化。根據各種實施例,提供一種工具以進行測試案例的重新運行,其具備作為統一的測試自動化報告平台的能力。該工具可被任何運用跨多平台(網頁、行動、API)自動化測試的軟體公司所使用,特別是Golang格式的軟體應用程式。The approach in Figure 6 can be used for different types of software automation testing, such as API automation for different platforms. According to various embodiments, a tool is provided for re-running of test cases with the capability of serving as a unified test automation reporting platform. The tool can be used by any software company that uses automated testing across multiple platforms (web, mobile, API), especially for software applications in Golang format.

第6圖之方法是例如由第7圖所繪示的伺服器電腦所實施。The method in FIG. 6 is implemented by the server computer shown in FIG. 7, for example.

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

伺服器電腦系統700包含通訊介面701(例如設置以接收測試輸入資料或日誌,以及設置以輸出測試相關資訊,例如狀態或錯誤來源)。伺服器電腦系統700更包含處理單元702及記憶體703。記憶體703可被處理單元402用以儲存,例如待處理資料,像是日誌。伺服器電腦設置以進行第6圖之方法。應注意的是,伺服器電腦系統700可以是包含複數個電腦的分散式系統。The server computer system 700 includes a communication interface 701 (eg, configured to receive test input data or logs, and configured to output test-related information, such as status or error sources). The server computer system 700 further includes a processing unit 702 and a memory 703 . The memory 703 can be used by the processing unit 402 to store, for example, data to be processed, such as logs. The server computer is set up to perform the method in Figure 6. It should be noted that the server computer system 700 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:中央處理單元(CPU) 102:系統記憶體(RAM) 103:硬碟(HDD) 104:軟體開發環境 105:應用程式 106:裝置 107:網路 108:測試工具 200:流程圖 202-208:步驟 300:流程圖 301-307:步驟 400:表格 402:第一狀態 404:第二狀態 406:測試案例A 408:測試案例B 410:測試案例C 420:表格 422:清除前狀態 424:清除後狀態 426:測試案例A 428A:初始運行測試案例B 428B:重新運行測試案例B 430A:初始運行測試案例C 430B:重新運行測試案例C 500:示意圖 502:測試中案例 504:通過案例 506:故障 508:間歇性故障 510:產品編碼問題 550:示意圖 552:測試中案例 554:通過案例 556:故障 558:間歇性故障 560:產品編碼問題 600:流程圖 602-612:步驟 700:伺服器電腦系統 701:通訊介面 702:處理單元 703:記憶體 100: computer 101:Central Processing Unit (CPU) 102: System memory (RAM) 103: Hard disk (HDD) 104:Software development environment 105: Apps 106: Device 107: Network 108:Test tools 200: Flowchart 202-208: Steps 300: Flowchart 301-307: Steps 400: form 402: First state 404: second state 406: Test case A 408:Test case B 410: Test Case C 420: Form 422: Clear the previous state 424: Status after clearing 426:Test case A 428A: Initial run test case B 428B: Rerun test case B 430A: Initial Operation Test Case C 430B: Rerun test case C 500: Schematic diagram 502: Case in test 504: Pass the case 506: failure 508: Intermittent failure 510: Product coding problem 550: Schematic diagram 552: Case in test 554:Pass the case 556: failure 558: Intermittent failure 560: Product coding problem 600: Flowchart 602-612: Steps 700: Server computer system 701: communication interface 702: processing unit 703: Memory

參考以下實施方式的詳細敘述,並考慮不限制的範例及附圖,可更佳地理解本發明,其中: 第1圖展示用以開發軟體應用程式的電腦。 第2圖根據一實施例展示流程圖,其繪示測試案例之重新執行。 第3圖根據一實施例展示流程圖,其繪示測試案例之報告清除。 第4A圖根據一實施例展示報告中的表格,其展示測試案例之範例狀態。 第4B圖根據一實施例展示報告中的表格,其展示清除前即清除後的測試案例之範例狀態。 第5A圖根據一實施例展示示意圖,其繪示沒有重新執行功能之情況下的範例故障百分比。 第5B圖根據一實施例展示示意圖,其繪示帶有重新運行功能之情況下的範例故障百分比。 第6圖展示一流程圖,其繪示一種重新執行軟體應用程式中的測試案例之方法。 第7圖根據一實施例展示一種伺服器電腦系統。 The present invention may be better understood by reference to the following detailed description of the embodiments, and consideration of the non-limiting examples and accompanying drawings, in which: Figure 1 shows a computer used to develop software applications. FIG. 2 shows a flowchart illustrating re-execution of test cases according to one embodiment. FIG. 3 shows a flowchart illustrating report cleanup of a test case, according to one embodiment. Figure 4A shows a table in a report showing sample status of test cases according to one embodiment. FIG. 4B shows a table in a report showing an example status of test cases before and after cleanup, according to one embodiment. FIG. 5A shows a schematic diagram illustrating example failure percentages without re-execution of functions, according to one embodiment. FIG. 5B shows a schematic diagram illustrating example failure percentages with rerun functionality, according to one embodiment. FIG. 6 shows a flowchart illustrating a method of re-executing test cases in a software application. FIG. 7 shows a server computer system according to an embodiment.

200:流程圖 200: Flowchart

202-208:步驟 202-208: Steps

Claims (15)

一種重新執行一軟體應用程式中的測試案例之方法,包括: (i)取得測試中的該軟體應用程式之一測試案例之執行的一第一狀態; (ii)若該測試案例之執行之該第一狀態指示一故障狀態,重新執行該測試案例,以及取得該測試案例之重新執行之一第二狀態; 對複數個測試案例之每一測試案例,重複步驟(i)及(ii); 取得該複數個測試案例之複數個第一狀態及至少一已重新執行測試案例之至少一第二狀態的一日誌; 搜尋該複數個測試案例之測試案例名稱與該至少一已重新執行測試案例之測試案例名稱的匹配處; 其中若有找到測試案例名稱之間的一匹配處,將該匹配處的該第一狀態改變為一略過狀態,將該第二狀態用作為該匹配處之一最終狀態,以及將該日誌中帶有該略過狀態的測試案例移除。 A method of re-executing test cases in a software application, comprising: (i) obtaining a first state of execution of a test case of the software application under test; (ii) if the first state of execution of the test case indicates a failure state, re-execute the test case, and obtain a second state of the re-execution of the test case; Repeat steps (i) and (ii) for each test case of the plurality of test cases; obtaining a log of a plurality of first states of the plurality of test cases and at least a second state of at least one re-executed test case; searching for a match between the test case name of the plurality of test cases and the test case name of the at least one re-executed test case; Wherein if a match between test case names is found, change the first state of the match to a skip state, use the second state as a final state of the match, and log in Test cases with this skipped status are removed. 如請求項1之方法,更包括: 檢查該測試案例之一重新運行旗標狀態。 The method of claim 1 further includes: Check the rerun flag status for one of the test cases. 如請求項1或2之方法,更包括: 若該測試案例之執行之該第一狀態指示一故障狀態且該重新運行旗標狀態指示該測試案例在一重新運行模式下,重新執行該測試案例。 The method of claim 1 or 2 further includes: If the first state of execution of the test case indicates a failure state and the rerun flag state indicates that the test case is in a rerun mode, re-execute the test case. 如請求項1至3任一項之方法,其中該軟體應用程式是以Golang撰寫。The method as claimed in any one of items 1 to 3, wherein the software application program is written in Golang. 如請求項1至4任一項之方法,其中取得該日誌包括接收該複數個測試案例之測試結果資料,及從測試結果資料解析出該日誌。The method according to any one of claims 1 to 4, wherein obtaining the log includes receiving test result data of the plurality of test cases, and parsing the log from the test result data. 如請求項1至5任一項之方法,更包括: 藉由將測試相關資訊寫入該報告日誌,輸出該測試相關資訊。 The method according to any one of claims 1 to 5, further comprising: Outputs the test-related information by writing the test-related information to the report log. 如請求項1至6任一項之方法,更包括: 若該測試案例之執行之該第一狀態指示一故障狀態,判斷一錯誤來源。 The method according to any one of claims 1 to 6, further comprising: If the first state of the execution of the test case indicates a failure state, determine an error source. 如請求項7之方法,更包括: 輸出該錯誤來源之相關資訊。 Such as the method of claim item 7, further comprising: Output information about the source of the error. 如請求項1至8任一項之方法,其中輸出該測試相關資訊及該錯誤來源包括將該報告日誌上傳至一伺服器。The method according to any one of claims 1 to 8, wherein outputting the test-related information and the error source includes uploading the report log to a server. 如請求項1至9任一項之方法,其中輸出該測試相關資訊及輸出該錯誤類型包括顯示該測試相關資訊及該錯誤來源。The method according to any one of claims 1 to 9, wherein outputting the test-related information and outputting the error type includes displaying the test-related information and the source of the error. 如請求項1至10任一項之方法,其中顯示該測試相關資訊包括顯示關聯於一測試清單中測試的資訊。The method of any one of claims 1 to 10, wherein displaying the test-related information includes displaying information associated with tests in a test list. 一種伺服器電腦,包括一通訊界面、一記憶體及一處理單元,設置以執行請求項1至11任一項之方法。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 11. 一種電腦程式元件,包括程式指令,當被一或多個處理器執行時,致使該一或多個處理器執行請求項1至11任一項之方法。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 11. 一種電腦可讀取媒體,包括程式指令,當被一或多個處理器執行時,致使該一或多個處理器執行請求項1至11任一項之方法。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 11. 一種重新執行一軟體應用程式中的測試案例之裝置,包括一處理器,設置以: 取得測試中的該軟體應用程式之複數個測試案例之一測試案例之執行的一第一狀態; 若該測試案例之執行之該第一狀態指示一故障狀態,重新執行該測試案例,並取得該測試案例之重新執行之一第二狀態; 對複數個測試案例之每一者,重複取得該第一狀態及至少一第二狀態; 取得該複數個測試案例之複數個第一狀態及至少一已重新執行測試案例之該至少一第二狀態的一日誌; 搜尋該複數個測試案例之測試案例名稱與該至少一已重新執行測試案例之測試案例名稱的匹配處: 其中若有找到測試案例名稱之間的一匹配處,將該匹配處的該第一狀態改變為一略過狀態,將該第二狀態用作為該匹配處之一最終狀態,以及將該日誌中帶有該略過狀態的測試案例移除。 An apparatus for re-executing test cases in a software application, comprising a processor configured to: obtaining a first state of execution of one of the plurality of test cases of the software application under test; if the first state of execution of the test case indicates a failure state, re-execute the test case and obtain a second state of the re-execution of the test case; For each of the plurality of test cases, repeatedly obtaining the first state and at least one second state; obtaining a log of the plurality of first states of the plurality of test cases and the at least one second state of at least one re-executed test case; Searching for a match of the test case name of the plurality of test cases with the test case name of the at least one re-executed test case: Wherein if a match between test case names is found, change the first state of the match to a skip state, use the second state as a final state of the match, and log in Test cases with this skipped status are removed.
TW111122167A 2021-07-29 2022-06-15 Device and method for re-executing of test cases in software application TW202311947A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
SG10202108290P 2021-07-29
SG10202108290P 2021-07-29

Publications (1)

Publication Number Publication Date
TW202311947A true TW202311947A (en) 2023-03-16

Family

ID=85088233

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111122167A TW202311947A (en) 2021-07-29 2022-06-15 Device and method for re-executing of test cases in software application

Country Status (2)

Country Link
TW (1) TW202311947A (en)
WO (1) WO2023009062A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991640A (en) * 2023-06-21 2023-11-03 深圳市晶存科技有限公司 Off-line testing method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107870849B (en) * 2016-09-28 2021-03-09 平安科技(深圳)有限公司 Processing method and device of test log
CN106502895A (en) * 2016-10-21 2017-03-15 郑州云海信息技术有限公司 A kind of automatic test information generation device and method
CN108459961A (en) * 2017-12-29 2018-08-28 微梦创科网络科技(中国)有限公司 The method, client and server of examination are resurveyed after a kind of failure of testing case

Also Published As

Publication number Publication date
WO2023009062A1 (en) 2023-02-02

Similar Documents

Publication Publication Date Title
US10552301B2 (en) Completing functional testing
US8607198B2 (en) Cross-concern code coverage assessment
US20120159443A1 (en) System and method for reducing test effort by object risk analysis
US8719799B2 (en) Measuring coupling between coverage tasks and use thereof
US20160371173A1 (en) Diagnosis of test failures in software programs
US10353809B2 (en) System and method for executing integration tests in multiuser environment
US10049031B2 (en) Correlation of violating change sets in regression testing of computer software
US9983979B1 (en) Optimized dynamic matrixing of software environments for application test and analysis
US20170123873A1 (en) Computing hardware health check
JP2015011372A (en) Debug support system, method, program, and recording medium
US8661414B2 (en) Method and system for testing an order management system
JP2018532169A (en) Method and apparatus for generating, collecting, storing, and loading debug information about failed test scripts
Nouman et al. Software testing: A survey and tutorial on white and black-box testing of C/C++ programs
US9779014B2 (en) Resilient mock object creation for unit testing
CN112650676A (en) Software testing method, device, equipment and storage medium
TW202311947A (en) Device and method for re-executing of test cases in software application
US10592703B1 (en) Method and system for processing verification tests for testing a design under test
Manthey et al. Spybug: Automated bug detection in the configuration space of SAT solvers
US10528691B1 (en) Method and system for automated selection of a subset of plurality of validation tests
TW202303388A (en) Device and method for identifying errors in a software application
CN115757099A (en) Automatic test method and device for platform firmware protection recovery function
Lavoie et al. A case study of TTCN-3 test scripts clone analysis in an industrial telecommunication setting
CN115176233A (en) Performing tests in deterministic order
CN111367796A (en) Application program debugging method and device
CN112181855A (en) API-based automatic testing method and device and computer equipment