KR20090104275A - Pairwise test case generation method based on module dependency and computer readable medium for recording program thereof - Google Patents

Pairwise test case generation method based on module dependency and computer readable medium for recording program thereof Download PDF

Info

Publication number
KR20090104275A
KR20090104275A KR1020080029628A KR20080029628A KR20090104275A KR 20090104275 A KR20090104275 A KR 20090104275A KR 1020080029628 A KR1020080029628 A KR 1020080029628A KR 20080029628 A KR20080029628 A KR 20080029628A KR 20090104275 A KR20090104275 A KR 20090104275A
Authority
KR
South Korea
Prior art keywords
test case
node
test
test cases
leaf
Prior art date
Application number
KR1020080029628A
Other languages
Korean (ko)
Other versions
KR100977522B1 (en
Inventor
최경희
정기현
김장복
Original Assignee
한국항공우주산업 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국항공우주산업 주식회사 filed Critical 한국항공우주산업 주식회사
Priority to KR1020080029628A priority Critical patent/KR100977522B1/en
Publication of KR20090104275A publication Critical patent/KR20090104275A/en
Application granted granted Critical
Publication of KR100977522B1 publication Critical patent/KR100977522B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/263Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers

Landscapes

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

Abstract

PURPOSE: A method generating a test case considering a dependent relation between modules and a recording media storing a program are provided to express a dependent relation between the modules within a range which a number of test cases does not increased within the range. CONSTITUTION: A method generating a test case considering a dependent relation between modules is as follows. Two pair of test cases are generated(S100). PTMD(Pair wise Testing based on Module Dependency) test case which satisfied with a module dependent relation is generated by calling for one node function(S200). A proper test case set is generated by summing the PTMD test case and the two test case.

Description

모듈 사이의 의존관계를 고려한 테스트 케이스를 생성하는 방법 및 그 방법에 대한 프로그램을 저장한 기록매체{PAIRWISE TEST CASE GENERATION METHOD BASED ON MODULE DEPENDENCY AND COMPUTER READABLE MEDIUM FOR RECORDING PROGRAM THEREOF}TECHNICAL AND COMPUTER READABLE MEDIUM FOR RECORDING PROGRAM THEREOF}

본 발명은 모듈 사이의 의존관계를 고려한 테스트 케이스를 생성하는 방법에 관한 것이고, 특히 시스템 모듈 사이의 의존 관계를 고려한 변형된 이쌍 테스트 케이스 알고리즘을 사용하여 보다 신뢰성있는 테스트 케이스를 생성하는 방법에 관한 것이다.The present invention relates to a method for generating test cases considering the dependencies between modules, and more particularly to a method for generating more reliable test cases using a modified two-pair test case algorithm considering the dependencies between system modules. .

일반적으로, 어떠한 시스템이 가질 수 있는 입력 변수와, 각 변수가 가질 수 있는 값들을 이용하여 시스템이 가질 수 있는 모든 입력 조합을 모두 테스트하는 것은 사실상 불가능하다. 따라서 모든 입력 조합들 중 시스템을 테스트하기 위한 테스트 케이스를 골라내야 하는데, 종래에는 시스템에 주입할 입력 조합을 생성하는 방법으로서 이쌍 테스트 케이스(Pairwise testcase) 생성 방법을 사용하였다.In general, it is virtually impossible to test all the combinations of inputs a system can have and the values that each variable can have. Therefore, it is necessary to select a test case for testing a system among all input combinations. In the past, a pairwise test case generation method was used as a method of generating input combinations to be injected into the system.

종래의 이쌍 테스트 케이스 생성 방법(예를 들면, "IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 28, NO. 1, JANUARY 2002"의 "A Test Generation Strategy for Pairwise testing" 문헌 참조)은 시스템의 입력 변수들에 대해서 각 쌍(pair)에 대한, 모든 조합이 테스트 케이스에 나타나도록 테스트 케이스를 생성하는 방법이다. 예를 들어서, 파라미터 A, B, C가 있고, A는 A1, A2, B는 B1,B2, C는 C1,C2의 값을 가질 수 있다면, (A,B)에 대한 모든 쌍 (A1,B1), (A1,B2), (A2,B1),(A2,B2)가 모두 존재하여야 하며, (A,C)에 대한 모든 조합인 (A1,C1),(A1,C2),(A2,C1),(A2,C2) 가 나타나야한다. 마찬가지로, (B,C)에 대한 모든 조합 (B1,C1), (B1,C2), (B2,C1), (B2,C2)가, 생성된 테스트 케이스에 나타나야한다. 즉, 다음 4개의 테스트 케이스는 이러한 조건들을 만족할 수 있게 된다.The conventional method of generating a two-pair test case (see, for example, the document "A Test Generation Strategy for Pairwise testing" of "IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 28, NO. 1, JANUARY 2002") is based on the input variables of the system. For each pair, we create a test case so that all combinations appear in the test case. For example, if there are parameters A, B, C, A can be A 1 , A 2 , B can be B 1 , B 2 , C can have a value of C 1 , C 2 , then for (A, B) All pairs (A 1 , B 1 ), (A 1 , B 2 ), (A 2 , B 1 ), (A 2 , B 2 ) must all exist and all combinations of (A, C) ( A 1 , C 1 ), (A 1 , C 2 ), (A 2 , C 1 ), (A 2 , C 2 ) should appear. Similarly, all combinations (B 1 , C 1 ), (B 1 , C 2 ), (B 2 , C 1 ), (B 2 , C 2 ) for (B, C) must appear in the generated test case do. In other words, the next four test cases can satisfy these conditions.

(A1,B1,C1), (A1,B2,C2), (A2,B1,C2), (A2,B2,C1)(A 1 , B 1 , C 1 ), (A 1 , B 2 , C 2 ), (A 2 , B 1 , C 2 ), (A 2 , B 2 , C 1 )

이처럼 이쌍 테스트 케이스 생성방법은 시스템의 모든 조합을 축소시켜줄 수 있는 효율적인 방법이지만, 시스템 내부의 모듈 사이의 "의존관계"와 같은 시스템 특성을 고려하지 않고 테스트 케이스를 생성하기 때문에 반드시 필요한 테스트 케이스를 누락시키는 경우가 발생할 수 있다. 이 때문에, 종래의 이쌍 테스트 케이스 생성방법(즉, 모듈 사이의 "의존관계"를 고려하지 않은 테스트 케이스 생성 방법)에 의할 경우, 시스템에 치명적인 영향을 줄 수 있는 오류를 검출할 수 없는 테스트 케이스가 생성될 수도 있다.The two-pair test case generation method is an efficient way to reduce all combinations of the system. However, since the test case is generated without considering the system characteristics such as the "dependency" between the modules in the system, the necessary test cases are omitted. May occur. For this reason, in the case of the conventional two-pair test case generation method (that is, a test case generation method that does not consider the "dependency" between modules), a test case that cannot detect an error that may have a fatal effect on the system May be generated.

여기서, 시스템 S의 내부 모듈 사이에 "의존관계"가 있다는 것은 어떤 모듈의 출력값이 다른 모듈의 입력값이 된다는 것을 의미한다. 이에 대해, 도 1을 참조 하여 설명한다.Here, the "dependency" between internal modules of the system S means that the output value of one module becomes the input value of another module. This will be described with reference to FIG. 1.

도 1은 시스템 내부의 모듈 사이의 "의존관계"를 설명하기 위한 도면으로서, 도 1의 시스템 S는 3개의 입력변수 {X,Y,Z}를 가지며, 2개의 내부 모듈 OP1과 OP2를 갖는다. X와 Y는 OP1의 입력이며, W는 출력이다. 따라서 W=OP1(X,Y)로 나타낼 수 있다. 그리고 W와 Z가 OP2의 입력이면, OP1과 OP2는 서로 "의존관계"에 있다고 말한다. 이러한 모듈 사이에 "의존관계"가 있는 시스템은 도 1과 같은 트리(Tree) 형태로 모델링하는 것이 가능하고, "S=(X XOR Y) AND Z"로 표현할 수 있다. 도 1에서 OP1과 OP2는 각각 "XOR", "AND" 연산자이며, OP2는 트리의 최상위 노드가 된다.FIG. 1 is a diagram for explaining a "dependency" between modules in a system. The system S of FIG. 1 has three input variables {X, Y, Z} and two internal modules OP 1 and OP 2 . Have X and Y are inputs of OP 1 and W is output. Therefore, it can be expressed as W = OP 1 (X, Y). If W and Z are inputs of OP 2 , then OP 1 and OP 2 are said to be in a "dependency" with each other. A system having a "dependency" between these modules can be modeled in a tree form as shown in FIG. 1 and can be expressed as "S = (X XOR Y) AND Z". In FIG. 1, OP 1 and OP 2 are "XOR" and "AND" operators, respectively, and OP 2 becomes a top node of the tree.

도 1의 시스템에 종래의 이쌍 테스트 케이스 생성 방법(예를 들면, "IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 28, NO. 1, JANUARY 2002"의 "A Test Generation Strategy for Pairwise testing" 문헌 참조)에 의한 테스트 케이스(이쌍 테스트 케이스)를 생성할 경우의 결과는 다음 표 1과 같다.By the conventional two-pair test case generation method (see, for example, the document "A Test Generation Strategy for Pairwise testing" of "IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 28, NO. 1, JANUARY 2002") in the system of FIG. The result of generating a test case (two pair test case) is shown in Table 1 below.

[표 1]TABLE 1

XX YY WW ZZ TT TT FF TT TT FF TT FF FF TT TT FF FF FF FF TT

그러나, 종래의 이쌍 테스트 케이스 생성 방법에 의해 생성된 상기 [표 1]의 이쌍 테스트 케이스를 사용하여 도 1의 OP2모듈을 테스트 하는 경우에 있어서는, (W,Z) = {(T,T),(F,F)} 테스트 케이스가 포함되어 있지 않으므로(즉, OP1과 OP2가 서로 "의존관계"에 있음을 전혀 고려하지 않음) 신뢰성있는 테스트 결과를 기대할 수 없는 문제점이 있었다.However, in the case of testing the OP 2 module of FIG. 1 using the two pair test case of [Table 1] generated by the conventional two pair test case generation method, (W, Z) = {(T, T) , (F, F)} Because the test cases are not included (ie, it does not consider that OP 1 and OP 2 are "depending on each other"), there is a problem in that reliable test results cannot be expected.

본 발명은 상술한 문제점을 해결하기 위해 제안된 것으로서, 본 발명의 목적은 종래의 이쌍 테스트 생성 방법에 비해 테스트 케이스 개수가 크게 증가하지 않는 범위 내에서 모듈 사이의 의존 관계를 표현할 수 있는 테스트 케이스를 생성하는 것이다.The present invention has been proposed to solve the above-described problems, and an object of the present invention is to provide a test case capable of expressing a dependency relationship between modules within a range in which the number of test cases does not increase significantly compared to a conventional two-pair test generation method. To generate.

상기 목적을 달성하기 위해, 본 발명은 (A) 이쌍 테스트 케이스를 생성하는 단계; (B) '포원노드(ForOneNode)'함수를 호출하여 모듈 의존관계를 만족하는 '피티엠디(PTMD: Pairwise Testing based on Module Dependency)' 테스트 케이스를 생성하는 단계; 및 (C) 상기 (A) 단계의 이쌍 테스트 케이스와 상기 (B) 단계의 '피티엠디' 테스트 케이스를 합쳐서 완전한 테스트 케이스 집합을 생성하는 단계;로 구성되는 테스트 케이스를 생성하는 방법으로서, 상기 (B) 단계의 상기 '포원노드'함수는,In order to achieve the above object, the present invention comprises the steps of (A) generating a two-pair test case; (B) calling a 'ForOneNode' function to generate a 'pairwise testing based on module dependency' (PTMD) test case that satisfies the module dependency; And (C) combining the two pair test cases of step (A) and the 'PTI MD' test cases of step (B) to generate a complete set of test cases. The 'one node' function of step B) is

(B1) 노드가 리프(Leaf)인지 판단하는 단계;(B1) determining whether the node is a leaf;

(B2) 리프가 아닌 노드의 모든 자식노드에 대해서 상기 '포원노드'를 재귀적 으로 호출하여, 상기 자식노드에 대한 '피티엠디' 테스트 케이스를 생성하는 단계;(B2) recursively calling the 'four node' for all the child nodes of the non-leaf node to generate a 'PTI MD' test case for the child node;

(B3) 상기 리프가 아닌 노드의 입력 변수를 이용하여 이쌍 테스트 케이스를 생성하는 단계; 및(B3) generating two pair test cases using input variables of the non-leaf nodes; And

(B4) 상기 리프가 아닌 노드의 입력 변수를 이용하여 생성된 상기 이쌍 테스트 케이스의 입력 변수를 상기 리프가 아닌 노드의 자식노드의 입력 변수로 대체하는 단계;를 포함하는 알고리즘에 의해 상기 모듈 의존관계를 만족하는 '피티엠디' 테스트 케이스를 생성하는 것을 특징으로 하는 시스템 모듈 사이의 의존 관계를 고려한 테스트 케이스를 생성하는 방법 및/또는 상기 방법을 수행하는 프로그램이 기록된 컴퓨터 판독가능한 기록매체를 제공한다.(B4) replacing the input variable of the two-pair test case generated using the input variable of the non-leaf node with the input variable of the child node of the non-leaf node; It provides a method for generating a test case taking into account the dependencies between the system modules, characterized in that to generate a 'PTI MD' test case that satisfies and / or a computer-readable recording medium recorded a program for performing the method .

바람직한 실시예에 따라, 상기 (B) 단계의 상기 '포원노드'함수는, 상기 (B4) 단계 후에, (B5) 상기 리프가 아닌 노드의 자식노드에 대한 테스트 케이스들 중 상기 리프가 아닌 노드의 입력 변수로 대체되지 않은 테스트 케이스를 상기 '피티엠디' 테스트 케이스에 강제로 추가하는 단계를 더 포함할 수 있다.According to a preferred embodiment, the 'one node' function of the step (B), after the step (B4), (B5) of the non-leaf node of the test cases for the child node of the non-leaf node The method may further include forcibly adding a test case that is not replaced with an input variable to the 'PTI MD' test case.

이하, 본 발명에 따른 시스템 모듈 사이의 의존 관계를 고려한 테스트 케이스를 생성하는 방법 및/또는 상기 방법을 수행하는 프로그램이 기록된 컴퓨터 판독가능한 기록매체를 도면을 참조하여 상세하게 설명한다. Hereinafter, a method of generating a test case in consideration of dependence between system modules according to the present invention and / or a computer-readable recording medium having recorded thereon a program for performing the method will be described in detail with reference to the accompanying drawings.

도 2는 본 발명인 시스템 모듈 사이의 의존 관계를 고려한 테스트 케이스 생성 방법을 설명하기 위한 순서도이고, 도 3은 도 2의 상기 테스트 케이스 생성 방법을 구현하는 프로그램의 알고리즘을 수도 코드(Pseudocode)로 나타낸 도면이다. FIG. 2 is a flowchart illustrating a test case generation method in consideration of the dependency relationship between system modules of the present invention, and FIG. 3 is a diagram illustrating an algorithm of a program implementing the test case generation method of FIG. 2 in pseudo code. to be.

본 발명인 시스템 모듈 사이의 의존 관계를 고려한 테스트 케이스 생성 방법 및/또는 그 프로그램을 위한 알고리즘은 트리(Tree) 형태로 표현된 시스템(S)에 대해 적용가능하다.The test case generation method and / or algorithm for the program considering the dependency among the system modules of the present invention is applicable to the system S represented in the form of a tree.

먼저, 도 2 및 도 3의 알고리즘에 사용된 용어를 정의하면 다음과 같다.First, terms used in the algorithm of FIGS. 2 and 3 are defined as follows.

nd는 노드를 나타낸다. vi(nd)는 nd의 i번째 출력값을 나타낸다. 따라서, 만약 nd가 마지막 노드(Leaf node)이면, 그것은 시스템의 입력 파라미터가 되며, vi(nd)는 그것의 i번째 값 그 자체가 된다. 그리고, N(nd)는 노드가 가지고 있는 파라미터의 개수이며, Ci는 nd의 자식 노드의 i번째를 나타낸다. 테스트 케이스를 표현하기 위해서, 입력 파라미터와 값의 조합을 나타내는 Pi를 순서대로 나타내며, 그것을 t=p1p2p3... 로 표현한다. 예를 들어, 테스트 케이스 t=(X,T)(Y,T)(Z,F)라면, X,Y,Z 파라미터 값이 각각 T,T,F라는 것을 나타내게 된다. 그리고, output(nd,t)는 노드 nd에 t가 적용되었을 때의 출력값을 나타낸다. PT(nd1,nd2,...)는 종래의 이쌍 테스트 케이스(Pairwise testcase) 생성 알고리즘에 의해 생성된 테스트 케이스를 나타낸다.nd represents a node. v i (nd) represents the i th output of nd. Thus, if nd is the last node, it becomes the system's input parameter, and v i (nd) is its i th value itself. N (nd) is the number of parameters the node has, and C i represents the i th of a child node of nd. To represent the test case, P i , which represents a combination of input parameters and values, is presented in order, with t = p1p2p3 ... For example, if test case t = (X, T) (Y, T) (Z, F), it indicates that the X, Y, Z parameter values are T, T, F, respectively. And output (nd, t) shows the output value when t is applied to node nd. PT (nd1, nd2, ...) represents a test case generated by a conventional Pairwise testcase generation algorithm.

도 2 및 도 3을 참조하면, 본 발명인 시스템 모듈 사이의 의존 관계를 고려한 테스트 케이스 생성 방법은, 크게 이쌍 테스트 케이스를 생성하는 단계(S100); '포원노드(ForOneNode)'함수를 호출하여 모듈 의존관계를 만족하는 '피티엠디(PTMD: Pairwise Testing based on Module Dependency)' 테스트 케이스를 생성하는 단계(S200); 및 상기 S100 단계의 이쌍 테스트 케이스와 상기 S200 단계의 '피 티엠디' 테스트 케이스를 합쳐서 완전한 테스트 케이스 집합을 생성하는 단계(S300);를 포함하는 메인 함수에 의해 구성된다(도 3의 302 참조). 한편, 상기 S100 단계의 이쌍 테스트 케이스를 생성하는 단계는 종래에 일반적으로 사용되던 이쌍 테스트 케이스(Pairwise testcase) 생성 알고리즘으로 구현할 수 있다.2 and 3, the test case generation method in consideration of the dependency between the inventors of the system module, generating a large two-pair test case (S100); Generating a pairwise testing based on module dependency (PTMD) test case satisfying the module dependency by calling the 'ForOneNode' function (S200); And generating a complete set of test cases by combining the two pair test cases of step S100 and the 'P TMD' test cases of step S200 (S300) (see 302 of FIG. 3). . On the other hand, the step of generating the two-pair test case of the step S100 can be implemented by a pairwise test case (Pairwise test case) generation algorithm generally used in the prior art.

또한, 본 발명인 시스템 모듈 사이의 의존 관계를 고려한 테스트 케이스 생성 방법의 상기 메인 함수 중, 상기 S200 단계에서의 상기 '포원노드'함수는 노드 nd가 리프(Leaf)인지 판단하는 단계(S202); 리프가 아닌 노드 nd의 모든 자식노드 Cn에 대해서 상기 '포원노드'를 재귀적으로 호출하여, 자식노드 Cn에 대한 '피티엠디' 테스트 케이스를 생성하는 단계(S204); 상기 리프가 아닌 노드 nd의 입력 변수를 이용하여 이쌍 테스트 케이스를 생성하는 단계(S206); 및 상기 리프가 아닌 노드 nd의 입력 변수를 이용하여 생성된 이쌍 테스트 케이스의 입력 값을 상기 리프가 아닌 노드 nd의 자식노드 Cn의 입력 변수로 대체하는 단계(S208);를 포함하는 알고리즘에 의해 구성된다. 바람직한 실시예에 따라, 본 발명에 적용되는 '포원노드(ForOneNode)'함수는 상기 S208 단계 후에, 상기 리프가 아닌 노드 nd의 자식노드 Cn에 대한 테스트 케이스들 중 상기 리프가 아닌 노드 nd의 입력 변수로 대체되지 않은 테스트 케이스를 상기 '피티엠디' 테스트 케이스에 강제로 추가하는 단계(S210)를 더 포함할 수 있다.In addition, among the main functions of the test case generation method considering the dependency between the present inventors, the 'one node' function in step S200 may include determining whether node nd is a leaf (S202); Recursively calling the 'four node' for all child nodes Cn of the node nd other than the leaf, thereby generating a 'PTI M' test case for the child node Cn (S204); Generating two pair test cases using input variables of the node nd other than the leaf (S206); And replacing the input value of the two-pair test case generated using the input variable of the non-leaf node nd with the input variable of the child node Cn of the non-leaf node nd (S208). do. According to a preferred embodiment, the 'ForOneNode' function applied to the present invention is the input variable of the non-leaf node nd among the test cases for the child node Cn of the non-leaf node nd after the step S208. The method may further include forcibly adding a test case that is not replaced with the 'PTI MD' test case (S210).

구체적으로, 상기 '포원노드'함수를 구성하는 상기 노드 nd가 리프(Leaf)인지 판단하는 단계(S202)는 '포원노드'함수의 아규먼트(argument)로 넘어온 노드가 리프 노드인 경우에는 상기 노드 nd가 가질 수 있는 값이 해당 노드에 대한 테스트 케이스가 되므로, 상기 노드 nd가 가질 수 있는 값을 테스트 케이스 리스트로 만들고 그것을 반환하는 과정이다(도 2의 S203, 도 3의 304 참조).In detail, determining whether the node nd constituting the 'one node' function is a leaf (S202) is performed when the node passed to an argument of the 'one node' function is a leaf node. Since the value that can have becomes the test case for the node, a process of making the value that the node nd has can be made as a test case list and returning it (see S203 of FIG. 2 and 304 of FIG. 3).

또한, 상기 리프가 아닌 노드 nd의 모든 자식노드 Cn에 대해서 상기 '포원노드'를 재귀적으로 호출하여, 자식노드 Cn에 대한 '피티엠디' 테스트 케이스를 생성하는 단계(S204)는 상기 '포원노드'함수의 아규먼트로 넘어온 노드 nd에 속한 모든 자식노드들 각각에 대한 '피티엠디(PTMD: Pairwise Testing based on Module Dependency)' 테스트 케이스를 생성하는 과정이다(도 3의 306 참조).In addition, in step S204, the 'four node' test case is generated for the child node C n by recursively calling the 'four node' for all the child nodes C n other than the leaf. It is a process of generating a 'pairwise testing based on module dependency (PTMD)' test case for each of the child nodes belonging to the node nd passed into the function's argument (see 306 of FIG. 3).

또한, 상기 리프가 아닌 노드 nd의 입력 변수를 이용하여 이쌍 테스트 케이스를 생성하는 단계(S206)는, 상기 '포원노드'함수의 아규먼트로 넘어온 노드 중 리프가 아닌 노드에 대해, 상기 노드의 입력 변수가 가질 수 있는 값을 이용하여 이쌍 테스트 케이스를 생성하는 과정이다(도 3의 308 참조).In addition, the generating of the two-pair test case using the input variable of the non-leaf node nd (S206), for the non-leaf node among the nodes passed by the argument of the 'four node' function, the input variable of the node This is a process of generating a two-pair test case using a value that can have (see 308 of FIG. 3).

또한, 상기 리프가 아닌 노드 nd의 입력 변수를 이용하여 생성된 이쌍 테스트 케이스의 입력 값을 상기 리프가 아닌 노드 nd의 자식노드 Cn의 입력 변수로 대체하는 단계(S208)는, 상기 리프가 아닌 노드 nd의 입력 값은 사실상 상기 노드 nd의 자식노드의 출력 값이므로, 상기 노드 nd의 입력 값을 자식 노드의 입력 값으로 변환하는 과정이다(도 3의 310 참조). 본 발명에 적용되는 '포원노드'함수는 상기 S208 단계에 의해서 상기 노드 nd에 대한 입력 값을 실제 시스템의 입력 값으로 변환시킨다.In operation S208, the input value of the two-pair test case generated using the input variable of the non-leaf node nd is replaced with the input variable of the child node Cn of the non-leaf node nd. Since the input value of nd is actually the output value of the child node of the node nd, the process of converting the input value of the node nd into the input value of the child node (see 310 of FIG. 3). The 'one node' function applied to the present invention converts the input value for the node nd into the input value of the actual system by the step S208.

또한, 상기 리프가 아닌 노드 nd의 자식노드 Cn에 대한 테스트 케이스들 중 상기 리프가 아닌 노드 nd의 입력 변수로 대체되지 않은 테스트 케이스를 상기 '피 티엠디' 테스트 케이스에 강제로 추가하는 단계(S210)는, 만약 상기 리프가 아닌 노드 nd의 자식노드 Cn에 대한 테스트 케이스들 중, 상기 S208 단계에서의 대체 과정을 수행하지 않은 테스트 케이스들이 존재한다면, 자식 노드에 대한 테스트 케이스를 만족하지 못하게 되기 때문에, 자식노드에 대한 테스트 케이스 중 상기 대체 과정이 누락된 테스트 케이스를 강제로 상기 '포원노드'함수의 아규먼트로 넘어온 노드 nd의 테스트 케이스로 추가하는 과정이다(도 3의 312 참조).In addition, forcibly adding a test case which is not replaced by an input variable of the non-leaf node nd among the test cases for the child node Cn of the non-leaf node nd to the 'PMT' test case (S210) ), If there are test cases for the child node Cn of the non-leaf node nd that do not perform the replacement process in step S208, the test case for the child node is not satisfied. In this case, the test case for which the replacement process is omitted among the test cases for the child node is forcibly added to the test case of node nd transferred to the argument of the 'one node' function (see 312 of FIG. 3).

본 발명인 시스템 모듈 사이의 의존 관계를 고려한 테스트 케이스 생성 방법은, 상기 S100 단계에서 종래의 이쌍 테스트 케이스(Pairwise testcase) 생성 알고리즘에 의해 생성된 테스트 케이스와, 상기 S200 단계에서 본 발명에 따른 상기 '포원노드(ForOneNode)'함수의 알고리즘에 의해 생성된 '피티엠디' 테스트 케이스를 합쳐서 완전한 테스트 케이스 집합을 생성한다(S300).The test case generation method considering the dependency between the inventors and the system module includes a test case generated by a conventional pairwise testcase generation algorithm in step S100, and the 'powon' according to the present invention in step S200. A complete set of test cases is generated by combining the 'PTI MD' test cases generated by the algorithm of 'ForOneNode' function (S300).

(실시예)(Example)

본 발명인 시스템 모듈 사이의 의존 관계를 고려한 테스트 케이스 생성 방법(알고리즘)에 의하면, 입력 변수의 값에 따라서 모듈의 결과값이 결정되면, 모듈의 결과값이 다시 다음 모듈에 영향을 미치게 된다. 따라서, 입력 변수가 가질 수 있는 가능한 값들의 순서를 바꾸게 되면 테스트 케이스의 종류 및 테스트 케이스의 갯수까지 달라지게 된다. 반면에, 종래의 이쌍 테스트 케이스(Pairwise testcase) 생성 방법(알고리즘)은 입력되는 변수의 값에 아무런 의미를 부여하지 않기 때문에, 입력 변수의 순서 변동이 테스트 케이스의 생성 조합에만 영향을 미칠 뿐, 테스트 케이스의 갯수에는 아무런 영향을 미치지 못한다.According to the test case generation method (algorithm) considering the dependency between the system modules of the present invention, if the result value of the module is determined according to the value of the input variable, the result value of the module affects the next module again. Therefore, if the order of possible values that an input variable can have is changed, the type of test case and the number of test cases are changed. On the other hand, since the conventional pairwise test case generation method (algorithm) does not give meaning to the value of the input variable, the order variation of the input variable only affects the generation combination of the test case. It has no effect on the number of cases.

도 4 및 도 5a,5b를 참조하여, 본 발명인 시스템 모듈 사이의 의존 관계를 고려한 테스트 생성 방법의 실시예를 설명하도록 한다. 도 4는 본 발명을 설명하기 위한 예로서, 엘리베이터가 설치된 3층 높이의 각 요소(이하, 모듈)에 대한 경계조건 및 그 구동동작을 나타낸 도면이고, 도 5a 및 5b는 도 4의 상기 각 모듈에 대한 의존관계를 나타낸 트리이다.4 and 5A and 5B, an embodiment of a test generation method in consideration of dependency between the present inventors' system modules will be described. FIG. 4 is an example for explaining the present invention. FIG. 4 is a view illustrating boundary conditions and driving operations of each element (hereinafter, a module) having a height of three floors in which an elevator is installed, and FIGS. 5A and 5B are each module of FIG. Tree showing dependency on.

먼저, 도 4를 참조하면, 본 발명이 적용되는 엘리베이터가 설치된 건물의 높이를 지상 3층으로 가정해 본다. 이 경우, 도어 컨트롤(Door Control) 모듈의 입력 변수는, 'DoorReversal', 'CurrentFloor', 'DesiredFloor.f', 'DesiredFloor.d', 'Drive', 'DoorCycle', 'HallCall[floor,direction]', 'CarCall[floor]', 'DoorOpen', 'DoorOpen.old', 'DoorClose', 'DoorClose.old', 'CountDown', 'CountDown.old'가 있다. First, referring to FIG. 4, it is assumed that the height of a building on which an elevator to which the present invention is applied is set as three floors above the ground. In this case, the input variable of the door control module is' DoorReversal ',' CurrentFloor ',' DesiredFloor.f ',' DesiredFloor.d ',' Drive ',' DoorCycle ',' HallCall [floor, direction] ',' CarCall [floor] ',' DoorOpen ',' DoorOpen.old ',' DoorClose ',' DoorClose.old ',' CountDown 'and' CountDown.old '.

여기서, 'DoorReversal'은 문에 있는 센서에 의해서 문에 장애물이 있다고 판단되면 TRUE값을 가진다. 그렇지 않은 경우 FALSE값을 가진다. Here, 'DoorReversal' has a TRUE value when it is determined that there is an obstacle in the door by the sensor in the door. Otherwise it has a value of FALSE.

'CurrentFloor'는 현재 엘리베이터(Elevator)의 카(Car)가 위치한 층을 지칭하며, 카(Car)가 멈추지 않고 움직이고 있다면 INVALID 값을 가진다. 즉, INVALID,1,2,3의 값을 가질 수 있다. 'DesiredFloor.f'와 'DesiredFloor.d'는 카(Car)가 움직여야 할 층과 그 층을 가기 위한 방향성을 나타내기 위해서 사용되어진다. 따라서 'DesiredFloor.f'는 1,2,3값을 가질 수 있으며, 'DesiredFloor.d'는 UP,DOWN,STOP 값을 가질 수 있다. 'CurrentFloor' refers to the floor where the car of the elevator is currently located. If the car is moving without stopping, it has an INVALID value. That is, it may have a value of INVALID, 1,2,3. 'DesiredFloor.f' and 'DesiredFloor.d' are used to indicate the floor the car should move and the direction to go to it. Therefore, 'DesiredFloor.f' may have a value of 1,2,3 and 'DesiredFloor.d' may have a value of UP, DOWN, STOP.

'Drive'는 현재 카(Car)가 움직이고 있는지 멈추어 있는지 나타내기 위해서 사용되며, MOVE, STOP값을 가질 수 있다. 'Drive' is used to indicate whether the current car is moving or stopped. It can have MOVE and STOP values.

'DoorCycle'은 엘리베이터 도어(Elevator door)의 동작 싸이클이 한번이라도 수행되었다면 TRUE값을 가지며, 그렇지 않은 경우 FALSE값을 가진다. 'DoorCycle' has TRUE if the operation door of the elevator door has been performed at least once, otherwise it has FALSE.

'HallCall[floor, direction]'은 홀(Hall)에 설치된 상하 버튼의 입력을 나타내기 위해서 사용되는 변수로써, 각층 마다 UP, DOWN, STOP에 해당하는 값을 가지게 된다. STOP버튼은 존재하지 않으므로 항상 FALSE값을 가진다. 그리고 제일 상층과 하층은 각각 UP, DOWN버튼이 없으므로, 항상 FALSE값을 가진다. 'HallCall [floor, direction]' is a variable used to indicate the input of up and down buttons installed in a hall, and has a value corresponding to UP, DOWN, and STOP for each floor. There is no STOP button, so it always has a value of FALSE. The top and bottom layers do not have UP and DOWN buttons, respectively, so they always have FALSE.

'CarCall[floor]'는 엘리베이터 내부에 있는 버튼의 값을 나타내며, 각 층마다 TRUE, FALSE값을 가진다. 'DoorOpen'과 'DoorClose'는 문이 완전히 열리거나 닫혔을경우 TRUE값이 되며, 그렇지 않은 경우에는 FALSE값을 가진다. 'CountDown'값은 문이 열린 상태로 대기하여야하는 드웰링 타이머(Dwelling timer)값을 나타내며, 'CountDown'값이 0이면 타이머가 만료(expired)되었다는 것을 일컫는다. 마지막으로 'DoorOpen.old', 'DoorClose.old', 'CountDown.old'는 엘리베이터 시스템(Elevator System)의 현 실행 사이클 이전의 'DoorOpen', 'DoorClose', 'CountDown'값을 나타내기 위해서 사용되어지는 변수이다.'CarCall [floor]' represents the value of the button inside the elevator. Each floor has TRUE and FALSE values. 'DoorOpen' and 'DoorClose' are TRUE if the door is fully open or closed, otherwise FALSE. The 'CountDown' value represents the dwelling timer value that should wait with the door open. If the 'CountDown' value is 0, it means that the timer has expired. Finally, 'DoorOpen.old', 'DoorClose.old', and 'CountDown.old' are used to represent 'DoorOpen', 'DoorClose' and 'CountDown' values before the current run cycle of the elevator system. Losing is a variable.

도 4에서는 엘리베이터 도어 컨트롤의 스펙을 경계 조건(Guard Condition)과 그것이 만족되었을때의 동작(Action)으로 구분하여 나타내고 있다. 각 경계 조건의 순서는 실행순서를 나타내므로 제일 뒤에 수행되는것이 가장 우선순위가 높다.In FIG. 4, the specification of the elevator door control is shown by dividing it into a guard condition and an action when it is satisfied. The order of each boundary condition represents the order of execution, so the last one is the highest priority.

도 4로부터 모듈 의존관계 트리(Module Dependency Tree)를 그리기 위해서는 먼저 총 7개의 경계 조건을 (C1, {C2,C3,C4}, C5, C6, C7)인 총 4개의 분류로 나눌 수 있다. {C2,C3,C4}를 같은 분류로 나눈것은 그것의 동작(Action)이 동일하고 또한 경계 조건(Guard Condition)의 선행부분이 "CurrentFloor == DesiredFloor.f && Drive == STOP"으로 동일하므로 3개의 경계 조건의 동일한 부분을 뺀 나머지를 OR연산으로 변경시킬 수 있기 때문이다. 이렇게 표현된 4개의 모듈을 의존관계 트리(Dependency Tree)로 나타내면 도 5a와 같다. 각 모듈의 출력값은 TRUE, FALSE값이다.In order to draw a module dependency tree from FIG. 4, a total of seven boundary conditions may be divided into four categories, (C1, {C2, C3, C4}, C5, C6, and C7). Dividing {C2, C3, C4} into the same classification means that its Action is the same and the preceding part of the Guard Condition is the same as "CurrentFloor == DesiredFloor.f && Drive == STOP". This is because the remainder of the two boundary conditions can be changed to OR. The four modules expressed as described above are represented by a dependency tree as shown in FIG. 5A. Output values of each module are TRUE and FALSE.

도 5a는 5개의 모듈 C1, (C2,C3,C4), C5, C6, C7의 우선순위를 나타내는 모듈 의존관계 트리(Module Dependency Tree)이다. OP3는 C1과 (C2,C3,C4)의 출력값을 받아들여서, (C2,C3,C4)가 TRUE이면, (C2,C3,C4)를 출력한다. 그리고 (C2,C3,C4)가 FALSE이고, C1이 TRUE이면 C1을 출력한다. 2개의 입력값이 모두 FALSE이면 INVALID값을 출력한다. OP0, OP1, OP2는 모두 OPn +1의 입력과 각각 C7, C6,C5를 입력으로 받는다. 그리고 C7, C6, C5가 TRUE이면, C7,C6,C5 값을 출력으로 내놓으며 그렇지 않은 경우 OPn + 1값을 그대로 출력하게 함으로써 우선순위를 표현하였다. C1, C5, C6, C7이 해당 조건을 만족시키도록 하기 위해 필요한 입력변수를 연결하였다.5A is a Module Dependency Tree showing the priorities of five modules C1, (C2, C3, C4), C5, C6, and C7. OP 3 accepts the output values of C1 and (C2, C3, C4), and outputs (C2, C3, C4) if (C2, C3, C4) is TRUE. If (C2, C3, C4) is FALSE and C1 is TRUE, C1 is output. If both input values are FALSE, INVALID value is output. OP 0 , OP 1 , and OP 2 all receive OP n +1 input and C7, C6, C5 input, respectively. If C7, C6, and C5 are TRUE, priority is expressed by outputting C7, C6, C5 as an output. Otherwise, OP n + 1 is output as it is. Input variables needed to ensure that C1, C5, C6, and C7 satisfy the conditions are connected.

한편, (C2,C3,C4) 모듈은 C1, C5, C6, C7보다 복잡하게 표현되어진다. 도 5b는 (C2,C3,C4)와 입력 변수와의 의존관계를 표현한 트리이다. 총 입력변수의 종류는 7개이나, 'CurrentFloor'는 3개의 서로 다른 모듈에 사용되므로 트리에서 입력변수의 종류는 9개로 표현하였다. OP10과 OP7은 C2,C3,C4에 모두 포함된 조건식 "CurrentFloor == DesiredFloor.f && Drive == STOP"을 표현하기 위해서 사용되어 진다. 그리고 (C2,C3,C4)는 OP4와 OP7의 입력값을 모두 만족할 때 TRUE값을 그렇지 않을 경우 FALSE값을 출력하는 오퍼레이터(Operator)이다. OP9은 C4의 "CarCall[CurrentFloor]==TRUE"구절을 표현하기 위해서 사용되어지며, OP6,OP8는 C3의 "CurrentFloor == DesiredFloor.f && Drive == STOP"절을 제외한 부분을 나타내기 위해서 사용되어지는 오퍼레이터이다. 마지막으로 OP4,OP5는 OR 연산을 표현하기 위해서 사용되어졌다.On the other hand, the (C2, C3, C4) module is more complicated than C1, C5, C6, C7. 5B is a tree representing a dependency between (C2, C3, C4) and input variables. There are 7 types of input variables, but 'CurrentFloor' is used for 3 different modules, so 9 types of input variables are represented in the tree. OP 10 and OP 7 are used to express the conditional expression "CurrentFloor == DesiredFloor.f && Drive == STOP" contained in C2, C3 and C4. And (C2, C3, C4) is an operator that outputs a TRUE value when the input values of OP 4 and OP 7 are satisfied, and a FALSE value otherwise. OP 9 is used to express the "CarCall [CurrentFloor] == TRUE" clause in C4, while OP 6 and OP 8 indicate the portion of C3 except the "CurrentFloor == DesiredFloor.f && Drive == STOP" clause. The operator used to bet. Finally, OP 4 and OP 5 are used to represent OR operations.

이상 설명한 도 5a 및 도 5b의 모듈 의존관계 트리(Module Dependency Tree)에 대해, 본 발명인 시스템 모듈 사이의 의존 관계를 고려한 테스트 생성 방법을 적용하였다. 이 때, 엘리베이터는 총 3층으로 이루어진 것으로 가정하였으며, 이에 따라, 입력 변수 'DoorReversal', 'CurrentFloor', 'DesiredFloor.f', 'DesiredFloor.d', 'Drive', 'DoorCycle', 'HallCall[floor,direction]', 'CarCall[floor]', 'DoorOpen', 'DoorOpen.old', 'DoorClose', 'DoorClose.old', 'CountDown', 'CountDown.old'는 각각 2, 4, 3, 3, 2, 2, 16, 8, 2, 2, 2, 2, 2, 2개의 변수를 가질 수 있다. 따라서 입력변수를 이용하여 만들 수 있는 모든 조합의 테스트 케이스는 2,359,296개이다. 이 때, 종래의 대표적인 이쌍 테스트 케이스 생성 툴(Pairwise test case generation tool) 중 하나인 "AllPairs" 프로그램을 이용하여 테스트 케이스를 생성하면 129개가 생성된다. 5A and 5B described above, a test generation method considering a dependency relationship between system modules of the present invention is applied to the module dependency tree. At this time, it is assumed that the elevator consists of three floors, and accordingly, input variables' DoorReversal ',' CurrentFloor ',' DesiredFloor.f ',' DesiredFloor.d ',' Drive ',' DoorCycle ', and' HallCall [ floor, direction] ',' CarCall [floor] ',' DoorOpen ',' DoorOpen.old ',' DoorClose ',' DoorClose.old ',' CountDown 'and' CountDown.old 'are 2, 4, 3, It can have three, two, two, sixteen, eight, two, two, two, two, two, two variables. Therefore, there are 2,359,296 test cases of all combinations that can be created using input variables. At this time, 129 are generated when a test case is generated by using the "AllPairs" program, which is one of the conventional representative pairwise test case generation tools.

한편, 본 발명에서 제안한 테스트 케이스 생성 방법(알고리즘)(도 2 및 도 3의 설명부분 참조)을 사용하였을 경우에 생성되는 테스트케이스의 개수를 측정하기 위 해서, 입력변수 값 순서를 랜덤으로하여 총 500가지의 서로 다른 테스트 케이스의 셋을 구하였다. 테스트 케이스 셋은 평균 191.6개가 생성되었다. Meanwhile, in order to measure the number of test cases generated when the test case generation method (algorithm) (see the description of FIGS. 2 and 3) proposed in the present invention is used, the total order of input variable values is randomly calculated. A set of 500 different test cases was obtained. An average of 191.6 test cases were generated.

종래의 방법인 "AllPairs" 툴에 의해 생성된 순수 테스트케이스가 128개이므로, 본 발명인 테스트 케이스 생성 방법에 의할 경우, 모듈사이의 의존관계를 반영하기 위해서 추가로 평균 63.6개의 테스트케이스가 추가로 생성된 것을 알 수 있다.Since there are 128 pure test cases generated by the conventional "AllPairs" tool, the test case generation method of the present invention additionally adds an average of 63.6 test cases to reflect the dependencies between modules. You can see that it was created.

(비교예)(Comparative Example)

도 4에 나타낸 엘리베이터의 도어 컨트롤 모듈들을 사용하여, 본 발명에서 제안한 테스트 케이스 생성 방법(알고리즘)(도 2 및 도 3의 설명부분 참조)에 의해 생성된 테스트 케이스가 종래의 방법인 이쌍 테스트 케이스(Pairwise test case) 생성 방법(알고리즘)에 의해 생성된 테스트 케이스에 비해 얼마만큼의 성능향상이 이루어지는지 비교하면 다음과 같다.By using the door control modules of the elevator shown in Fig. 4, the test case generated by the test case generation method (algorithm) (see the description of Figs. 2 and 3) proposed in the present invention is a conventional two-pair test case ( Compared with the test cases generated by the pairwise test case generation method (algorithm), the performance improvement is as follows.

먼저, 도 4에 나타낸 바와 같은 엘리베이터의 도어 컨트롤 모듈을 구성하고, 그것에 'Fault'를 주입한 후, 본 발명에서 제안한 테스트 케이스 생성 방법에 의해 생성한 테스트 케이스와 종래의 방법인 이쌍 테스트 케이스 생성 방법에 의해 생성된 테스트 케이스를 각각 적용하였을 때 상기 'Fault'를 찾을 수 있는지를 점검하였다. First, a door control module of an elevator as shown in FIG. 4 is configured, 'Fault' is injected therein, and a test case generated by the test case generating method proposed by the present invention and a conventional two-pair test case generating method. It was checked whether the 'Fault' could be found when each test case generated by

'Fault'가 포함되지 않은 원본 모듈은 도 4에서 설명한 총 7개의 경계 조건과 그 동작(Action)으로 이루어져 있다. 그리고 'Fault'가 포함되지 않은 원본 모듈에 3가지 서로 다른 룰을 적용하여 'Fault'가 포함된 모듈을 자동으로 생성하였다.The original module without 'Fault' is composed of a total of seven boundary conditions and actions (actions) described in FIG. In addition, three different rules were applied to the original module without 'Fault' to automatically create a module with 'Fault'.

'Fault'가 존재하는 모듈은 각각 원본 모듈에서 단 한가지만 변경하였다. 첫 번째 룰은 경계 조건이나 그 동작(Action)에 포함된 특정 문자열을 변경시키는 것으로 총 XXX개의 'Fault Injected' 모듈을 생성하였다. 치환시킨 문자열의 종류는 [표 2]와 같다. [표 2]에서의 "<","<=",">",">=" 문자열에 대해 변환을 행하지 않은 이유는 그것들이 'Fault'가 포함되지 않은 모듈에 나타나지 않기 때문이다. Only one module with 'Fault' has been changed from the original module. The first rule modifies a specific string included in the boundary condition or its action, creating a total of XXX 'Fault Injected' modules. The type of the replaced string is shown in [Table 2]. The reason for not converting "<", "<=", ">", "> =" strings in [Table 2] is that they do not appear in modules that do not contain 'Fault'.

[표 2] 문자열 치환 리스트[Table 2] String Substitution List

SourceSource DestinationDestination == == ">","!=","<",">=","<=" ">", "! =", "<", "> =", "<=" |||| &&&& &&&& |||| 00 "1","2","3","4""1", "2", "3", "4" 1One "0","2","3","4""0", "2", "3", "4" 22 "0","1","3","4""0", "1", "3", "4"

'Fault'를 주입하기 위한 두번째 방법은 주어진 모듈에서 조건문들의 순서를 변화시키는 것으로서, 조건문의 우선순위를 테스트하기 위해서 해당 'Fault'가 주입되었다. 우선순위가 존재하는 경계 조건과 그 동작(Action)을 나열하고 그것들의 순서를 변경하였다. 마지막으로 총 7개의 경계 조건에서 하나의 경계 조건을 삭제하여 총 7개의 'Fault Injected' 모듈을 생성하였다. 이 3가지 룰을 이용하여 생성한 'Fault injected' 모듈의 개수는 총 254개이다. The second way to inject 'Fault' is to change the order of the conditional statements in a given module, which is injected to test the priority of the conditional statements. We have listed the boundary conditions and their actions that have priorities and changed their order. Finally, a total of seven 'Fault Injected' modules were created by deleting one boundary condition from a total of seven boundary conditions. The total number of 'Fault injected' modules created using these three rules is 254.

다음, 본 발명에서 제안한 테스트 케이스 생성 방법(알고리즘)(도 2 및 도 3의 설명부분 참조)에 의해 생성된 테스트 케이스와 종래의 방법인 이쌍 테스트 케이스(Pairwise test case) 생성 방법(알고리즘)에 의해 생성된 테스트 케이스를 각각 적용하여 몇 개의 'Fault injected' 모듈을 찾아내는지 실험하였다.    Next, a test case generated by the test case generation method (algorithm) proposed by the present invention (see the description of FIGS. 2 and 3) and a conventional pairwise test case generation method (algorithm) We experimented with how many 'Fault injected' modules were found by applying each generated test case.

[표 3]은 상기 실험 결과를 요약하여 나타낸 표이다. "PTMD"와 "Pairwise"는 각각 본 발명에서 제안한 테스트 케이스 생성 방법과 종래의 대표적인 이쌍 테스트 케이스 생성 방법인 "AllPairs" 툴에 의해 생성된 각 테스트 케이스 셋들을 이용하여 얻은 결과를 나타내며, "All Combination"은 입력변수로 가능한 모든 조합의 테스트케이스를 사용하였을 때의 결과를 나타낸 것이다.Table 3 is a table summarizing the experimental results. "PTMD" and "Pairwise" respectively indicate the results obtained by using the test case generation method proposed by the present invention and each test case set generated by the "AllPairs" tool, which is a typical two-pair test case generation method, and "All Combination". "Shows the results of using all possible combinations of test cases as input variables.

[표 3] 실험 결과Table 3 Experimental Results

PTMDPTMD PairwisePairwise AllAll CombinationCombination Test case의 개수 Number of test cases 191.6 191.6 128 128 2,359,296 2,359,296 'Fault' 발견 수 'Fault' Discovery Count 222.6 222.6 214.2 214.2 240 240

본 발명에서 제안한 테스트 케이스 생성 방법은 종래의 이쌍 테스트 케이스(Pairwise test case) 생성 방법에 의해 생성되는 테스트 케이스에 부가하여, 모듈 의존 관계를 만족하는 테스트 케이스를 추가로 더 생성하므로, 상기 [표 3]에 나타낸 바와 같이, 종래보다 신뢰성있는 테스트 결과를 기대할 수 있다.The test case generation method proposed in the present invention further generates a test case satisfying a module dependency in addition to the test case generated by the conventional pairwise test case generation method, and thus, the above [Table 3 As can be seen, more reliable test results can be expected than before.

구체적으로, 상기 [표 3]은, 본 발명에서 제안한 테스트 케이스 생성 방법을 사용할 경우에는 총 254개 중 평균 222.6개에 대해서 'Fault'를 감지해낼 수 있으며, 종래의 이쌍 테스트 케이스 생성 방법에 의할 경우에는 평균 214.2개의 'Fault'를 감지해낼 수 있음을 나타낸다. 이러한 성능은, 각각 본 발명인 방법과 종래 방법에 의해 테스트 케이스를 생성할 경우, 'Fault'가 주입된 모듈 254개 중 89.2%와 84.3% 만의 'Fault'를 찾아낼 수 있다는 것을 의미한다. 그러나 입력변수를 이용하여 조합이 가능한 모든 테스트케이스를 사용하였을 때 찾아낸 'Fault'의 개수역시 240개로 모든 'Fault'를 찾지는 못한다. 그 이유는 'Fault'가 주입된 모듈이 'Fault'가 주입되기 전과 동일한 결과값을 가져오도록 만들어질 수 있기 때문이다. 예를 들어 "if(DoorReversal==1)"라는 문장을 "if(DoorReversal>=1)"로 바꾸었다고 가정할 경우, 'DoorReversal'는 0과 1만을 가질 수 있기 때문에 변경된 모듈은 원본 모듈과 동일한 결과값을 가져 올 수 밖에 없다. 이러한 이유로 14개의 모듈은 가능한 모든 조합의 테스트케이스(All Combination)를 이용하더라도 찾아낼 수가 없다. Specifically, [Table 3], when using the test case generation method proposed in the present invention can detect the 'Fault' for the average 222.6 out of a total of 254, according to the conventional two-pair test case generation method In this case, an average of 214.2 'Faults' can be detected. Such performance means that when generating test cases by the present method and the conventional method, only 89.2% and 84.3% of 'Fault' can be found. However, when all test cases that can be combined using input variables are used, the number of 'Faults' found is also 240, which does not find all 'Faults'. The reason is that a module injected with 'Fault' can be made to produce the same result as before the 'Fault' was injected. For example, suppose you changed the sentence "if (DoorReversal == 1)" to "if (DoorReversal> = 1)". Since 'DoorReversal' can only have 0 and 1, the changed module is the same as the original module. You have no choice but to get the result. For this reason, 14 modules cannot be found even with all possible combinations of test cases (All Combination).

따라서, 본 발명에서 제안한 테스트 케이스 생성 방법에 의해 생성한 테스트 케이스로 찾아낸 'Fault'의 실제 비율은 94.4%(종래 방법은 89.3%)로 상당히 신뢰성있는 테스트 결과를 기대할 수 있음을 알 수 있다.Therefore, it can be seen that the actual ratio of 'Fault' found by the test case generated by the test case generation method proposed in the present invention is 94.4% (the conventional method is 89.3%), and thus a fairly reliable test result can be expected.

이상, 본 발명의 실시예를 참조하여 본 발명을 설명하였지만, 본 발명이 이러한 실시예만으로 한정되는 것은 아니며, 본 청구범위들에 의해 정의된 사상 및 범위 내에서 다양한 변형 및 변형이 가능함은 당업자에게 자명할 것이다.Although the present invention has been described above with reference to embodiments of the present invention, the present invention is not limited to these embodiments, and various modifications and variations are possible within the spirit and scope defined by the claims. Will be self explanatory.

도 1은 종래 시스템 내부 모듈 사이의 "의존관계"를 설명하기 위한 도면.BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a diagram for explaining a “dependency” between modules in a conventional system.

도 2는 본 발명인 시스템 모듈 사이의 의존 관계를 고려한 테스트 케이스 생성 방법을 설명하기 위한 순서도.Figure 2 is a flow chart for explaining a test case generation method in consideration of the dependency between the inventor system module.

도 3은 도 2의 상기 테스트 케이스 생성 방법을 구현하는 프로그램의 알고리즘을 수도 코드(Pseudocode)로 나타낸 도면.3 is a diagram illustrating an algorithm of a program implementing the test case generation method of FIG. 2 in pseudo code; FIG.

도 4는 엘리베이터가 설치된 3층 건물의 각 모듈의 경계조건 및 그 구동동작을 나타낸 도면.4 is a view showing the boundary conditions and driving operation of each module of a three-story building in which an elevator is installed.

도 5a 및 5b는 도 4의 상기 각 모듈에 대한 의존관계를 나타낸 트리.5a and 5b are trees showing the dependencies for each of the modules of FIG.

Claims (4)

(A) 이쌍 테스트 케이스를 생성하는 단계; (B) '포원노드(ForOneNode)'함수를 호출하여 모듈 의존관계를 만족하는 '피티엠디(PTMD: Pairwise Testing based on Module Dependency)' 테스트 케이스를 생성하는 단계; 및 (C) 상기 (A) 단계의 이쌍 테스트 케이스와 상기 (B) 단계의 '피티엠디' 테스트 케이스를 합쳐서 완전한 테스트 케이스 집합을 생성하는 단계;로 구성되는 테스트 케이스를 생성하는 방법으로서, 상기 (B) 단계의 상기 '포원노드'함수는,(A) generating two pair test cases; (B) calling a 'ForOneNode' function to generate a 'pairwise testing based on module dependency' (PTMD) test case that satisfies the module dependency; And (C) combining the two pair test cases of step (A) and the 'PTI MD' test cases of step (B) to generate a complete set of test cases. The 'one node' function of step B) is (B1) 노드가 리프(Leaf)인지 판단하는 단계;(B1) determining whether the node is a leaf; (B2) 리프가 아닌 노드의 모든 자식노드에 대해서 상기 '포원노드'를 재귀적으로 호출하여, 상기 자식노드에 대한 '피티엠디' 테스트 케이스를 생성하는 단계;(B2) recursively calling the 'four node' for all the child nodes of the non-leaf node to generate a 'PTI M' test case for the child node; (B3) 상기 리프가 아닌 노드의 입력 변수를 이용하여 이쌍 테스트 케이스를 생성하는 단계; 및(B3) generating two pair test cases using input variables of the non-leaf nodes; And (B4) 상기 리프가 아닌 노드의 입력 변수를 이용하여 생성된 상기 이쌍 테스트 케이스의 입력 변수를 상기 리프가 아닌 노드의 자식노드의 입력 변수로 대체하는 단계;를 포함하는 알고리즘에 의해 상기 모듈 의존관계를 만족하는 '피티엠디' 테스트 케이스를 생성하는 것을 특징으로 하는 시스템 모듈 사이의 의존 관계를 고려한 테스트 케이스를 생성하는 방법.(B4) replacing the input variable of the two-pair test case generated using the input variable of the non-leaf node with the input variable of the child node of the non-leaf node; A method for generating a test case in consideration of dependencies between system modules, characterized in that to generate a 'PTI MD' test case satisfying the. 제 1 항에 있어서,The method of claim 1, 상기 (B) 단계의 상기 '포원노드'함수는, 상기 (B4) 단계 후에,The 'one node' function of step (B) is, after the step (B4), (B5) 상기 리프가 아닌 노드의 자식노드에 대한 테스트 케이스들 중 상기 리프가 아닌 노드의 입력 변수로 대체되지 않은 테스트 케이스를 상기 '피티엠디' 테스트 케이스에 강제로 추가하는 단계를 더 포함하는 것을 특징으로 하는 시스템 모듈 사이의 의존 관계를 고려한 테스트 케이스를 생성하는 방법.(B5) further including forcibly adding a test case, which is not replaced with an input variable of the non-leaf node, among the test cases for the child node of the non-leaf node to the 'PTI MD' test case. A method for generating test cases that takes into account the dependencies between the system modules. (A) 이쌍 테스트 케이스를 생성하는 단계; (B) '포원노드(ForOneNode)'함수를 호출하여 모듈 의존관계를 만족하는 '피티엠디(PTMD: Pairwise Testing based on Module Dependency)' 테스트 케이스를 생성하는 단계; 및 (C) 상기 (A) 단계의 이쌍 테스트 케이스와 상기 (B) 단계의 '피티엠디' 테스트 케이스를 합쳐서 완전한 테스트 케이스 집합을 생성하는 단계;로 구성되는 테스트 케이스를 생성하는 방법으로서, 상기 (B) 단계의 상기 '포원노드'함수는,(A) generating two pair test cases; (B) calling a 'ForOneNode' function to generate a 'pairwise testing based on module dependency' (PTMD) test case that satisfies the module dependency; And (C) combining the two pair test cases of step (A) and the 'PTI MD' test cases of step (B) to generate a complete set of test cases. The 'one node' function of step B) is (B1) 노드가 리프(Leaf)인지 판단하는 단계;(B1) determining whether the node is a leaf; (B2) 리프가 아닌 노드의 모든 자식노드에 대해서 상기 '포원노드'를 재귀적으로 호출하여, 상기 자식노드에 대한 '피티엠디' 테스트 케이스를 생성하는 단계;(B2) recursively calling the 'four node' for all the child nodes of the non-leaf node to generate a 'PTI M' test case for the child node; (B3) 상기 리프가 아닌 노드의 입력 변수를 이용하여 이쌍 테스트 케이스를 생성하는 단계; 및(B3) generating two pair test cases using input variables of the non-leaf nodes; And (B4) 상기 리프가 아닌 노드의 입력 변수를 이용하여 생성된 상기 이쌍 테스트 케이스의 입력 변수를 상기 리프가 아닌 노드의 자식노드의 입력 변수로 대체하는 단계;를 포함하는 알고리즘에 의해 상기 모듈 의존관계를 만족하는 '피티엠디' 테스트 케이스를 생성하는 것을 특징으로 하는 시스템 모듈 사이의 의존 관계를 고려한 테스트 케이스를 생성하는 방법을 수행하는 프로그램이 기록된 컴퓨터 판독가능한 기록매체.(B4) replacing the input variable of the two-pair test case generated using the input variable of the non-leaf node with the input variable of the child node of the non-leaf node; A computer-readable recording medium having recorded thereon a program for performing a method of generating a test case in consideration of a dependency between system modules, wherein the test case satisfies a system module. 제 3 항에 있어서,The method of claim 3, wherein 상기 (B) 단계의 상기 '포원노드'함수는, 상기 (B4) 단계 후에,The 'one node' function of step (B) is, after the step (B4), (B5) 상기 리프가 아닌 노드의 자식노드에 대한 테스트 케이스들 중 상기 리프가 아닌 노드의 입력 변수로 대체되지 않은 테스트 케이스를 상기 '피티엠디' 테스트 케이스에 강제로 추가하는 단계를 더 포함하는 것을 특징으로 하는 시스템 모듈 사이의 의존 관계를 고려한 테스트 케이스를 생성하는 방법을 수행하는 프로그램이 기록된 컴퓨터 판독가능한 기록매체.(B5) further including forcibly adding a test case, which is not replaced with an input variable of the non-leaf node, among the test cases for the child node of the non-leaf node to the 'PTI MD' test case. A computer-readable recording medium having recorded thereon a program for performing a method for generating a test case taking into account the dependencies between system modules.
KR1020080029628A 2008-03-31 2008-03-31 Pairwise test case generation method based on module dependency and computer readable medium for recording program thereof KR100977522B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080029628A KR100977522B1 (en) 2008-03-31 2008-03-31 Pairwise test case generation method based on module dependency and computer readable medium for recording program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080029628A KR100977522B1 (en) 2008-03-31 2008-03-31 Pairwise test case generation method based on module dependency and computer readable medium for recording program thereof

Publications (2)

Publication Number Publication Date
KR20090104275A true KR20090104275A (en) 2009-10-06
KR100977522B1 KR100977522B1 (en) 2010-08-23

Family

ID=41534093

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080029628A KR100977522B1 (en) 2008-03-31 2008-03-31 Pairwise test case generation method based on module dependency and computer readable medium for recording program thereof

Country Status (1)

Country Link
KR (1) KR100977522B1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014088144A1 (en) * 2012-12-05 2014-06-12 경북대학교 산학협력단 Function test device based on unit test case reuse and function test method therefor
CN109002684A (en) * 2018-06-20 2018-12-14 北京大学 A kind of block information analysis method
KR20190093274A (en) * 2018-02-01 2019-08-09 주식회사 한글과컴퓨터 Method for producing test case through algorithm and extracting test case using pair-wise testing, and apparatus using the same
CN110109815A (en) * 2018-02-01 2019-08-09 中兴通讯股份有限公司 The execution method, apparatus and storage medium of test case
CN110262803A (en) * 2019-06-30 2019-09-20 潍柴动力股份有限公司 A kind of generation method and device of dependence
CN110928784A (en) * 2019-11-21 2020-03-27 中国民航信息网络股份有限公司 Software testing environment monitoring method and device
CN111258907A (en) * 2020-01-20 2020-06-09 黑龙江连特科技有限公司 Automobile instrument testing method, device and equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI258073B (en) * 2004-11-05 2006-07-11 Inst Information Industry System and method for automated test-case generation

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014088144A1 (en) * 2012-12-05 2014-06-12 경북대학교 산학협력단 Function test device based on unit test case reuse and function test method therefor
KR101410099B1 (en) * 2012-12-05 2014-06-25 경북대학교 산학협력단 Function Test Apparatus based on Unit Test Cases Reusing and Function Test Method thereof
KR20190093274A (en) * 2018-02-01 2019-08-09 주식회사 한글과컴퓨터 Method for producing test case through algorithm and extracting test case using pair-wise testing, and apparatus using the same
CN110109815A (en) * 2018-02-01 2019-08-09 中兴通讯股份有限公司 The execution method, apparatus and storage medium of test case
CN109002684A (en) * 2018-06-20 2018-12-14 北京大学 A kind of block information analysis method
CN109002684B (en) * 2018-06-20 2021-08-06 北京大学 Interval information analysis method
CN110262803A (en) * 2019-06-30 2019-09-20 潍柴动力股份有限公司 A kind of generation method and device of dependence
CN110928784A (en) * 2019-11-21 2020-03-27 中国民航信息网络股份有限公司 Software testing environment monitoring method and device
CN110928784B (en) * 2019-11-21 2023-09-05 中国民航信息网络股份有限公司 Software testing environment monitoring method and device
CN111258907A (en) * 2020-01-20 2020-06-09 黑龙江连特科技有限公司 Automobile instrument testing method, device and equipment

Also Published As

Publication number Publication date
KR100977522B1 (en) 2010-08-23

Similar Documents

Publication Publication Date Title
KR100977522B1 (en) Pairwise test case generation method based on module dependency and computer readable medium for recording program thereof
Mateescu et al. Efficient on-the-fly model-checking for regular alternation-free mu-calculus
Xing et al. A new decision-diagram-based method for efficient analysis on multistate systems
Jiang et al. Supervisory control of discrete event systems with CTL* temporal logic specifications
Zang et al. A BDD-based algorithm for analysis of multistate systems with multistate components
KR101499599B1 (en) Data logging in graph-based computations
Miremadi et al. A BDD-based approach for modeling plant and supervisor by extended finite automata
Anand et al. Towards a formally verified proof assistant
JP2010524134A (en) Method, computer program, and system for editing and compiling business rules
Benton et al. Realizability and compositional compiler correctness for a polymorphic language
Brenguier et al. AbsSynthe: abstract synthesis from succinct safety specifications
Löh et al. Generic programming with indexed functors
Bonsangue et al. Presenting functors by operations and equations
Batteux et al. AltaRica 3.0 language specification
Höller Translating totally ordered HTN planning problems to classical planning problems using regular approximation of context-free languages
Ovsiannikova et al. Towards user-friendly model checking of IEC 61499 systems with counterexample explanation
Lennartson et al. Supervisory control for state-vector transition models—A unified approach
Bloem et al. CTL* synthesis via LTL synthesis
Goranko et al. Alternating-time temporal logic ATL with finitely bounded semantics
Kolb et al. Descriptions of cross-serial dependencies
Fischer et al. Ensuring correct self-reconfiguration in safety-critical applications by verified result checking
Devriese et al. Fixing idioms: a recursion primitive for applicative DSLs
Liu et al. An approach to automatic test case generation for unit testing
Chivilikhin et al. Counterexample-guided inference of controller logic from execution traces and temporal formulas
Bisztray et al. Combining termination proofs in model transformation systems

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130807

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20140814

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20150811

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20160809

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20170809

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20180808

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20190730

Year of fee payment: 10