KR102016472B1 - Method and apparatus for measuring code coverage and computer readable recording medium having program the same - Google Patents

Method and apparatus for measuring code coverage and computer readable recording medium having program the same Download PDF

Info

Publication number
KR102016472B1
KR102016472B1 KR1020170026302A KR20170026302A KR102016472B1 KR 102016472 B1 KR102016472 B1 KR 102016472B1 KR 1020170026302 A KR1020170026302 A KR 1020170026302A KR 20170026302 A KR20170026302 A KR 20170026302A KR 102016472 B1 KR102016472 B1 KR 102016472B1
Authority
KR
South Korea
Prior art keywords
source code
function
code
information
coverage
Prior art date
Application number
KR1020170026302A
Other languages
Korean (ko)
Other versions
KR20180099192A (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 KR1020170026302A priority Critical patent/KR102016472B1/en
Publication of KR20180099192A publication Critical patent/KR20180099192A/en
Application granted granted Critical
Publication of KR102016472B1 publication Critical patent/KR102016472B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis

Abstract

본 발명의 코드 커버리지 측정 장치는 제 1 소스코드의 적어도 일 부분이 변경되어 생성된 변경 부분을 포함하는 제 2 소스코드를 취득하는 소스코드 취득부; 및 상기 변경 부분에 대한 제 2 테스트 수행으로 변경 커버리지 정보를 생성하는 소스코드 처리부를 포함하고, 상기 제 1 소스코드는 전체 커버리지 정보를 생성하기 위한 제 1 테스트 수행 대상인 코드 커버리지 측정 장치임을 특징으로 한다.Code coverage measuring apparatus of the present invention comprises: a source code acquisition unit for acquiring a second source code including a change portion generated by changing at least a portion of the first source code; And a source code processor configured to generate change coverage information by performing a second test on the changed part, wherein the first source code is a code coverage measuring device that is a first test target to generate full coverage information. .

Description

코드 커버리지 측정 방법 및 장치, 그리고 이를 실행하기 위한 프로그램을 기록한 컴퓨터로 판독가능한 기록매체{METHOD AND APPARATUS FOR MEASURING CODE COVERAGE AND COMPUTER READABLE RECORDING MEDIUM HAVING PROGRAM THE SAME}METHOD AND APPARATUS FOR MEASURING CODE COVERAGE AND COMPUTER READABLE RECORDING MEDIUM HAVING PROGRAM THE SAME}

본 발명은 코드 커버리지 측정 방법 및 장치, 그리고 이를 실행하기 위한 프로그램을 기록한 컴퓨터로 판독가능한 기록매체에 관한 것이다.The present invention relates to a method and apparatus for measuring code coverage and a computer readable recording medium having recorded thereon a program for executing the same.

종래에는 사용자가 프로그램 개발 과정에서, 개발중인 프로그램의 검증을 위해 작성된 소스 코드에 대한 테스트 수행 정도를 확인하는 과정이 수행되었다. In the related art, a process of checking a test performance of a source code written for verifying a program under development is performed by a user in a program development process.

그러나, 이러한 소스 코드에 대한 테스트 수행시, 반복되는 테스트 수행으로 많은 시간과 비용 낭비가 되는 단점이 있었다. 특히, 수정된 소스코드임에도 전체 소스코드를 반복하여 테스트 수행하는 경우, 이러한 문제점은 더욱 부각되었으며, 수정된 부분에 대해서만 테스트를 수행하는 필요성이 대두되고 있는 실정이다. However, when performing a test on such source code, there is a disadvantage that a lot of time and cost are wasted due to repeated test execution. In particular, even when the modified source code is repeatedly tested in the entire source code, this problem is more highlighted, and the need to perform the test only on the modified part is on the rise.

본 발명에 따른 코드 커버리지 측정 방법은, 변경된 소스 코드에 대한 테스트만 수행함으로서 코드 커버리지 측정 시간을 줄이도록 함을 목적으로 한다.Code coverage measurement method according to the present invention is to reduce the code coverage measurement time by performing a test only for the changed source code.

또한, 출력된 소스코드 정보나 커버리지 정보를 통신부를 통해 외부에 전송함으로서, 외부 사용자도 소스코드에 대한 테스트 수행이나 커버리지 측정을 실시간 모니터링 하고, 해당 결과를 쉽게 확인할 수 있도록 한다.In addition, by transmitting the output source code information or coverage information to the outside through the communication unit, the external user can monitor the test performance or the measurement of the source code in real time, and can easily check the result.

또한, 본 발명의 코드 커버리지 측정 장치(200)는 사용자의 개입 없이 커버리지를 자동으로 측정하여, 사용자는 테스트 수행에만 집중하도록 한다.In addition, the code coverage measuring apparatus 200 of the present invention automatically measures the coverage without the user's intervention, so that the user concentrates only on test execution.

그리고, 형상 관리 도구를 활용하여 효율적으로 테스트 수행을 함을 목적으로 한다.And, it aims to perform the test efficiently by using the configuration management tool.

본 발명에 따른 코드 커버리지 측정 장치는 제 1 소스코드의 적어도 일 부분이 변경되어 생성된 변경 부분을 포함하는 제 2 소스코드를 취득하는 소스코드 취득부 및 상기 변경 부분에 대한 제 2 테스트 수행으로 변경 커버리지 정보를 생성하는 소스코드 처리부; 를 포함하고, 상기 제 1 소스코드는 전체 커버리지 정보를 생성하기 위한 제 1 테스트 수행 대상인 코드 커버리지 측정 장치임을 특징으로 한다.The apparatus for measuring code coverage according to the present invention changes to a source code acquisition unit for acquiring a second source code including a change portion generated by changing at least one portion of the first source code, and performing a second test on the change portion. A source code processor for generating coverage information; And the first source code is a code coverage measurement device that is a first test target to generate full coverage information.

본 발명에 따른 코드 커버리지 측정 방법에 의하면, 코드 커버리지 테스트가 된 부분을 다시 테스트하지 않아도 되기 때문에, 소스 코드의 코드 커버리지 측정 시간을 줄일 수 있는 이점이 있다.According to the code coverage measurement method according to the present invention, since the code coverage test part does not need to be tested again, there is an advantage of reducing the code coverage measurement time of the source code.

또한, 출력된 소스코드 정보나 커버리지 정보를 통신부를 통해 외부에 전송함으로서, 외부 사용자도 소스코드에 대한 테스트 수행이나 커버리지 측정을 실시간 모니터링 하고, 해당 결과를 쉽게 확인할 수 있다. In addition, by transmitting the output source code information or coverage information to the outside through the communication unit, an external user can monitor the test performance or measurement of the source code in real time, and can easily check the result.

또한, 본 발명의 코드 커버리지 측정 장치(200)는 사용자의 개입 없이 커버리지를 자동으로 측정하여, 사용자는 테스트 수행에만 집중할 수 있게 된다.In addition, the code coverage measuring apparatus 200 of the present invention automatically measures the coverage without the user's intervention, so that the user can concentrate on only performing the test.

그리고, 형상 관리 도구를 활용하여 효율적으로 테스트 수행을 할 수 있게 된다.In addition, the configuration management tool can be used to perform the test efficiently.

도 1은 본 발명의 실시예에 따른 코드 커버리지 측정 장치(200)에서 구현되는 제 1 소스코드 및 제 2 소스코드에 대한 도면.
도 2는 본 발명의 실시예에 따른 코드 커버리지 측정 장치(200)의 블록도.
도 3은 본 발명의 일 실시예에 따른 코드 커버리지 측정 방법에 대한 순서도.
도 4 및 도 5는 본 발명의 실시예에 따른 전체 커버리지 정보와 변경 커버리지 정보를 설명하기 위한 도면.
도 6a는 반복 테스트 수행으로 인한 함수 커버리지 도출 결과를 도시한 도면.
도 6b는 사용자 인터페이스 환경에서, 소스 코드를 컴파일하여 응용 프로그램을 메이킹(making) 하기 위한 빌드(build) 과정을 통해 생성된 형상 모듈(610)에 대한 도면.
도 6c는 복수의 형상 모듈(610)을 포함하는 어플리케이션에 대한 테스트 수행 결과를 도시한 도면.
도 7은 코드 커버리지 측정 장치(200)의 외부 장치와의 데이터 송수신 시스템에 대한 도면.
1 is a view of the first source code and the second source code implemented in the code coverage measurement apparatus 200 according to an embodiment of the present invention.
2 is a block diagram of a code coverage measurement apparatus 200 according to an embodiment of the present invention.
3 is a flowchart of a method for measuring code coverage according to an embodiment of the present invention.
4 and 5 are diagrams for explaining the overall coverage information and the change coverage information according to an embodiment of the present invention.
FIG. 6A illustrates a result of function coverage derivation due to performing an iterative test. FIG.
6B is a diagram of a shape module 610 generated through a build process for compiling source code and making an application in a user interface environment.
FIG. 6C illustrates a test performance result for an application including a plurality of shape modules 610.
7 is a diagram of a data transmission / reception system with an external device of the code coverage measuring device 200.

이하, 본 발명의 바람직한 실시예의 상세한 설명이 첨부된 도면들을 참조하여 설명된다. 도면들 중 인용부호들 및 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 인용부호들로 표시됨을 유의해야 한다. 참고로 본 발명을 설명함에 있어서 관련된 공지 기능 혹은 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 이하 첨부된 도면을 참조하여 본 발명의 실시 형태에 따른 코드 커버리지 측정 방법을 설명한다.DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, detailed descriptions of preferred embodiments of the present invention will be described with reference to the accompanying drawings. It should be noted that reference numerals and like elements among the drawings are denoted by the same reference numerals as much as possible even if they are shown in different drawings. For reference, in the following description of the present invention, if it is determined that a detailed description of related known functions or configurations may unnecessarily obscure the subject matter of the present invention, the detailed description thereof will be omitted. Hereinafter, a method of measuring code coverage according to an embodiment of the present invention will be described with reference to the accompanying drawings.

도 1은 본 발명의 실시예에 따른 코드 커버리지 측정 장치(200)에서 수행되는 제 1 소스코드 및 제 2 소스코드에 대한 도면이다.1 is a diagram of a first source code and a second source code performed by the code coverage measuring apparatus 200 according to an embodiment of the present invention.

본 발명의 실시예에 따른 코드 커버리지 측정 장치(200)는 코드 커버리지(code coverage)를 측정하기 위한 LDRA, VectorCAST, CodeScroll Controller Tester 등의 프로그램이 설치된 장치이다. 또한, 코드 커버리지 측정 장치(200)는 소정의 운영체제에 의해 구동되고, 소프트웨어의 설치 및 편집이 가능한 장치로서, 소정의 프로그램 모듈 또는 하드웨어들을 포함한다. 메모리부를 구비하고 마이크로 프로세서를 탑재하여 연산 능력을 갖춘 기기라면 얼마든지 본 발명의 실시예에 따른 코드 커버리지 측정 장치(200)로서 이용될 수 있다.Code coverage measurement apparatus 200 according to an embodiment of the present invention is a device installed with a program such as LDRA, VectorCAST, CodeScroll Controller Tester for measuring code coverage (code coverage). In addition, the code coverage measuring apparatus 200 is a device which is driven by a predetermined operating system and which can install and edit software, and includes predetermined program modules or hardware. Any device having a memory unit and a microprocessor can be used as the code coverage measuring apparatus 200 according to an exemplary embodiment of the present invention.

코드 커버리지(code coverage)는 소프트웨어의 테스트를 논할 때 얼마나 테스트가 충분한가를 나타내는 지표중 하나이다. 즉, 소프트웨어 테스트를 진행했을 때 코드 자체가 얼마나 실행되었냐는 것이다. 따라서, 테스트 진행 결과, 실행 부분과 미실행 부분을 포함할 수 있으며, 전체 코드 중에 실행 부분을 코드 커버리지로 정의한다. 특히, 본 발명의 실시예에 따를 경우, 코드 커버리지는 코드 전체에 대한 실행 비율 정보인 전체 커버리지 정보와 변경 부분에 대한 실행 비율 정보인 변경 커버리지 정보를 포함할 수 있다.Code coverage is one of the indicators of how good a test is when discussing a test of software. In other words, how much of the code itself was executed when testing software. Therefore, as a result of the test, the execution part and the non-execution part may be included, and the execution part of the entire code is defined as code coverage. In particular, according to an embodiment of the present invention, the code coverage may include full coverage information, which is execution rate information for the entire code, and change coverage information, which is execution rate information for the changed part.

도 1에 도시한 제 1 소스코드는 전체 커버리지 정보를 도출하기 위한 최초 테스트 수행 대상이고, 제 2 소스코드는 제 1 소스코드에서 변경된 변경 부분을 기반으로 변경 커버리지 정보를 도출하기 위한 재 테스트 수행 대상이 되는 코드일 수 있다. 여기서, 제 1 소스코드는 적어도 하나의 함수를 포함하고, 이 중 일부의 함수는(함수 c, 함수 d) 변경되어 변경 부분을 생성하고, 제 2 소스코드는 변경 부분을 포함한다. 도 1에 도시한 제 1 함수는 제 1 소스코드의 일부분을 구성하여 수정이 가능한 대상 함수이고, 제 2 함수는 제 1 함수에 추가된 별도의 함수이거나 제 1 함수의 적어도 일부가 변경된 함수일 수 있다. The first source code shown in FIG. 1 is an initial test target for deriving entire coverage information, and the second source code is a target for retesting for deriving change coverage information based on a changed portion of the first source code. May be code. Here, the first source code includes at least one function, and some of the functions (function c, function d) are changed to generate a change part, and the second source code includes the change part. The first function illustrated in FIG. 1 is a target function that can be modified by forming a part of the first source code, and the second function may be a separate function added to the first function or a function in which at least a part of the first function is changed. .

이러한 제 1 소스코드에 대해 최초로 테스트를 수행하여 전체 커버리지 정보를 도출할 수 있고, 제 2 소스코드에 대해 테스트를 다시 수행하여 변경 커버리지 정보를 도출할 수 있다. The entire coverage information may be derived by first performing a test on the first source code, and the change coverage information may be derived by performing a test on the second source code again.

도 2는 본 발명의 실시예에 따른 코드 커버리지 측정 장치(200)의 블록도이다.2 is a block diagram of a code coverage measurement apparatus 200 according to an embodiment of the present invention.

본 발명의 실시예에 따른 코드 커버리지 측정 장치(200)는 소스코드 취득부(210), 소스코드 판독부(220) 및 소스코드 처리부(230)를 포함할 수 있다.Code coverage measurement apparatus 200 according to an embodiment of the present invention may include a source code acquisition unit 210, a source code reading unit 220 and a source code processing unit 230.

소스코드 취득부(210)는 제 1 소스코드의 적어도 일 부분이 변경되어 생성된 변경 부분을 포함하는 제 2 소스코드를 취득한다. 여기서, 제 1 소스코드는 전체 커버리지 정보를 도출하기 위한 제 1 테스트 수행 대상이고, 제 2 소스코드는 제 1 소스코드에서 변경된 변경 부분을 기반으로 변경 커버리지 정보를 도출하기 위한 제 2 테스트 수행 대상이 되는 코드일 수 있다.The source code acquisition unit 210 acquires a second source code including a change portion generated by changing at least one portion of the first source code. Here, the first source code is a first test target for deriving total coverage information, and the second source code is a second test target for deriving change coverage information based on a changed part in the first source code. May be code.

소스코드 판독부(220)는 제 1 소스코드와 제 2 소스코드를 비교하여, 제 2 소스코드의 변경 부분을 판독한다. 구체적으로, 제 1 소스코드에 포함되는 적어도 하나의 함수와 제 2 소스코드에 포함되는 적어도 하나의 함수를 비교하여 변경 부분의 생성을 판독할 수 있다.The source code reading unit 220 compares the first source code with the second source code, and reads the changed portion of the second source code. Specifically, the generation of the changed part may be read by comparing at least one function included in the first source code with at least one function included in the second source code.

소스코드 처리부(230)는 제 2 소스코드가 변경 부분을 포함한 것으로 판단한 경우, 변경 부분에 대해 테스트를 수행하여 변경 커버리지 정보를 생성한다.When the source code processor 230 determines that the second source code includes the changed part, the source code processor 230 performs the test on the changed part to generate the change coverage information.

도 3은 본 발명의 일 실시예에 따른 코드 커버리지 측정 방법에 대한 순서도이다. 3 is a flowchart illustrating a code coverage measurement method according to an embodiment of the present invention.

도 3에 도시한 바와 같이, 본 발명의 일 실시예에 따른 소스코드 취득부(210)는 제 2 소스코드를 취득할 수 있다(S301). 본 발명의 제 2 소스코드는 제 1 소스코드의 적어도 일 부분이 변경되어 생성된 변경 부분을 포함할 수 있다.As shown in FIG. 3, the source code acquisition unit 210 according to an embodiment of the present invention may acquire a second source code (S301). The second source code of the present invention may include a change portion generated by changing at least one portion of the first source code.

본 발명의 실시예에 따라, 제 1 소스코드는 전체 커버리지 정보를 도출하기 위한 제 1 테스트 수행 대상이고, 제 2 소스코드는 제 1 소스코드에서 변경된 변경 부분을 기반으로 변경 커버리지 정보를 도출하기 위한 제 2 테스트 수행 대상이 되는 코드일 수 있다. 이 때, 제 1 소스코드는 제 1 테스트를 최초로 수행(기 테스트 수행)한 코드이거나 제 1 테스트 수행을 거치지 않은 코드일 수 있으며, 제 1 소스코드의 테스트 수행 여부에 따른 전체/변경 커버리지 정보 생성에 대해서는 도 3에서 후술한다. 이 때, 제 1 테스트는 제 1 소스코드에 대한 테스트로 정의하고, 제 2 테스트는 제 2 소스코드에 대한 테스트로 정의할 수 있다.According to an exemplary embodiment of the present invention, the first source code is a first test target for deriving total coverage information, and the second source code is for deriving change coverage information based on a changed part of the first source code. It may be a code to be subjected to the second test. In this case, the first source code may be a code that first performs a first test (preliminary test) or a code that has not undergone the first test, and generates full / change coverage information according to whether the first source code is tested. This will be described later with reference to FIG. 3. In this case, the first test may be defined as a test for the first source code, and the second test may be defined as a test for the second source code.

한편, 본 발명의 제 1 소스코드는 테스트 수행을 위해 코드 커버리지 측정 장치(200)가 취득한 코드로서, 코드 커버리지 측정 장치(200)에 기 저장된 코드이거나 외부 장치(710, 720)로부터 취득한 코드일 수 있다. 예를 들어, 본 발명의 실시예에 따른 제 1 외부 장치(710)는 형상 관리 도구를 동작시키기 위한 장치로서 서버 또는 단말(ex> pc 또는 스마트폰, 태블릿 pc등의 모바일 단말)포함할 수 있고, 제 2 외부 장치(720)는 제 1 소스코드를 변경하기 위한 장치로 개발자 PC, 모바일 단말등을 포함할 수 있다. 따라서, 제 1 소스코드는 제 1 외부 장치(710)에서 취득하여 제 2 외부 장치(720)를 통해 변경되거나, 제 2 외부 장치(720)에서 취득하여 변경될 수도 있다. 이에 대한 자세한 설명은 도 7에서 후술한다.Meanwhile, the first source code of the present invention is a code acquired by the code coverage measuring apparatus 200 to perform a test, and may be a code previously stored in the code coverage measuring apparatus 200 or a code acquired from external devices 710 and 720. have. For example, the first external device 710 according to the embodiment of the present invention may include a server or a terminal (eg, a mobile terminal such as a pc or a smartphone or a tablet pc) as an apparatus for operating a shape management tool. The second external device 720 may be a device for changing the first source code, and may include a developer PC and a mobile terminal. Accordingly, the first source code may be acquired by the first external device 710 and changed through the second external device 720, or may be acquired and changed by the second external device 720. A detailed description thereof will be described later with reference to FIG. 7.

한편, 제 2 소스코드는 제 1 소스코드의 적어도 일 부분이 변경되어 생성된 변경 부분을 포함하는 것으로서, 본 발명의 실시예에 따른 소스코드 판독부(220)는 제 1 소스코드에 포함되는 적어도 하나의 함수와 제 2 소스코드에 포함되는 적어도 하나의 함수를 비교하여 변경 부분의 생성을 판독할 수 있다.(S302, S303) 예를 들어, 제 1 소스코드에 포함되는 함수와 제 2 소스코드에 포함되는 함수를 각각 일대일 대응하여 비교할 수 있으며, 이 때, 각 함수의 시그니처(signiture)(함수명, 파라미터의 타입, 순서 등)를 참조하여 제 2 소스코드에 변경 부분이 생성되었는지 여부를 판독할 수 있다. 즉, 제 2함수의 함수명과 제 1함수의 함수명을 각각 일대일 비교하여 변경 부분의 생성을 판단할 수 있다.On the other hand, the second source code includes a change portion generated by changing at least a portion of the first source code, the source code reading unit 220 according to an embodiment of the present invention is at least included in the first source code The generation of the changed part may be read by comparing one function with at least one function included in the second source code. (S302, S303) For example, the function included in the first source code and the second source code may be read. The functions included in each function can be compared in a one-to-one correspondence, and the signature (function name, parameter type, order, etc.) of each function can be read to determine whether a change portion is generated in the second source code. Can be. That is, the generation of the changed part may be determined by comparing the function name of the second function and the function name of the first function one by one.

이 때, 도 1에 도시한 제 1 소스코드의 적어도 일 부분에 포함되는 제 1 함수의 일부가 변경(C->C')된 제 2 함수가 생성되거나, 제 1 함수 이외에 새로운 별개의 제 2 함수(E)가 생성된 경우, 소스코드 판독부(220)는 이러한 변경(C') 또는 추가된 함수(E)로써, 제 2 테스트 수행 대상이 되는 제 2 소스코드에 변경 부분이 생성된 것으로 판단할 수 있다. At this time, a second function in which a part of the first function included in at least a portion of the first source code illustrated in FIG. 1 is changed (C-> C ') is generated, or a new separate second in addition to the first function. If the function (E) is generated, the source code reading unit 220 is a change (C ') or added to the function (E), the change portion is generated in the second source code to be subjected to the second test You can judge.

예를 들어, 도 4에 도시한 바와 같이 도 4a의 제 1 소스코드의 적어도 일 부분이 변경되어 도 4b와 같은 변경 부분이 생성된 경우, 소스코드 판독부(220)는 도 4b의 함수 foo()와 도 4a의 함수 foo()를 상호 비교하여 일부 소스코드의 변경을 판단할 수 있고, 이로서 변경 부분의 생성을 판단할 수 있다. 마찬가지로, 소스코드 판독부(220)는 도 4b의 함수 hoo()와 도 4a의 소스코드를 비교하여 새로운 함수 hoo()가 추가된 것으로, 변경 부분의 생성을 판단할 수 있다.For example, as shown in FIG. 4, when at least a portion of the first source code of FIG. 4A is changed to generate a changed portion as shown in FIG. 4B, the source code reading unit 220 may perform the function foo (FIG. 4B). ) And the function foo () of FIG. 4A can be compared with each other to determine the change of some source code, thereby determining the generation of the change part. Similarly, the source code reading unit 220 compares the function hoo () of FIG. 4B with the source code of FIG. 4A and adds a new function hoo (), and may determine the generation of the changed part.

소스코드 판독부(220)의 판단 결과, 제 2 소스코드가 변경 부분을 포함한 것으로 판단한 경우, 소스코드 처리부(230)는 변경 부분에 대해 테스트를 수행할 수 있다.(S304) 이 때, 본 발명의 일 실시예에 따라 변경 부분에 대해서만 테스트를 수행하고, 변경되지 않은 나머지 코드 부분에 대해서는 별도의 추가적인 테스트를 수행하지 않을 수 있다. 또한, 소스코드 처리부(230)는 제 2 소스코드의 변경 부분에 대한 테스트 수행시, 변경 부분에 문법적 오류가 있는지 판단할 수 있다. 예를 들어, 변경된 소스 코드상에 포함된 콜론 및 세미콜론 등의 문장 부호를 확인함으로써 변경 부분에 대한 문법적 오류를 확인하고, 문법적 오류가 없는 경우, 테스트 수행이 계속 진행되도록 할 수 있다.As a result of the determination by the source code reading unit 220, when it is determined that the second source code includes the changed part, the source code processing unit 230 may perform a test on the changed part (S304). According to an embodiment of the present invention, the test may be performed only on the changed part, and the additional test may not be performed on the remaining unchanged code part. In addition, the source code processor 230 may determine whether there is a grammatical error in the changed part when performing a test on the changed part of the second source code. For example, by checking the punctuation marks, such as colon and semicolon included in the changed source code, the grammatical error of the changed part can be checked, and if there is no grammatical error, the test execution can be continued.

또한, 변경 부분에 대한 테스트 수행시, 커버리지 정보를 도출하기 위해 소스 코드를 가상 머신상에서 실시간으로 실행시킬 수도 있다. 이러한 가상 머신(virtual machine)은 소스 코드가 포함된 프로그램의 언어(ex, c, c++, java 등)에 적합한 가상 머신이 사용될 수도 있다. 그리고, 이러한 가상 머신에서 실행한 결과를 웹(web)상에서 출력하여 사용자에게 제공할 수도 있다.In addition, when testing a change part, source code may be executed in real time on a virtual machine to derive coverage information. Such a virtual machine may be a virtual machine suitable for a language (eg, c, c ++, java, etc.) of a program including source code. In addition, the result of the execution of the virtual machine may be output on the web and provided to the user.

본 발명의 일 실시예의 경우, 변경 부분에 대해서만 테스트 수행을 진행함으로서, 불필요한 테스트 수행으로 인한 번거로움을 줄일 수 있고, 테스트 수행에 필요한 비용을 절감할 수 있게 된다.In the case of one embodiment of the present invention, by performing the test only for the changed part, it is possible to reduce the inconvenience caused by unnecessary test execution, it is possible to reduce the cost required to perform the test.

한편, 이러한 변경 부분에 대한 테스트 수행으로 소스코드 처리부(230)는 변경 커버리지 정보를 생성할 수 있다(S305). 본 발명의 실시예에 따른 변경 커버리지 정보는 변경 함수 정보 또는 변경 라인 정보를 포함할 수 있으며, 변경 함수 정보는 제 2 함수의 실행 비율 정보일 수 있고, 변경 라인 정보는 제 2 함수에 포함되는 코딩 라인의 실행 비율 정보일 수 있다. 이 때, 함수(function)는 c, c++, JAVA등의 프로그래밍 언어를 구성하여 소스코드의 기능을 정의하기 위한 모둘(module)로서, 도 5에 도시한 바와 같이 void calculateEngryBlockNumerator, void calculateEmptyBlock, void nextCodeBlockNumerator 와 같은 모듈로 정의할 수 있다. 또한, 코딩 라인은 이러한 각 함수에 포함되는 소스코드의 스트링 단위로서, 파서(parser)에 의해 각 스트링이 해석될 수 있으며, 도 5에 도시한 134 내지 184는 각각 스트링 단위로 코딩 라인으로 정의할 수 있다. Meanwhile, the source code processor 230 may generate change coverage information by performing a test on the changed portion (S305). The change coverage information according to an embodiment of the present invention may include change function information or change line information, the change function information may be execution ratio information of a second function, and the change line information is included in the second function. It may be execution rate information of a line. In this case, a function is a module for defining a function of source code by configuring a programming language such as c, c ++, JAVA, and the like. As shown in FIG. Can be defined as the same module. In addition, the coding line is a string unit of the source code included in each of these functions, and each string may be interpreted by a parser, and 134 to 184 illustrated in FIG. 5 may be defined as coding lines in string units. Can be.

전술한 변경 함수 정보는 제 2 함수의 실행 비율 정보로서, 제 2 함수의 실행 비율 정보는 테스트 수행으로 제 2 함수의 전체 개수 중에 실제 실행된 제 2 함수의 개수 정보를 의미할 수 있다. 또한, 변경 라인 정보는 제 2 함수에 포함되는 코딩 라인의 실행 비율 정보로서, 코딩 라인의 실행 비율에 대한 정보는 테스트 수행으로 제 2 함수를 구성하는 코딩 라인들 중에 실제 실행된 라인들 정보를 의미할 수 있다. 즉, 테스트가 수행되는 경우, 테스트 대상이 되는 소스코드 전부가 실행되지 않을 수 있어, 변경 커버리지 정보를 통해 변경 정보 중 실제 실행된 소스코드에 대한 정보를 확인할 수 있다.The above-described change function information is information on the execution ratio of the second function, and information on the execution ratio of the second function may mean information on the number of the second functions actually executed among the total number of the second functions by performing the test. In addition, the change line information is execution rate information of the coding line included in the second function, and the information about the execution rate of the coding line means information of lines actually executed among the coding lines constituting the second function by performing a test. can do. That is, when the test is performed, all of the source codes to be tested may not be executed, and the information on the actual executed source code among the change information may be confirmed through the change coverage information.

예를 들어, 도 5는 변경 부분을 포함하는 제 2 소스코드로서, void calculateEmptyBlock 함수가 제 2 함수임을 예시한다. 도 5a에서 테스트 수행으로 제 2 함수인 void calculateEmptyBlock 함수가 모두 실행되어, 도 5b에서 변경 함수 정보(변경 함수 커버리지)는 100%를 나타낼 수 있다. 도 5b는 본 발명의 실시예에 따른 커버리지 정보에 대한 예시로, 도 5a의 제 2 함수에 포함되는 코딩 라인(149 내지 166)의 전체 개수 중에 실제 실행된 라인들을 변경 라인 정보(변경 라인 커버리지)로 72.73%로 나타낼 수 있다. 좀더 구체적으로, 제 2 함수에 포함되는 코딩 라인(149 내지 166) 은 테스트 대상이 되는 영역과 테스트 대상이 되지 않는 empty 영역을 포함하며, 코딩 라인 17 개중에 empty 영역인 6개를 제외한 11개가 테스트 대상이 되고, 이중 비실행 라인 3개를 제외한 실제 실행된 라인인 8개에 대한 비율인 72.73%가 도출될 수 있다.For example, FIG. 5 is a second source code including a change part, and illustrates that the void calculateEmptyBlock function is a second function. In the test performed in FIG. 5A, all of the second function, calculate calculateEmptyBlock, is executed. In FIG. 5B, the change function information (change function coverage) may represent 100%. FIG. 5B is an example of coverage information according to an embodiment of the present invention. In FIG. 5A, lines actually executed among the total number of coding lines 149 to 166 included in the second function of FIG. 5A are changed line information (change line coverage). 72.73%. More specifically, the coding lines 149 to 166 included in the second function include an area to be tested and an empty area not to be tested, and 11 of the 17 coding lines except for 6, which are empty areas, are tested. A target, 72.73%, can be derived for eight of the actual executed lines except three of the non-executed lines.

또한, 도 5b는 제 2 소스코드가 변경 부분을 포함하지 않은 경우, 제 1 소스코드에 대한 전체 커버리지 정보에 포함되는 복수의 정보의 예들을 도시한다.5B also shows examples of a plurality of pieces of information included in the overall coverage information for the first source code when the second source code does not include the change portion.

예를 들어, 함수 커버리지는 제 1 소스코드에 포함되는 전체 함수 중 실행 함수의 비율을 나타내고, 라인 커버리지는 전체 함수에 포함되는 코딩 라인중 실행된 라인의 비율을 나타낼 수 있다. 또한, 구문(statement) 커버리지는 ";" 으로 구획되어 정의되는 전체 구문 중 실행 구문의 비율을 나타내고, 조건(condition) 커버리지는 IF, WHILE, FOR, SWITCH 등의 조건으로 구획되어 정의되는 전체 조건문 중에 실행된 조건문의 비율을 나타낼 수 있다. 그밖에, 함수 호출 커버리지는 호출 주체가 되는 함수 중 실행 함수의 비율을 나타내고, 엔트리 커버리지는 호출 대상이 되는, 즉 피호출 함수 중 실행 함수의 비율을 나타낼 수 있다. For example, the function coverage may indicate the ratio of the execution function among the total functions included in the first source code, and the line coverage may indicate the ratio of the executed line among the coding lines included in the entire function. Also, statement coverage is ";" The condition coverage may represent the ratio of execution statements among all statements defined and separated, and the condition coverage may represent the ratio of condition statements executed among all condition statements defined and defined by conditions such as IF, WHILE, FOR, and SWITCH. In addition, the function call coverage may indicate the ratio of the execution function among the functions which are the call subjects, and the entry coverage may indicate the ratio of the execution function among the called functions, that is, the called function.

그리고, 이러한 제 2 소스코드 및 변경 커버리지 정보는 도 5a와 도 5b에 도시한 바와 같은 형태로 웹(web)상에 출력될 수 있다(S306). 본 발명의 코드 커버리지 측정 장치(200)는, 출력된 소스코드 정보나 커버리지 정보를 유/무선 네트워크가 연결된 경우, 통신부(미도시)를 통해 외부에 전송할 수 있다. 이로서, 외부 사용자도 소스코드에 대한 테스트 수행이나 커버리지 측정을 실시간 모니터링 함으로써 해당 결과를 쉽게 확인할 수 있다. The second source code and the change coverage information may be output on the web in the form as shown in FIGS. 5A and 5B (S306). The code coverage measurement apparatus 200 of the present invention may transmit the output source code information or coverage information to the outside through a communication unit (not shown) when the wired / wireless network is connected. This allows external users to easily verify the results by monitoring the source code and performing real-time monitoring of coverage measurements.

한편, 소스코드 판독부(220)가 제 1 소스코드에 포함되는 적어도 하나의 함수와 제 2 소스코드에 포함되는 적어도 하나의 함수를 비교하여 변경 부분의 생성을 판독한 결과, 변경 부분이 생성되지 않은 것으로 판단한 경우, 소스코드 처리부(230)는 제 1 소스코드의 기 테스트 수행 여부에 따라 전체 커버리지 정보를 불러오거나 신규 테스트 수행으로 전체 커버리지 정보를 출력할 수 있다. 즉, 제 1 소스코드가 이미 테스트를 수행한 코드인 경우, 메모리부(미도시)에 저장된 전체 커버리지 정보를 불러올 수 있다(S307, S308). 이 경우, 전체 커버리지 정보는 제 1 소스코드의 전체 코드중 실행 코드의 비율을 나타내는 정보로서, 도 5B의 전체 커버리지 정보에 포함되는 복수의 정보들을 의미한다. 반면, 제 1 소스코드가 테스트를 수행하지 않은 코드인 경우, 제 1 소스코드에 대한 신규 테스트를 수행하여 새로운 전체 커버리지 정보를 생성할 수 있다.(S310, S311) 전술한 두 경우에 있어, 코드 커버리지 측정 장치(200)는 제 1 소스코드와 도 5B와 같은 전체 커버리지 정보를 웹(web)상에 출력할 수 있다(S309).On the other hand, when the source code reading unit 220 compares at least one function included in the first source code with at least one function included in the second source code, and reads the generation of the changed part, the changed part is not generated. If not, the source code processor 230 may read the entire coverage information or output the entire coverage information by performing a new test according to whether or not the first source code has been previously tested. That is, when the first source code is a code that has already been tested, the entire coverage information stored in the memory unit (not shown) may be loaded (S307 and S308). In this case, the total coverage information is information representing a ratio of the execution code among the entire code of the first source code, and means a plurality of pieces of information included in the entire coverage information of FIG. 5B. On the other hand, when the first source code is a code that has not been tested, new full coverage information may be generated by performing a new test on the first source code. (S310, S311) In the above two cases, the code The coverage measurement apparatus 200 may output the first source code and the entire coverage information as illustrated in FIG. 5B on the web (S309).

이 때, 소스코드 처리부(230)는 복수의 테스트 진행으로 복수의 전체 커버리지 정보를 생성할 수 있다. 예를 들어, 도 6a에 도시한 바와 같이, 1차 테스트 수행으로 40%의 함수 커버리지 (A,B,C,D,E 는 각각 함수를 정의한다, 5개중 A,E 실행) 정보를 도출할 수 있고, 2차 및 3차 테스트 수행으로 각각 60%의 함수 커버리지 정보를 도출할 수 있으며, 각 함수 커버리지 정보는 누적되어 메모리부에 저장될 수 있다. 또한, 모든 함수가 실행된 경우, 최종 함수 커버리지 정보(100%)로 저장될 수 있다. 추가적으로, 위에서 언급한 1차 테스트, 2차 테스트, 3차 테스트는 전술한 본원 발명의 제 1 테스트에 포함될 수 있다. In this case, the source code processor 230 may generate a plurality of total coverage information through a plurality of test processes. For example, as shown in FIG. 6A, 40% of the functional coverage (A, B, C, D, and E define functions, respectively, A and E execution of 5) can be derived by performing the first test. The function coverage information of 60% may be derived by performing second and third order tests, respectively, and the respective function coverage information may be accumulated and stored in the memory unit. In addition, when all functions are executed, it may be stored as final function coverage information (100%). In addition, the first test, the second test, and the third test mentioned above may be included in the first test of the present invention described above.

이러한 누적된 각 함수 커버리지 정보는 메모리부에 별도로 저장되어, 코드 커버리지 측정 장치(200)는 언제든지 기 저장된 함수 커버리지 정보를 불러올 수 있다. 즉, 3차 테스트가 수행된 이후에도, 소스코드를 초기화한 후에 기 저장된 1차 테스트 수행 결과인 전체 커버리지 정보를 불러올 수 있다.The accumulated function coverage information is stored separately in the memory unit, so that the code coverage measuring apparatus 200 may recall the stored function coverage information at any time. That is, even after the third test is performed, the entire coverage information, which is the result of performing the pre-stored first test, may be loaded after initializing the source code.

또한, 이러한 누적이 사용자 개입 없이 코드 커버리지 측정 장치(200)에 의해 자동으로 이루어져, 사용자는 테스트 수행에만 집중할 수 있게 된다.In addition, this accumulation is automatically performed by the code coverage measurement apparatus 200 without user intervention, so that the user can concentrate on performing the test.

지금까지는 변경 커버리지 정보와 전체 커버리지 정보의 생성 및 출력에 대해 기술하였다. 이하에서는, 생성된 커버리지 정보들을 활용한 예를 기술하고자 한다. 도 6b는 사용자 인터페이스 환경에서, 소스 코드를 컴파일하여 어플리케이션을 메이킹(making) 하기 위한 빌드(build) 과정을 통해 생성된 형상 모듈(610)에 대한 도면으로서, 계좌 이체 환경에서 구동되는 어플리케이션의 예를 도시하였다. So far, the generation and output of change coverage information and full coverage information have been described. Hereinafter, an example of using the generated coverage information will be described. FIG. 6B is a diagram of a configuration module 610 generated through a build process for compiling source code and making an application in a user interface environment, and illustrates an example of an application running in an account transfer environment. Shown.

도 6b에 도시한 바와 같이, 제 1 어플리케이션(이체 기존 서비스 목록)은 각 형상 모듈(610)을 포함하고, 각 형상 모듈(610)은 적어도 하나의 함수를 포함할 수 있다. 각 형상 모듈(610)은 테스트 수행으로 100% 전체 함수가 실행되어 전체 커버리지 정보 100%를 나타낸다. 이 때, 소스 코드 변경으로 새로운 어플리케이션을 생성하게 되고, 새롭게 형성된 제 2 어플리케이션(이체 신규 서비스 목록) 은 제 1 형상 모듈(620) 및 제 2 형상 모듈(630)을 포함할 수 있다. 제 1 형상 모듈(620)은 별도의 테스트 수행이 필요하지 않으며, 제 2 형상 모듈(630)은 프로그램 재 테스트 대상이 되는 소스 코드 변경 부분을 포함함으로서, 별도의 테스트 수행이 필요하게 된다. 특히, 도 6b의 경우에는, 제 2 형상 모듈(630)이 기존 형상 모듈의 변경으로 생성된 경우를 예시하거나, 새로운 형상 모듈(630)이 생성된 경우를 예시한다. 구체적으로, 간편 이체 형상 모듈(630)은 50%의 코드 변경 부분이 발생하여, 50%에 대해서만 테스트를 진행하고, 종합 이체 형상 모듈(630)은 새롭게 형성된 모듈로서, 전체 소스 코드에 대한 테스트를 수행하게 된다. As shown in FIG. 6B, the first application (transfer existing service list) may include each shape module 610, and each shape module 610 may include at least one function. Each shape module 610 executes a test to perform 100% total function to represent 100% of total coverage information. At this time, a new application is generated by changing the source code, and the newly formed second application (transfer new service list) may include the first shape module 620 and the second shape module 630. The first shape module 620 does not need to perform a separate test, and the second shape module 630 includes a source code change part to be retested, thereby requiring a separate test. In particular, in the case of FIG. 6B, a case in which the second shape module 630 is generated by a change of an existing shape module is illustrated, or a case in which a new shape module 630 is generated is illustrated. Specifically, the simple variant shape module 630 generates a 50% code change portion, and tests only about 50%, and the comprehensive variant shape module 630 is a newly formed module. Will be performed.

한편, 형상 모듈들을 포함하는 각 어플리케이션 정보 및 코드 커버리지 정보는 메모리부에 별도로 저장되어, 코드 커버리지 측정 장치(200)는 언제든지 기 저장된 코드 커버리지 정보를 불러올 수 있다.Meanwhile, each application information and code coverage information including the shape modules are separately stored in the memory unit, so that the code coverage measurement apparatus 200 may recall the pre-stored code coverage information at any time.

도 6c에 도시한 바와 같이, 복수의 형상 모듈(610)을 포함하는 제 1 어플리케이션(version 1)에 대한 테스트 수행으로 100% 전체 함수가 실행되어 전체 커버리지 정보 100%를 도출한 상태에서, 전체 커버리지 정보 100%에 대한 정보를 메모리부에 저장한 후, 소스 코드를 초기화할 수 있다. 이후, 소스 코드 변경으로 새로운 어플리케이션을 생성하게 되고, 새롭게 형성된 제 2 어플리케이션(version 2) 은 제 1 형상 모듈(620) 및 제 2 형상 모듈(630)을 포함할 수 있으며, 이에 대한 설명은 전술한 바와 같다. 소스코드 처리부(230)는 제 2 형상 모듈(630)에 대한 신규 테스트를 수행하여 신규 커버리지 정보를 도출할 수 있으며, 이 또한 메모리부에 저장할 수 있다. 이 상태에서, 다시 기존에 생성된 전체 커버리지 정보를 불러오고자 하는 경우, 코드 커버리지 측정 장치(200)는 언제든지 기 저장된 제 1 어플리케이션(version 1)에 대한 전체 커버리지 정보를 불러올 수 있다.As shown in FIG. 6C, in a state in which 100% total function is executed by deriving a test for a first application (version 1) including a plurality of shape modules 610 to derive 100% of total coverage information, full coverage After storing information about 100% of information, the source code can be initialized. Subsequently, a new application is generated by changing the source code, and the newly formed second application (version 2) may include a first shape module 620 and a second shape module 630, which will be described above. As shown. The source code processor 230 may derive new coverage information by performing a new test on the second shape module 630, which may also be stored in the memory unit. In this state, if the user wants to retrieve the entire coverage information previously generated, the code coverage measurement apparatus 200 may retrieve the entire coverage information for the previously stored first application version 1 at any time.

지금까지는 코드 커버리지 측정 장치(200)의 기능적 구성을 기술하였다. 이하에서는, 코드 커버리지 측정 장치(200)의 외부 장치(710, 720)와의 데이터 송수신을 통한 코드 커버리지 측정 시스템에 대해 기술한다.So far, the functional configuration of the code coverage measurement apparatus 200 has been described. Hereinafter, a code coverage measurement system through data transmission / reception with external devices 710 and 720 of the code coverage measurement apparatus 200 will be described.

특히, 도 7에 의할 경우, 형상 관리 도구를 활용하여 효율적인 테스트 수행이 가능해진다. 본 발명의 실시예에 따른 형상 관리 도구는, 복수개의 버전별 소스 코드를 등록받아 관리하고, 등록된 소스 코드의 변경을 탐지하여 변경된 소스 코드를 재등록하는 소프트웨어의 일종으로, CVS, SVN, Git, GitHub 등을 포함할 수 있다.In particular, according to FIG. 7, it is possible to perform an efficient test using a shape management tool. The shape management tool according to the embodiment of the present invention is a kind of software for registering and managing a plurality of version-specific source codes, detecting a change in registered source code, and re-registering the changed source code. CVS, SVN, Git , GitHub, and the like.

도 7에 도시한 바와 같이, 제 1 외부 장치(710)는 형상 관리 도구를 동작시키기 위한 장치로서 서버 또는 단말(ex> pc 또는 스마트폰, 태블릿 pc등의 모바일 단말)포함할 수 있고, 제 2 외부 장치(720)는 제 1 소스코드를 변경하기 위한 장치로 개발자 PC 또는 모바일 단말 등을 포함할 수 있다. 그리고, 코드 커버리지 측정 장치(200)는 코드 커버리지를 측정하기 위한 프로그램이 설치된 장치로, 전체 커버리지 정보 또는 변경 커버리지 정보를 생성할 수 있다. As illustrated in FIG. 7, the first external device 710 may include a server or a terminal (eg, a mobile terminal such as a pc or a smartphone or a tablet pc) as a device for operating a shape management tool. The external device 720 is a device for changing the first source code, and may include a developer PC or a mobile terminal. The code coverage measuring apparatus 200 is a device in which a program for measuring code coverage is installed, and may generate overall coverage information or change coverage information.

이러한 도 7의 코드 커버리지 측정 시스템을 구성하는 각 장치(710,720,200)들은 각 장치들 상호간에 유선 통신이나 WIFI, LTE 등의 무선 통신을 통해 데이터 송수신을 진행할 수 있다. Each of the devices 710, 720, and 200 constituting the code coverage measurement system of FIG. 7 may perform data transmission / reception through wired communication or wireless communication such as WIFI or LTE.

한편, 도 7에 도시한 바와 같이, 제 1 외부 장치(710)는 형상 관리 도구를 통해 전체 커버리지 정보를 도출하기 위한 테스트 수행 대상이 되는 제 1 소스코드를 등록한다(s711). 이러한 형상 관리 도구는 제 1 외부 장치(710)에 임베디드(embeded)된 것일 수 있다. 그리고, 제 2 외부 장치(720)가 제 1 외부 장치(710)로부터 제 1 소스코드를 수신하여(checking out), 제 1 소스코드의 일부를 수정함으로써 제 1 소스코드에 대한 변경 부분을 생성할 수 있다(s721). 코드 커버리지 측정 장치(200)는 제 2 외부 장치(720)로부터 변경 부분을 포함하는 제 2 소스 코드를 취득하고, 변경 부분을 기반으로 변경 커버리지 정보를 생성할 수 있다.(s201, s202) 이러한 s201, s202 단계는 도 3에서 전술한 s301 내지 s311 단계를 포함한다. Meanwhile, as illustrated in FIG. 7, the first external device 710 registers a first source code, which is a test target for deriving total coverage information, through the shape management tool (S711). The shape management tool may be embedded in the first external device 710. Then, the second external device 720 receives the first source code from the first external device 710 and checks out the first source code, thereby modifying a portion of the first source code to generate a change portion for the first source code. It may be (s721). The code coverage measurement apparatus 200 may acquire a second source code including a change portion from the second external device 720 and generate change coverage information based on the change portion. (S201, s202) Such s201 , step s202 includes steps s301 to s311 described above with reference to FIG. 3.

한편, 코드 커버리지 측정 장치(200)는 제 2 외부 장치(720)로 전체/변경 커버리지 정보나 변경 부분이 포함된 제 2 소스코드를 전송하고, 제 2 외부 장치(720)는 이러한 정보들을 기반으로 소스 코드 변경 부분에 대한 확인 및/또는 승인을 제 1 외부 장치(710)에 요청할 수 있다. 이 때, 제 2 외부 장치(720)를 거치지 않고, 코드 커버리지 측정 장치(200)가 제 1 외부 장치(710)에 직접 확인 및/또는 승인 요청을 전송할 수도 있다.Meanwhile, the code coverage measuring apparatus 200 transmits the second source code including the full / change coverage information or the changed part to the second external device 720, and the second external device 720 based on the information. The first external device 710 may be requested to confirm and / or approve the source code change portion. In this case, the code coverage measurement apparatus 200 may directly transmit a confirmation and / or approval request to the first external device 710 without passing through the second external device 720.

제 1 외부 장치(710)는 소스 코드 변경 부분에 대한 확인 및/또는 승인 요청에 기초하여, 제 2 소스코드가 변경 커버리지 등록 기준을 달성했는지 여부를 판별할 수 있다.(s712) 예를 들어, 제 1 외부 장치(710)에 기 저장된 변경 커버리지 등록 기준에 대한 정보와 새롭게 취득한 제 2 소스코드에 대한 변경 커버리지 정보를 비교하여, 변경 커버리지 정보가 소정의 기준을 만족했는지 여부를 판별할 수 있다. 그리고, 제 1 외부 장치(710)는 제 2 소스코드의 변경 커버리지 정보가 소정의 기준을 만족했다고 판단하는 경우, 소정의 기준 만족에 대한 결과 정보를 제 2 외부 장치(720)로 전송할 수 있다. 그리고, 제 2 외부 장치(720)는 소정의 기준 만족에 대한 결과 정보를 수신하고, 제 2 소스코드를 제 1 외부 장치(710)로 전송함으로써, 제 1 외부 장치(710)는 제 2 소스코드를 등록한다(s713). The first external device 710 may determine whether the second source code achieves the change coverage registration criterion based on the request for confirmation and / or approval of the source code change portion (s712). By comparing the change coverage registration criteria previously stored in the first external device 710 with the change coverage information about the newly acquired second source code, it may be determined whether the change coverage information satisfies a predetermined criterion. When the first external device 710 determines that the change coverage information of the second source code satisfies a predetermined criterion, the first external device 710 may transmit the result information on satisfying the predetermined criterion to the second external device 720. In addition, the second external device 720 receives the result information for satisfying the predetermined reference, and transmits the second source code to the first external device 710, so that the first external device 710 receives the second source code. Register (s713).

이상 설명된 실시 형태는 다양한 컴퓨터 구성요소를 통하여 실행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터로 판독가능한 기록매체에 기록될 수 있다. 상기 컴퓨터로 판독가능한 기록매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. The above-described embodiments may be implemented in the form of program instructions that can be executed by various computer components, and recorded on a computer-readable recording medium. The computer-readable recording medium may include program instructions, data files, data structures, etc. alone or in combination.

상기 컴퓨터로 판독가능한 기록매체에 기록되는 프로그램 명령어는 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 분야의 당업자에게 공지되어 사용 가능한 것일 수도 있다.Program instructions recorded on the computer-readable recording medium may be those specially designed and configured for the present invention, or may be known and available to those skilled in the computer software arts.

컴퓨터로 판독가능한 기록매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 실행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령어의 예에는, 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 실행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tape, optical recording media such as CD-ROMs, DVDs, and magneto-optical media such as floptical disks. optical media) and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like. The hardware device may be configured to operate as one or more software modules to carry out the process according to the invention, and vice versa.

이상 첨부된 도면을 참조하여 본 발명의 실시 형태를 설명하였으나 이는 단지 예시일 뿐 본 발명을 한정하는 것이 아니며, 본 발명이 속하는 분야의 통상의 지식을 가진 자라면 본 실시 형태의 본질적인 특성을 벗어나지 않는 범위에서 이상에 예시되지 않은 여러 가지의 변형과 응용이 가능함을 알 수 있을 것이다. 예를 들어, 실시 형태에 구체적으로 나타난 각 구성 요소는 변형하여 실시할 수 있는 것이다. 그리고 이러한 변형과 응용에 관계된 차이점들은 첨부된 청구범위에서 규정하는 본 발명의 범위에 포함되는 것으로 해석되어야 할 것이다. 따라서, 본 발명의 사상은 상기 설명된 실시예에 국한되어 정해져서는 아니되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등하게 또는 등가적으로 변형된 모든 것들은 본 발명의 사상의 범주에 속한다고 할 것이다.The embodiments of the present invention have been described above with reference to the accompanying drawings, which are merely exemplary and are not intended to limit the present invention, and those skilled in the art do not depart from the essential characteristics of the present embodiment. It will be appreciated that various modifications and applications which are not illustrated above in the scope are possible. For example, each component specifically shown in embodiment can be modified and implemented. And differences relating to such modifications and applications will have to be construed as being included in the scope of the invention defined in the appended claims. Therefore, the spirit of the present invention should not be limited to the embodiments described above, and all of the equivalents or equivalents of the claims, as well as the claims below, are included in the scope of the spirit of the present invention. I will say.

Claims (8)

소스코드 취득부에 의해, 제 1 소스코드의 적어도 일 부분이 변경되어 생성된 변경 부분을 포함하는 제 2 소스코드를 취득하는 단계;
소스코드 처리부에 의해, 상기 변경 부분에 대한 부분 테스트 수행으로 변경 코드 커버리지 정보를 생성하는 단계; 및
상기 소스코드 처리부에 의해, 상기 제 1 소스코드에 대한 전체 테스트 수행을 반복적으로 수행하여 생성된 복수의 전체 코드 커버리지 정보를 누적하여 저장하는 단계;를 포함하는,
코드 커버리지 측정 방법.
Acquiring, by the source code acquiring unit, at least one portion of the first source code, the second source code including a change portion generated by the change;
Generating, by a source code processing unit, change code coverage information by performing a partial test on the changed portion; And
And accumulating and storing, by the source code processing unit, a plurality of total code coverage information generated by repeatedly performing the entire test on the first source code.
How to measure code coverage.
제 1항에 있어서,
상기 제 1 소스코드 및 상기 제 2 소스코드는 적어도 하나의 함수를 포함하고,
소스코드 판독부에 의해, 상기 제 1 소스코드의 함수와 상기 제 2 소스코드의 함수를 비교하여 상기 변경 부분의 생성을 판독하는 코드 커버리지 측정 방법.
The method of claim 1,
The first source code and the second source code include at least one function,
And a source code reading unit, which compares a function of the first source code with a function of the second source code and reads the generation of the changed part.
제 2항에 있어서,
상기 변경 부분은 적어도 하나의 제 2 함수를 포함하고,
상기 제 2 함수가 생성된 경우, 상기 변경 부분이 생성된 것으로 판독하고,
상기 제 2 함수는 상기 제 1 소스코드의 적어도 일부분에 포함되는 제 1 함수에 추가된 별도의 함수이거나 상기 제 1 함수가 일부 변경된 것인,
코드 커버리지 측정 방법.
The method of claim 2,
The modifying portion includes at least one second function,
If the second function is generated, read that the modified part is generated,
The second function is a separate function added to the first function included in at least a portion of the first source code, or the first function is partially changed,
How to measure code coverage.
제 3항에 있어서,
상기 변경 코드 커버리지 정보는 변경 함수 정보를 포함하고,
상기 변경 함수 정보는 상기 변경 부분에 대한 테스트 수행으로 생성된 상기 적어도 하나의 제 2 함수의 실행 비율 정보인 코드 커버리지 측정 방법.
The method of claim 3, wherein
The change code coverage information includes change function information,
And the change function information is execution ratio information of the at least one second function generated by performing a test on the changed part.
제 3항에 있어서,
상기 변경 코드 커버리지 정보는 변경 라인 정보를 포함하고,
상기 적어도 하나의 제 2 함수는 코딩 라인을 포함하며,
상기 변경 라인 정보는 상기 변경 부분에 대한 테스트 수행으로 생성된 상기 코딩 라인의 실행 비율에 대한 정보인 코드 커버리지 측정 방법.
The method of claim 3, wherein
The change code coverage information includes change line information,
The at least one second function comprises a coding line,
And the change line information is information on an execution ratio of the coding line generated by performing a test on the changed part.
삭제delete 제 1항에 있어서,
상기 제 1 소스코드 및/또는 상기 제 2 소스코드는 소스코드의 변경 정보를 관리하는 형상관리도구로부터 취득하는 코드 커버리지 측정 방법.
The method of claim 1,
And the first source code and / or the second source code are acquired from a configuration management tool for managing change information of the source code.
제 1항 내지 제 5항, 및 제 7항 중 어느 한 항에 따른 방법을 실행하기 위한 컴퓨터 프로그램을 기록하기 위한 컴퓨터 판독 가능한 기록 매체.
A computer-readable recording medium for recording a computer program for executing the method according to any one of claims 1 to 5.
KR1020170026302A 2017-02-28 2017-02-28 Method and apparatus for measuring code coverage and computer readable recording medium having program the same KR102016472B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170026302A KR102016472B1 (en) 2017-02-28 2017-02-28 Method and apparatus for measuring code coverage and computer readable recording medium having program the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170026302A KR102016472B1 (en) 2017-02-28 2017-02-28 Method and apparatus for measuring code coverage and computer readable recording medium having program the same

Publications (2)

Publication Number Publication Date
KR20180099192A KR20180099192A (en) 2018-09-05
KR102016472B1 true KR102016472B1 (en) 2019-09-02

Family

ID=63594720

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170026302A KR102016472B1 (en) 2017-02-28 2017-02-28 Method and apparatus for measuring code coverage and computer readable recording medium having program the same

Country Status (1)

Country Link
KR (1) KR102016472B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109683856A (en) * 2018-10-26 2019-04-26 平安科技(深圳)有限公司 Electronic device, Faas stage function creation method and storage medium
KR20240035250A (en) * 2022-09-08 2024-03-15 슈어소프트테크주식회사 Unit test re-using method, and computer-readable recording medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101672378B1 (en) * 2013-12-18 2016-11-03 구글 인코포레이티드 Process for displaying test coverage data during code reviews

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101667262B1 (en) * 2014-08-18 2016-10-19 슈어소프트테크주식회사 Method for measuring code coverage and computer readable recording medium having program the same

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101672378B1 (en) * 2013-12-18 2016-11-03 구글 인코포레이티드 Process for displaying test coverage data during code reviews

Also Published As

Publication number Publication date
KR20180099192A (en) 2018-09-05

Similar Documents

Publication Publication Date Title
US8601436B2 (en) Simulation-based interface testing automation system and method for robot software components
KR100990777B1 (en) Debug information collecting method and debug information collecting system
US20180129590A1 (en) System and method for determining test coverage
CN111651366B (en) SDK test method, device, equipment and storage medium
US8140319B2 (en) Method and system for predicting system performance and capacity using software module performance statistics
CN110674047B (en) Software testing method and device and electronic equipment
US20100275062A1 (en) Functional Coverage Using Combinatorial Test Design
NL2029881B1 (en) Methods and apparatus for automatic detection of software bugs
CN101473301A (en) Iterative static and dynamic software analysis
CN105338110A (en) Remote debugging method, platform and server
CN109388569B (en) Method for remotely detecting environmental anomaly of client, test server and storage medium
CN110532185B (en) Test method, test device, electronic equipment and computer readable storage medium
CN107145446B (en) Application program APP test method, device and medium
KR102016472B1 (en) Method and apparatus for measuring code coverage and computer readable recording medium having program the same
US9223683B1 (en) Tool to analyze dependency injection object graphs for common error patterns
CN103186463B (en) Determine the method and system of the test specification of software
CN110365804A (en) A kind of distribution terminal cloud detection system
KR101982504B1 (en) Vehicle to everything communication conforming device
KR101898427B1 (en) Vehicle to everything communication conforming program
US9646252B2 (en) Template clauses based SAT techniques
KR101862617B1 (en) System of testing iot sensor for power facility management
KR101231746B1 (en) Software Development system in SaaS environment
KR102042996B1 (en) Method and apparatus for measuring code coverage not by using probes and computer readable recording medium having program the same
CN110971478B (en) Pressure measurement method and device for cloud platform service performance and computing equipment
CN116450511A (en) Information updating method, device, electronic equipment and computer readable medium

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