WO2014088144A1 - 단위 테스트 케이스 재사용 기반의 함수 테스트 장치 및 그 함수 테스트 방법 - Google Patents

단위 테스트 케이스 재사용 기반의 함수 테스트 장치 및 그 함수 테스트 방법 Download PDF

Info

Publication number
WO2014088144A1
WO2014088144A1 PCT/KR2012/011087 KR2012011087W WO2014088144A1 WO 2014088144 A1 WO2014088144 A1 WO 2014088144A1 KR 2012011087 W KR2012011087 W KR 2012011087W WO 2014088144 A1 WO2014088144 A1 WO 2014088144A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
unit
function
test case
case
Prior art date
Application number
PCT/KR2012/011087
Other languages
English (en)
French (fr)
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 US14/123,297 priority Critical patent/US20150363296A1/en
Publication of WO2014088144A1 publication Critical patent/WO2014088144A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Definitions

  • the present invention relates to a test apparatus for a function, and more particularly, a unit test case reuse-based function in which an upper function selectively reuses unit test cases of a lower function in an integrated testing step to check whether the functions interact.
  • a test apparatus and its function test method are described.
  • the software under test must be run according to the test case.
  • test quality and efficiency The importance of testing software leads to expectations for the high quality of embedded systems. Especially in the systems of aviation or medical devices that require a high level of confidence, software inspection and validation may account for more than half of the overall project development resources. Creating a test case in this series of tests is recognized as an important task in determining test quality and efficiency.
  • the device or system is composed of a set of a plurality of functions, the operation of the device or system is controlled as a whole through the interaction of the functions. Also, the software's error is that most of it happens when the functions interact with each other, so you must test the interactions between the functions.
  • One example is to test a parent function that calls multiple subfunctions to check for errors in the interaction between the functions.
  • the method is limited to the case where the amount of information of the sub-function is extremely small enough to analyze all the internal structure of the sub-function. In other words, it is difficult to apply it to functional test in consideration of development period and cost in the environment where software is very complicated in recent years.
  • Another example is a method of storing a test case of a specific function and then accessing and using the stored test case again when retesting the same function.
  • an object of the present invention is to solve the above problems, and during the integration test step, selectively generate a test case by selectively reusing a unit test case used in a lower function when generating a test case of the upper function and using the function. It is to test whether the interaction between them works normally.
  • Another object of the present invention is to enable a test of a function without analyzing the internal structure of a lower function called by a higher function when performing a test on the interaction between the functions.
  • Another object of the present invention is to classify and store unit test cases of functions in a hierarchical structure according to test coverage to improve utilization of unit test cases.
  • a storage unit for storing a unit test case for each function in a hierarchical structure;
  • a unit test case selector for selectively reusing a unit test case of the sub function to abstract the internal structure of the sub function called by the test object function if a test object function is provided;
  • a test case generation unit generating at least one test case to perform all the unit test cases selected by the test case selection unit;
  • a test case execution unit configured to execute the test case and test the test the test target function.
  • the unit test case may be a unit test case that has passed unit testing on the sub-function before being integrated with the test target function.
  • the abstraction of the internal structure is characterized in that the level of abstraction is determined according to the integrated testing policy.
  • the generation unit for generating a test case by reusing the unit test case of at least one sub-function called by the test target function;
  • a unit test case reuse based function test apparatus including a test unit configured to test the test target function.
  • the unit test case reused when generating the test case is a unit test case used for unit testing of the sub-function, and the unit test case has a test coverage that provides a specific coverage.
  • test coverage is characterized by having a hierarchical inclusion relationship.
  • the request generation step of generating a test request for the function to be tested A unit test case selecting step of selecting a unit test case of at least one sub function called by the test target function according to the test request; Generating a test case by reusing the selected unit test case; And a unit test case reuse based function test method including a test case execution step of executing the generated test case.
  • the method may further include a storing step of storing the unit test case for the sub function in a hierarchical structure before the request generating step.
  • the test case generating step may include generating at least one test case.
  • the test case executing step may include performing a test on the test target function using a test case having the highest test coverage among the at least one test case.
  • test coverage tests can be performed on the function under test, thereby ensuring high reliability of the test results.
  • FIG. 1 is a block diagram illustrating a functional test apparatus based on unit test case reuse according to an exemplary embodiment of the present invention.
  • FIG. 2 illustrates an example of storing a unit test case in a hierarchical structure according to the present invention.
  • FIG. 3 is a flowchart of a test case generation method according to an exemplary embodiment of the present invention.
  • FIG. 4 is an exemplary view showing a state of reusing a unit test case in FIG.
  • FIG. 1 is a block diagram illustrating a functional test apparatus based on unit test case reuse according to an exemplary embodiment of the present invention.
  • the function test device based on the unit test case reuse of the present invention (hereinafter, referred to as a “function test device”) generates a test case by reusing a unit test case of a plurality of sub functions called by an upper function in an integration testing step.
  • the technical feature is that the upper function performs normal interaction with the lower function by performing all the unit test cases included in the test case.
  • the unit test case storage unit 110 for storing the unit test case of the lower function is configured.
  • the unit test case storage unit 110 processes and stores a test case used for unit testing in a hierarchical structure. This is to improve management efficiency and provide convenience for unit test cases.
  • FIG. 2 An example of storing unit test cases in a hierarchical structure is shown in FIG. 2.
  • branch coverage consists of unit test cases 1 through 4
  • return coverage consists of unit test cases 1 and 2
  • function coverage consists of all unit test cases of each of these functions.
  • the unit test case for each function has test coverage that satisfies it.
  • each coverage has a hierarchical inclusion relationship.
  • each unit test case is stored hierarchically for reuse according to any test coverage.
  • Such coverage will be used to design tests and generate test cases to achieve corresponding coverage.
  • syntax coverage or condition coverage may be further added in addition to the coverage to provide a hierarchical structure.
  • the test case selector 120 is configured to select unit test cases of the corresponding functions in the unit test case storage unit 110 to examine the test target function according to the integrated testing policy.
  • the selection of unit test cases is made within the range that satisfies the criteria of test coverage.
  • the test case generator 130 is configured to generate a test case to perform all of the unit test cases selected by the test case selector 120. There may be at least one test case. That is, you can create test cases for every software module you want to test.
  • the test case execution unit 140 is configured to test the test target function using the test case.
  • the test case execution unit 140 performs a test according to the generated test case. In this case, only the abstraction information is used without analyzing the internal structure of another function included in the test target function.
  • test case generation method according to the present invention will be described with reference to FIG. 3.
  • function A is an upper function that calls functions B through E, and functions B and E become lower functions.
  • function D becomes a function that calls function E. Therefore, if you test the function under test A, you can create test cases that include functions B and C, and test cases that include functions D and E.
  • the embodiment will be described as testing a function A including a function B and a function C.
  • Each of function B to function E has its own unit test case.
  • the unit test cases of functions B through E are unit tests that have already passed unit testing before being integrated with function A.
  • the unit test case for each function as described above is stored in the unit test case storage unit 110 (s100).
  • a test request for the function A is generated while the unit test case is stored (s102).
  • the test case selector 120 When a test request for the function A occurs, the test case selector 120 should select the unit test case of the lower function according to the integrated testing policy in order to generate the test case (s104). Accordingly, the test case selector 120 selects to reuse the unit test cases of the functions B and C which have already passed the unit testing. This allows you to abstract the internal structure of function B and function C. That is, the unit test cases of function B and function C already reflect the structures of their functions B and C. This allows the test to be performed without analyzing all the internal structures of Function B and Function C that Function A calls.
  • test case generator 130 When the unit test case for the function is selected, the test case generator 130 generates a test case by reusing the unit test cases of the functions B and C (S106).
  • test function A tests the interaction with functions D and E, it will generate a test case that works with the unit test cases of functions D and E. That is, test cases may be generated according to the function under test.
  • one or more test cases for one test target function may be generated. At this time, the test coverage of the test case is provided differently.
  • the generated test case is transferred to the test case execution unit 140, and the test case execution unit 140 executes the generated test case (s108).
  • function A can test whether the interaction with function B and function C is being performed correctly. That is, it checks for errors that occur between interactions between functions.
  • the test case execution unit 140 may perform a test on the test target function using a test case having the highest test coverage among one or more test cases.
  • the upper function is to reuse the unit test case provided by the lower function to generate a test case and thereby check for interaction errors between the functions. have.
  • the present invention is not limited to performing a test for a specific software, but may be applied to perform a test by applying to most general software including embedded software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

본 발명은 단위 테스트 케이스 재사용 기반의 함수 테스트 장치 및 그 함수 테스트 방법에 관한 것이다. 본 발명의 함수 테스트 장치는, 각 함수에 대한 단위 테스트 케이스를 계층구조로 저장하는 저장부와, 테스트 대상 함수가 제공되면 그 테스트 대상 함수에 의해 호출되는 하위 함수의 내부 구조를 추상화하도록 상기 하위 함수의 단위 테스트 케이스를 선별적으로 재사용하는 단위 테스트 케이스 선택부와, 상기 테스트 케이스 선택부에 의해 선택된 단위 테스트 케이스가 모두 수행되도록 적어도 하나의 테스트 케이스를 생성하는 테스트 케이스 생성부, 및 상기 테스트 케이스를 실행하여 상기 테스트 대상 함수를 테스트하는 테스트 케이스 실행부를 포함하여 구성된다.

Description

단위 테스트 케이스 재사용 기반의 함수 테스트 장치 및 그 함수 테스트 방법
본 발명은 함수의 테스트 장치에 관한 것으로, 더욱 상세하게는 통합 테스팅 단계에서 상위 함수가 하위 함수의 단위 테스트 케이스를 선별적으로 재사용하여 함수들 간의 상호작용 여부를 검사하는 단위 테스트 케이스 재사용 기반의 함수 테스트 장치 및 그 함수 테스트 방법에 관한 것이다.
어떠한 장치나 시스템을 테스트하기 위해서는 테스트 대상 소프트웨어를 테스트 케이스에 따라 실행하여야 한다.
그런데 근래 소프트웨어는 탑재되는 기능이 많아짐에 따라 점차 복잡하게 구현되고 있다. 이에 따라 테스트 실행 환경 및 테스트 케이스를 설계하는 데에도 많은 시간과 비용이 소요된다. 또한 복잡하게 구현된 소프트웨어는 테스트 단계에서 많은 오류가 발생할 수 있다.
이에 각종 오류의 해결과 함께 개발 기간이나 소요 비용의 증가를 최소화하고, 생산성과 신뢰성이 있는 소프트웨어를 개발하기 위해 소프트웨어 테스트의 필요성이 부각되고 있다.
소프트웨어의 테스트에 대한 중요성은 임베디드 시스템(Embeded system)의 높은 품질에 대한 기대로 이어진다. 특히 고도로 높은 신뢰 수준을 요구하는 항공이나 의료기기의 시스템에서는 소프트웨어를 검사하고 타당성을 검증하는 과정이 전체 프로젝트 개발 자원의 절반 이상을 차지하기도 한다. 이처럼 테스트를 위한 일련의 작업들 속에서 테스트 케이스를 생성하는 것은 테스트의 질과 효율을 결정하는 중요한 작업으로 인식되고 있다.
한편 장치나 시스템에서 테스트를 수행하기 위해서는 함수들 상호 간의 상호 작용을 살펴봐야 한다. 즉 장치나 시스템은 복수의 함수들의 집합으로 구성되어 있고, 상기 함수들의 상호 작용을 통해 장치나 시스템의 작동이 전체적으로 제어되고 있기 때문이다. 또한 소프트웨어의 오류는 대부분이 함수들 상호 간의 작용시에 발생하기 때문에 함수들 상호 간의 상호 작용을 테스트해야 한다는 것이다.
종래에 함수들 상호 간의 상호작용이 정상적으로 수행되는지를 검증하는 방법이 다수 제안된 바 있다.
하나의 예로 복수의 하위 함수를 호출하는 상위 함수를 테스트하여 함수들 간의 상호작용에 오류가 있는지를 검사하는 방법이 있다.
이때 상기 상위 함수를 테스트 하기위해서는 하위 함수의 내부 구조를 모두 분석해야하는 선행조건이 있다. 물론 선행조건인 하위 함수의 내부 구조를 쉽게 분석할 수 있다면 함수 간의 상호작용에 대한 테스트는 용이하게 실시할 수 있을 것이다. 하지만, 상기 상위 함수는 복수의 하위 함수를 포함하고 있기 때문에 상위 함수가 가지는 내부 구조는 매우 복잡한 형태를 취한다. 이는 상위 함수의 내부 구조를 분석할 수 없음을 의미한다.
따라서 상기 방법은 하위 함수의 내부 구조를 전부 분석할 수 있을 정도로 하위 함수의 정보량이 극히 적은 경우에 한정되어 선택적으로 사용되는 실정이다. 즉, 근래와 같이 소프트웨어가 매우 복잡한 환경에서는 개발 기간이나 소요 비용을 고려하면 실질적으로 함수 테스트에 적용하기가 어려운 방식이라 할 수 있다.
다른 예로 특정 함수의 테스트 케이스를 저장하고, 이후 동일한 함수를 다시 테스트할 때 상기 저장된 테스트 케이스를 다시 액세스하여 사용하는 방법이 있다.
하지만, 이 방법은 동일 함수에만 적용할 수 있고, 다른 함수를 테스트할 경우에는 저장된 테스트 케이스는 활용하지 못하는 문제가 있다.
따라서 본 발명의 목적은 상기한 문제점을 해결하기 위한 것으로, 통합 테스팅 단계에서 상위 함수의 테스트 케이스 생성시에 하위 함수에 사용된 단위 테스트 케이스를 선별적으로 재사용하여 테스트 케이스를 생성하고 이를 이용하여 함수들 간의 상호작용이 정상적으로 실행되는지 테스트하도록 하는 것이다.
본 발명의 다른 목적은 함수들 간의 상호작용에 대한 테스트 수행시에 상위 함수가 호출하는 하위 함수의 내부 구조를 분석하지 않고서도 함수에 대한 테스트가 가능하도록 하는 것이다.
본 발명의 또 다른 목적은 함수들의 단위 테스트 케이스를 테스트 커버리지(test coverage)에 따라 계층구조로 분류, 저장하여 단위 테스트 케이스의 활용도를 향상시키는 것이다.
상기한 목적을 달성하기 위한 본 발명의 특징에 따르면, 각 함수에 대한 단위 테스트 케이스를 계층구조로 저장하는 저장부; 테스트 대상 함수가 제공되면 그 테스트 대상 함수에 의해 호출되는 하위 함수의 내부 구조를 추상화하도록 상기 하위 함수의 단위 테스트 케이스를 선별적으로 재사용하는 단위 테스트 케이스 선택부; 상기 테스트 케이스 선택부에 의해 선택된 단위 테스트 케이스가 모두 수행되도록 적어도 하나의 테스트 케이스를 생성하는 테스트 케이스 생성부; 및 상기 테스트 케이스를 실행하여 상기 테스트 대상 함수를 테스트하는 테스트 케이스 실행부를 포함하는 단위 테스트 케이스 재사용 기반의 함수 테스트 장치가 제공된다.
상기 단위 테스트 케이스는, 상기 테스트 대상 함수와 통합되기 전에 상기 하위 함수에 대한 단위 테스팅을 통과한 단위 테스트 케이스임을 특징으로 한다.
상기 내부 구조에 대한 추상화는 통합 테스팅 정책에 따라 추상화 수준이 결정됨을 특징으로 한다.
본 발명의 다른 특징에 따르면, 테스트 대상 함수에 의해 호출되는 적어도 하나의 하위 함수의 단위 테스트 케이스를 재사용하여 테스트 케이스를 생성하는 생성부; 및 상기 테스트 대상 함수를 테스트하는 테스트부를 포함하는 단위 테스트 케이스 재사용 기반의 함수 테스트 장치가 제공된다.
상기 단위 테스트 케이스가 재사용되면 상기 하위 함수의 내부구조는 통합 테스팅 정책에 따라 추상화됨을 특징으로 한다.
상기 테스트 케이스 생성시에 재사용되는 단위 테스트 케이스는 상기 하위 함수의 단위 테스팅에 사용된 단위 테스트 케이스이고, 상기 단위 테스트 케이스는 특정 커버리지를 제공하는 테스트 커버리지를 가지는 것을 특징으로 한다.
상기 테스트 커버리지는 계층적인 포함관계를 가지면서 구성됨을 특징으로 한다.
본 발명의 또 다른 특징에 따르면, 테스트 대상 함수에 대한 테스트 요청이 발생하는 요청 발생단계; 상기 테스트 요청에 따라 상기 테스트 대상 함수가 호출하는 적어도 하나의 하위 함수가 가지는 단위 테스트 케이스를 선택하는 단위 테스트 케이스 선택단계; 상기 선택된 단위 테스트 케이스를 재사용하여 테스트 케이스를 생성하는 테스트 케이스 생성단계; 및 상기 생성된 테스트 케이스를 실행하는 테스트 케이스 실행단계를 포함하는 단위 테스트 케이스 재사용 기반의 함수 테스트 방법이 제공된다.
상기 요청 발생 단계 이전에, 상기 하위 함수에 대한 단위 테스트 케이스를 계층 구조로 저장하는 저장단계를 더 포함하고 있다.
상기 단위 테스트 케이스 선택 단계에서 단위 테스트 케이스가 선택되면 상기 하위 함수의 내부구조가 추상화되는 것을 특징으로 한다.
상기 테스트 케이스 생성단계는, 적어도 하나 이상의 테스트 케이스를 생성하는 것을 특징으로 한다.
상기 테스트 케이스 실행단계는, 상기 적어도 하나 이상의 테스트 케이스 중에서 테스트 커버리지가 가장 높은 테스트 케이스를 이용하여 상기 테스트 대상 함수에 대한 테스트를 수행하는 것을 특징으로 한다.
이와 같은 본 발명의 단위 테스트 케이스 재사용 기반의 함수 테스트 장치 및 그 함수 테스트 방법에 따르면 다음과 같은 효과가 있다.
먼저 통합 테스팅 단계에서 소프트웨어 함수의 내부 구조를 분석하지 않아도 함수에 대한 테스트를 수행할 수 있다.
그리고 테스트 대상 함수에 대하여 테스트 커버리지가 높은 테스트를 수행할 수 있어 테스트 결과에 대한 높은 신뢰성을 확보할 수 있다.
또한 다수 함수가 단위 테스팅 단계에서 통과되었던 단위 테스트 케이스를 재사용하기 때문에 통합 테스팅의 비용을 절감할 수 있는 효과도 기대할 수 있다.
도 1은 본 발명의 바람직한 실시 예에 따른 단위 테스트 케이스 재사용 기반의 함수 테스트 장치를 보인 블록 구성도
도 2는 본 발명에 따라 단위 테스트케이스를 계층구조로 저장하는 예를 보인 도면
도 3은 본 발명의 바람직한 실시 예에 따른 테스트 케이스 생성방법의 흐름도
도 4는 도 3에서 단위 테스트케이스를 재사용하는 상태를 보인 예시도
도 5는 본 발명에 따른 함수 테스트 측정 결과를 보인 그래프
이하 본 발명에 의한 단위 테스트 케이스 재사용 기반의 함수 테스트 장치 및 그 함수 테스트 방법의 실시 예를 첨부된 도면을 참조하여 상세하게 설명한다.
도 1은 본 발명의 바람직한 실시 예에 따라 단위 테스트 케이스 재사용 기반의 함수 테스트 장치를 보인 블록 구성도이다.
본 발명의 단위 테스트 케이스 재사용 기반의 함수 테스트 장치(이하, '함수 테스트 장치'라고 함)는 통합 테스팅 단계에서 상위 함수에 의해 호출되는 복수의 하위 함수가 가지는 단위 테스트 케이스를 재사용하여 테스트 케이스를 생성하고 상기 테스트케이스 내에 포함된 단위 테스트케이스를 모두 수행하여 상위 함수가 하위 함수와 정상적인 상호작용이 수행되는지를 테스트하는 것을 그 기술적 특징으로 하고 있다.
이를 위한 함수 테스트 장치의 구성을 살펴본다.
하위 함수의 단위 테스트 케이스를 저장하는 단위 테스트 케이스 저장부(110)가 구성된다. 단위 테스트케이스 저장부(110)는 단위 테스팅에 사용되는 테스트 케이스를 계층구조로 가공하여 저장한다. 이는 단위 테스트 케이스에 대한 관리 효율을 높이고 편리함을 제공하기 위함이다.
단위 테스트 케이스를 계층구조로 저장하는 예는 도 2에 도시되어 있다. 도 2를 보면, 함수 커버리지(Function coverage), 반환 커버리지(Return coverage), 및 분기 커버리지(Branch coverage)를 포함한다. 예로 분기 커버리지는 단위 테스트 케이스 1 내지 4로 각각 구성되고, 반환 커버리지는 단위 테스트 케이스 1과 2, 단위 테스트 케이스 3과 4로 구성되고, 함수 커버리지는 이들 각각의 함수의 모든 단위 테스트 케이스로 구성된다. 이처럼 각 함수의 단위 테스트 케이스는 이를 만족시키는 테스트 커버리지를 가지고 있다. 또한 각각의 커버리지 간에는 계층적인 포함관계를 가진다. 다시 말하면 각 단위 테스트 케이스는 임의의 테스트 커버리지에 따라 재사용을 위해 계층적으로 저장되고 있는 것이다. 이와 같은 커버리지는 대응하는 커버리지를 달성하기 위한 테스트를 설계하고 테스트 케이스를 생성하기 위해 사용될 것이다. 물론 상기 커버리지 이외에 구문 커버리지(Statement coverage)나 조건 커버리지(Condition coverage) 등이 더 추가되어 계층적인 구조를 제공할 수도 있을 것이다.
통합 테스팅 정책에 따라 테스트 대상 함수를 검사하도록 단위 테스트 케이스 저장부(110)에서 해당하는 함수들의 단위 테스트 케이스를 선택하는 테스트 케이스 선택부(120)가 구성된다. 단위 테스트 케이스의 선택은 테스트 커버리지의 기준을 만족하는 범위 내에서 이루어진다. 그리고 단위 테스트 케이스가 선택되면 해당 함수의 내부 구조를 추상화할 수 있다. 예컨대, 하나의 상위 함수가 적어도 둘 이상의 하위 함수의 단위 테스트 케이스를 재사용하면 그 하위 함수의 내부 구조를 분석하지 않고서도 상위 함수를 테스트할 수 있게 되는 것이다. 한편 상기 추상화는 통합 테스팅의 정책에 따라 추상화 수준은 결정될 것이다.
테스트 케이스 선택부(120)에 의해 선택된 단위 테스트 케이스를 모두 수행하도록 테스트 케이스를 생성하는 테스트 케이스 생성부(130)가 구성된다. 테스트 케이스는 적어도 하나 이상이 될 수 있다. 즉 테스트할 모든 소프트웨어 모듈에 대하여 테스트 케이스를 생성할 수 있다.
테스트 케이스가 생성되면 이를 이용하여 테스트 대상 함수를 테스트하는 테스트 케이스 실행부(140)가 구성된다. 테스트 케이스 실행부(140)는 생성된 테스트 케이스에 따라 테스트를 수행하는 것으로, 이때 테스트 대상 함수에 포함된 다른 함수의 내부구조를 분석하지 않고 추상화 정보만을 이용하게 된다.
다음에는 본 발명에 따른 테스트 케이스 생성방법을 도 3을 참조하여 설명하기로 한다.
우선하여 테스트 대상 함수가 제공되어야 한다. 테스트 대상 함수의 예는 도 4를 참조하기로 한다.
도 4에 도시된 바와 같이 함수 A, 함수 B, 함수 C, 함수 D 및 함수 E가 제공되고, 그 중 테스트 대상 함수는 함수 A라고 가정한다. 이 경우 함수 A는 함수 B 내지 함수 E를 호출하는 상위 함수이고, 함수 B 내지 함수 E는 하위 함수가 된다. 물론 테스트 대상 함수가 D라고 한다면 함수 D는 함수 E를 호출하는 함수가 된다. 따라서 테스트 대상 함수 A를 테스트할 경우 함수 B 및 함수 C를 포함하는 테스트 케이스와 함수 D 및 함수 E를 포함하는 테스트 케이스를 생성할 수 있다. 실시 예에서는 함수 B 및 함수 C를 포함하는 함수 A를 테스트하는 것으로 설명하기로 할 것이다.
그리고 함수 B 내지 함수 E에는 각각 자신의 단위 테스트 케이스가 존재하고 있다. 이때 함수 B 내지 함수 E의 단위 테스트 케이스는 함수 A와 통합되기 이전에 이미 단위 테스팅을 통과한 단위 테스트가 된다. 이와 같은 각 함수에 대한 단위 테스트 케이스는 단위 테스트 케이스 저장부(110)에 저장된 상태이다(s100).
그와 같이 단위 테스트 케이스가 저장된 상태에서 함수 A에 대한 테스트 요청이 발생한다(s102).
함수 A에 대한 테스트 요청이 발생하면 테스트 케이스 선택부(120)는 테스트 케이스를 생성하기 위하여 하위 함수의 단위 테스트 케이스를 통합 테스팅 정책에 따라 선택해야 한다(s104). 이에 테스트 케이스 선택부(120)는 이미 단위 테스팅을 통과한 함수 B 및 함수 C의 단위 테스트 케이스를 재사용하도록 선택한다. 그러면 함수 B 및 함수 C의 내부구조를 추상화할 수 있게 된다. 즉 함수 B 및 함수 C의 단위 테스트 케이스는 자신의 함수 B 및 함수 C의 구조를 이미 반영하고 있기 때문이다. 이렇게 하면 테스트 대상인 함수 A가 호출하는 함수 B 및 함수 C의 모든 내부 구조를 분석하지 않고서도 테스트를 수행할 수 있게 된다.
함수에 대한 단위 테스트 케이스가 선택되면 테스트 케이스 생성부(130)는 함수 B 및 함수 C의 단위 테스트 케이스를 재사용하여 테스트 케이스를 생성한다(s106). 물론 여기서 테스트 대상 함수 A가 함수 D 및 함수 E와의 상호 작용을 테스트할 경우 함수 D 및 함수 E의 단위 테스트 케이스와 연동하는 테스트 케이스를 생성할 것이다. 즉 테스트 케이스는 테스트 대상 함수에 따라 각각 생성될 수 있다. 아울러 하나의 테스트 대상 함수에 대한 테스트 케이스도 하나 이상 생성될 수 있다. 이때 테스트 케이스의 테스트 커버리지는 각각 상이하게 제공된다.
이렇게 생성된 테스트 케이스는 테스트 케이스 실행부(140)로 전달되고, 테스트 케이스 실행부(140)는 생성된 테스트 케이스를 실행한다(s108). 그 수행 결과 함수 A가 함수 B 및 함수 C와의 상호 작용이 올바르게 수행되고 있는지 테스트할 수 있게 된다. 즉 함수들 간의 상호작용 간에 발생하는 오류를 검사하게 된다.
이때 테스트 케이스 실행부(140)는 하나 이상의 테스트 케이스 중에서 테스트 커버리지가 가장 높은 테스트 케이스를 이용하여 상기 테스트 대상 함수에 대한 테스트를 수행할 수도 있다.
이상에서 설명한 바와 같이, 본 발명의 실시 예에서는 통합 테스팅 단계에서 상위 함수는 하위 함수가 제공하는 단위 테스트 케이스를 재사용하여 테스트 케이스를 생성하고 이를 통해 함수들 상호 간의 상호 작용 오류를 검사하는 것임을 알 수 있다.
한편, 상술한 본 발명의 실시 예를 적용하면 테스트 커버리지 능력이 향상됨을 측정결과를 통해 확인할 수 있다. 즉 Randoop 방법, CodePro 방법 및 CoView 방법에서 단위 테스트케이스를 재사용하는 경우가 단위 테스트케이스를 재사용하지 않은 경우보다 대략 16% ~ 25% 향상되고 있다. 이의 측정 결과는 도 5에 도시하고 있다. 도 5에서 'A'는 본 실시 예의 테스트 방법이 미 적용된 상태이고 'B'는 본 실시 예의 테스트 방법이 적용된 상태를 나타낸다.
이상과 같이 본 발명의 도시된 실시 예를 참고하여 설명하고 있으나, 이는 예시적인 것들에 불과하며, 본 발명이 속하는 기술 분야의 통상의 지식을 가진자라면 본 발명의 요지 및 범위에 벗어나지 않으면서도 다양한 변형, 변경 및 균등한 타 실시 예들이 가능하다는 것을 명백하게 알 수 있을 것이다. 따라서 본 발명의 진정한 기술적 보호 범위는 첨부된 청구범위의 기술적인 사상에 의해 정해져야 할 것이다.
본 발명은 특정 소프트웨어에 대한 테스트를 수행하는 것에 한정되지 않고, 임베디드 소프트웨어를 포함한 대부분의 일반적인 소프트웨어에 적용되어 테스트를 수행하도록 적용될 수 있다.

Claims (12)

  1. 각 함수에 대한 단위 테스트 케이스를 계층구조로 저장하는 저장부;
    테스트 대상 함수가 제공되면 그 테스트 대상 함수에 의해 호출되는 하위 함수의 내부 구조를 추상화하도록 상기 하위 함수의 단위 테스트 케이스를 선별적으로 재사용하는 단위 테스트 케이스 선택부;
    상기 테스트 케이스 선택부에 의해 선택된 단위 테스트 케이스가 모두 수행되도록 적어도 하나의 테스트 케이스를 생성하는 테스트 케이스 생성부; 및
    상기 테스트 케이스를 실행하여 상기 테스트 대상 함수를 테스트하는 테스트 케이스 실행부를 포함하는 단위 테스트 케이스 재사용 기반의 함수 테스트 장치.
  2. 제 1 항에 있어서,
    상기 단위 테스트 케이스는,
    상기 테스트 대상 함수와 통합되기 전에 상기 하위 함수에 대한 단위 테스팅을 통과한 단위 테스트 케이스임을 특징으로 하는 단위 테스트 케이스 재사용 기반의 함수 테스트 장치.
  3. 제 1 항에 있어서,
    상기 내부 구조에 대한 추상화는 통합 테스팅 정책에 따라 추상화 수준이 결정됨을 특징으로 하는 단위 테스트 케이스 재사용 기반의 함수 테스트 장치.
  4. 테스트 대상 함수에 의해 호출되는 적어도 하나의 하위 함수의 단위 테스트 케이스를 재사용하여 테스트 케이스를 생성하는 생성부; 및
    상기 테스트 대상 함수를 테스트하는 테스트부를 포함하는 단위 테스트 케이스 재사용 기반의 함수 테스트 장치.
  5. 제 4 항에 있어서,
    상기 단위 테스트 케이스가 재사용되면 상기 하위 함수의 내부구조는 통합 테스팅 정책에 따라 추상화됨을 특징으로 하는 단위 테스트 케이스 재사용 기반의 함수 테스트 장치.
  6. 제 4 항에 있어서,
    상기 테스트 케이스 생성시에 재사용되는 단위 테스트 케이스는 상기 하위 함수의 단위 테스팅에 사용된 단위 테스트 케이스이고,
    상기 단위 테스트 케이스는 특정 커버리지를 제공하는 테스트 커버리지를 가지는 것을 특징으로 하는 단위 테스트 케이스 재사용 기반의 함수 테스트 장치.
  7. 제 6 항에 있어서,
    상기 테스트 커버리지는 계층적인 포함관계를 가지면서 구성됨을 특징으로 하는 단위 테스트 케이스 재사용 기반의 함수 테스트 장치.
  8. 테스트 대상 함수에 대한 테스트 요청이 발생하는 요청 발생단계;
    상기 테스트 요청에 따라 상기 테스트 대상 함수가 호출하는 적어도 하나의 하위 함수가 가지는 단위 테스트 케이스를 선택하는 단위 테스트 케이스 선택단계;
    상기 선택된 단위 테스트 케이스를 재사용하여 테스트 케이스를 생성하는 테스트 케이스 생성단계; 및
    상기 생성된 테스트 케이스를 실행하는 테스트 케이스 실행단계를 포함하는 단위 테스트 케이스 재사용 기반의 함수 테스트 방법.
  9. 제 8 항에 있어서,
    상기 요청 발생 단계 이전에, 상기 하위 함수에 대한 단위 테스트 케이스를 계층 구조로 저장하는 저장단계를 더 포함함을 특징으로 하는 단위 테스트 케이스 재사용 기반의 함수 테스트 방법.
  10. 제 8 항에 있어서,
    상기 단위 테스트 케이스 선택 단계에서 단위 테스트 케이스가 선택되면 상기 하위 함수의 내부구조가 추상화되는 것을 특징으로 하는 단위 테스트 케이스 재사용 기반의 함수 테스트 방법.
  11. 제 8 항에 있어서,
    상기 테스트 케이스 생성단계는, 적어도 하나 이상의 테스트 케이스를 생성하는 것을 특징으로 하는 단위 테스트 케이스 재사용 기반의 함수 테스트 방법.
  12. 제 11 항에 있어서,
    상기 테스트 케이스 실행단계는, 상기 적어도 하나 이상의 테스트 케이스 중에서 테스트 커버리지(Test coverage)가 가장 높은 테스트 케이스를 이용하여 상기 테스트 대상 함수에 대한 테스트를 수행하는 것을 특징으로 하는 단위 테스트 케이스 재사용 기반의 함수 테스트 방법.
PCT/KR2012/011087 2012-12-05 2012-12-18 단위 테스트 케이스 재사용 기반의 함수 테스트 장치 및 그 함수 테스트 방법 WO2014088144A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/123,297 US20150363296A1 (en) 2012-12-05 2012-12-18 Function test apparatus based on unit test cases reusing and function test method thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020120140573A KR101410099B1 (ko) 2012-12-05 2012-12-05 단위 테스트 케이스 재사용 기반의 함수 테스트 장치 및 그 함수 테스트 방법
KR10-2012-0140573 2012-12-05

Publications (1)

Publication Number Publication Date
WO2014088144A1 true WO2014088144A1 (ko) 2014-06-12

Family

ID=50883551

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2012/011087 WO2014088144A1 (ko) 2012-12-05 2012-12-18 단위 테스트 케이스 재사용 기반의 함수 테스트 장치 및 그 함수 테스트 방법

Country Status (3)

Country Link
US (1) US20150363296A1 (ko)
KR (1) KR101410099B1 (ko)
WO (1) WO2014088144A1 (ko)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260317A (zh) * 2015-11-19 2016-01-20 上海斐讯数据通信技术有限公司 一种测试用例的选取方法
CN106294138A (zh) * 2016-07-29 2017-01-04 东软集团股份有限公司 测试用例生成方法和装置
CN109871311A (zh) * 2017-12-04 2019-06-11 北京京东尚科信息技术有限公司 一种推荐测试用例的方法和装置

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9703690B2 (en) 2015-01-22 2017-07-11 International Business Machines Corporation Determining test case efficiency
CN104932975B (zh) * 2015-05-28 2018-01-09 浪潮(北京)电子信息产业有限公司 一种测试用例选择方法和装置
CN105302717A (zh) * 2015-09-30 2016-02-03 浪潮集团有限公司 一种大数据平台的检测方法及装置
CN105528292A (zh) * 2015-12-07 2016-04-27 浪潮(北京)电子信息产业有限公司 一种基于内核模块的内核单元测试方法及系统
CN105487982B (zh) * 2015-12-22 2018-01-16 艾体威尔电子技术(北京)有限公司 Api测试方法及系统
CN105760297B (zh) * 2016-02-02 2018-10-12 四川长虹电器股份有限公司 一种基于用户反馈的测试用例生成方法
CN106250314B (zh) * 2016-08-04 2019-05-28 合一网络技术(北京)有限公司 一种测试数据获取方法与系统
KR101935105B1 (ko) * 2016-11-15 2019-01-03 국방과학연구소 오류 모의 함수를 이용한 자동화 기반 강건성 검증 장치 및 방법
US11142345B2 (en) 2017-06-22 2021-10-12 Textron Innovations Inc. System and method for performing a test procedure
DE102017212612A1 (de) 2017-07-21 2019-01-24 Ford Global Technologies, Llc Verfahren zum automatischen Erzeugen von Tests für die Software eines Fahrzeugs
KR102452457B1 (ko) 2017-11-13 2022-10-12 현대자동차주식회사 테스트 케이스 관리 시스템 및 테스트 케이스 관리 방법
CN108984410A (zh) * 2018-07-18 2018-12-11 郑州云海信息技术有限公司 一种高复用的测试用例设计方法
CN109634866A (zh) * 2018-12-14 2019-04-16 泰康保险集团股份有限公司 数据测试方法、装置、介质及电子设备
US10802952B2 (en) * 2018-12-28 2020-10-13 Paypal, Inc. Streamlined creation of integration tests
CN110334022B (zh) * 2019-06-27 2023-03-28 上海电气泰雷兹交通自动化系统有限公司 适用于联锁自动化测试的生成冲突进路测试用例的方法
KR102544186B1 (ko) * 2020-12-22 2023-06-14 주식회사 국민은행 아레스 테스트 고도화 서비스 시스템 및 방법
KR102618391B1 (ko) * 2023-09-12 2023-12-27 주식회사 테스트웍스 호스트 가상화를 통한 임베디드 장치의 테스트 방법 및 이를 수행하는 컴퓨팅 장치

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004107087A2 (en) * 2003-05-29 2004-12-09 Flextronics Design Limited Generating test cases
KR20060050370A (ko) * 2004-09-29 2006-05-19 마이크로소프트 코포레이션 재생가능한 테스트 자동화를 위한 테스트 케이스 실행비해비어 선택 시스템 및 방법
KR100621574B1 (ko) * 1999-07-07 2006-09-12 삼성전자주식회사 내장 시스템 소프트웨어 테스팅을 위한 테스트 드라이버 생성시스템
KR20090104275A (ko) * 2008-03-31 2009-10-06 한국항공우주산업 주식회사 모듈 사이의 의존관계를 고려한 테스트 케이스를 생성하는방법 및 그 방법에 대한 프로그램을 저장한 기록매체
KR20120107193A (ko) * 2011-03-21 2012-10-02 엔에이치엔비즈니스플랫폼 주식회사 키워드에 기반하여 웹 서비스의 테스트를 자동적으로 수행하는 시스템 및 방법

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090006066A1 (en) * 2007-06-28 2009-01-01 Behm Michael L Method and System for Automatic Selection of Test Cases

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100621574B1 (ko) * 1999-07-07 2006-09-12 삼성전자주식회사 내장 시스템 소프트웨어 테스팅을 위한 테스트 드라이버 생성시스템
WO2004107087A2 (en) * 2003-05-29 2004-12-09 Flextronics Design Limited Generating test cases
KR20060050370A (ko) * 2004-09-29 2006-05-19 마이크로소프트 코포레이션 재생가능한 테스트 자동화를 위한 테스트 케이스 실행비해비어 선택 시스템 및 방법
KR20090104275A (ko) * 2008-03-31 2009-10-06 한국항공우주산업 주식회사 모듈 사이의 의존관계를 고려한 테스트 케이스를 생성하는방법 및 그 방법에 대한 프로그램을 저장한 기록매체
KR20120107193A (ko) * 2011-03-21 2012-10-02 엔에이치엔비즈니스플랫폼 주식회사 키워드에 기반하여 웹 서비스의 테스트를 자동적으로 수행하는 시스템 및 방법

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260317A (zh) * 2015-11-19 2016-01-20 上海斐讯数据通信技术有限公司 一种测试用例的选取方法
CN106294138A (zh) * 2016-07-29 2017-01-04 东软集团股份有限公司 测试用例生成方法和装置
CN109871311A (zh) * 2017-12-04 2019-06-11 北京京东尚科信息技术有限公司 一种推荐测试用例的方法和装置

Also Published As

Publication number Publication date
KR20140072726A (ko) 2014-06-13
US20150363296A1 (en) 2015-12-17
KR101410099B1 (ko) 2014-06-25

Similar Documents

Publication Publication Date Title
WO2014088144A1 (ko) 단위 테스트 케이스 재사용 기반의 함수 테스트 장치 및 그 함수 테스트 방법
White et al. A firewall concept for both control-flow and data-flow in regression integration testing
US6071316A (en) Automated validation and verification of computer software
US6023580A (en) Apparatus and method for testing computer systems
Lemos et al. Control and data flow structural testing criteria for aspect-oriented programs
Muşlu et al. Finding bugs by isolating unit tests
US7389495B2 (en) Framework to facilitate Java testing in a security constrained environment
CN102880546A (zh) 一种基于xml数据库的软件集成测试方法及系统
WO2014175637A1 (ko) 프로세서 검증을 위한 테스트 케이스 생성 장치 및 방법과, 검증장치
WO2013042802A1 (ko) 안드로이드 앱의 행위정보 동적분석 에뮬레이터 및 이를 포함하는 행위정보 동적분석 시스템, 그리고 안드로이드 앱의 행위정보 동적분석 프로그램이 기록된 컴퓨터 판독 가능한 기록매체
CN103389939A (zh) 一种针对堆可控分配漏洞的检测方法及系统
WO2016111525A1 (ko) 소스코드 이관제어 방법 및 이를 위한 컴퓨터 프로그램, 그 기록매체
CN105988798B (zh) 补丁处理方法及装置
WO2012153879A1 (ko) 예외처리 테스트 장치 및 방법
CN106628250A (zh) 一种jl9飞机功能模块化综合自动检测系统
US8959485B2 (en) Security protection domain-based testing framework
CN114168471A (zh) 测试方法、装置、电子设备及存储介质
WO2022124720A1 (ko) 운영체제 커널 메모리의 실시간 오류 검출 방법
CN103713995B (zh) 用于确定测试数据的方法和设备
CN206476130U (zh) 一种jl9飞机功能模块化综合自动检测系统
CN112256588A (zh) 应用程序测试的资源配置方法、计算机可读存储介质及测试机
Zhang et al. Verifying OSEK/VDX automotive applications: A Spin‐based model checking approach
CN108628620B (zh) Pos应用开发的实现方法、装置、计算机设备和存储介质
Saha et al. Finding resource-release omission faults in linux
CN109491839A (zh) 系统管理员权限复位测试方法、装置、终端及存储介质

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 14123297

Country of ref document: US

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12889497

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12889497

Country of ref document: EP

Kind code of ref document: A1