KR102165037B1 - Code coverage measuring apparatus, code coverage measuring method of the code coverage mearusing apparatus, and code coverage measuring system - Google Patents

Code coverage measuring apparatus, code coverage measuring method of the code coverage mearusing apparatus, and code coverage measuring system Download PDF

Info

Publication number
KR102165037B1
KR102165037B1 KR1020180153290A KR20180153290A KR102165037B1 KR 102165037 B1 KR102165037 B1 KR 102165037B1 KR 1020180153290 A KR1020180153290 A KR 1020180153290A KR 20180153290 A KR20180153290 A KR 20180153290A KR 102165037 B1 KR102165037 B1 KR 102165037B1
Authority
KR
South Korea
Prior art keywords
source code
code
probe
code coverage
web
Prior art date
Application number
KR1020180153290A
Other languages
Korean (ko)
Other versions
KR20200066778A (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 KR1020180153290A priority Critical patent/KR102165037B1/en
Publication of KR20200066778A publication Critical patent/KR20200066778A/en
Application granted granted Critical
Publication of KR102165037B1 publication Critical patent/KR102165037B1/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/3604Software analysis for verifying properties of programs
    • G06F11/3612Software analysis for verifying properties of programs by runtime analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for 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/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Abstract

본 발명의 일 실시예에 따른 코드 커버리지 측정 장치는, 소스코드를 입력받기 위한 소스코드 입력부, 상기 소스코드에 탐침을 삽입하는 탐침 삽입부, 상기 탐침이 삽입된 소스코드에 대한 실행정보를 상기 코드 커버리지 측정 장치와 연동된 웹 서버로부터 수신하는 웹 서버연동부 및 상기 웹 서버연동부로부터 수신한 상기 실행정보를 기초로 상기 소스코드에 대한 코드 커버리지를 측정하는 커버리지 측정부를 포함할 수 있다.The code coverage measurement apparatus according to an embodiment of the present invention includes a source code input unit for receiving a source code, a probe insertion unit for inserting a probe into the source code, and execution information for the source code into which the probe is inserted. A coverage measurement unit for measuring code coverage for the source code based on the execution information received from the web server interworking unit and the web server interworking unit received from the web server interlocked with the coverage measurement device.

Description

코드 커버리지 측정 장치, 코드 커버리지 측정 장치의 코드 커버리지 측정 방법, 및 코드 커버리지 측정 시스템{CODE COVERAGE MEASURING APPARATUS, CODE COVERAGE MEASURING METHOD OF THE CODE COVERAGE MEARUSING APPARATUS, AND CODE COVERAGE MEASURING SYSTEM}Code coverage measurement device, code coverage measurement method of the code coverage measurement device, and code coverage measurement system {CODE COVERAGE MEASURING APPARATUS, CODE COVERAGE MEASURING METHOD OF THE CODE COVERAGE MEARUSING APPARATUS, AND CODE COVERAGE MEASURING SYSTEM}

본 발명은 코드 커버리지 측정 장치, 코드 커버리지 측정 장치의 코드 커버리지 측정 방법, 및 코드 커버리지 측정 시스템에 관한 것으로,The present invention relates to a code coverage measurement apparatus, a code coverage measurement method of the code coverage measurement apparatus, and a code coverage measurement system,

보다 구체적으로 탐침이 삽입된 소스코드에 대한 실행정보를 웹 페이지를 구동하는 단말기가 아닌 웹 서버로부터 수신하여 코드 커버리지를 측정하도록 함으로서, 보안에 취약한 네트워크 환경에서 코드 커버리지를 측정해도 웹 페이지를 구동하는 단말기 사용자의 보안이 유지되도록 하는,More specifically, the code coverage is measured by receiving execution information for the source code with the probe inserted from the web server rather than the terminal running the web page, so that even if the code coverage is measured in a network environment that is vulnerable to security, the web page is driven. To ensure that the security of the terminal user is maintained,

코드 커버리지 측정 장치, 코드 커버리지 측정 장치의 코드 커버리지 측정 방법, 및 코드 커버리지 측정 시스템에 관한 것이다.It relates to a code coverage measurement apparatus, a code coverage measurement method of the code coverage measurement apparatus, and a code coverage measurement system.

종래에는 사용자가 프로그램 개발 과정에서, 개발중인 프로그램의 검증을 위해 작성된 소스 코드에 대한 테스트 수행 정도를 확인하는 과정이 수행되었다. 예를 들어, 프로그램 설계의 실수나 미처 생각하지 못한 변수 등에 의해서 프로그램은 작성자의 의도와 다르게 또는 비효율적으로 동작할 가능성이 있다. 프로그램이 원하지 않는 결과를 내는 것을 버그(Bug) 또는 프로그램 오류(Error)라고 부른다. 이런 버그 또는 프로그램 오류를 막기 위해 프로그램 개발을 할 때에 테스트 과정이 반드시 필요하다. 이러한 의미에서 프로그램이 충분히 검증되었는지 수치로 확인 하는 동적 테스트 장치가 주목되고 있다. Conventionally, during the program development process, a user checks the degree of test execution for the source code written for verifying the program being developed. For example, there is a possibility that a program may operate differently from the author's intention or inefficiently due to a program design mistake or a variable that was not yet conceived. When a program produces unwanted results, it is called a bug or program error. In order to prevent such bugs or program errors, a test process is essential when developing programs. In this sense, a dynamic test device that checks whether the program is sufficiently verified or not is attracting attention.

이러한 동적 테스트 장치의 경우, 코드 커버리지(Code Coverage)를 측정하곤 하였다.In the case of such a dynamic test device, code coverage was measured.

코드 커버리지는, 소프트웨어 테스트(software test)의 품질을 측정하기 위해 사용되는 하나의 척도(measure)이다. Code coverage is a measure used to measure the quality of a software test.

코드 커버리지는, 어느 하나의 프로그램(program)의 소스 코드(source code)가 테스트된 비율을 의미한다. 따라서, 코드 커버리지는 일반적으로 백분율로 표시된다. Code coverage refers to the rate at which the source code of any one program is tested. Thus, code coverage is usually expressed as a percentage.

그런데, 이러한 코드 커버리지 측정이 웹브라우저에서 사용되는 소스코드를 대상으로 한 경우, 타 사용자와 데이터를 공유하는 인터넷 환경에서 사용되어 해당 정보가 외부 기기에 손쉽게 노출되거나 해킹당할 수 있는 문제점이 있다. 이는 보안을 유지하기 어려운 네트워크 환경의 취약한 현실을 반영한 결과이다.However, when such code coverage measurement targets a source code used in a web browser, it is used in an Internet environment sharing data with other users, so that the information may be easily exposed to external devices or hacked. This is a result of reflecting the weak reality of the network environment where it is difficult to maintain security.

따라서, 본 발명은 전술한 문제점을 해결하기 위해 도출된 것으로, 코드 커버리지 측정 장치에서 직접적으로 웹브라우징 기기로부터 소스코드 실행 정보를 수신하지 않고, 우회적으로 웹 서버로부터 소스코드 실행 정보를 수신하여 해당 실행 정보를 기초로 코드 커버리지를 측정할 수 있도록 하는 데에 그 목적이 있다.Therefore, the present invention was derived to solve the above-described problem, the code coverage measurement device does not directly receive the source code execution information from the web browsing device, and indirectly receives the source code execution information from the web server and executes the corresponding execution. Its purpose is to be able to measure code coverage based on information.

본 발명의 일 실시예에 따른 코드 커버리지 측정 장치는, 소스코드를 입력받기 위한 소스코드 입력부, 상기 소스코드에 탐침을 삽입하는 탐침 삽입부, 상기 탐침이 삽입된 소스코드에 대한 실행정보를 상기 코드 커버리지 측정 장치와 연동된 웹 서버로부터 수신하는 웹 서버연동부 및 상기 웹 서버연동부로부터 수신한 상기 실행정보를 기초로 상기 소스코드에 대한 코드 커버리지를 측정하는 커버리지 측정부를 포함할 수 있다.The code coverage measurement apparatus according to an embodiment of the present invention includes a source code input unit for receiving a source code, a probe insertion unit for inserting a probe into the source code, and execution information for the source code into which the probe is inserted. A coverage measurement unit for measuring code coverage for the source code based on the execution information received from the web server interworking unit and the web server interworking unit received from the web server interlocked with the coverage measurement device.

본 발명의 일 실시예에 따른 코드 커버리지 측정 장치의 코드 커버리지 측정 방법은, 소스코드 입력부를 통해, 소스코드를 입력받는 단계, 탐침 삽입부를 통해, 상기 소스코드에 탐침을 삽입하는 단계, 웹 서버연동부를 통해, 상기 탐침이 삽입된 소스코드에 대한 실행정보를 상기 코드 커버리지 측정 장치와 연동된 웹 서버로부터 수신하는 단계 및 커버리지 측정부를 통해, 상기 웹 서버연동부로부터 수신한 상기 실행정보를 기초로 상기 소스코드에 대한 코드 커버리지를 측정하는 단계를 포함할 수 있다.The code coverage measurement method of the code coverage measuring apparatus according to an embodiment of the present invention includes receiving a source code through a source code input unit, inserting a probe into the source code through a probe insertion unit, and interlocking with a web server. Receiving the execution information on the source code into which the probe is inserted from the web server interlocked with the code coverage measurement device through the unit, and the execution information received from the web server interworking unit through the coverage measurement unit. It may include the step of measuring code coverage for the source code.

본 발명의 일 실시예에 따른 코드 커버리지 측정 시스템은, 소스코드를 코드 커버리지 측정 장치로 전송하는 외부기기, 상기 외부기기로부터 수신한 상기 소스코드에 탐침을 삽입하는 코드 커버리지 측정 장치, 상기 탐침이 삽입된 소스코드에 대한 실행정보를 생성하는 웹브라우징 기기 및 상기 웹브라우징 기기로부터 상기 실행정보를 수신하는 웹 서버를 포함하고, 상기 코드 커버리지 측정 장치는 상기 웹 서버로부터 상기 실행정보를 수신하여, 상기 실행정보를 기초로 상기 소스코드에 대한 코드 커버리지를 측정하도록 구현될 수 있다.A code coverage measurement system according to an embodiment of the present invention includes an external device that transmits a source code to a code coverage measurement device, a code coverage measurement device that inserts a probe into the source code received from the external device, and the probe is inserted. A web browsing device that generates execution information for the source code and a web server that receives the execution information from the web browsing device, and the code coverage measurement device receives the execution information from the web server and executes the execution It may be implemented to measure code coverage for the source code based on information.

본 발명의 다른 실시예에 따른 코드 커버리지 측정 장치는, 상기 코드 커버리지 측정 장치와 연동된 프록시 서버로부터 탐침이 삽입된 소스코드를 수신하는 소스코드 수신부, 상기 탐침이 삽입된 소스코드에 대한 실행정보를 상기 프록시 서버로부터 수신하는 실행정보 수신부 및 상기 실행정보를 기초로 상기 소스코드에 대한 코드 커버리지를 측정하는 커버리지 측정부를 포함할 수 있다.A code coverage measurement apparatus according to another embodiment of the present invention includes a source code receiving unit receiving a source code into which a probe is inserted from a proxy server interlocked with the code coverage measurement apparatus, and execution information about the source code into which the probe is inserted. It may include an execution information receiving unit received from the proxy server and a coverage measurement unit measuring code coverage for the source code based on the execution information.

본 발명의 다른 실시예에 따른 코드 커버리지 측정 장치의 코드 커버리지 측정 방법은, 소스코드 수신부를 통해, 상기 코드 커버리지 측정 장치와 연동된 프록시 서버로부터 탐침이 삽입된 소스코드를 수신하는 단계, 실행정보 수신부를 통해, 상기 탐침이 삽입된 소스코드에 대한 실행정보를 상기 프록시 서버로부터 수신하는 단계 및 커버리지 측정부를 통해, 상기 실행정보를 기초로 상기 소스코드에 대한 코드 커버리지를 측정하는 단계를 포함할 수 있다.A code coverage measurement method of a code coverage measurement apparatus according to another embodiment of the present invention includes receiving, through a source code receiving unit, a source code into which a probe is inserted from a proxy server interlocked with the code coverage measurement apparatus, and an execution information receiving unit Through, receiving execution information on the source code into which the probe is inserted, from the proxy server, and measuring code coverage for the source code based on the execution information through a coverage measurement unit. .

본 발명의 다른 실시예에 따른 코드 커버리지 측정 시스템은, 소스코드에 탐침을 삽입하는 프록시 서버, 상기 프록시 서버로부터 상기 탐침이 삽입된 소스코드를 수신하여, 상기 탐침이 삽입된 소스코드에 대한 실행정보를 생성하고 상기 실행정보를 상기 프록시 서버로 전송하는 웹브라우징 기기 및 상기 프록시 서버로부터 상기 탐침이 삽입된 소스코드와 상기 실행정보를 수신하여 상기 실행정보를 기초로 상기 소스코드에 대한 코드 커버리지를 측정하는 코드 커버리지 측정 장치를 포함할 수 있다.A code coverage measurement system according to another embodiment of the present invention includes a proxy server for inserting a probe into a source code, receiving a source code into which the probe is inserted from the proxy server, and execution information for the source code into which the probe is inserted. A web browsing device that generates and transmits the execution information to the proxy server, and the source code into which the probe is inserted and the execution information are received from the proxy server, and the code coverage for the source code is measured based on the execution information. It may include a code coverage measuring device.

코드 커버리지 측정 장치에서 직접적으로 웹브라우징 기기로부터 소스코드 실행 정보를 수신하지 않고, 우회적으로 웹 서버로부터 소스코드 실행 정보를 수신하여 해당 실행 정보를 기초로 코드 커버리지를 측정할 수 있다.The code coverage measurement device may not directly receive the source code execution information from the web browsing device, but indirectly receive the source code execution information from the web server and measure the code coverage based on the corresponding execution information.

이러한 코드 커버리지 측정 방식에 따르면, 네트워크 환경에서도 웹브라우징 기기를 사용하는 사용자의 보안이 유지될 수 있게 된다. According to this code coverage measurement method, security of a user using a web browsing device can be maintained even in a network environment.

도 1은 일반적인 웹 브라우저에서의 자바스크립트(Javascript) 구동 방식을 설명하기 위해 참조되는 도면이다.
도 2는 일반적인 웹 브라우저에서 자바스크립트 구동시 발생하는 보안 관련 문제를 설명하기 위해 참조되는 도면이다.
도 3은 본 발명의 실시예에 따른 코드 커버리지 측정 시스템을 설명하기 위해 참조되는 도면이다.
도 4 및 도 5는 본 발명의 실시예에 따른 코드 커버리지 측정 장치를 설명하기 위해 참조되는 도면이다.
도 6a는 자바스크립트 소스 코드의 일례를 나타내며, 도 6b는 자바스크립트 소스 코드에 탐침이 삽입된 결과를 나타내는 도면이다.
도 7은 본 발명의 다른 실시예에 따른 코드 커버리지 측정 시스템을 예시한다.
도 8 및 도 9는 본 발명의 다른 실시예에 따른 코드 커버리지 측정 장치를 설명하기 위해 참조되는 도면이다.
도 10 및 도 11은 본 발명의 실시예에 따른 소스코드의 커버리지 측정 결과를 예시하기 위해 참조되는 도면이다.
1 is a diagram referred to for explaining a method of driving Javascript in a general web browser.
FIG. 2 is a diagram referenced to describe a security-related problem that occurs when JavaScript is driven in a general web browser.
3 is a diagram referenced to describe a code coverage measurement system according to an embodiment of the present invention.
4 and 5 are diagrams referenced to describe an apparatus for measuring code coverage according to an embodiment of the present invention.
6A shows an example of a JavaScript source code, and FIG. 6B is a view showing a result of inserting a probe into the JavaScript source code.
7 illustrates a code coverage measurement system according to another embodiment of the present invention.
8 and 9 are diagrams referenced to describe an apparatus for measuring code coverage according to another embodiment of the present invention.
10 and 11 are diagrams referenced to illustrate a result of measuring coverage of a source code according to an embodiment of the present invention.

후술하는 본 발명에 대한 상세한 설명은, 본 발명이 실시될 수 있는 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 본 발명을 실시할 수 있기에 충분하도록 상세히 설명된다. 본 발명의 다양한 실시예는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예에 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 본 발명의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 본 발명의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다.DETAILED DESCRIPTION OF THE INVENTION The detailed description of the present invention to be described later refers to the accompanying drawings, which illustrate specific embodiments in which the present invention may be practiced. These embodiments are described in detail sufficient to enable a person skilled in the art to practice the present invention. It is to be understood that the various embodiments of the present invention are different from each other, but need not be mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the present invention in relation to one embodiment. In addition, it is to be understood that the location or arrangement of individual components within each disclosed embodiment may be changed without departing from the spirit and scope of the present invention. Accordingly, the detailed description to be described below is not intended to be taken in a limiting sense, and the scope of the present invention, if appropriately described, is limited only by the appended claims, along with all scopes equivalent to those claimed by the claims. Like reference numerals in the drawings refer to the same or similar functions over several aspects.

이하, 첨부되는 도면을 참조하여 본 발명의 실시예에 따른 코드 커버리지 측정 장치 및 코드 커버리지 측정 장치의 코드 커버리지 측정 방법을 설명한다.Hereinafter, a code coverage measurement apparatus and a code coverage measurement method of the code coverage measurement apparatus according to an embodiment of the present invention will be described with reference to the accompanying drawings.

도 1은 일반적인 웹 브라우저에서의 자바스크립트(Javascript) 구동 방식을 설명하기 위해 참조되는 도면이다.1 is a diagram referred to for explaining a method of driving Javascript in a general web browser.

도 1에 도시한 바와 같이, 일반적으로 웹 브라우저를 구동하는 웹브라우징 기기(4)는 사용자로부터 웹페이지에 대한 명령어 입력을 수신하면, 웹 어플리케이션 서버(WAS, Wep Application Server)(3)(이하, 웹 서버로 명명한다.)에 사용자가 실행하고자 하는 웹페이지에 대한 전송을 요청한다(①). 그러면, 자바스크립트로 구현된 웹페이지에 대한 정보를 포함하는 웹 서버(3)는 웹브라우징 기기(4)의 웹페이지 전송 요청 명령에 상응하여 해당 웹페이지를 포함하는 정보를 웹브라우징 기기(4)로 전송한다(②). 이후, 웹브라우징 기기(4)는 웹페이지에 포함된 자바스크립트 코드를 수행하여 사용자 명령을 실행하게 된다.As shown in Fig. 1, when a web browsing device 4 generally driving a web browser receives a command input for a web page from a user, a web application server (WAS, Wep Application Server) 3 (hereinafter, It is called a web server.), requests the transmission of the web page the user wants to execute (①). Then, the web server 3 including the information on the web page implemented in JavaScript, in response to the web page transmission request command of the web browsing device 4, sends the information including the web page to the web browsing device 4 Transfer to (②). Thereafter, the web browsing device 4 executes a user command by executing the JavaScript code included in the web page.

이러한 자바스크립트는 객체 기반의 스크립트 프로그래밍 언어로, 주로 인터넷 기반의 웹브라우저에서는 자바스크립트로 작성된 소스코드가 사용되게 된다. Such JavaScript is an object-based script programming language, and source codes written in JavaScript are mainly used in Internet-based web browsers.

그런데, 도 2에 도시한 바와 같이, 웹브라우저에서 사용되는 소스코드의 경우, 타 사용자와 데이터를 공유하는 인터넷 환경에서 사용되어 해당 정보가 외부 기기에 손쉽게 노출되거나 해킹당할 수 있는 문제점이 있다. 이는 보안을 유지하기 어려운 네트워크 환경의 취약한 현실을 반영한 결과이다.However, as shown in FIG. 2, in the case of the source code used in a web browser, there is a problem in that the information is easily exposed to an external device or hacked because it is used in an Internet environment that shares data with other users. This is a result of reflecting the weak reality of the network environment where it is difficult to maintain security.

예를 들어, 웹브라우징 기기(4)는 웹 서버(3)와 데이터 송수신을 자유롭게 수행할 수 있지만, 웹 서버(3)와 웹브라우징 기기(4) 사이에서 공유된 정보는 외부 기기(1)나 코드 커버리지 측정 장치(2) 등의 타 사용자에게 전송될 수 없다. 특히, 자바스크립트로 작성된 소스코드의 경우에는 이에 대한 실행 정보를 타 사용자에게 전송할 수 없다는 문제점이 있다.For example, the web browsing device 4 can freely transmit and receive data with the web server 3, but information shared between the web server 3 and the web browsing device 4 It cannot be transmitted to other users such as the code coverage measurement device 2. In particular, in the case of source code written in JavaScript, there is a problem that execution information about it cannot be transmitted to other users.

즉, 본 발명은 이러한 보안이 취약한 네트워크 환경의 현실을 감안하여 도출된 것으로, 코드 커버리지 측정 장치(2)에서 직접적으로 웹브라우징 기기(4)로부터 소스코드 실행 정보를 수신하지 않고, 우회적으로 웹 서버(3)로부터 소스코드 실행 정보를 수신하여 해당 실행 정보를 기초로 코드 커버리지를 측정할 수 있도록 하는 데에 그 목적이 있다. 이러한 코드 커버리지 측정 방식에 따르면, 네트워크 환경에서도 웹브라우징 기기(4)를 사용하는 사용자의 보안이 유지될 수 있게 된다. That is, the present invention was derived in consideration of the reality of such a weak network environment, and the code coverage measurement device 2 does not directly receive the source code execution information from the web browsing device 4, and bypasses the web server. The purpose is to receive source code execution information from (3) and measure code coverage based on the execution information. According to this code coverage measurement method, security of a user who uses the web browsing device 4 can be maintained even in a network environment.

따라서, 이하에서는, 코드 커버리지 측정 장치(2)가 웹 서버(3)로부터 소스코드 실행 정보를 수신하여 코드 커버리지를 측정하는 방식에 대해 기술하고자 한다.Therefore, hereinafter, a method of measuring code coverage by receiving source code execution information from the web server 3 by the code coverage measuring apparatus 2 will be described.

도 3은 본 발명의 실시예에 따른 코드 커버리지 측정 시스템을 설명하기 위해 참조되는 도면이다.3 is a diagram referenced to describe a code coverage measurement system according to an embodiment of the present invention.

도 3에 도시한 바와 같이, 코드 커버리지 측정 시스템은 외부 기기(1), 코드 커버리지 측정 장치(2), 웹 서버(3), 및 웹브라우징 기기(4) 간에 상호 데이터를 송수신하여 구성될 수 있다.As shown in FIG. 3, the code coverage measurement system may be configured by transmitting and receiving mutual data between the external device 1, the code coverage measurement device 2, the web server 3, and the web browsing device 4 .

외부 기기(1)는 자바스크립트 파일을 제공하는 기기로 개발자 PC를 예로 들 수 있다. The external device 1 is a device that provides a JavaScript file, for example, a developer PC.

외부 기기(1)는 하나 또는 복수의 자바스크립트 파일을 코드 커버리지 측정 장치(2)로 전송한다. 여기서 자바스크립트 파일은 웹브라우징 기기(4)에서 실제로 구동될 웹페이지를 구성한다. The external device 1 transmits one or a plurality of JavaScript files to the code coverage measurement device 2. Here, the JavaScript file constitutes a web page to be actually driven in the web browsing device 4.

외부 기기(1)는 코드 커버리지 측정 장치(2)에서 탐침이 삽입된 자바스크립트 파일(소스 코드)를 수신하여 이를 웹 서버(3)로 전송한다. 즉, 웹 서버(3)에서 소스 코드를 수정하는 것이 아니라, 외부 기기(1)로부터 탐침이 삽입된 소스 코드가 배포되어 웹 서버(3)로 전송되는 것이다. The external device 1 receives a JavaScript file (source code) into which a probe is inserted from the code coverage measurement device 2 and transmits it to the web server 3. That is, the web server 3 does not modify the source code, but the source code into which the probe is inserted from the external device 1 is distributed and transmitted to the web server 3.

코드 커버리지 측정 장치(2)는 외부 기기(1)로부터 수신한 소스 코드에 대한 커버리지를 측정한다. The code coverage measuring apparatus 2 measures the coverage of the source code received from the external device 1.

코드 커버리지를 측정하기 위하여 코드 커버리지 측정 장치(1)는 수신한 소스 코드에 탐침(probe)을 삽입할 수 있다.In order to measure code coverage, the code coverage measurement apparatus 1 may insert a probe into the received source code.

탐침은 소스코드의 실행 중간에 소스코드의 어떠한 위치에서 어떠한 메모리를 참조하는 지에 대한 동적 정보를 추출하는 역할을 하는 코드일 수 있다.The probe may be a code that serves to extract dynamic information about which memory is referred to at any location in the source code during execution of the source code.

소스 코드에 탐침을 삽입하는 단계는, 추상 구문 트리(abstract syntax tree, AST)를 생성하는 단계를 포함하여 수행될 수 있다.The step of inserting the probe into the source code may be performed including the step of generating an abstract syntax tree (AST).

구체적으로, 추상 구문 트리를 생성하는 단계는, 소스 코드로부터 추상 구문 트리를 생성할 수 있다. 추상 구문 트리는, 파서(parser)를 이용하여 생성할 수 있다. 여기서, 파서는 예를 들어 JavaScript 파서일 수 있다. 소스 코드를 JavaScript 파서로 입력시키면 JavaScript 파서는 추상 구문 트리를 생성할 수 있다.Specifically, in the step of generating the abstract syntax tree, the abstract syntax tree may be generated from the source code. An abstract syntax tree can be created using a parser. Here, the parser may be, for example, a JavaScript parser. By entering the source code into a JavaScript parser, the JavaScript parser can generate an abstract syntax tree.

앞서 생성된 추상 구문 트리를 이용하여 탐침을 삽입하는 방법을 이하에서 구체적으로 설명하도록 한다.A method of inserting a probe using the previously generated abstract syntax tree will be described in detail below.

탐침은 추상 구문 트리를 이용하여 삽입한다. 구체적으로, 추상 구문 트리의 구문 단위로 탐침을 삽입하고, 추상 구문 트리 내의 분기문을 판별하여 탐침을 삽입할 수 있다. The probe is inserted using an abstract syntax tree. Specifically, a probe may be inserted in a syntax unit of the abstract syntax tree, and a branch statement in the abstract syntax tree may be identified to insert the probe.

예를 들어, 추상 구문 트리에서 분기문을 검색하고, 검색된 분기문의 형태를 변경한 후, 탐침을 삽입하는 것일 수 있다. For example, it may be to search for a branch statement in the abstract syntax tree, change the shape of the searched branch statement, and then insert a probe.

여기서, 분기문은 실행 흐름을 결정하는 문으로서, for문, if문 및 while문을 포함할 수 있다. 그리고, 분기문의 형태를 변경한다는 의미는 검색된 분기문의 실질적인 의미는 변경하지 않고, 탐침을 삽입할 수 있도록 형식을 변경하는 것을 의미한다.Here, the branch statement is a statement that determines the execution flow, and may include a for statement, an if statement, and a while statement. In addition, the meaning of changing the shape of the branch statement means changing the format so that a probe can be inserted without changing the actual meaning of the searched branch statement.

소스코드에 탐침이 삽입된 결과는 도 6b에 도시한 바와 같이(점선부분) 나타날 수 있다.The result of inserting the probe into the source code may appear as shown in FIG. 6B (dotted line).

코드 커버리지 측정 장치(1)에서 생성된 탐침이 삽입된 소스코드는 외부 기기(1)로 전송될 수 있다.The source code into which the probe generated by the code coverage measurement apparatus 1 is inserted may be transmitted to the external device 1.

웹 서버(3)는 외부 기기(1)로부터 탐침이 삽입된 소스코드를 수신하여 저장할 수 있다. 그리고 웹브라우징 기기(4)로부터 웹 페이지 전송 요청 명령을 수신하게 되면, 웹 페이지에 매칭하는 탐침이 삽입된 소스코드를 웹브라우징 기기(4)로 전송할 수 있다. The web server 3 may receive and store the source code into which the probe is inserted from the external device 1. In addition, when a web page transmission request command is received from the web browsing device 4, a source code in which a probe matching the web page is inserted may be transmitted to the web browsing device 4.

웹브라우징 기기(4)는 웹브라우저로 구동되는 모든 전자기기를 의미한다. The web browsing device 4 refers to all electronic devices driven by a web browser.

웹브라우징 기기(4)는 웹 서버(3)로부터 웹 페이지에 매칭하는 탐침이 삽입된 소스코드를 수신하여, 해당 소스코드에 대한 실행정보를 생성할 수 있다. 여기서 실행정보의 생성의 의미는 소스코드의 일부 영역이 실제로 수행된 결과값을 도출하는 과정을 의미한다. 예를 들어, 도 6a에 도시한 바와 같이 라인 1 번 내지 라인 6번이 있을 경우, 이 중 라인 1번 내지 라인 5번이 수행되어 제1 실행정보(에러 출력)를 생성하고, 라인 1번 내지 라인 4번과 라인 6번이 수행되어 제2 실행정보(결과값반환)를 생성한다.The web browsing device 4 may receive the source code into which the probe matching the web page is inserted from the web server 3 and generate execution information for the corresponding source code. Here, the meaning of generation of execution information refers to the process of deriving a result value actually performed by a part of the source code. For example, as shown in Fig. 6A, when there are lines 1 to 6, among them, lines 1 to 5 are performed to generate first execution information (error output), and lines 1 to 6 are performed. Lines 4 and 6 are executed to generate second execution information (result value return).

웹브라우징 기기(4)는 해당 소스코드에 대한 실행정보를 웹 서버(3)에 전송할 수 있다. The web browsing device 4 may transmit execution information for the corresponding source code to the web server 3.

도 3에서는 웹브라우징 기기(4)와 외부 기기(1)가 별개인 것을 예시하였으나, 하나의 기기에서 웹브라우징 기기(4)와 외부 기기(1)의 역할을 하도록 구현할 수도 있다. Although FIG. 3 illustrates that the web browsing device 4 and the external device 1 are separate, one device may be implemented to serve as the web browsing device 4 and the external device 1.

웹 서버(3)는 웹브라우징 기기(4)에서 도출된 실행정보를 수신할 수 있다. 이러한 웹 서버(3)에서의 실행정보 수신은 코드 커버리지 측정 장치(2)가 웹브라우징 기기(4)가 아닌 다른 루트를 통한 우회적인 실행정보 수신이 가능하도록 하는 데에 그 의의가 있다.The web server 3 may receive execution information derived from the web browsing device 4. The reception of execution information in the web server 3 is significant in that the code coverage measurement device 2 enables indirect execution information reception through a route other than the web browsing device 4.

코드 커버리지 측정 장치(2)는 웹 서버(3)로부터 실행정보를 수신할 수 있다.The code coverage measurement apparatus 2 may receive execution information from the web server 3.

코드 커버리지 측정 장치(2)는 웹 서버(3)로부터 수신한 실행정보를 기초로 기 저장된 탐침이 삽입된 소스코드에 대한 코드 커버리지를 측정할 수 있다.The code coverage measuring apparatus 2 may measure the code coverage for the source code into which the pre-stored probe is inserted based on the execution information received from the web server 3.

도 3의 각 구성 요소 간의 데이터 흐름을 순차적으로 기술하면 다음과 같다. 다만, 본 발명의 권리범위가 하기 순서에 국한되는 것은 아니다. 즉, 다양한 순서의 조합이 가능하다.The data flow between each component of FIG. 3 will be sequentially described as follows. However, the scope of the present invention is not limited to the following order. That is, combinations of various orders are possible.

(a) 외부 기기(1)는 소스코드를 코드 커버리지 측정 장치(2)로 전송한다.(a) The external device 1 transmits the source code to the code coverage measurement device 2.

(b) 코드 커버리지 측정 장치(2)는 소스코드에 대한 탐침을 삽입하여 탐침이 삽입된 소스코드를 생성한다.(b) The code coverage measuring apparatus 2 inserts a probe for the source code and generates a source code with the probe inserted.

(c) 외부 기기(1)는 코드 커버리지 측정 장치(2)로부터 탐침이 삽입된 소스코드를 수신하여 웹 서버(3)로 전송한다.(c) The external device 1 receives the source code into which the probe is inserted from the code coverage measurement device 2 and transmits it to the web server 3.

(d) 웹 서버(3)는 웹브라우징 기기(4)로부터 웹페이지 전송 요청 명령을 수신한다.(d) The web server 3 receives a web page transmission request command from the web browsing device 4.

(e) 웹 서버(3)는 웹페이지 전송 요청 명령에 상응하는 웹페이지를 웹브라우징 기기(4)로 전송한다.(e) The web server 3 transmits a web page corresponding to the web page transmission request command to the web browsing device 4.

(f) 웹브라우징 기기(4)는 웹페이지에 포함된 탐침이 삽입된 소스코드에 대한 실행정보를 생성한다. (f) The web browsing device 4 generates execution information for the source code into which the probe included in the web page is inserted.

(g) 웹서버(3)는 웹브라우징 기기(4)로부터 실행정보를 수신한다.(g) The web server 3 receives execution information from the web browsing device 4.

(h) 웹 서버(3)는 수신한 실행정보를 코드 커버리지 측정 장치(2)로 전송한다.(h) The web server 3 transmits the received execution information to the code coverage measurement device 2.

(i) 코드 커버리지 측정 장치(2)는 실행정보를 기초로 탐침이 삽입된 소스코드에 대한 코드 커버리지를 측정한다.(i) The code coverage measuring apparatus 2 measures the code coverage for the source code into which the probe is inserted based on the execution information.

도 4 및 도 5는 본 발명의 실시예에 따른 코드 커버리지 측정 장치(2)를 설명하기 위해 참조되는 도면이다.4 and 5 are diagrams referred to for explaining a code coverage measurement apparatus 2 according to an embodiment of the present invention.

도 4에 도시한 바와 같이, 코드 커버리지 측정 장치(2)는 소스코드 입력부(210), 탐침 삽입부(220), 웹 서버 연동부(230), 및 커버리지 측정부(240)를 포함할 수 있다. As shown in FIG. 4, the code coverage measurement apparatus 2 may include a source code input unit 210, a probe insertion unit 220, a web server linking unit 230, and a coverage measurement unit 240. .

소스코드 입력부(210)는 외부 기기(1)로부터 소스코드를 입력받을 수 있다.(S510) 소스코드는 자바스크립트에 기반한 코드일 수 있다. 다만, 본 발명의 권리범위가 자바스크립트에 국한되는 것은 아니고, 네트워크 환경에서 웹이 구동되는 데에 사용되는 언어에 기반한 모든 종류의 코드에 적용될 수 있다. The source code input unit 210 may receive a source code from the external device 1 (S510). The source code may be a code based on JavaScript. However, the scope of the present invention is not limited to JavaScript, and can be applied to all kinds of codes based on the language used to run the web in a network environment.

탐침 삽입부(220)는 외부에서 입력받은 소스코드에 탐침을 삽입하여 탐침이 삽입된 소스코드를 생성할 수 있다.(S520) The probe insertion unit 220 may generate a source code into which the probe is inserted by inserting the probe into the source code input from the outside (S520).

웹 서버 연동부(230)는 탐침이 삽입된 소스코드에 대한 실행정보를 웹 서버(3)로부터 수신할 수 있다.(S530) 즉, 탐침이 삽입된 소스코드에 대한 실행정보를 직접 생성하거나 외부 기기(1) 또는 웹브라우징 기기(4)로부터 수신하는 것이 아닌 코드 커버리지 측정 장치(2)와 연동된 웹 서버(3)로부터 수신할 수 있다. 여기서, 실행정보는 웹브라우저를 실행하는 웹브라우징 기기(4)에서 탐침이 삽입된 소스코드를 실행하여 생성된 후 웹 서버(3)로 전송되는 정보일 수 있다.The web server interworking unit 230 may receive execution information on the source code into which the probe is inserted, from the web server 3 (S530), that is, directly generate execution information on the source code into which the probe is inserted, or It can be received from the web server 3 linked to the code coverage measuring apparatus 2, not from the device 1 or the web browsing device 4. Here, the execution information may be information transmitted to the web server 3 after being generated by executing the source code into which the probe is inserted in the web browsing device 4 executing the web browser.

커버리지 측정부(240)는 웹 서버연동부(230)로부터 수신한 실행정보를 기초로 탐침이 삽입된 소스코드에 대한 코드 커버리지를 측정할 수 있다.(S540)The coverage measurement unit 240 may measure the code coverage for the source code into which the probe is inserted based on the execution information received from the web server interworking unit 230 (S540).

도 7은 본 발명의 다른 실시예에 따른 코드 커버리지 측정 시스템을 예시한다.7 illustrates a code coverage measurement system according to another embodiment of the present invention.

도 3의 실시예에 따르면 웹 서버(3)를 통해 소스코드 실행정보를 수신한다면, 도 7의 실시예에 따르면 프록시 서버(5)를 통해 소스코드 실행정보를 수신하는 구조이다.According to the embodiment of FIG. 3, if source code execution information is received through the web server 3, according to the embodiment of FIG. 7, source code execution information is received through the proxy server 5.

도 7에 도시한 바와 같이, 코드 커버리지 측정 시스템은 코드 커버리지 측정 장치(2), 웹 서버(3), 웹브라우징 기기(4), 및 프록시 서버(5)간에 상호 데이터를 송수신하는 구조로 구성될 수 있다.As shown in FIG. 7, the code coverage measurement system is configured to transmit and receive data between the code coverage measurement device 2, the web server 3, the web browsing device 4, and the proxy server 5 I can.

프록시 서버(5)는 소스코드에 탐침을 삽입할 수 있다. 소스코드는 웹 서버(3)로부터 수신한 것일 수 있다. 소스코드는 웹 브라우징 기기(4)에서 실행되기 위한 웹 페이지를 구성하는 소스코드일 수 있다.The proxy server 5 may insert a probe into the source code. The source code may be received from the web server 3. The source code may be a source code constituting a web page to be executed in the web browsing device 4.

프록시 서버(5)는 웹브라우징 기기(4)로부터 웹페이지 전송 요청을 수신하면, 해당 전송 요청을 웹 서버(3)로 전송할 수 있다. 그리고, 웹 서버(3)로부터 웹 서버(3)에 저장된 웹페이지를 수신하면, 웹페이지에 포함된 소스코드에 탐침을 삽입하여 탐침이 삽입된 소스코드를 생성할 수 있다. When the proxy server 5 receives a web page transmission request from the web browsing device 4, the proxy server 5 may transmit the transmission request to the web server 3. In addition, when a web page stored in the web server 3 is received from the web server 3, a probe may be inserted into a source code included in the web page to generate a source code in which the probe is inserted.

프록시 서버(5)는 탐침이 삽입된 소스코드를 생성하여 웹브라우징 기기(4)와 코드 커버리지 측정 장치(2)에 전송할 수 있다.The proxy server 5 may generate the source code into which the probe is inserted and transmit it to the web browsing device 4 and the code coverage measuring device 2.

프록시 서버(5)는 탐침이 삽입된 소스코드에 대한 실행정보를 웹브라우징 기기(4)로부터 수신할 수 있다. 그리고, 해당 정보를 코드 커버리지 측정 장치(2)로 전송할 수 있다. 코드 커버리지 측정 장치(2)는 프록시 서버(5)로부터 기 수신한 탐침이 삽입된 소스코드와 소스코드에 대한 실행 정보를 수신하여 소스코드에 대한 코드 커버리지를 측정할 수 있다.The proxy server 5 may receive execution information on the source code into which the probe is inserted from the web browsing device 4. Then, the corresponding information may be transmitted to the code coverage measuring apparatus 2. The code coverage measuring apparatus 2 may measure code coverage for the source code by receiving the previously received source code into which the probe is inserted and execution information for the source code from the proxy server 5.

웹브라우징 기기(4)는 웹브라우저로 구동되는 모든 전자기기를 의미한다. The web browsing device 4 refers to all electronic devices driven by a web browser.

웹브라우징 기기(4)는 프록시 서버(5)로부터 탐침이 삽입된 소스코드를 수신하여, 탐침이 삽입된 소스코드에 대한 실행정보를 생성할 수 있다. 그리고, 실행정보를 프록시 서버(5)로 전송하여 프록시 서버(5)에서 코드 커버리지 측정 장치(2)로 실행정보가 전송되게 된다. The web browsing device 4 may receive the source code into which the probe is inserted from the proxy server 5 and generate execution information for the source code into which the probe is inserted. Then, the execution information is transmitted to the proxy server 5 so that the execution information is transmitted from the proxy server 5 to the code coverage measuring apparatus 2.

도 7의 각 구성 요소 간의 데이터 흐름을 순차적으로 기술하면 다음과 같다.The data flow between each component of FIG. 7 will be sequentially described as follows.

다만, 본 발명의 권리범위가 하기 순서에 국한되는 것은 아니다. 즉, 다양한 순서의 조합이 가능하다.However, the scope of the present invention is not limited to the following order. That is, combinations of various orders are possible.

(a) 웹브라우징 기기(4)는 웹페이지 전송 요청 명령을 프록시 서버(5)로 전송한다.(a) The web browsing device 4 transmits a web page transmission request command to the proxy server 5.

(b) 프록시 서버(5)는 웹페이지 전송 요청 명령을 웹 서버(3)로 전송한다.(b) The proxy server 5 transmits a web page transmission request command to the web server 3.

(c) 웹 서버(3)는 웹페이지 전송 요청 명령에 대응하는 웹페이지를 프록시 서버(5)로 전송한다. (c) The web server 3 transmits a web page corresponding to the web page transmission request command to the proxy server 5.

(d) 프록시 서버(5)는 웹페이지를 구성하는 소스코드에 탐침을 삽입한다.(d) The proxy server 5 inserts the probe into the source code constituting the web page.

(e)(f) 프록시 서버(5)는 탐침이 삽입된 소스코드를 웹브라우징 기기(4)와 코드 커버리지 측정 장치(2)로 전송한다. (e)(f) The proxy server 5 transmits the source code in which the probe is inserted to the web browsing device 4 and the code coverage measuring device 2.

(g) 웹브라우징 기기(4)는 수신된 탐침이 삽입된 소스코드에 대한 실행정보를 생성한다. (g) The web browsing device 4 generates execution information for the source code into which the received probe is inserted.

(h) 웹브라우징 기기(4)는 실행정보를 프록시 서버(5)로 전송한다.(h) The web browsing device 4 transmits execution information to the proxy server 5.

(i) 프록시 서버(5)는 실행정보를 코드 커버리지 측정 장치(2)로 전송한다.(i) The proxy server 5 transmits execution information to the code coverage measurement device 2.

(j) 코드 커버리지 측정 장치(2)는 탐침이 삽입된 소스코드에 대한 실행정보를 기초로 코드 커버리지를 측정한다.(j) The code coverage measurement apparatus 2 measures code coverage based on execution information for the source code into which the probe is inserted.

도 8 및 도 9는 본 발명의 다른 실시예에 따른 코드 커버리지 측정 장치(2)를 설명하기 위해 참조되는 도면이다.8 and 9 are diagrams referred to for explaining a code coverage measurement apparatus 2 according to another embodiment of the present invention.

도 8에 도시한 바와 같이, 코드 커버리지 측정 장치(2)는 소스코드 수신부(215), 실행정보 수신부(225), 및 커버리지 측정부(235)를 포함할 수 있다.As shown in FIG. 8, the code coverage measurement apparatus 2 may include a source code receiving unit 215, an execution information receiving unit 225, and a coverage measurement unit 235.

소스코드 수신부(215)는 코드 커버리지 측정 장치(2)와 연동된 프록시 서버(5)로부터 탐침이 삽입된 소스코드를 수신할 수 있다(S910). 탐침이 삽입된 소스코드는 웹 서버(3)에서 제공된 웹페이지를 구성하는 소스코드를 기초로 프록시 서버(5)에서 탐침이 삽입된 것일 수 있다.The source code receiving unit 215 may receive the source code into which the probe is inserted from the proxy server 5 interworked with the code coverage measuring apparatus 2 (S910). The source code into which the probe is inserted may be that the probe is inserted by the proxy server 5 based on the source code constituting the web page provided by the web server 3.

실행정보 수신부(225)는 탐침이 삽입된 소스코드에 대한 실행정보를 프록시 서버(5)로부터 수신할 수 있다(S920). 실행정보는 웹브라우저를 실행하는 웹브라우징 기기(4)에서 탐침이 삽입된 소스코드를 실행하여 생성된 후 프록시 서버(5)로 전송되는 정보일 수 있다. The execution information receiving unit 225 may receive execution information on the source code into which the probe is inserted from the proxy server 5 (S920). The execution information may be information transmitted to the proxy server 5 after being generated by executing the source code in which the probe is inserted in the web browsing device 4 executing the web browser.

커버리지 측정부(235)는 프록시 서버(5)로부터 수신한 탐침이 삽입된 소스코드에 대한 실행정보를 기초로 소스코드에 대한 코드 커버리지를 측정할 수 있다(S930).The coverage measurement unit 235 may measure the code coverage for the source code based on the execution information for the source code into which the probe is inserted, received from the proxy server 5 (S930).

도 10은 본 발명의 실시예에 따른 소스코드의 커버리지 측정 결과를 예시한 도면이다.10 is a diagram illustrating a result of measuring coverage of a source code according to an embodiment of the present invention.

도 10은 본 발명의 실시예에 따른 소스코드의 커버리지 측정 결과에 대한 예시이며, 도 11은 이에 대한 분석 결과를 나타낸 도면이다.10 is an example of a coverage measurement result of a source code according to an embodiment of the present invention, and FIG. 11 is a view showing an analysis result thereof.

도 11은 전체 커버리지 정보에 포함되는 복수의 정보의 예들을 도시한다.11 shows examples of a plurality of pieces of information included in the total coverage information.

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

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

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

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

컴퓨터로 판독가능한 기록매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, 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 tapes, optical recording media such as CD-ROMs and 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 the program instructions include not only machine language codes such as those produced by a compiler, but also high-level language codes 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 execute the processing according to the present invention, and vice versa.

이상에서 실시예들에 설명된 특징, 구조, 효과 등은 본 발명의 하나의 실시예에 포함되며, 반드시 하나의 실시예에만 한정되는 것은 아니다. 나아가, 각 실시예에서 예시된 특징, 구조, 효과 등은 실시예들이 속하는 분야의 통상의 지식을 가지는 자에 의해 다른 실시예들에 대해서도 조합 또는 변형되어 실시 가능하다. 따라서 이러한 조합과 변형에 관계된 내용들은 본 발명의 범위에 포함되는 것으로 해석되어야 할 것이다.Features, structures, effects, and the like described in the embodiments above are included in one embodiment of the present invention, and are not necessarily limited to one embodiment. Further, the features, structures, effects, etc. illustrated in each embodiment may be implemented by combining or modifying other embodiments by a person having ordinary knowledge in the field to which the embodiments belong. Accordingly, contents related to such combinations and modifications should be interpreted as being included in the scope of the present invention.

또한, 이상에서 실시예를 중심으로 설명하였으나 이는 단지 예시일 뿐 본 발명을 한정하는 것이 아니며, 본 발명이 속하는 분야의 통상의 지식을 가진 자라면 본 실시예의 본질적인 특성을 벗어나지 않는 범위에서 이상에 예시되지 않은 여러 가지의 변형과 응용이 가능함을 알 수 있을 것이다. 예를 들어, 실시예에 구체적으로 나타난 각 구성 요소는 변형하여 실시할 수 있는 것이다. 그리고 이러한 변형과 응용에 관계된 차이점들은 첨부된 청구 범위에서 규정하는 본 발명의 범위에 포함되는 것으로 해석되어야 할 것이다.In addition, although the embodiments have been described above, these are only examples and do not limit the present invention, and those of ordinary skill in the field to which the present invention belongs are illustrated above within the scope not departing from the essential characteristics of the present embodiment. It will be seen that various modifications and applications that are not available are possible. For example, each component specifically shown in the embodiment can be modified and implemented. And differences related to these modifications and applications should be construed as being included in the scope of the present invention defined in the appended claims.

Claims (21)

코드 커버리지 측정 장치에 있어서,
외부기기로부터 소스코드를 입력받기 위한 소스코드 입력부;
상기 외부기기로부터 입력된 소스코드에 탐침을 삽입하는 탐침 삽입부;
상기 탐침이 삽입된 소스코드를 웹 서버를 경유하여 웹브라우징 기기로 전송하고, 상기 웹브라우징 기기에서 실행된 실행정보를 상기 웹 서버를 통하여 수신하는 웹 서버연동부; 및
상기 웹 브라우징 기기에서 실행되고 상기 웹 서버를 경유하여 수신된 상기 실행정보를 기초로 상기 외부기기로부터 입력받은 상기 소스코드에 대한 코드 커버리지를 측정하는 커버리지 측정부;를 포함하는,
코드 커버리지 측정 장치.
In the code coverage measurement device,
A source code input unit for receiving a source code from an external device;
A probe insertion unit for inserting a probe into the source code input from the external device;
A web server interworking unit for transmitting the source code into which the probe is inserted to a web browsing device via a web server, and receiving execution information executed by the web browsing device via the web server; And
Including; a coverage measurement unit that is executed in the web browsing device and measures code coverage for the source code input from the external device based on the execution information received via the web server.
Code coverage measurement device.
제 1항에 있어서,
상기 실행정보는 웹브라우저를 실행하는 웹브라우징 기기에서 상기 탐침이 삽입된 소스코드를 실행하여 생성된 후 상기 웹 서버로 전송되는 정보인,
코드 커버리지 측정 장치.
The method of claim 1,
The execution information is information transmitted to the web server after being generated by executing the source code into which the probe is inserted in a web browsing device executing a web browser,
Code coverage measurement device.
제 2항에 있어서,
상기 실행정보는 하기 (a) 내지 (d)의 과정을 거쳐 생성되는,
(a) 상기 탐침 삽입부에서 생성된 상기 탐침이 삽입된 소스코드는 상기 외부기기로 전송
(b) 상기 탐침이 삽입된 소스코드를 상기 외부기기로부터 상기 웹 서버로 전송
(c) 상기 웹브라우징 기기의 전송 요청에 따라 상기 웹 서버에서 상기 웹브라우징 기기로 전송
(d) 상기 웹브라우징 기기에서 상기 탐침이 삽입된 소스코드가 실행되어 상기 실행정보가 생성
코드 커버리지 측정 장치.
The method of claim 2,
The execution information is generated through the processes of the following (a) to (d),
(a) The source code into which the probe generated by the probe insertion unit is inserted is transmitted to the external device.
(b) Transmitting the source code with the probe inserted from the external device to the web server
(c) Transmitted from the web server to the web browsing device according to the transmission request from the web browsing device
(d) The web browsing device executes the source code into which the probe is inserted, and the execution information is generated.
Code coverage measurement device.
제 1항 내지 제 3항 중 어느 한 항에 있어서,
상기 소스코드는 자바스크립트(JavaScript) 언어를 기반으로 생성된 코드인,
코드 커버리지 측정 장치.
The method according to any one of claims 1 to 3,
The source code is a code generated based on the JavaScript language,
Code coverage measurement device.
코드 커버리지 측정 장치의 코드 커버리지 측정 방법에 있어서,
소스코드 입력부를 통해, 외부기기로부터 소스코드를 입력받는 단계;
탐침 삽입부를 통해, 상기 외부기기로부터 입력된 소스코드에 탐침을 삽입하는 단계;
웹 서버연동부를 통해, 상기 탐침이 삽입된 소스코드를 웹 서버를 경유하여 웹브라우징 기기로 전송하고, 상기 웹브라우징 기기에서 실행된 실행정보를 상기 웹 서버를 통하여 수신하는 단계; 및
커버리지 측정부를 통해, 상기 웹브라우징 기기에서 실행되고 상기 웹 서버를 경유하여 수신된 상기 실행정보를 기초로 상기 외부기기로부터 입력받은 상기 소스코드에 대한 코드 커버리지를 측정하는 단계;를 포함하는,
코드 커버리지 측정 장치의 코드 커버리지 측정 방법.
In the code coverage measurement method of the code coverage measurement device,
Receiving a source code from an external device through a source code input unit;
Inserting a probe into a source code input from the external device through a probe insertion unit;
Transmitting the source code into which the probe is inserted to a web browsing device via a web server, and receiving execution information executed by the web browsing device through the web server; And
Including, through a coverage measurement unit, measuring code coverage for the source code input from the external device based on the execution information executed in the web browsing device and received via the web server.
Code coverage measurement method of the code coverage measurement device.
제 5항에 있어서,
상기 실행정보는 웹브라우저를 실행하는 웹브라우징 기기에서 상기 탐침이 삽입된 소스코드를 실행하여 생성된 후 상기 웹 서버로 전송되는 정보인,
코드 커버리지 측정 장치의 코드 커버리지 측정 방법.
The method of claim 5,
The execution information is information transmitted to the web server after being generated by executing the source code into which the probe is inserted in a web browsing device executing a web browser,
Code coverage measurement method of the code coverage measurement device.
제 6항에 있어서,
상기 실행정보는 하기 (a) 내지 (d)의 과정을 거쳐 생성되는,
(a) 상기 탐침 삽입부에서 생성된 상기 탐침이 삽입된 소스코드는 상기 외부기기로 전송
(b) 상기 탐침이 삽입된 소스코드를 상기 외부기기로부터 상기 웹 서버로 전송
(c) 상기 웹브라우징 기기의 전송 요청에 따라 상기 웹 서버에서 상기 웹브라우징 기기로 전송
(d) 상기 웹브라우징 기기에서 상기 탐침이 삽입된 소스코드가 실행되어 상기 실행정보가 생성
코드 커버리지 측정 장치의 코드 커버리지 측정 방법.
The method of claim 6,
The execution information is generated through the processes of the following (a) to (d),
(a) The source code into which the probe generated by the probe insertion unit is inserted is transmitted to the external device.
(b) Transmitting the source code with the probe inserted from the external device to the web server
(c) Transmitted from the web server to the web browsing device according to the transmission request from the web browsing device
(d) The web browsing device executes the source code into which the probe is inserted, and the execution information is generated.
Code coverage measurement method of the code coverage measurement device.
제 5항에 있어서,
상기 소스코드는 자바스크립트(Java Script) 언어를 기반으로 생성된 코드인,
코드 커버리지 측정 장치의 코드 커버리지 측정 방법.
The method of claim 5,
The source code is a code generated based on the Java Script language,
Code coverage measurement method of the code coverage measurement device.
소스코드를 코드 커버리지 측정 장치로 전송하는 외부기기;
상기 외부기기로부터 수신한 상기 소스코드에 탐침을 삽입하는 코드 커버리지 측정 장치;
상기 탐침이 삽입된 소스코드에 대한 실행정보를 생성하는 웹브라우징 기기; 및
상기 웹브라우징 기기로부터 상기 실행정보를 수신하는 웹 서버;를 포함하고,
상기 코드 커버리지 측정 장치는 상기 탐침이 삽입된 소스코드를 상기 웹 서버를 경유하여 상기 웹브라우징 기기로 전송하고, 상기 웹브라우징 기기에서 실행된 실행정보를 상기 웹 서버를 통하여 수신하며, 수신된 상기 실행정보를 기초로 상기 외부기기로부터 입력받은 상기 소스코드에 대한 코드 커버리지를 측정하는,
코드 커버리지 측정 시스템.
An external device for transmitting the source code to the code coverage measuring device;
A code coverage measuring device for inserting a probe into the source code received from the external device;
A web browsing device that generates execution information for the source code into which the probe is inserted; And
Including; a web server for receiving the execution information from the web browsing device,
The code coverage measuring apparatus transmits the source code into which the probe is inserted to the web browsing device via the web server, receives execution information executed in the web browsing device through the web server, and receives the received execution Measuring code coverage for the source code input from the external device based on information,
Code coverage measurement system.
제 9항에 있어서,
상기 실행정보는 웹브라우저를 실행하는 웹브라우징 기기에서 상기 탐침이 삽입된 소스코드를 실행하여 생성된 후 상기 웹 서버로 전송되는 정보인,
코드 커버리지 측정 시스템.
The method of claim 9,
The execution information is information transmitted to the web server after being generated by executing the source code into which the probe is inserted in a web browsing device executing a web browser,
Code coverage measurement system.
제 10항에 있어서,
상기 실행정보는 하기 (a) 내지 (d)의 과정을 거쳐 생성되는,
(a) 상기 코드 커버리지 측정 장치에서 생성된 상기 탐침이 삽입된 소스코드는 상기 외부기기로 전송
(b) 상기 외부기기로부터 상기 웹 서버로 전송
(c) 상기 웹브라우징 기기의 전송 요청에 따라 상기 웹 서버에서 상기 웹브라우징 기기로 전송
(d) 상기 웹브라우징 기기에서 상기 탐침이 삽입된 소스코드가 실행되어 상기 실행정보가 생성
코드 커버리지 측정 시스템.
The method of claim 10,
The execution information is generated through the processes of the following (a) to (d),
(a) The source code into which the probe generated by the code coverage measurement device is inserted is transmitted to the external device.
(b) Transfer from the external device to the web server
(c) Transmitted from the web server to the web browsing device according to the transmission request from the web browsing device
(d) The web browsing device executes the source code into which the probe is inserted, and the execution information is generated.
Code coverage measurement system.
제 9항 내지 제 11항 중 어느 한 항에 있어서,
상기 소스코드는 자바스크립트(Java Script) 언어를 기반으로 생성된 코드인,
코드 커버리지 측정 시스템.
The method according to any one of claims 9 to 11,
The source code is a code generated based on the Java Script language,
Code coverage measurement system.
제 5항 내지 제 8항 중 어느 한 항에 따른 방법을 실행하기 위한 컴퓨터 프로그램을 기록하기 위한 컴퓨터 판독 가능한 기록 매체.
A computer-readable recording medium for recording a computer program for executing the method according to any one of claims 5 to 8.
삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete
KR1020180153290A 2018-12-03 2018-12-03 Code coverage measuring apparatus, code coverage measuring method of the code coverage mearusing apparatus, and code coverage measuring system KR102165037B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180153290A KR102165037B1 (en) 2018-12-03 2018-12-03 Code coverage measuring apparatus, code coverage measuring method of the code coverage mearusing apparatus, and code coverage measuring system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180153290A KR102165037B1 (en) 2018-12-03 2018-12-03 Code coverage measuring apparatus, code coverage measuring method of the code coverage mearusing apparatus, and code coverage measuring system

Publications (2)

Publication Number Publication Date
KR20200066778A KR20200066778A (en) 2020-06-11
KR102165037B1 true KR102165037B1 (en) 2020-10-13

Family

ID=71070441

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180153290A KR102165037B1 (en) 2018-12-03 2018-12-03 Code coverage measuring apparatus, code coverage measuring method of the code coverage mearusing apparatus, and code coverage measuring system

Country Status (1)

Country Link
KR (1) KR102165037B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20230057711A (en) 2021-10-22 2023-05-02 슈어소프트테크주식회사 Apparatus and method for display the test coverage

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112860543A (en) * 2021-01-20 2021-05-28 维沃移动通信(深圳)有限公司 Method and electronic equipment for detecting page operation

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060235947A1 (en) * 2005-04-15 2006-10-19 Microsoft Corporation Methods and apparatus for performing diagnostics of web applications and services
KR101667262B1 (en) * 2014-08-18 2016-10-19 슈어소프트테크주식회사 Method for measuring code coverage and computer readable recording medium having program the same
US20180101468A1 (en) 2015-04-15 2018-04-12 Entit Software Llc Code coverage information
US10560539B1 (en) 2018-09-20 2020-02-11 Sap Se Automatic script code coverage measurements for software scripts

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060235947A1 (en) * 2005-04-15 2006-10-19 Microsoft Corporation Methods and apparatus for performing diagnostics of web applications and services
KR101667262B1 (en) * 2014-08-18 2016-10-19 슈어소프트테크주식회사 Method for measuring code coverage and computer readable recording medium having program the same
US20180101468A1 (en) 2015-04-15 2018-04-12 Entit Software Llc Code coverage information
US10560539B1 (en) 2018-09-20 2020-02-11 Sap Se Automatic script code coverage measurements for software scripts

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20230057711A (en) 2021-10-22 2023-05-02 슈어소프트테크주식회사 Apparatus and method for display the test coverage

Also Published As

Publication number Publication date
KR20200066778A (en) 2020-06-11

Similar Documents

Publication Publication Date Title
US11151018B2 (en) Method and apparatus for testing a code file
US8745641B1 (en) Automatic verification and anomaly detection in a representational state transfer (REST) application programming interface
US8601434B2 (en) Method and system for information processing and test case generation
Hallé et al. Runtime Verification of Web Service Interface Contracts.
Moran et al. MDroid+ a mutation testing framework for android
US20030074423A1 (en) Testing web services as components
US8839351B2 (en) Effective testing of authorization logic of web components which utilize claims-based authorization
US20130312102A1 (en) Verifying application security vulnerabilities
US8239493B2 (en) Automated server controlled client-side logging
Huang et al. Detecting sensitive data disclosure via bi-directional text correlation analysis
US11888885B1 (en) Automated security analysis of software libraries
CN109871312B (en) Interface testing method, device, equipment and readable storage medium
US10310956B2 (en) Techniques for web service black box testing
Nguyen et al. Mining interprocedural, data-oriented usage patterns in JavaScript web applications
KR102165037B1 (en) Code coverage measuring apparatus, code coverage measuring method of the code coverage mearusing apparatus, and code coverage measuring system
Mirzaaghaei et al. DOM-based test adequacy criteria for web applications
CN112419057A (en) Method, device, equipment and storage medium for generating and storing logs of intelligent contracts
US20070245313A1 (en) Failure tagging
US20060193342A1 (en) System and method for testing a protocol using targeted variant input
Kupsch et al. Bad and good news about using software assurance tools
Heelan et al. Augmenting vulnerability analysis of binary code
US10606569B2 (en) Declarative configuration elements
CN110457040B (en) Method and device for distributed construction of source code
Roy Choudhary Cross-platform testing and maintenance of web and mobile applications
Grigera et al. Live versioning of web applications through refactoring

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant