KR101307353B1 - Apparatus for data flow unit testing and method using the same - Google Patents
Apparatus for data flow unit testing and method using the same Download PDFInfo
- Publication number
- KR101307353B1 KR101307353B1 KR1020100128645A KR20100128645A KR101307353B1 KR 101307353 B1 KR101307353 B1 KR 101307353B1 KR 1020100128645 A KR1020100128645 A KR 1020100128645A KR 20100128645 A KR20100128645 A KR 20100128645A KR 101307353 B1 KR101307353 B1 KR 101307353B1
- Authority
- KR
- South Korea
- Prior art keywords
- data
- path
- data flow
- test
- generating
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 110
- 238000000034 method Methods 0.000 title claims description 13
- 238000004364 calculation method Methods 0.000 claims description 18
- 230000007547 defect Effects 0.000 abstract description 12
- 238000010586 diagram Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000010998 test method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/28—Error detection; Error correction; Monitoring by checking the correct order of processing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
본 발명은 자료 흐름 단위 테스팅 장치에 관한 것으로, 자료 흐름 그래프를 기반으로 모든 노드에서 모든 변수들의 경로를 검증하여 생성되는 자료 테스트 데이터를 근거로 상기 모든 변수들의 자료 결함을 식별하는 자료 테스트 데이터 생성부와, 상기 모든 변수들이 정의된 지점부터 사용된 지점까지의 각각의 경로리스트들을 추출하여 상기 경로리스트들 중 하나 이상을 선택하여 실행하는 자료 흐름 테스트 경로 생성부와, 상기 하나 이상의 경로 리스트에서 자료 흐름 경로의 실행결과를 상기 자료 흐름 그래프 상에 표시하는 경로 실행부와, 상기 자료 흐름 경로의 실행결과에 대한 커버리지(Coverage) 보고서를 생성하는 테스트 결과 보고서 생성부를 포함한다.The present invention relates to a data flow unit testing apparatus, and a data test data generation unit for identifying data defects of all the variables based on data test data generated by verifying paths of all variables in all nodes based on a data flow graph. And a data flow test path generation unit for selecting and executing one or more of the path lists by extracting respective path lists from a point where all the variables are defined to a used point, and a data flow in the one or more path lists. And a path execution unit for displaying the execution result of the path on the data flow graph, and a test result report generator for generating a coverage report on the execution result of the data flow path.
Description
본 발명은 자료 흐름 단위 테스팅 장치 및 그 방법에 관한 것으로, 더욱 상세하게는 Java/C/C++ 프로그램에서 함수 내부의 전역 변수와 지역변수 흐름에 대한 정의(Definition)와, 참조계산(Computation)과 서술(Predicate)이 포함된 사용의 관계 자료 흐름을 테스트하기 위한 기술에 관한 것이다.
The present invention relates to a data flow unit testing apparatus and a method thereof, and more particularly, to define, reference, and describe the flow of global and local variables in a function in a Java / C / C ++ program. It relates to a technique for testing the flow of relational data for use that includes (Predicate).
일반적으로 프로그램의 실행 결함을 찾을 수 있는 단위테스트 방법은 각 함수의 소스코드에서 제어 흐름 또는 자료 흐름 기반으로 코드 결함을 찾는 단위 테스팅 방법이 존재한다. In general, there is a unit testing method for finding a defect in a program based on a control flow or a data flow in the source code of each function.
그러나, 제어 흐름 테스트 방법에는 코드상의 조건문에서 분기되는 제어 흐름의 결함을 찾아주는 테스팅 방법이나, 자료 흐름의 정의(Definition)와, 참조계산(Computation)과 서술(Predicate)이 포함된 사용 관계를 분석하여 자료 흐름의 결함을 탐지할 수 없는 문제점이 있었다.
However, the control flow test method is a testing method that finds a defect in the control flow branched from conditional statements in the code, or analyzes the relationship between the definition of the data flow, the use calculation including the reference calculation, and the predicate. There was a problem that can not detect the defect of the data flow.
본 발명은, 단위 테스팅 중에서 프로그램 내에 모든 변수의 테스트 경로들을 자동 생성하여 선택적으로 자료 흐름 테스트를 수행하는 것을 목적으로 한다.An object of the present invention is to automatically generate test paths of all variables in a program during unit testing and to selectively perform data flow tests.
또한, 본 발명은 Java/C/C++ 소프트웨어에 포함되어 있는 자료 결함들을 식별하여 제거하며, 커버리지 보고서를 제공하는 것을 목적으로 한다.
In addition, the present invention aims to identify and eliminate data defects included in Java / C / C ++ software and to provide a coverage report.
상기한 목적을 달성하기 위하여, 본 발명의 실시예에 따른 자료 흐름 단위 테스팅 장치는, 자료 흐름 그래프를 기반으로 모든 노드에서 모든 변수들의 경로를 검증하여 생성되는 자료 테스트 데이터를 근거로 상기 모든 변수들의 자료 결함을 식별하는 자료 테스트 데이터 생성부와; 상기 모든 변수들이 정의된 지점부터 사용된 지점까지의 각각의 경로리스트들을 추출하여 상기 경로리스트들 중 하나 이상을 선택하여 실행하는 자료 흐름 테스트 경로 생성부와; 상기 하나 이상의 경로 리스트에서 자료 흐름 경로의 실행결과를 상기 자료 흐름 그래프 상에 표시하는 경로 실행부와; 상기 자료 흐름 경로의 실행결과에 대한 커버리지(Coverage) 보고서를 생성하는 테스트 결과 보고서 생성부;를 포함한다. In order to achieve the above object, the data flow unit testing apparatus according to an embodiment of the present invention, based on the data flow data generated by verifying the path of all variables at all nodes based on the data flow graph of all of the variables A data test data generation unit for identifying a data defect; A data flow test path generation unit for extracting respective path lists from a point where all the variables are defined to a used point to select and execute at least one of the path lists; A path execution unit that displays an execution result of a data flow path in the at least one path list on the data flow graph; And a test result report generator for generating a coverage report for the execution result of the data flow path.
또한, 자료 테스트 데이터 생성부는, 경로 설정 기준을 함수 내에 변수의 정의 및 사용에 초점을 두어 상기 모든 변수들의 경로를 검증하는 것을 특징으로 한다. In addition, the data test data generation unit is characterized by verifying the path of all the variables by focusing on the definition and use of the variable in the path setting criteria in the function.
또한, 자료 테스트 데이터 생성부는, 상기 모든 변수들이 정의, 참조계산, 조건문의 참, 거짓을 경정하는 변수의 사용의 존재 여부를 분석하는 것을 특징으로 한다.In addition, the data test data generation unit is characterized in that all of the above variables, the existence of the use of the variable to determine the definition, reference calculation, true, false of the conditional statement.
상기한 목적을 달성하기 위하여, 본 발명의 실시예에 따른 자료 흐름 단위 테스팅 방법은, 자료 데이터 생성부를 통해, 자료 흐름 그래프를 기반으로 모든 노드에서 모든 변수들의 경로를 검증하여 생성되는 자료 테스트 데이터를 근거로 상기 모든 변수들의 자료 결함을 식별하는 단계와; 자료 흐름 테스트 경로 생성부를 통해, 상기 모든 변수들이 정의된 지점부터 사용된 지점까지의 각각의 경로리스트들을 추출하여 상기 경로리스트들 중 하나 이상을 선택하여 실행하는 단계와; 경로 실행부를 통해, 상기 하나 이상의 경로 리스트에서 자료 흐름 경로의 실행결과를 상기 자료 흐름 그래프 상에 표시하는 단계와; 테스트 결과 보고서 생성부를 통해, 상기 자료 흐름 경로의 실행결과에 대한 커버리지(Coverage) 보고서를 생성하는 단계;를 포함한다.In order to achieve the above object, the data flow unit testing method according to an embodiment of the present invention, through the data data generation unit, the data test data generated by verifying the path of all the variables in all nodes based on the data flow graph Identifying data defects of all said variables on the basis of; Selecting and executing one or more of the path lists by extracting respective path lists from a point where all the variables are defined to a used point through a data flow test path generation unit; Displaying a result of executing a data flow path in the at least one path list on the data flow graph through a path execution unit; And generating a coverage report on an execution result of the data flow path through a test result report generator.
또한, 자료 데이터를 생성하는 단계는, 경로 설정 기준을 함수 내에 변수의 정의 및 사용에 초점을 두어 상기 모든 변수들의 경로를 검증하는 것을 특징으로 한다. In addition, the step of generating the data data is characterized by verifying the paths of all the variables by focusing on the definition and use of the variables in the path setting criteria.
또한, 자료 데이터를 생성하는 단계는, 상기 모든 변수들이 정의, 참조계산, 조건문의 참, 거짓을 경정하는 변수의 사용의 존재 여부를 분석하는 것을 특징으로 한다.
In addition, the step of generating the data data, characterized in that all the variables are analyzed for the existence of the use of the variable to determine the definition, reference calculation, true, false of the conditional statement.
본 발명은, 단위 테스팅 중에서 프로그램 내에 모든 변수의 테스트 경로들을 자동 생성하여 선택적으로 자료 흐름 테스트를 수행하는 것이 가능한 효과가 있다.According to the present invention, it is possible to automatically generate test paths of all variables in a program during unit testing to selectively perform a data flow test.
또한, 본 발명은 Java/C/C++ 소프트웨어에 포함되어 있는 자료 결함들을 식별하여 제거할 수 있으며, 커버리지 보고서를 제공하는 효과가 있다.In addition, the present invention can identify and eliminate data defects included in Java / C / C ++ software, and has an effect of providing a coverage report.
도 1은 본 발명의 실시예에 따른 자료 흐름 기반 단위 테스트 장치의 전체 구성도.
도 2는 도 1에 따른 자료 흐름 단위 테스팅 장치의 상세 블럭도.
도 3은 본 발명의 실시예에 따른 자료 흐름 테스트 경로를 실행하여 커버리지의 보고서를 생성하는 흐름도.
도 4는 본 발명의 실시예에 따른 자료 흐름 그래프를 설명하기 위한 도면.
도 5는 본 발명의 실시예에 따른 자료 테스트 데이터를 생성하는 그래프를 설명하기 위한 도면.
도 6은 본 발명의 실시예에 따른 자료 흐름을 테스팅하기 위한 경로를 생성하는 그래프를 설명하기 위한 도면.1 is an overall configuration diagram of a data flow based unit test apparatus according to an embodiment of the present invention.
FIG. 2 is a detailed block diagram of the data flow unit testing apparatus according to FIG. 1. FIG.
3 is a flow chart for executing a data flow test path in accordance with an embodiment of the present invention to generate a report of coverage.
4 is a view for explaining a data flow graph according to an embodiment of the present invention.
5 is a view for explaining a graph for generating data test data according to an embodiment of the present invention;
6 is a diagram for explaining a graph for generating a path for testing a data flow according to an embodiment of the present invention;
본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 정도로 상세히 설명하기 위하여, 본 발명의 가장 바람직한 실시예를 첨부 도면을 참조하여 설명하기로 한다. 우선 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In order to facilitate the understanding of the technical idea of the present invention, a most preferred embodiment of the present invention will be described with reference to the accompanying drawings. In the drawings, the same reference numerals are used to designate the same or similar components throughout the drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear.
이하, 본 발명의 실시예에 따른 자료 흐름 단위 테스팅 장치 및 그 방법을 첨부된 도면을 참조하여 상세하게 설명하면 아래와 같다.
Hereinafter, a data flow unit testing apparatus and a method thereof according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings.
도 1은 본 발명의 실시예에 따른 자료 흐름 기반 단위 테스트 장치의 전체 구성도이다.1 is an overall configuration diagram of a data flow based unit test apparatus according to an embodiment of the present invention.
도 1을 참조하면, 자료 흐름 기반 단위 테스트 장치는 자료흐름 그래프(100), 자료 흐름 단위 테스팅 장치(200)를 포함한다.Referring to FIG. 1, a data flow based unit test apparatus includes a
자료흐름 그래프(100)는 프로그램에서 함수 내부의 전역 변수(구조체)와 지역변수 흐름대한 정의(Definition)와, 참조계산(Computation)과 서술(Predicate)이 포함된 사용의 관계를 그래프로 표현하여, 함수 내부의 자료 흐름을 테스트하는데 사용된다.The
자료 흐름 단위 테스팅 장치(200)는 자료 흐름 그래프를 기반으로, 자료 테스트 데이터를 생성하고, 자료 흐름 그래프에서 선택된 각 함수들의 자료 흐름을 테스팅 하기 위한 경로를 생성하여, 각 경로별로 실행하고 그 실행 결과에 대한 커버리지 보고서를 생성한다.
The data flow
도 2는 도 1에 따른 자료 흐름 단위 테스팅 장치의 상세 블럭도이다.FIG. 2 is a detailed block diagram of a data flow unit testing apparatus according to FIG. 1.
도 2를 참조하면, 자료 흐름 단위 테스팅 장치(200)는 자료 테스트 데이터 생성부(210), 자료 흐름 테스트 경로 생성부(220), 경로 실행부(230), 테스트 결과 보고서 생성부(240)를 포함한다.Referring to FIG. 2, the data flow
자료 테스트 데이터 생성부(210)는 자료 흐름 그래프를 기반으로 모든 노드에서 모든 변수들의 경로를 검증하여 생성되는 자료 테스트 데이터를 근거로 상기 모든 변수들의 자료 결함을 식별한다.The data test
즉, 자료 테스트 데이터 생성부(210)는 자료 흐름 테스트를 위한 경로 설정 기준은 함수 내에 변수의 정의 및 사용에 초점을 둔다.That is, the data test
이때, 경로 생성 알고리즘은 랩스(Rapps) 또는 웨유커(Weyuker)가 제안한 자료 흐름 경로 선정 기준을 기반으로 한다.At this time, the path generation algorithm is based on the data flow path selection criteria proposed by Rapps or Weyuker.
또한, 각 노드(문장)에서 모든 변수들이 정의(Definition, Def), 참조계산(Computation Use: C-use) 그리고, 조건문의 참, 거짓을 결정하는 변수의 사용(Predicate Use: P-use)의 존재 여부를 분석한다.Also, in each node, all variables are defined (Definition, Def), Computation Use (C-use), and the use of variables that determine the true or false of conditional statements (Predicate Use: P-use). Analyze presence.
자료 흐름 테스트 경로 생성부(220)는 모든 변수들이 정의된 지점부터 사용된 지점까지의 각각의 경로리스트들을 추출하여 추출한 경로리스트들 중 하나 이상을 선택하여 실행한다.The data flow test path generation unit 220 selects and executes one or more of the extracted path lists by extracting respective path lists from a point where all variables are defined to a used point.
즉, 자료 흐름 테스트 경로 생성부(220)는 함수 내에 변수가 정의된 지점에서부터 변수가 사용된 지점까지의 경로리스트들을 자동 생성하여 선택적으로 실행한다.That is, the data flow test path generation unit 220 automatically generates and selectively executes the path lists from the point where the variable is defined in the function to the point where the variable is used.
경로 실행부(230)는 하나 이상의 경로 리스트에서 자료 흐름 경로의 실행결과를 자료 흐름 그래프 상에 표시한다.The
테스트 결과 보고서 생성부(240)는 자료 흐름 경로 실행 결과에 대한 커버리지 보고서를 생성한다.
The test
도 3은 본 발명의 실시예에 따른 자료 흐름 테스트 경로를 실행하여 커버리지 보고서를 생성하는 흐름도이다.3 is a flowchart for generating a coverage report by executing a data flow test path in accordance with an embodiment of the present invention.
도 3을 참조하면, 자료 흐름 테스트 경로 생성부(220)를 통해 추출한 각 경로 리스트들에서 선택한 자료 흐름 경로 실행 결과를 자료 흐름 그래프 상에 표시하고, 이에 대한 커버리지 보고서를 생성한다.Referring to FIG. 3, a data flow path execution result selected from respective path lists extracted through the data flow test path generation unit 220 is displayed on a data flow graph, and a coverage report is generated.
자료 테스트 데이터 생성부(210)에서 각 함수는 모든 변수의 정의에서부터 사용(C-use, P-use)된 노드(문장)까지를 포함하는 완벽한 경로를 제공하는 모든 정의-사용(All DU) 경로 리스트들에 대한 경로 인덱스를 설정한다(S100).In the data
이어서, 각 모든 정의-사용(All DU)의 경로 리스트를 생성하는 방법을 상세히 설명한다.Subsequently, a method of generating a path list of each all-DU is described in detail.
함수 tenLoop()에서 정의된 변수는(Def) “breakPoint"와 "index"이고. 참조 계산된 변수는(C-use)는 "index"뿐 이고, 자료 흐름에 영향을 주는 서술 변수(P-use)는 “breakPoint"와 "index"이다.The variables defined in the function tenLoop () are (Def) “breakPoint” and “index”, and the reference calculated variable (C-use) is only “index” and the descriptive variable (P-use) that affects the data flow. ) Are “breakPoint” and “index”.
모든 정의-사용(All DU)의 경로 리스트를 생성하기 위해서는, 정의된 변수의 시작점에서 참조 계산된 변수(C-use)까지의 경로와 서술 변수(P-use)까지의 경로를 통합함으로써 모든 정의-사용(All DU)경로를 생성한다.To create a list of paths for all definitions, all definitions are made by consolidating the paths from the beginning of the defined variable to the reference-calculated variable (C-use) and the path from the description variable (P-use). Create an All DU path.
이후, S100 단계에서 설정된 모든 정의-사용(All DU) 경로 리스트들의 인덱스 순서로 단위 테스트 대상인 각 경로에 대하여 S200 단계부터 S800 단계까지 모든 정의-사용(All DU)의 경로 테스트를 수행(S200)하고, 경로가 실행된 테스트 결과를 S300 단계, S400 단계, 또는 S500 단계로 통보한다. Subsequently, a path test of all definition-use (All DU) is performed from step S200 to step S800 for each path that is a unit test target in the index order of all definition-use (All DU) path lists set in step S100 (S200). In step S300, S400, or S500, the test result of executing the path is notified.
또한, 경로 리스트 인덱스의 마지막까지 위 과정을 반복적으로 수행할 수 있다. Also, the above process can be repeatedly performed until the end of the path list index.
경로가 실행된 테스트 결과를 S200 단계로부터 모든 정의-사용(All DU) 경로 패턴을 통보받았다면(S300), S300 단계로부터 받은 모든 정의-사용(All DU)의 실행 경로를 통보한다(S310).If the test result of executing the path is notified of all the definition-use (All DU) path patterns from step S200 (S300), the execution path of all definition-use (All DU) received from step S300 is notified (S310).
S310 단계로부터 실행된 경로를 경로 실행부(230)의 자료 흐름 그래프상에 표시하고(S600), 모든 정의-사용(All DU)의 실행 경로의 수를 전달하여 테스트 결과 보고서 생성부(240)를 통해 모든 정의-사용(All DU) 경로 커버리지 보고서를 생성한다(S700).The path executed from the step S310 is displayed on the data flow graph of the path execution unit 230 (S600), and the test
또한, 각 모든 정의-사용(All DU) 경로의 커버리지 계산에 대해 상세히 설명한다.In addition, the coverage calculation of each All DU path is described in detail.
모든 정의-사용(All DU) 경로는 모든 자료의 정의(Definition)에서부터 사용(Use: P-Use 또는 C-Use)된 노드까지의 DU(Definition-Use) 경로들이 실행되었는지를 측정한다.All DU paths measure whether the DU (Definition-Use) paths from the definition of all data to the nodes used (P-Use or C-Use) were executed.
또한, 한 함수내에서 모든 정의-사용(All DU) 경로 커버리지 계산은 다음과 같다.In addition, all DU path coverage calculations within a function are as follows.
모든 정의-사용 커버리지(%) = (실행된 DU 쌍의 수/ 모든 DU 쌍의 수)* 100%All defined-use coverage (%) = (number of DU pairs executed / number of all DU pairs) * 100%
이후, 다음경로를 수행(S800)하여 다시 S100단계부터 반복한 후, 경로가 실행된 테스트 결과를 S200 단계로부터 모든 변수의 사용(All P-use) 경로 패턴을 통보받으면, 모든 변수의 사용(All P-use)의 실행 경로를 경로 실행부(230)로 통보하여(S410) 실행된 경로를 자료 흐름 그래프상에 표시한다(S600).Subsequently, after performing the next path (S800) and repeating from step S100 again, if a test result of the path is notified from the step S200 of all variables (All P-use) of the path pattern, all the variables are used (All The execution path of P-use is notified to the path execution unit 230 (S410) and the executed path is displayed on the data flow graph (S600).
또한, 모든 변수의 사용(All P-use) 실행 경로의 수를 테스트 결과 보고서 생성부(240)로 전달하여 모든 변수의 사용(All P-use)의 경로 커버리지 보고서를 생성한다(S800). In addition, the number of execution paths of all variables (All P-use) is transmitted to the test
또한, 각 모든 변수의 사용(All P-use) 경로 커버리지 계산에 대해 상세히 설명한다.In addition, all P-use path coverage calculation of each variable will be described in detail.
모든 변수의 사용(All P-use)은 모든 변수의 정의(Definition)된 노드부터 조건문의 참, 거짓을 결정하는 변수의 사용(Predicate Use: P-use)까지의 DPU(Definition-P-use) 경로들이 실행되었는지를 측정한다.All P-use is defined as DPU (Definition-P-use) from defined node of all variables to use of variable to determine true or false of condition statement. Measure whether the paths have been run.
또한, 한 함수내에서 모든 변수의 사용(All P-use) 경로 커버리지의 계산은 다음과 같다.In addition, the calculation of all P-use path coverage in a function is as follows.
모든 변수의 사용(All P-use) 커버리지(%) = (실행된 DPU 쌍의 수/ 모든 DPU 쌍의 수)* 100%All P-use Coverage (%) = (Number of DPU pairs executed / Number of all DPU pairs) * 100%
이후, 다음경로를 수행(S800)하여 다시 S100단계부터 반복한 후, 경로가 실행된 테스트 결과를 S200 단계로부터 모든 참조계산(All C-use) 경로 패턴을 통보받았다면, 모든 참조계산(All C-use)의 실행 경로를 경로 실행부(230)로 통보(S510)한다.Thereafter, after performing the next path (S800) and repeating from step S100 again, if all the C-use path patterns are notified from the step S200 of the test result of executing the path, all the reference calculations (All C) are performed. Notify the execution path of -use to the path execution unit 230 (S510).
경로 실행부(230)는 실행된 경로를 자료 흐름 그래프상에 표시하고, 모든 참조계산(All C-use)의 실행 경로의 수를 테스트 결과 보고서 생성부(240)로 전달하여 모든 참조계산(All C-use)의 경로 커버리지 보고서를 생성한다.The
또한, 각 모든 참조계산(All C-use) 경로 커버리지 계산에 대해 상세히 설명한다.In addition, each All C-use path coverage calculation will be described in detail.
모든 참조계산(All C-use)은 모든 변수에 대하여 변수가 정의(Definition)된 노드부터 참조 계산(Computation Use: C-use)으로 사용된 노드까지의 DCU (Definition-C-use) 경로들이 실행되었는지를 측정한다.All C-uses run DCU (Definition-C-use) paths from the node where the variable is defined to the node used as the Computation Use (C-use) for all variables. Measure it.
또한, 한 함수내에서 모든 참조계산(All C-use) 경로 커버리지의 계산은 다음과 같다.In addition, the calculation of all C-use path coverage in a function is as follows.
모든 참조계산(All C-use) 커버리지(%) = (실행된 DCU 쌍의 수/ 모든 DCU 쌍의 수)* 100%All C-use coverage (%) = (number of DCU pairs executed / number of all DCU pairs) * 100%
이후, 다음 경로가 있으면, 다시 S100 단계로 이동하고, 없으면, 모든 정의-사용(All DU) 경로 테스트를 종료한다.
Then, if there is a next path, go back to step S100, and if not, end all DU path test.
도 4는 본 발명의 실시예에 따른 자료 흐름 그래프를 설명하기 위한 도면이다.4 is a view for explaining a data flow graph according to an embodiment of the present invention.
도 4를 참조하면, 자료흐름 그래프(100)는 프로그램에서 함수 내부의 전역 변수(구조체)와 지역변수 흐름대한 정의(Definition)와, 참조계산(Computation)과 서술(Predicate)이 포함된 사용의 관계를 계층 그래프로 나타낸다.Referring to FIG. 4, the
즉, 노드와 간선으로 구성되며, 노드는 문장이며, 간선은 조건문에서 분기되는 제어 흐름을 나타낸다. That is, it consists of a node and an edge, the node is a sentence, and the edge represents a control flow branched from the conditional sentence.
여기서, 노드는 제어문, 실행문, 선언문으로 구분된다. Here, nodes are divided into control statements, execution statements, and declaration statements.
또한, 그래프 상에 표시한 노드의 숫자는 소스의 라인을 나타내며, 또한 간선의 라벨은 조건문에서 노드의 흐름이 참(True, T)와 거짓(False, F)으로 표현한다.
In addition, the number of nodes displayed on the graph indicates the line of the source, and the label of the edge expresses the flow of nodes in the conditional statements as true (True, T) and false (False, F).
도 5는 본 발명의 실시예에 따른 자료 테스트 데이터를 생성하는 그래프를 설명하기 위한 도면이다.5 is a view for explaining a graph for generating data test data according to an embodiment of the present invention.
도 5를 참조하면, 자료 흐름 기반 단위 테스팅 시스템 및 방법의 자료 흐름 정의(Definition)와, 참조계산(Computation)과 서술(Predicate)이 포함된 사용의 관계를 분석하여 자료 테스트 집합의 보고서 화면을 나타낸다.Referring to FIG. 5, a report screen of a data test set is displayed by analyzing a relationship between a data flow definition of a data flow-based unit testing system and a method, and a use including a reference calculation and a predicate. .
즉, 각 All DU 경로 리스트를 생성하기 위하여, 함수 tenLoop()에서 정의된 변수는(Def) “breakPoint"와 "index"이고. 참조 계산된 변수는(C-use)는 "index"뿐 이고, 자료 흐름에 영향을 주는 서술 변수(P-use)는 “breakPoint"와 "index"이다.
In other words, to generate each All DU path list, the variables defined in the function tenLoop () are (Def) "breakPoint" and "index", and the reference calculated variable (C-use) is only "index", Descriptive variables (P-use) that affect data flow are “breakPoint” and “index”.
도 6은 본 발명의 실시예에 따른 자료 흐름을 테스팅하기 위한 경로를 생성하는 그래프를 설명하기 위한 도면이다.6 is a view for explaining a graph for generating a path for testing a data flow according to an embodiment of the present invention.
도 6을 참조하면, 모든 정의-사용(All DU) 경로 리스트를 생성하기 위해서는 변수 "index"의 모든 참조계산(All C-use)의 경로는 2개 경로가 있고(노드 39~43, 39~46), 변수 "index"의 모든 변수의 사용(All P-use) 경로는 4개의 경로(노드 39~43, 39~45, 39~42, 39~47)와, 변수 “breakPoint"의 모든 변수의 사용(All P-use) 경로는 2개의 경로(노드 37~43, 37~45)가 존재한다. Referring to FIG. 6, in order to generate a list of all DU paths, all C-use paths of the variable "index" have two paths (
이렇게 생성된 총 8개의 경로를 통합하면, 4개의 최단경로인 모든 정의-사용(All DU) 경로가 생성된다.Combining the total eight paths thus generated, four shortest paths, the All DU path, are created.
(1) 모든 정의-사용 커버리지(%) = (실행된 DU 쌍의 수/ 모든 DU 쌍의 수)* 100%(1) All defined-use coverage (%) = (number of DU pairs executed / number of all DU pairs) * 100%
위의 식 (1)을 이용하여 한 함수내에서 모든 정의-사용(All DU) 경로 커버리지를 계산하면, 1번의 모든 정의-사용(All DU) 경로의 커버리지는 25%이다(= 1/4)Computing all DU path coverage in a function using Equation (1) above gives 25% coverage for all 1 DU path (= 1/4)
(2) 모든 변수의 사용(All P-use) 커버리지(%) = (실행된 DPU 쌍의 수/ 모든 DPU 쌍의 수)* 100%(2) All P-use Coverage (%) = (Number of DPU pairs executed / Number of all DPU pairs) * 100%
위의 식(2)를 이용하여 한 함수내에서 모든 변수의 사용(All P-use) 경로 커버리지는 1번의 모든 변수의 사용(All P-use) 경로의 커버리지는 50%이다(= 3/6)Using Equation (2) above, all P-use path coverage in one function is 50% of all P-use path coverage (= 3/6). )
(3) 모든 참조계산(All C-use) 커버리지(%) = (실행된 DCU 쌍의 수/ 모든 DCU 쌍의 수)* 100% (3) All C-use coverage (%) = (number of DCU pairs executed / number of all DCU pairs) * 100%
위의 식(3)을 이용하여 한 함수내에서 모든 참조계산(All C-use) 경로 커버리지를 계산하면, 1번의 모든 참조계산(All C-use) 경로의 커버리지는 50%이다(= 1/2)Computing all C-use path coverage in one function using Equation (3) above, the coverage of all C-use paths in
이렇게, 모든 노드(문장)에서 모든 변수들이 정의(Definition, Def), 참조계산(Computation Use: C-use) 그리고 조건문의 참, 거짓을 결정하는 변수의 사용(Predicate Use: P-use)의 존재 여부를 분석하여, 변수 정의는 있지만 사용하지 않는 변수인 미 사용 변수 결함을 또는 변수 정의가 없고 사용만 있는 미 정의 변수 결함들을 식별할 수 있다.Thus, at every node, all variables are defined (Definition, Def), Computation Use (C-use), and Predicate Use (P-use) to determine the true or false of conditional statements. By analyzing whether it is possible to identify unused variable defects that are variable definitions but not used, or undefined variable defects that do not have variable definitions and only use them.
따라서, Java/C/C++ 소프트웨어에 포함되어 있는 자료 결함들을 식별하여 제거할 수 있는 효과와 커버리지 보고서를 제공한다.
Therefore, it provides effects and coverage reports to identify and eliminate data defects included in Java / C / C ++ software.
이상에서 본 발명의 바람직한 실시예에 대해 설명하였으나, 다양한 형태로 변형이 가능하며, 본 기술분야에서 통상의 지식을 가진자라면 본 발명의 특허청구범위를 벗어남이 없이 다양한 변형예 및 수정예를 실시할 수 있을 것으로 이해된다.
Although the preferred embodiments of the present invention have been described above, modifications may be made in various forms, and a person of ordinary skill in the art may implement various modifications and modifications without departing from the claims of the present invention. It is understood that it can be done.
100: 자료 흐름 그래프 200: 자료 흐름 단위 테스팅 장치
210: 자료 테스트 데이터 생성부 220: 자료 흐름 테스트 경로 생성부
230: 경로 실행부 240: 테스트 결과 보고서 생성부100: data flow graph 200: data flow unit testing device
210: data test data generation unit 220: data flow test path generation unit
230: path execution unit 240: test result report generation unit
Claims (10)
상기 생성한 자료 테스트 데이터를 근거로 복수의 경로를 포함하는 자료 흐름 테스트 경로 리스트를 생성하는 자료 흐름 테스트 경로 생성부;
상기 자료 흐름 테스트 경로 리스트에 포함된 경로들의 실행결과를 상기 자료 흐름 그래프에 표시하는 경로 실행부; 및
상기 자료 흐름 경로의 실행결과에 대한 커버리지(Coverage) 보고서를 생성하는 테스트 결과 보고서 생성부를 포함하고,
상기 테스트 결과 보고서 생성부는,
모든 정의-사용 쌍의 개수중에서 실행된 정의-사용 쌍의 개수에 대한 백분율로 모든 정의-사용 경로 커버리지를 산출하고, 모든 DPU 쌍의 수에서 실행된 DPU 쌍의 개수에 대한 백분율로 모든 변수의 사용 경로 커버리지를 산출하고, 모든 DCU 쌍의 수에서 실행된 DCU 쌍의 개수에 대한 백분율로 모든 참조계산 경로 커버리지를 산출하는 것을 특징으로 하는 자료 흐름 단위 테스팅 장치.A data test data generation unit for generating data test data based on a data flow graph including a definition of a global variable and a local variable flow in a program and a reference calculation and a description;
A data flow test path generation unit generating a data flow test path list including a plurality of paths based on the generated data test data;
A path execution unit that displays an execution result of paths included in the data flow test path list on the data flow graph; And
A test result report generation unit configured to generate a coverage report on an execution result of the data flow path;
The test result report generation unit,
Calculate all definition-use path coverage as a percentage of the number of definition-use pairs executed among the number of all definition-use pairs, and use all variables as a percentage of the number of DPU pairs executed at the number of all DPU pairs. Calculating path coverage and calculating all reference calculated path coverages as a percentage of the number of DCU pairs executed in the number of all DCU pairs.
상기 자료 테스트 데이터 생성부는,
자료 흐름 테스트를 위한 경로 생성의 기준이 되는 변수들의 집합으로 구성되는 자료 테스트 데이터를 생성하는 것을 특징으로 하는 자료 흐름 단위 테스팅 장치.The method according to claim 1,
The data test data generation unit,
A data flow unit testing apparatus, characterized in that for generating data test data consisting of a set of variables that are the basis of the path generation for data flow testing.
상기 자료 흐름 테스트 경로 생성부는,
상기 프로그램의 함수 내에 모든 변수들에 대해 각각의 변수가 정의된 지점에서부터 사용된 지점까지의 경로들을 포함하는 자료 흐름 테스트 경로 리스트를 생성하는 것을 특징으로 하는 자료 흐름 단위 테스팅 장치.The method according to claim 1,
The data flow test path generation unit,
And a data flow test path list for all of the variables within the function of the program, including a path from a point at which each variable is defined to a point used.
상기 자료 흐름 테스트 경로 생성부는,
상기 자료 흐름 테스트 경로 리스트에 포함된 경로들 중에 적어도 하나를 실행한 실행결과를 상기 경로 실행부에게로 전송하는 것을 특징으로 하는 자료 흐름 단위 테스팅 장치.The method according to claim 3,
The data flow test path generation unit,
And transmitting the execution result of executing at least one of the paths included in the data flow test path list to the path execution unit.
자료 흐름 테스트 경로 생성부에 의해, 상기 생성한 자료 테스트 데이터를 근거로 복수의 경로를 포함하는 자료 흐름 테스트 경로 리스트를 생성하는 단계;
경로 실행부에 의해, 상기 생성한 자료 흐름 테스트 경로 리스트에 포함된 경로들의 실행결과를 상기 자료 흐름 그래프에 표시하는 단계; 및
테스트 결과 보고서 생성부에 의해, 상기 자료 흐름 경로의 실행결과에 대한 커버리지(Coverage) 보고서를 생성하는 단계를 포함하고,
상기 커버리지 보고서를 생성하는 단계는,
상기 테스트 결과 보고서 생성부에 의해, 모든 정의-사용 쌍의 개수중에서 실행된 정의-사용 쌍의 개수에 대한 백분율로 모든 정의-사용 경로 커버리지를 산출하는 단계;
상기 테스트 결과 보고서 생성부에 의해, 모든 DPU 쌍의 수에서 실행된 DPU 쌍의 개수에 대한 백분율로 모든 변수의 사용 경로 커버리지를 산출하는 단계; 및
상기 테스트 결과 보고서 생성부에 의해, 모든 DCU 쌍의 수에서 실행된 DCU 쌍의 개수에 대한 백분율로 모든 참조계산 경로 커버리지를 산출하는 단계를 포함하는 것을 특징으로 하는 자료 흐름 단위 테스팅 방법.Generating, by the data test data generation unit, data test data based on a data flow graph including definitions of global variables and local variable flows in a function, and reference calculation and description in a program;
Generating, by the data flow test path generation unit, a data flow test path list including a plurality of paths based on the generated data test data;
Displaying, by the path execution unit, execution results of paths included in the generated data flow test path list on the data flow graph; And
Generating, by the test result report generator, a coverage report for the execution result of the data flow path;
Generating the coverage report,
Calculating, by the test result report generator, all definition-use path coverages as a percentage of the number of definition-use pairs executed among the number of all definition-use pairs;
Calculating, by the test result report generator, usage path coverage of all variables as a percentage of the number of DPU pairs executed in the number of all DPU pairs; And
And calculating, by the test result report generator, all reference calculation path coverages as a percentage of the number of DCU pairs executed in the number of all DCU pairs.
상기 자료 테스트 데이터를 생성하는 단계에서는,
상기 자료 테스트 데이터 생성부에 의해, 자료 흐름 테스트를 위한 경로 생성의 기준이 되는 변수들의 집합으로 구성되는 자료 테스트 데이터를 생성하는 것을 특징으로 하는 자료 흐름 단위 테스팅 방법.The method of claim 6,
In the step of generating the data test data,
And, by the data test data generating unit, generating data test data including a set of variables which are a reference for generating a path for data flow testing.
상기 자료 테스트 데이터를 생성하는 단계에서는,
상기 자료 흐름 테스트 경로 생성부에 의해, 상기 프로그램의 함수 내에 모든 변수들에 대해 각각의 변수가 정의된 지점에서부터 사용된 지점까지의 경로들을 포함하는 자료 흐름 테스트 경로 리스트를 생성하는 것을 특징으로 하는 자료 흐름 단위 테스팅 방법.The method of claim 6,
In the step of generating the data test data,
The data flow test path generation unit generates a data flow test path list including paths from a point where each variable is defined to a point used for all variables in the function of the program. Flow unit testing method.
상기 자료 테스트 데이터를 생성하는 단계에서는,
상기 자료 흐름 테스트 경로 생성부에 의해, 상기 자료 흐름 테스트 경로 리스트에 포함된 경로들 중에 적어도 하나를 실행하는 단계;
상기 자료 흐름 테스트 경로 생성부에 의해, 상기 실행된 경로들에 대한 실행결과를 상기 경로 실행부에게로 전송하는 것을 특징으로 하는 자료 흐름 단위 테스팅 방법.The method according to claim 8,
In the step of generating the data test data,
Executing, by the data flow test path generation unit, at least one of paths included in the data flow test path list;
And transmitting, by the data flow test path generation unit, execution results of the executed paths to the path execution unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020100128645A KR101307353B1 (en) | 2010-12-15 | 2010-12-15 | Apparatus for data flow unit testing and method using the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020100128645A KR101307353B1 (en) | 2010-12-15 | 2010-12-15 | Apparatus for data flow unit testing and method using the same |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20120067186A KR20120067186A (en) | 2012-06-25 |
KR101307353B1 true KR101307353B1 (en) | 2013-09-11 |
Family
ID=46686310
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020100128645A Active KR101307353B1 (en) | 2010-12-15 | 2010-12-15 | Apparatus for data flow unit testing and method using the same |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101307353B1 (en) |
-
2010
- 2010-12-15 KR KR1020100128645A patent/KR101307353B1/en active Active
Non-Patent Citations (2)
Title |
---|
"10. Data flow testing" (출처: http://docstoc.com/docs/47963166/10-Data-flow-testing) (2010.07.23.) * |
"10. Data flow testing" (출처: http://docstoc.com/docs/47963166/10-Data-flow-testing) (2010.07.23.)* |
Also Published As
Publication number | Publication date |
---|---|
KR20120067186A (en) | 2012-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104536883B (en) | A kind of static defect detection method and its system | |
Ostberg et al. | On automatically collectable metrics for software maintainability evaluation | |
Scanniello | Source code survival with the Kaplan Meier | |
Kaur et al. | Improving the quality of software by refactoring | |
Badri et al. | Predicting unit testing effort levels of classes: An exploratory study based on multinomial logistic regression modeling | |
Okmen et al. | Uncertainty evaluation with fuzzy schedule risk analysis model in activity networks of construction projects | |
Ufuktepe et al. | A program slicing-based bayesian network model for change impact analysis | |
Drebes et al. | Interactive visualization of cross-layer performance anomalies in dynamic task-parallel applications and systems | |
Nugroho et al. | Assessing uml design metrics for predicting fault-prone classes in a java system | |
Wert | Performance problem diagnostics by systematic experimentation | |
Debbarma et al. | Static and dynamic software metrics complexity analysis in regression testing | |
KR101307353B1 (en) | Apparatus for data flow unit testing and method using the same | |
CN104615535B (en) | A method and device for generating test cases based on extended data flow model | |
CN107247663A (en) | A kind of redundancy variant recognition methods | |
Dutta et al. | Fault localization using a weighted function dependency graph | |
Helfrich et al. | QUIP: quantitative user interface profiling | |
Lopes Margarido et al. | Towards a framework to evaluate and improve the quality of implementation of CMMI® practices | |
Tripathi et al. | Improving software quality based on relationship among the change proneness and object oriented metrics | |
Akimoto et al. | Test case selection technique for regression testing using differential control flow graphs | |
Rott et al. | Ticket coverage: putting test coverage into context | |
Park et al. | Requirements attributes to predict requirements related defects | |
Badri et al. | On understanding software quality evolution from a defect perspective: A case study on an open source software system | |
Silva et al. | Predicting prime path coverage using regression analysis | |
Zeleňáková | Process of environmental risk assessment in watershed | |
Tanrıöver et al. | An emprical analysis of early object oriented design metrics in relation to code size |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20101215 |
|
A201 | Request for examination | ||
PA0201 | Request for examination |
Patent event code: PA02012R01D Patent event date: 20120522 Comment text: Request for Examination of Application Patent event code: PA02011R01I Patent event date: 20101215 Comment text: Patent Application |
|
PG1501 | Laying open of application | ||
PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20130626 Patent event code: PE09021S01D |
|
E701 | Decision to grant or registration of patent right | ||
PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 20130830 |
|
GRNT | Written decision to grant | ||
PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20130905 Patent event code: PR07011E01D |
|
PR1002 | Payment of registration fee |
Payment date: 20130906 End annual number: 3 Start annual number: 1 |
|
PG1601 | Publication of registration | ||
FPAY | Annual fee payment |
Payment date: 20160826 Year of fee payment: 4 |
|
PR1001 | Payment of annual fee |
Payment date: 20160826 Start annual number: 4 End annual number: 4 |
|
LAPS | Lapse due to unpaid annual fee |