TWI519946B - Regression testing system and method in variable database environment - Google Patents

Regression testing system and method in variable database environment Download PDF

Info

Publication number
TWI519946B
TWI519946B TW102138599A TW102138599A TWI519946B TW I519946 B TWI519946 B TW I519946B TW 102138599 A TW102138599 A TW 102138599A TW 102138599 A TW102138599 A TW 102138599A TW I519946 B TWI519946 B TW I519946B
Authority
TW
Taiwan
Prior art keywords
regression
data
test
test case
module
Prior art date
Application number
TW102138599A
Other languages
Chinese (zh)
Other versions
TW201516676A (en
Inventor
Ju Chi Tseng
Kuo Yu Tseng
Su Han Yu
yi chi Chen
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 filed Critical
Priority to TW102138599A priority Critical patent/TWI519946B/en
Publication of TW201516676A publication Critical patent/TW201516676A/en
Application granted granted Critical
Publication of TWI519946B publication Critical patent/TWI519946B/en

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

變動資料庫環境中之迴歸測試系統與方法 Regression test system and method in variable database environment

本發明係為一種迴歸測試系統與方法有關;具體而言,特別是關於一種變動資料庫環境中之迴歸測試系統與方法,提供自動化抽取測試案例且兼容個資處理,確保取測試案例之處理符合NCC規範、個資法及業務規則,此外,亦提供自動化選擇迴歸案例,依迴歸標的版本動態調整所採用測試案例,針對不同版本、不同功能及業務邏輯的迴歸標的載入相對應的測試案例進行測試,以順應不同狀況下的測試需求。 The invention relates to a regression test system and a method; in particular, particularly relates to a regression test system and method in a variable database environment, which provides an automated extraction test case and is compatible with individual processing to ensure that the processing of the test case is met. NCC specifications, individual capitalization laws and business rules. In addition, automated selection regression cases are also provided. The test cases are dynamically adjusted according to the version of the regression target, and the corresponding test cases are loaded for the regression targets of different versions, different functions and business logics. Test to meet the testing needs in different situations.

迴歸測試是指修改了舊程式後,重新進行測試以確認修改沒有引入新的錯誤或導致其他程式產生錯誤。隨著軟體的改變,軟體的功能和應用介面以及軟體的實現發生了演變,測試案例庫中的一些測試案例可能會失去針對性和有效性,而另一些測試案例可能會變得過時,還有一些測試案例將完全不能運行。 Regression testing means that after modifying the old program, re-testing to confirm that the modification has not introduced a new error or caused another program to generate an error. As the software changes, the functionality and application interface of the software and the implementation of the software evolve. Some test cases in the test case library may lose relevance and effectiveness, while other test cases may become obsolete. Some test cases will not work at all.

迴歸測試大多仰賴大量人工執行控管,包括測試資料準備、將測試資料放入系統、執行功能測試,並驗證系統產 出結果是否符合預期。目前業界實務對於測試的研發重心大多放在使用者圖形介面,錄製使用者行為,並對結果畫面進行驗證。 Regression testing relies heavily on a large number of manual execution controls, including test data preparation, putting test data into the system, performing functional tests, and verifying system production. Whether the results are in line with expectations. At present, the focus of the industry's practice on testing is mostly on the user's graphical interface, recording user behavior, and verifying the resulting image.

先前的中華民國發明專利第201007446號「驗證資料的方法」中,提出先定義多個規格,再從規格代號中擇一使用其中的驗證資料,再比對驗證結果,這種方法適用於驗證資料的種類變化較少的情形,因其對驗證條件較有侷限性。然而,需求日新月異,驗證資料亦需隨著需求更動而經常更新,若經常需要調改規格,則將耗時耗力。 In the previous method of "Recognition Data" of the Republic of China Invention Patent No. 201007446, it is proposed to first define a plurality of specifications, and then select one of the specification codes to use the verification data, and then compare the verification results, and the method is applicable to the verification data. The situation in which the type of change is less, because it has limitations on the verification conditions. However, the demand is changing with each passing day, and the verification data needs to be updated frequently as the demand changes. If the specifications need to be changed frequently, it will be time-consuming and labor-intensive.

由此可見,上述習用方式仍有諸多缺失,實非一良善之設計,而亟待加以改良。 It can be seen that there are still many shortcomings in the above-mentioned methods of use, which is not a good design, but needs to be improved.

本案發明人鑑於上述習用方式所衍生的各項缺點,乃亟思加以改良創新,並經多年苦心孤詣潛心研究後,終於成功研發完成本件發明。 In view of the shortcomings derived from the above-mentioned conventional methods, the inventor of the present invention has improved and innovated, and after years of painstaking research, he finally succeeded in researching and developing this invention.

本發明之目的即在於提供一變動資料庫環境中之迴歸測試系統與方法,於系統資訊模型變動時進行自動化處理資料填補,以維持測試案例的有效性、正確性,確保迴歸結果之正確性、完整性,減少案例重抽所花費時間,亦針對抽取測試案例時進行個資處理,確保抽取測試案例之資訊無涉及個資,符合NCC規範、個資法,避免因測試案例的外洩,導致客戶損失及公司聲譽的影響。 The object of the present invention is to provide a regression test system and method in a variable database environment, and automatically process data filling when the system information model changes, so as to maintain the validity and correctness of the test case and ensure the correctness of the regression result. Integrity, reduce the time spent on case re-extraction, and also deal with the capital processing when extracting test cases, to ensure that the information of the test cases is not involved in the individual capital, in line with NCC norms, individual capital laws, to avoid leakage due to test cases, resulting in leakage Customer loss and the impact of the company's reputation.

本發明之次一目的即在於提供自動化選擇迴歸案 例,依迴歸標的版本動態調整所採用測試案例,針對不同版本、不同功能及業務邏輯的迴歸標的載入相對應的測試案例進行測試,以順應不同狀況下的測試需求。 The second object of the present invention is to provide an automated selection regression case. For example, the test case is dynamically adjusted according to the version of the regression target, and the corresponding test cases of different versions, different functions and business logics are loaded to test the test cases to meet the test requirements under different conditions.

達成上述發明目的之一種變動資料庫環境中之迴歸測試系統與方法,主要係由(一)負責定義迴歸內容標的屬性的迴歸標的設定模組,(二)負責定義抽樣條件及其權重的動態抽樣條件組成模組,(三)負責抽取測試案例及驗證的資料處理模組,(四)負責存取測試案例的抽樣資料保存模組(五)負責計算權重及採用測試案例且執行迴歸測試的遠端執行程式模組,以及(六)負責比對迴歸結果的結果比對模組 The regression test system and method in a variable database environment that achieves the above object is mainly composed of (1) a regression target setting module responsible for defining the attributes of the regression content target, and (2) a dynamic sampling for defining the sampling condition and its weight. Conditional component module, (3) Data processing module responsible for extracting test cases and verification, (4) Sample data storage module responsible for accessing test cases (5) Responsible for calculating weights and adopting test cases and performing regression testing The execution module, and (6) the result comparison module responsible for comparing the regression results

本發明所提供之一種變動資料庫環境中之迴歸測試系統與方法,與其他習用技術相互比較時,更具備下列優點: The regression test system and method in the variable database environment provided by the invention have the following advantages when compared with other conventional technologies:

1.自動化處理資料填補,針對系統資訊模型變動時的處理,以維持測試案例的有效性、正確性,減少案例重抽所花費時間;確保迴歸測試執行的完整性、正確性。 1. Automated processing of data filling, for the processing of system information model changes, in order to maintain the validity and correctness of test cases, reduce the time spent on case re-extraction; ensure the integrity and correctness of regression test execution.

2.自動化抽取測試案例,且兼容個資規範之處理,確保抽取測試案例之處理符合NCC規範、個資法及業務規則。 2. Automated extraction of test cases, and compatible with the processing of individual assets, to ensure that the processing of the extracted test cases is in line with NCC regulations, individual capital laws and business rules.

3.自動化選擇迴歸案例,依迴歸標的版本動態調整所採用迴歸案例,透過迴歸參用指數及抽樣條件權重可針對不同版本、不同功能及業務邏輯的迴歸標的,載入相對應的測試案例進行測試,以順應不同狀況下的測試需求。 3. Automated selection of regression cases, dynamic adjustment of the regression case adopted by the version of the regression target, through the regression participation index and sampling condition weights can be tested for different versions, different functions and business logic regression indicators, loading corresponding test cases To meet the testing needs under different conditions.

101‧‧‧抽取測試案例資訊 101‧‧‧Extract test case information

102‧‧‧驗證測試案例資訊 102‧‧‧Verification test case information

103‧‧‧進行迴歸測試 103‧‧‧Regression test

104‧‧‧進行比對結果 104‧‧‧Comparison results

1011‧‧‧抽取輸入/輸出資料內容及定義 1011‧‧‧ Extract input/output data content and definition

1012‧‧‧進行個資抹除及變造 1012‧‧‧Exhibition and alteration

1031‧‧‧複製測試案例至迴歸標的環境 1031‧‧‧Copy test cases to the environment of the return target

1032‧‧‧計算測試案例權重 1032‧‧‧ Calculate test case weights

1033‧‧‧確認迴歸環境之系統資訊模型 1033‧‧‧Confirmation of the system information model for returning to the environment

1034‧‧‧進行資料填補 1034‧‧‧Information filling

1035‧‧‧載入測試案例資訊 1035‧‧‧Load test case information

1036‧‧‧執行迴歸測試 1036‧‧‧ Perform regression testing

1041‧‧‧進行資料轉換 1041‧‧‧Data conversion

1042‧‧‧進行不比對處理 1042‧‧‧Unmatched processing

1043‧‧‧進行業務鍵值比對 1043‧‧‧Business key-value comparison

1044‧‧‧產出比對結果 1044‧‧‧ Output comparison results

20‧‧‧變動資料庫環境中之迴歸測試系統 20‧‧‧Regression test system in a variable database environment

201‧‧‧迴歸標的設定模組 201‧‧‧Return target setting module

202‧‧‧動態抽樣條件組成模組 202‧‧‧ Dynamic sampling conditions form the module

203‧‧‧資料抽樣模組 203‧‧‧ data sampling module

204‧‧‧抽樣資料保存模組 204‧‧‧Sampling data storage module

205‧‧‧遠端執行程式模組 205‧‧‧ Remote Execution Module

206‧‧‧結果比對模組 206‧‧‧Results comparison module

2011‧‧‧設定迴歸標的元件 2011‧‧‧Set the components of the regression target

2012‧‧‧組裝設定元件 2012‧‧‧Assembling setting components

2021‧‧‧條件組裝元件 2021‧‧‧Conditional assembly components

2022‧‧‧條件驗證元件 2022‧‧‧ conditional verification component

2023‧‧‧條件轉譯元件 2023‧‧‧Conditional translation components

2024‧‧‧子條件設定 2024‧‧‧Subcondition setting

2025‧‧‧運算元 2025‧‧‧Operator

請參閱有關本發明之詳細說明及其附圖,將可進一步瞭解本發明之技術內容及其目的功效,有關附圖為:第1圖為本發明之變動資料庫環境中之迴歸測試系統與方法之方法流程圖。 Please refer to the detailed description of the present invention and the accompanying drawings, which can further understand the technical content of the present invention and its effect. The related drawings are: Figure 1 is a regression test system and method in the variable database environment of the present invention. Method flow chart.

第2圖為本發明之變動資料庫環境中之迴歸測試系統與方法之抽取測試案例資訊之步驟程序圖。 Figure 2 is a flow chart showing the steps of extracting test case information of the regression test system and method in the variable database environment of the present invention.

第3圖為本發明之變動資料庫環境中之迴歸測試系統與方法之進行迴歸測試之步驟程序圖。 Figure 3 is a flow chart showing the steps of the regression test system and method in the variable database environment of the present invention.

第4圖為本發明之變動資料庫環境中之迴歸測試系統與方法之進行比對結果之步驟程序圖。 Figure 4 is a flow chart showing the results of the comparison of the regression test system and method in the variable database environment of the present invention.

第5圖為本發明之變動資料庫環境中之迴歸測試系統與方法之系統架構圖。 Figure 5 is a system architecture diagram of a regression test system and method in a variable database environment of the present invention.

第6圖為本發明之變動資料庫環境中之迴歸測試系統與方法之迴歸標的設定模組之功能模組架構圖。 Figure 6 is a functional module architecture diagram of a regression module of a regression test system and method in a variable database environment of the present invention.

第7圖為本發明之變動資料庫環境中之迴歸測試系統與方法之動態條件組成模組之功能模組架構圖。 Figure 7 is a functional module architecture diagram of the dynamic condition component module of the regression test system and method in the variable database environment of the present invention.

為了使本發明的目的、技術方案及優點更加清楚明白,下面結合附圖及實施例,對本發明進行進一步詳細說明。應當理解,此處所描述的具體實施例僅用以解釋本發明,但並不用於限定本發明。 The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

以下,結合附圖對本發明進一步說明:本發明為一種變動資料庫環境中之迴歸測試系統與方法,請參閱第1圖,第1圖為本發明之變動資料庫環境中之迴歸測試系統與方法之方法流程圖。如第1圖所示,本發明所提出一種變動資料庫環境中之迴歸測試系統與方法,實行本方法之前提須定義迴歸標的內容屬性(驗證程式名稱及所在路徑、迴歸參用指數、輸入/輸出資料和指派規則)、抽樣條件和抽樣條件權重值,以下為實行本方法步驟包含:抽取測試案例資訊101:以自訂抽樣策略(亂數或直接指定)方式至迴歸標的實際運行環境抽取測試案例S,Sm為第m個測試案例,其m值為非負之整數;驗證測試案例資訊102:負責確認測試案例S是否滿足抽樣條件(α123....αn),以測試案例S1為例,驗證是否滿足抽樣條件α1,可透過下列公式進行驗證Cij=Siαj,其中im,jn,n1代入測試案例S1和抽樣條件α1,其結果如下:C11=S1α1若C11為1即代表S1滿足抽樣條件α1,反之為0,則不滿足抽樣 條件α1Hereinafter, the present invention is further described with reference to the accompanying drawings: the present invention is a regression test system and method in a variable database environment, please refer to FIG. 1 , and FIG. 1 is a regression test system and method in a variable database environment of the present invention. Method flow chart. As shown in FIG. 1 , the present invention provides a regression test system and method in a variable database environment. Before implementing the method, it is necessary to define the content attributes of the regression target (verification program name and path, regression reference index, input/ Output data and assignment rules), sampling conditions and sampling condition weight values, the following steps for the implementation of this method include: extracting test case information 101: using a custom sampling strategy (random number or direct designation) to the regression target actual operating environment extraction test Case S, S m is the mth test case, and its m value is a non-negative integer; verification test case information 102: responsible for confirming whether the test case S satisfies the sampling condition (α 1 , α 2 , α 3 .... α n ), taking the test case S 1 as an example, verifying whether the sampling condition α 1 is satisfied, and verifying C ij =S i α j by the following formula, where i m,j n,n 1 is substituted into the test case S 1 and the sampling condition α 1 , and the result is as follows: C 11 = S 1 α 1 If C 11 is 1, it means that S 1 satisfies the sampling condition α 1 , and vice versa, the sampling condition α 1 is not satisfied.

確認測試案例Si是否滿足所有抽樣條件α,即如下列式子所列: Confirm that the test case S i satisfies all sampling conditions α , as listed in the following formula:

上述公式即說明測試案例Si的驗證結果Ci是否滿足抽樣條件α,若Ci 1即代表測試案例Si至少滿足一個抽樣條件αj,即採用該測試案例Si進行後續的迴歸測試,反之則捨棄該測試案例。 The above formula indicates whether the verification result C i of the test case S i satisfies the sampling condition α , if C i 1 means that the test case S i satisfies at least one sampling condition α j , that is, the test case Si is used for subsequent regression test, and vice versa.

進行迴歸測試103:將驗證測試案例資訊102驗證通過的測試案例載入至迴歸標的執行環境中,並計算本次迴歸採用的測試案例權重結果Z,且依據迴歸參用指數進行計算是否為本次迴歸採用,針對不同版本、不同功能及業務邏輯的迴歸標的進行測試;進行比對結果104:負責比對迴歸結果,將測試案例(輸出資料)與迴歸執行結果進行比對。 Perform regression test 103: Load the test case verified by the verification test case information 102 into the execution environment of the regression target, and calculate the test case weight result Z used in the regression, and calculate according to the regression participation index. Regression is used to test the regression targets of different versions, different functions and business logics; the comparison result 104: Responsible for comparing the regression results, comparing the test cases (output data) with the regression execution results.

請參閱第2圖,第2圖為本發明之變動資料庫環境中之迴歸測試系統與方法之抽取測試案例資訊之步驟程序圖。如第2圖所示,本發明所提出一種變動資料庫環境中之迴歸測試系統與方法,其中該抽取測試案例資訊101之程序步驟包含:抽取輸入/輸出資料內容及定義1011:依照迴歸標的內容屬性所定義之輸入/輸出資料,取得迴歸標的實際運行環境中測試案例之輸入/輸出資料內容、輸入/輸出資料之資料欄位及型態定義,以作為日後辨別系統資訊模型之依據;進行個資抹除及變造1012:針對所抽取之測試案例依照迴歸標 的內容屬性所定義之個資欄位定義進行處理,進行抹除或變造,避免有個資外洩議題且兼容個資規範之處理,確保抽取測試案例之處理符合NCC規範、個資法及業務規則。 Please refer to FIG. 2, which is a step-by-step diagram of the extraction test case information of the regression test system and method in the variable database environment of the present invention. As shown in FIG. 2, the present invention provides a regression test system and method in a variable database environment, wherein the program step of extracting test case information 101 includes: extracting input/output data content and defining 1011: according to the content of the regression target The input/output data defined by the attribute obtains the input/output data content of the test case in the actual operating environment of the regression target, and the data field and type definition of the input/output data, as the basis for distinguishing the system information model in the future; Wipe and change 1012: According to the regression standard for the test cases The content field definition defined by the content attribute is processed, erased or altered, avoiding the problem of foreign capital leakage and compatible with the processing of individual capital specifications, ensuring that the processing of the extracted test cases complies with the NCC standard, the individual capital method and Business Rules.

請參閱第3圖,第3圖為本發明之變動資料庫環境中之迴歸測試系統與方法之進行迴歸測試之步驟程序圖。如第3圖所示,本發明所提出一種變動資料庫環境中之迴歸測試系統與方法,其中該進行迴歸測試103之程序步驟包含:複製測試案例至迴歸標的環境1031:將驗證通過之測試案例複製至執行環境中並進行資料清除動作,以確保迴歸執行環境中僅存在有效的測試資料且無影響迴歸執行的測試資料存在;計算測試案例權重1032:計算目前迴歸標的執行環境中之測試案例權重結果Z,以測試案例S_i為例,可計算出其權重結果Z_i,如下所示:,其中βj是針對αj所定義之權重值並確認Zi之PY,即可知測試案例Si是否為本次迴歸所採用,其中P為迴歸參用指數,由迴歸標的內容屬性所定義,而Y則透過下列式子所取得: 透過決定是否於本次迴歸採用該測試案例;確認迴歸環境之系統資訊模型1033:依照測試案例之輸入/輸出資料之資料欄位及型態定義所取得之輸入/輸出資料之資料欄位及型態定義與迴歸標的執行環境之相對應之資料欄位及 型態定義進行比對,判斷系統資訊模型是否有異動,若有異動;則跳至進行資料填補1034,反之,跳至載入測試案例1035;進行資料填補1034:主要是針對系統資訊模型異動時的處理,以維持測試案例的有效性、正確性,確保迴歸測試執行的完整性、正確性,針對異動欄位進行,依照迴歸標的內容屬性針對該欄位所定義之指派規則產出其資料內容,若無,則直接指派該資料欄位內容為Null值;載入測試案例資訊1035:將測試案例載入迴歸標的執行環境中,以便後續執行迴歸測試;執行迴歸測試1036:依照迴歸標的內容屬性所定義之驗證程式及所在路徑進行呼叫,執行迴歸測試。 Please refer to FIG. 3, which is a sequence diagram of the regression test of the regression test system and method in the variable database environment of the present invention. As shown in FIG. 3, the present invention provides a regression test system and method in a variable database environment, wherein the step of performing the regression test 103 includes: copying the test case to the regression target environment 1031: the test case that will pass the verification Copy to the execution environment and perform data cleanup actions to ensure that only valid test data exists in the regression execution environment and there is no test data affecting regression execution; Calculate test case weight 1032: Calculate test case weights in the current regression target execution environment The result Z, taking the test case S_i as an example, can calculate its weight result Z_i as follows: Where β j is the weight value defined for α j and confirms the PY of Z i , that is, whether the test case S i is used for this regression, wherein P is a regression participation index, defined by the content attribute of the regression target, Y is obtained by the following formula: Through Decide whether to use the test case in this regression; confirm the system information model 1033 of the return environment: the data field and type of the input/output data obtained according to the data field and type definition of the input/output data of the test case Define the data field and type definition corresponding to the execution environment of the regression target, and judge whether the system information model has any change. If there is any change, jump to the data padding 1034. Otherwise, jump to the load test case 1035. Data filling 1034: mainly for the processing of system information model changes, in order to maintain the validity and correctness of the test case, to ensure the integrity and correctness of the regression test execution, for the transaction field, according to the content attributes of the regression target The assignment rule defined by the field produces its data content. If not, the data field content is directly assigned to the Null value; the test case information 1035 is loaded: the test case is loaded into the regression target execution environment for subsequent Perform a regression test; perform a regression test 1036: a verification program and a program defined by the content attributes of the regression target Call path, perform regression testing.

請參閱第4圖,第4圖為本發明之本發明以變動資料庫環境中之迴歸測試系統與方法之進行比對結果之步驟程序圖。如第4圖所示,本發明所提出一種變動資料庫環境中之迴歸測試系統與方法,其中該進行比對結果104之程序步驟包含:進行資料轉換1041:將測試案例(輸出資料)與迴歸結果以當下迴歸執行環境之系統資訊模型轉換成一致的資料格式;進行不比對處理1042:依照迴歸標的內容屬性所定義之不比對欄位定義針對進行資料轉換1041所轉換之資料格式進行標識,以識別該欄位是不須進行比對處理,加速比對處理;進行業務鍵值比對1043:依照迴歸標的內容屬性所定義之資料業務鍵值定義針對轉換及標識後之資料格式進行比對,比對過程中,則將業務鍵值相同的資料配對,然後進行欄位內容比較, 若該欄位無不比對處理標識,則逐一比對產出結果,反之,則忽略該欄位內容之比對,接著進行下一欄位內容之比對;產出比對結果1044:依照比對結果產出相對應之報表內容,可知測試案例(輸入資料、輸出資料)與迴歸測試結果之差異。 Please refer to FIG. 4, which is a flow chart of the comparison result of the regression test system and method in the variable database environment of the present invention. As shown in FIG. 4, the present invention provides a regression test system and method in a variable database environment, wherein the program step of performing the comparison result 104 includes: performing data conversion 1041: testing the test case (output data) and regression The result is converted into a consistent data format by the current system information model of the regression execution environment; the non-alignment processing 1042: the data format converted by the data conversion 1041 is identified according to the definition of the content attribute of the regression target, Identifying the field is not necessary for comparison processing, speeding up the comparison processing; performing business key value comparison 1043: comparing the data format after conversion and identification according to the definition of the data service key value defined by the content attribute of the regression target, During the comparison process, the data with the same business key value is paired, and then the field contents are compared. If there is no comparison between the fields, the results are compared one by one. Otherwise, the comparison of the contents of the field is ignored, and then the comparison of the contents of the next field is performed; the output comparison result is 1044: according to the ratio The difference between the test case (input data, output data) and the regression test result can be found in the report content corresponding to the result output.

請參閱第5圖,第5圖為本發明之變動資料庫環境中之迴歸測試系統與方法之系統架構圖。如第5圖所示,本發明所提出一種變動資料庫環境中之迴歸測試系統與方法,其主要包括六大單元:迴歸標的設定模組201、動態抽樣條件組成模組202、資料抽樣模組203、抽樣資料保存模組204、遠端執行程式模組205、結果比對模組206。而該資料暫存207則負責儲存上述模組於執行迴歸測試過程中所產生之資料。 Please refer to FIG. 5. FIG. 5 is a system architecture diagram of a regression test system and method in the variable database environment of the present invention. As shown in FIG. 5, the present invention provides a regression test system and method in a variable database environment, which mainly comprises six major units: a regression target setting module 201, a dynamic sampling condition forming module 202, and a data sampling module. 203. The sample data storage module 204, the remote execution program module 205, and the result comparison module 206. The data temporary storage 207 is responsible for storing the data generated by the above modules during the execution of the regression test.

請參閱第6圖,第6圖為本發明之變動資料庫環境中之迴歸測試系統與方法之迴歸標的設定模組之功能模組架構圖。如第6圖所示,本發明所提出一種變動資料庫環境中之迴歸測試系統與方法,其中該迴歸標的設定模組201的功能模組架構圖,透過設定迴歸標的元件2011定義迴歸標的內容屬性,可動態增加迴歸測試標的,並藉由組裝設定元件2012將迴歸標的內容屬性轉換成系統內部所使用之物件提供給抽樣資料保存模組204、遠端執行程式模組205、結果比對模組206使用。 Please refer to FIG. 6. FIG. 6 is a functional module architecture diagram of a regression module of the regression test system and method in the variable database environment of the present invention. As shown in FIG. 6, the present invention provides a regression test system and method in a variable database environment, wherein a functional module architecture diagram of the regression target setting module 201 defines a content attribute of a regression target by setting a component of the regression target 2011. The regression test target can be dynamically added, and the content of the regression target is converted into the object used in the system by the assembly setting component 2012, and is provided to the sample data storage module 204, the remote execution program module 205, and the result comparison module. 206 used.

而迴歸標的內容屬性資訊則存放於資料暫存207中,迴歸標的內容屬性包括:驗證程式名稱及所在路徑、迴歸參用指數、輸入/輸出資料和指派規則。輸入/輸出資料內容包括:名稱、所在位置、類型(資料庫/檔案)、欄位定義、資料業務鍵值定義(business key)、個資欄位定義、不比對欄位定 義等等。資料業務鍵值定義,便於在後續比對資料時,用來識別不同筆資料間的對應關係,就不會有不同筆資料被當成相同資料進行資料配對比對的狀況。個資欄位定義,便於在抽取資料時,將個資欄位進行抹除或變造。 The content attribute information of the regression target is stored in the data temporary storage 207, and the content attributes of the regression target include: the verification program name and the path, the regression participation index, the input/output data, and the assignment rule. Input/output data content includes: name, location, type (database/archive), field definition, data business key definition (business key), personal fund field definition, no match field setting Righteousness and so on. The definition of the data service key value is convenient for identifying the correspondence between different pen data when the data is subsequently compared, and there is no situation in which different pen data is treated as the same data. The definition of the individual fund field is convenient for erasing or altering the personal fund field when extracting data.

不比對欄位定義,例如流水序號欄位,每次執行產出的結果資料都可能不一樣,但是也不影響整體資料的正確性,我們便把此欄位定義為不需比對的欄位,在後續比對迴歸執行結果時,便會略過此欄位;指派規則係針對系統模型變動的資料欄位進行設定,設定該欄位資料是否使用或指派該資料欄位為單一特定值、從特定值域內亂數選擇和依據測試案例資料中某些特定欄位於特定值情況下指派該欄位資料為所期望之特定值,若無任何設定則直接指派該資料欄位為Null值;迴歸參用指數係負責迴歸時計算是否採用測試案例,可透過該屬性自動化選擇迴歸案例,依迴歸標的版本動態調整所採用迴歸案例。上述內容屬性的目的是為了可以動態增加或修改迴歸的相關參數內容,並且做為其他模組統一的資料定義中心。 No, than the definition of the field, such as the serial number field, the result data of each execution may be different, but it does not affect the correctness of the overall data. We define this field as a field that does not need to be compared. In the subsequent comparison regression execution result, the field will be skipped; the assignment rule is set for the data field of the system model change, and whether the field data is used or assigned to a single specific value, Specifying the field data from a specific value range and assigning the field data to a specific value according to certain specific columns in the test case data, if there is no setting, directly assigning the data field to a Null value; The participation index is responsible for calculating whether to use the test case during the regression, and the regression case can be automatically selected through the attribute, and the regression case adopted is dynamically adjusted according to the version of the regression target. The purpose of the above content attributes is to dynamically add or modify the relevant parameter content of the regression, and as a unified data definition center of other modules.

請參閱第7圖,第7圖為本發明之變動資料庫環境中之迴歸測試系統與方法之之動態條件組成模組之功能模組架構圖。如第5圖及第7圖所示,本發明所提出一種變動資料庫環境中之迴歸測試系統與方法,其中該動態抽樣條件組成模組202為提供條件組裝元件2021負責定義涵蓋不同功能及業務的抽樣條件,並定義各抽樣條件之權重值,透過彈性組裝子條件設定2024中所定義的條件及運算元2025處理成為抽樣條件,且經由條件驗證元件2022進行抽樣驗證,確定抽樣條件是否正確,如符合則交付條件轉譯元件2023處理,轉譯和生成抽樣條件,以供資料抽樣模組203執行抽樣。 Please refer to FIG. 7. FIG. 7 is a functional module architecture diagram of a dynamic condition component module of the regression test system and method in the variable database environment of the present invention. As shown in FIG. 5 and FIG. 7, the present invention provides a regression test system and method in a variable database environment, wherein the dynamic sampling condition component module 202 is responsible for defining different functions and services for providing the conditional assembly component 2021. The sampling condition, and the weight value of each sampling condition is defined, and the condition defined by the elastic assembly sub-condition setting 2024 and the operation unit 2025 are processed into sampling conditions, and the sampling verification is performed via the condition verification component 2022 to determine whether the sampling condition is correct. If yes, the delivery condition translation component 2023 processes, translates, and generates sampling conditions for the data sampling module 203 to perform sampling.

其中子條件設定2024係提供設定條件定義,以利後續在進行條件組裝時可重複使用;條件驗證元件2022則負責驗證條件組裝元件2021所組成之抽樣條件的邏輯性是否正確,以確保抽樣條件邏輯之有效性、正確性,條件轉譯元件2023係負責將抽樣條件轉譯成資料抽樣模組203可執行之物件。 The sub-condition setting 2024 provides a setting condition definition for subsequent reuse in conditional assembly; the condition verification element 2022 is responsible for verifying whether the logical condition of the sampling condition composed of the conditional assembly element 2021 is correct to ensure sampling condition logic. The validity and correctness of the conditional translation component 2023 is responsible for translating the sampling conditions into objects executable by the data sampling module 203.

資料抽樣模組203則係實現變動資料庫環境中之迴歸測試方法之抽取測試案例資訊101及驗證測試案例資訊102,提供自動化抽取案例並確認每筆測試案例是否有滿足抽樣條件,最後將符合抽樣條件之案例資料交付給抽樣資料保存模組204進行後續處理。 The data sampling module 203 implements the extraction test case information 101 and the verification test case information 102 of the regression test method in the variable database environment, provides an automated extraction case and confirms whether each test case satisfies the sampling condition, and finally meets the sampling. The conditional case data is delivered to the sample data storage module 204 for subsequent processing.

由抽樣資料保存模組204當作本系統有關測試案例的資料統一介面,負責接收資料抽樣模組203、遠端執行程式模組205和結果比對模組206的呼叫進行有關測試案例的存取,接受資料抽樣模組203的呼叫,儲存符合驗證結果之測試案例,此外,亦提供遠端執行程式模組205和結果比對模組206的呼叫,讀取儲存之測試案例資訊,由於抽樣資料保存模組204僅做相當單純的資料存取的動作,因此穩定性高,不會受業務邏輯變動影響,因此可長時間運作。 The sample data storage module 204 is used as a unified interface for the test cases of the system, and is responsible for accessing the test cases of the data sampling module 203, the remote execution program module 205, and the result comparison module 206. Receiving the call of the data sampling module 203, storing the test case that meets the verification result, and also providing the call of the remote execution program module 205 and the result comparison module 206, reading the stored test case information, due to the sampling data The save module 204 only performs relatively simple data access operations, so the stability is high, and it is not affected by business logic changes, so it can operate for a long time.

而遠端執行程式模組205則係實現變動資料庫環境中之迴歸測試方法之進行迴歸測試103;結果比對模組206則係實現變動資料庫環境中之迴歸測試方法之進行比對結果104。 The remote execution program module 205 implements the regression test 103 in the regression test method in the variable database environment; the result comparison module 206 implements the regression test method in the variable database environment to compare the results 104. .

上列詳細說明乃針對本發明之一可行實施例進行具體說明,惟該實施例並非用以限制本發明之專利範圍,凡未 脫離本發明技藝精神所為之等效實施或變更,均應包含於本案之專利範圍中。 The detailed description above is specifically described for one possible embodiment of the present invention, but the embodiment is not intended to limit the scope of the patent of the present invention. Equivalent implementations or modifications departing from the spirit of the invention are intended to be included in the scope of the invention.

綜上所述,本案不僅於技術思想上確屬創新,並具備習用之傳統方法所不及之上述多項功效,已充分符合新穎性及進步性之法定發明專利要件,爰依法提出申請,懇請 貴局核准本件發明專利申請案,以勵發明,至感德便。 To sum up, this case is not only innovative in terms of technical thinking, but also has many of the above-mentioned functions that are not in the traditional methods of the past. It has fully complied with the statutory invention patent requirements of novelty and progressiveness, and applied for it according to law. Approved this invention patent application, in order to invent invention, to the sense of virtue.

103‧‧‧進行迴歸測試 103‧‧‧Regression test

1031‧‧‧複製測試案例至迴歸標的環境 1031‧‧‧Copy test cases to the environment of the return target

1032‧‧‧計算測試案例權重 1032‧‧‧ Calculate test case weights

1033‧‧‧確認迴歸環境之系統資訊模型 1033‧‧‧Confirmation of the system information model for returning to the environment

1034‧‧‧進行資料填補 1034‧‧‧Information filling

1035‧‧‧載入測試案例資訊 1035‧‧‧Load test case information

1036‧‧‧執行迴歸測試 1036‧‧‧ Perform regression testing

Claims (10)

一種變動資料庫環境中之迴歸測試方法,其步驟至少包括:A.抽取測試案例資訊,以自訂抽樣策略方式至迴歸標的實際運行環境抽取測試案例,將該測試案例傳送至驗證測試案例資訊;B.該驗證測試案例資訊確認該測試案例是否滿足抽樣條件;C.進行迴歸測試,進行有關迴歸執行環境的資料清除並計算載入適合的測試案例進行迴歸測試;以及D.進行比對結果,將迴歸測試所採用之測試案例其輸出資料與迴歸執行結果進行比對。 A regression test method in a variable database environment, the steps of which include at least: A. extracting test case information, extracting a test case from a custom sampling strategy mode to a real operating environment of the regression target, and transmitting the test case to the verification test case information; B. The verification test case information confirms whether the test case satisfies the sampling condition; C. performs regression test, performs data clearing on the regression execution environment and calculates loading the appropriate test case for regression test; and D. performs comparison test, Compare the output data of the test cases used in the regression test with the regression execution results. 如申請專利範圍第1項所述之變動資料庫環境中之迴歸測試方法,其中該抽取測試案例資訊之步驟更包括:A1.抽取輸入/輸出資料內容及定義,依照迴歸標的內容屬性所定義之輸入/輸出資料,取得迴歸標的實際運行環境中測試案例之輸入/輸出資料內容、輸入/輸出資料之資料欄位及型態定義,以作為日後辨別系統資訊模型之依據;以及A2.進行個資抹除及變造,針對所抽取之測試案例依照迴歸標的內容屬性所定義之個資欄位定義進行處理,進行抹除或變造。 For example, the regression test method in the change database environment described in claim 1 of the patent application, wherein the step of extracting test case information further comprises: A1. extracting input/output data content and definition, as defined by the content attribute of the regression target Input/output data, obtain the input/output data content of the test case in the actual operating environment of the regression target, the data field and type definition of the input/output data, as the basis for distinguishing the system information model in the future; and A2. Wipe and change, and the test cases extracted are processed according to the definition of the individual resource fields defined by the content attributes of the regression target, and erased or altered. 如申請專利範圍第1項所述之變動資料庫環境中之迴歸測 試方法,其中該進行迴歸測試之步驟更包括:C1.複製測試案例至迴歸標的環境,將驗證通過之測試案例複製至執行環境中並進行資料清除動作,以確保迴歸執行環境中僅存在有效的測試資料且無影響迴歸執行的測試資料存在;C2.計算測試案例權重,計算出符合本次迴歸採用之測試案例;C3.確認迴歸環境之系統資訊模型,依照測試案例之輸入/輸出資料之資料欄位及型態定義所取得之輸入/輸出資料之資料欄位及型態定義與迴歸標的執行環境之相對應之資料欄位及型態定義進行比對,判斷系統資訊模型是否有異動,若有異動則跳至進行資料填補,反之則跳至載入測試案例資訊;C4.進行資料填補,針對系統資訊模型異動時的處理,以維持測試案例的有效性、正確性,確保迴歸測試執行的完整性、正確性,針對異動欄位進行,依照迴歸標的內容屬性針對該欄位所定義之指派規則產出其資料內容,若無,則直接指派該資料欄位內容為Null值;C5.載入測試案例資訊,將測試案例載入迴歸標的執行環境中;以及C6.執行迴歸測試,依照迴歸標的內容屬性所定義之驗證程式及所在路徑進行呼叫,執行迴歸測試。 Regression measurement in the context of the change database as described in item 1 of the patent application scope The test method, wherein the step of performing the regression test further comprises: C1. copying the test case to the environment of the regression target, copying the test case passed through the verification to the execution environment and performing a data clearing action to ensure that only valid in the regression execution environment exists. Test data and no test data affecting regression execution; C2. Calculate test case weights, calculate test cases that meet the regression test; C3. Confirm the system information model of the regression environment, and input/output data according to test cases Field and type definition The data field and type definition of the input/output data obtained are compared with the corresponding data field and type definition of the execution environment of the regression target to determine whether the system information model has changed. If there is a change, it will jump to fill the data, otherwise it will jump to the test case information; C4. Fill in the data, and deal with the system information model change, to maintain the validity and correctness of the test case and ensure the regression test execution. Integrity, correctness, for the transaction field, according to the content attribute of the regression target The assignment rule defined by the bit produces its data content. If not, the content of the data field is directly assigned to the Null value; C5. Load the test case information, load the test case into the execution environment of the regression target; and C6. In the regression test, the call is performed according to the verification program and the path defined by the content attribute of the regression target, and the regression test is performed. 如申請專利範圍第1項所述之變動資料庫環境中之迴歸測試方法,其中該進行比對結果之步驟更包括: D1.進行資料轉換,將測試案例與迴歸結果以當下迴歸執行環境之系統資訊模型轉換成一致的資料格式;D2.進行不比對處理,將進行資料轉換步驟轉換完之資料格式依迴歸標的內容屬性所定義之不比對欄位進行標識以識別該欄位是不須進行比對處理,加速比對處理;D3.進行業務鍵值比對,依照迴歸標的內容屬性所定義之資料業務鍵值定義針對轉換及標識後之資料格式進行比對,比對過程中,則將業務鍵值相同的資料配對,然後進行欄位內容比較,若該欄位無不比對處理標識,則逐一比對產出結果,反之,則忽略該欄位內容之比對,接著進行下一欄位內容之比對;以及D4.產出比對結果,依照比對結果產出相對應之報表內容,可知測試案例與迴歸測試結果之差異。 The regression test method in the environment of the change database described in claim 1 of the patent application, wherein the step of comparing the results further comprises: D1. Perform data conversion, convert test cases and regression results into a consistent data format in the current regression environment system information model; D2. Perform non-alignment processing, and perform data conversion steps to convert the data format according to the content attributes of the regression target. It is defined that no more than the identification of the field to identify the field is not necessary for comparison processing, speed up the comparison processing; D3. Perform business key value comparison, according to the data attribute key value defined by the content attribute of the regression target The data format after conversion and identification is compared. In the comparison process, the data with the same business key value is paired, and then the content of the field is compared. If the field is processed, the output result is compared one by one. Conversely, the comparison of the contents of the field is ignored, and then the comparison of the contents of the next field is performed; and D4. The output comparison result, according to the report content corresponding to the output of the comparison result, the test case and the regression are known. The difference in test results. 一種變動資料庫環境中之迴歸測試系統,其該系統至少包括:一迴歸標的設定模組,係定義迴歸標的內容屬性,以彈性增加迴歸測試標的,以作為其他模組統一的資料定義中心;一動態抽樣條件組成模組,係定義涵蓋不同功能及業務的抽樣條件,並定義各抽樣條件之權重值;一資料抽樣模組,提供自動化抽取案例並判斷每筆測試案例是否有滿足抽樣條件;一抽樣資料保存模組,係為該些測試案例的資料統一介面, 提供予該資料抽樣模組、遠端執行程式模組和結果比對模組呼叫,存取該些測試案例資訊;一遠端執行程式模組,用以迴歸執行環境的初始化並計算載入適合的測試案進行迴歸測試;以及一結果比對模組,比對迴歸結果,將該測試案例與迴歸執行結果進行比對;其中,該迴歸標的設定模組將該測試案例傳送至該動態抽樣條件組成模組,定義該測試案例並傳送至該資料抽樣模組,進行判斷後傳送至該抽樣資料保存模組進行存取,而該遠端執行程式模組進行回歸測試,將該測試案例傳送至該結果比對模組進行比對,將該測試案例回傳至該抽樣資料保存模組。 A regression test system in a variable database environment, the system comprising at least: a regression target setting module, defining a content attribute of the regression target, and elastically increasing the regression test target to serve as a unified data definition center of other modules; Dynamic sampling conditions form a module that defines sampling conditions covering different functions and services, and defines weight values for each sampling condition; a data sampling module that provides automated extraction of cases and determines whether each test case satisfies the sampling conditions; The sample data storage module is a unified interface for the data of the test cases. Providing the data sampling module, the remote execution program module, and the result comparison module call, accessing the test case information; and a remote execution program module for returning to the execution environment initialization and calculating the loading suitable The test case is subjected to a regression test; and a result comparison module compares the regression result, and compares the test case with the regression execution result; wherein the regression target setting module transmits the test case to the dynamic sampling condition Forming a module, defining the test case and transmitting it to the data sampling module, performing the judgment and transmitting to the sample data storage module for access, and the remote execution program module performs a regression test, and transmitting the test case to The result is compared with the module, and the test case is transmitted back to the sample data saving module. 如申請專利範圍第5項所述之變動資料庫環境中之迴歸測試系統,其中該迴歸標的設定模組更包括:一設定迴歸標的元件,係提供迴歸標的內容屬性各項屬性的設定功能;以及一組裝設定元件,係提供將迴歸標的內容屬性轉換成為系統內部所使用之物件,並與該設定迴歸標的元件相連接。 The regression test system in the variable database environment described in claim 5, wherein the regression target setting module further comprises: a component for setting a regression target, and providing a setting function of each attribute of the content attribute of the regression target; An assembly setting component provides for converting the content attribute of the regression target into an object used inside the system, and is connected to the component of the set regression target. 如申請專利範圍第5項所述之變動資料庫環境中之迴歸測試系統,其中該迴歸標的內容屬性具有驗證程式名稱、所在路徑、迴歸參用指數與輸入/輸出資料或指派規則。 The regression test system in the variable database environment as described in claim 5, wherein the content attribute of the regression target has a verification program name, a path, a regression participation index, and an input/output data or an assignment rule. 如申請專利範圍第7項所述之變動資料庫環境中之迴歸測試系統,其中該輸入/輸出資料具有名稱、所在位置、類型、 欄位定義、資料業務鍵值定義、個資欄位定義或不比對欄位定義。 A regression test system in a variable database environment as described in claim 7 wherein the input/output data has a name, location, type, Field definition, data business key definition, collateral field definition or no match field definition. 如申請專利範圍第5項所述之變動資料庫環境中之迴歸測試系統,其中該動態抽樣條件組成模組更包括:一子條件設定,定義資料;一運算元,處理該資料為成為抽樣條件;一條件組裝元件,係將該子條件設定及運算元組裝成一個條件;一條件驗證元件,係驗證條件是否符合運算邏輯;以及一條件轉譯元件,轉譯為可辨識的判斷邏輯;其中,該條件組裝元件合併組裝該子條件設定與該運算元之資料為條件,將該條件傳送至該條件檢驗元件進行判斷,接著將該條件傳送至該條件轉譯元件。 The regression test system in the variable database environment described in claim 5, wherein the dynamic sampling condition component module further comprises: a sub-condition setting, defining data; an operation element, processing the data as a sampling condition a conditional assembly component that assembles the sub-condition setting and operation elements into a condition; a conditional verification component that verifies whether the condition conforms to the operational logic; and a conditional translation component that translates into an identifiable decision logic; wherein The conditional assembly component merges and assembles the sub-condition setting with the data of the operand as a condition, and the condition is transmitted to the conditional verification component for determination, and then the condition is transmitted to the conditional translation component. 如申請專利範圍第5項所述之變動資料庫環境中之迴歸測試系統,其中該資料抽樣模組更包括:一隨機抽樣元件,抽取資料;以及一資料驗證元件,接收該資料進行驗證。 The regression test system in the variable database environment as described in claim 5, wherein the data sampling module further comprises: a random sampling component, extracting data; and a data verification component, receiving the data for verification.
TW102138599A 2013-10-25 2013-10-25 Regression testing system and method in variable database environment TWI519946B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW102138599A TWI519946B (en) 2013-10-25 2013-10-25 Regression testing system and method in variable database environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW102138599A TWI519946B (en) 2013-10-25 2013-10-25 Regression testing system and method in variable database environment

Publications (2)

Publication Number Publication Date
TW201516676A TW201516676A (en) 2015-05-01
TWI519946B true TWI519946B (en) 2016-02-01

Family

ID=53720334

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102138599A TWI519946B (en) 2013-10-25 2013-10-25 Regression testing system and method in variable database environment

Country Status (1)

Country Link
TW (1) TWI519946B (en)

Also Published As

Publication number Publication date
TW201516676A (en) 2015-05-01

Similar Documents

Publication Publication Date Title
AU2021273576B2 (en) Model integration tool
US10108536B2 (en) Integrated automated test case generation for safety-critical software
US8589884B2 (en) Method and system for identifying regression test cases for a software
US9619373B2 (en) Method and apparatus to semantically connect independent build and test processes
US9454466B2 (en) Explaining partially illegal combinations in combinatorial models
US11567858B2 (en) System and method for user interface autonomous testing
CN110968437A (en) Method, device, equipment and medium for parallel execution of single contract based on Java intelligent contract
US8676627B2 (en) Vertical process merging by reconstruction of equivalent models and hierarchical process merging
CN103257919A (en) Inspection method and device for script programs
US10339035B2 (en) Test DB data generation apparatus
US8887112B2 (en) Test validation planning
CN113672520A (en) Test case generation method and device, electronic equipment and storage medium
CN112395182A (en) Automatic testing method, device, equipment and computer readable storage medium
US20190370151A1 (en) Equivalence verification apparatus and computer readable medium
JP2009099111A (en) Rule inspection program, rule inspection method, and rule inspection device
TWI519946B (en) Regression testing system and method in variable database environment
US20080195453A1 (en) Organisational Representational System
CN113032269A (en) Intelligent design data testing method and device, storage medium and electronic equipment
KR101737575B1 (en) Method and device for verifying data based on sql sentences generated automatically
CN109815129A (en) Test method, device, terminal and the storage medium of securities finance application software
KR102390280B1 (en) Automation apparatus and method for cyber security risk management in development life cycle of weapon system
KR102111392B1 (en) Test unified administration system and Controlling Method for the Same
CN115292165A (en) Test method and device, electronic device and storage medium
CN117851235A (en) API interface adaptation verification system based on technical standard document
JP6397800B2 (en) Test support system and test support method

Legal Events

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