[go: up one dir, main page]

KR102603330B1 - Apparatus and method for display the test coverage - Google Patents

Apparatus and method for display the test coverage Download PDF

Info

Publication number
KR102603330B1
KR102603330B1 KR1020210141791A KR20210141791A KR102603330B1 KR 102603330 B1 KR102603330 B1 KR 102603330B1 KR 1020210141791 A KR1020210141791 A KR 1020210141791A KR 20210141791 A KR20210141791 A KR 20210141791A KR 102603330 B1 KR102603330 B1 KR 102603330B1
Authority
KR
South Korea
Prior art keywords
code
step value
coverage
test
code line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
KR1020210141791A
Other languages
Korean (ko)
Other versions
KR20230057711A (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 KR1020210141791A priority Critical patent/KR102603330B1/en
Priority to PCT/KR2022/006552 priority patent/WO2023068467A1/en
Publication of KR20230057711A publication Critical patent/KR20230057711A/en
Application granted granted Critical
Publication of KR102603330B1 publication Critical patent/KR102603330B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/362Debugging of software
    • G06F11/3624Debugging of software by performing operations on the source code, e.g. via a compiler
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons

Landscapes

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

Abstract

본 발명에 따른 테스트 커버리지 표시 장치는 소스 코드에 대한 코드 커버리지를 측정하는 테스트 수행부, 테스트 수행부에서 측정된 코드 커버리지에 기초하여, 각 코드 라인별 커버 횟수의 누적 합계를 계산하고, 상기 누적 합계에 대응하는 단계값을 각 코드 라인별로 계산하여 저장하는 저장부, 및 저장부에 저장된 단계값에 기초하여 각 코드 라인을 상이하게 표시하는 커버리지 표시부를 포함한다. 본 발명에 의하면, 코드 커버리지에 시각적인 차이를 즉각적으로 확인할 수 있기 때문에 사용자가 더욱 용이하게 테스트 품질을 확인할 수 있게 된다. A test coverage display device according to the present invention includes a test execution unit that measures code coverage for source code, calculates a cumulative total of the number of covers for each code line based on the code coverage measured by the test execution unit, and calculates the cumulative total. It includes a storage unit that calculates and stores a step value corresponding to each code line, and a coverage display unit that displays each code line differently based on the step value stored in the storage unit. According to the present invention, users can more easily check test quality because visual differences in code coverage can be immediately confirmed.

Description

테스트 커버리지 표시 장치 및 표시 방법{APPARATUS AND METHOD FOR DISPLAY THE TEST COVERAGE}Test coverage display device and display method {APPARATUS AND METHOD FOR DISPLAY THE TEST COVERAGE}

본 발명은 코드 커버리지에 시각적인 차이를 둠으로써 코드의 테스트량을 즉각적으로 확인할 수 있는 테스트 커버리지 표시 장치 및 표시 방법에 관한 것이다.The present invention relates to a test coverage display device and method that can immediately check the test amount of code by making a visual difference in code coverage.

종래에는 사용자가 프로그램 개발 과정에서, 개발중인 프로그램의 검증을 위해 작성된 소스 코드에 대한 테스트 수행 정도를 확인하는 과정이 수행되었다. 예를 들어, 프로그램 설계의 실수나 미처 생각하지 못한 변수 등에 의해서 프로그램은 작성자의 의도와 다르게 또는 비효율적으로 동작할 가능성이 있다. 프로그램이 원하지 않는 결과를 내는 것을 버그(Bug) 또는 프로그램 오류(Error)라고 부른다. 이런 버그 또는 프로그램 오류를 막기 위해 프로그램 개발시 테스트 과정이 반드시 요구된다. 프로그램이 충분히 검증되었는지 수치로 확인하는 동적 테스트 장치는 코드 커버리지(Code Coverage)를 측정한다. 코드 커버리지는, 소프트웨어 테스트(software test)의 품질을 측정하기 위해 사용되는 하나의 척도(measure)가 되며, 어느 하나의 프로그램(program)의 소스 코드(source code)가 테스트된 비율을 의미한다. 따라서, 코드 커버리지는 일반적으로 백분율로 표시된다.Conventionally, during the program development process, users performed a process of checking the degree of test performance on the source code written to verify the program under development. For example, there is a possibility that a program may operate differently or inefficiently than the author intended due to mistakes in program design or unconsidered variables. When a program produces unwanted results, it is called a bug or program error. To prevent such bugs or program errors, a testing process is required when developing a program. A dynamic test device that numerically verifies whether a program has been sufficiently verified measures code coverage. Code coverage is a measure used to measure the quality of software testing, and refers to the rate at which the source code of one program has been tested. Therefore, code coverage is usually expressed as a percentage.

즉, 코드 커버리지는 테스트를 수행하면 얻어지는 결과물로, 해당 테스트가 어떤 코드를 수행했는지에 대한 정보를 나타낸다. 소프트웨어의 단위시험(unit test)을 진행할 때, 동일한 단위(보통 함수)에 테스트가 집중되는 경우가 있다. 기존에는 소스코드 편집기 상에 함수 단위로 관련된 테스트의 개수를 표시하거나, 별도의 윈도우를 두어 대상 함수별 테스트를 그룹화하는 방법을 사용해왔다. 하지만, 종래의 이러한 방식은 실제 테스트가 실행되기 전의 정적인 테스트 구성 상태만 고려하기 때문에, 실제로 코드의 어느 부분이 많이 테스트되었는지, 혹은, 어느 부분이 상대적으로 적게 테스트되었는지를 판단하기 어렵다는 문제점이 있었다.In other words, code coverage is the result obtained when a test is performed, and represents information about what code was performed by the test. When conducting unit tests for software, tests sometimes focus on the same unit (usually a function). Previously, methods were used to display the number of tests related to each function on the source code editor or to group tests by target function by placing a separate window. However, because this conventional method only considers the static test configuration state before the actual test is executed, there is a problem in that it is difficult to determine which part of the code has actually been tested a lot or which part has been tested relatively little. .

한국 등록특허공보 제10-2165037호 (2020년10월06일 등록)Korean Patent Publication No. 10-2165037 (registered on October 6, 2020)

본 발명은 상술한 문제점을 감안하여 안출된 것으로, 본 발명의 목적은 코드 커버리지에 시각적인 차이를 둠으로써 사용자가 더욱 용이하게 테스트 품질을 확인할 수 있는 테스트 커버리지 표시 장치 및 표시 방법을 제공함에 있다.The present invention was conceived in consideration of the above-mentioned problems, and the purpose of the present invention is to provide a test coverage display device and method that allows users to more easily check test quality by providing a visual difference in code coverage.

상기 목적을 달성하기 위한 본 발명에 따른 커버리지 표시 장치는, 소스 코드에 대한 코드 커버리지를 측정하는 테스트 수행부; 상기 테스트 수행부에서 측정된 코드 커버리지에 기초하여, 각 코드 라인별 커버 횟수의 누적 합계를 계산하고, 상기 누적 합계에 대응하는 단계값을 각 코드 라인별로 계산하여 저장하는 저장부; 및 상기 저장부에 저장된 단계값에 기초하여 각 코드 라인을 상이하게 표시하는 커버리지 표시부;를 포함한다.A coverage display device according to the present invention for achieving the above object includes a test performing unit that measures code coverage for source code; A storage unit that calculates a cumulative total of the number of covers for each code line based on the code coverage measured by the test execution unit, and calculates and stores a step value corresponding to the cumulative total for each code line; and a coverage display unit that displays each code line differently based on the step value stored in the storage unit.

또한, 상기 저장부는, 전체 코드를 대상으로 하는 기준과 함수 내 코드를 대상으로 하는 기준으로 구분하여 최대 누적횟수와 최소 누적횟수를 계산하고, 상기 최대 누적횟수와 최소 누적횟수에 기초하여 상기 단계값을 계산할 수 있다.In addition, the storage unit calculates the maximum accumulation number and minimum accumulation number by dividing into a standard targeting the entire code and a standard targeting code within the function, and calculates the step value based on the maximum accumulation number and minimum accumulation number. can be calculated.

그리고, 상기 단계값은 아래 수식에 의하여 계산될 수 있다. And, the step value can be calculated using the formula below.

단계값=floor((N/최대 누적횟수)*해당 라인의 누적횟수) (여기서, N은 단계값의 총 개수)Step value=floor((N/maximum cumulative number)*accumulated number of corresponding lines) (where N is the total number of step values)

또한, 상기 단계값은 총 N개의 단계를 포함하며, 상기 커버리지 표시부는 상기 N개의 단계 각각에 대하여 상이한 색상을 부여하고, 각각의 코드 라인의 단계값에 대응하는 색상을 상기 코드 라인에 표시할 수 있다.In addition, the step value includes a total of N steps, and the coverage display unit can give a different color to each of the N steps and display a color corresponding to the step value of each code line on the code line. there is.

그리고, 상기 단계값은 총 N개의 단계를 포함하며, 상기 커버리지 표시부는 상기 N개의 단계 각각에 대하여 상이한 아이콘을 부여하고, 각각의 코드 라인의 단계값에 대응하는 아이콘을 상기 코드 라인에 표시할 수 있다.In addition, the step value includes a total of N steps, and the coverage display unit can assign a different icon to each of the N steps and display an icon corresponding to the step value of each code line on the code line. there is.

또한, 상기 단계값에 대응하는 색상 또는 아이콘을 사용자로부터 지정받기 위한 입력부;를 더 포함할 수 있다.In addition, it may further include an input unit for receiving a color or icon corresponding to the step value from the user.

그리고, 커버리지 표시부는 상기 단계값이 기설정된 한계값 이상인 코드 라인에 대해서만 상이하게 표시할 수 있다.Additionally, the coverage display unit may display differently only for code lines whose step value is greater than or equal to a preset threshold.

한편, 상기 목적을 달성하기 위한 본 발명에 따른 테스트 커버리지 표시 방법은, 소스 코드에 대한 코드 커버리지를 측정하는 테스트 수행 단계; 상기 테스트 수행부에서 측정된 코드 커버리지에 기초하여, 각 코드 라인별 커버 횟수의 누적 합계를 계산하고, 상기 누적 합계에 대응하는 단계값을 각 코드 라인별로 계산하여 저장하는 저장 단계; 및 상기 저장된 단계값에 기초하여 각 코드 라인을 상이하게 표시하는 커버리지 표시 단계;를 포함한다.Meanwhile, a test coverage display method according to the present invention for achieving the above object includes a test performance step of measuring code coverage for source code; A storage step of calculating a cumulative total of the number of covers for each code line based on the code coverage measured by the test execution unit, and calculating and storing a step value corresponding to the cumulative total for each code line; and a coverage display step of displaying each code line differently based on the stored step value.

그리고, 상기 저장 단계는, 전체 코드를 대상으로 하는 기준과 함수 내 코드를 대상으로 하는 기준으로 구분하여 최대 누적횟수와 최소 누적횟수를 계산하고, 상기 최대 누적횟수와 최소 누적횟수에 기초하여 상기 단계값을 계산할 수 있다.In addition, in the storage step, the maximum accumulation number and minimum accumulation number are calculated by dividing into a standard targeting the entire code and a standard targeting the code within the function, and the step is based on the maximum accumulation number and minimum accumulation number. The value can be calculated.

또한, 상기 단계값은 아래 수식에 의하여 계산될 수 있다.Additionally, the step value can be calculated using the formula below.

단계값=floor((N/최대 누적횟수)*해당 라인의 누적횟수) (여기서, N은 단계값의 총 개수)Step value=floor((N/maximum cumulative number)*accumulated number of corresponding lines) (where N is the total number of step values)

그리고, 상기 단계값은 총 N개의 단계를 포함하며, 상기 커버리지 표시 단계는 상기 N개의 단계 각각에 대하여 상이한 색상을 부여하고, 각각의 코드 라인의 단계값에 대응하는 색상을 상기 코드 라인에 표시할 수 있다.In addition, the step value includes a total of N steps, and the coverage display step assigns a different color to each of the N steps, and displays a color corresponding to the step value of each code line on the code line. You can.

또한, 상기 단계값은 총 N개의 단계를 포함하며, 상기 커버리지 표시 단계는 상기 N개의 단계 각각에 대하여 상이한 아이콘을 부여하고, 각각의 코드 라인의 단계값에 대응하는 아이콘을 상기 코드 라인에 표시할 수 있다.In addition, the step value includes a total of N steps, and the coverage display step assigns a different icon to each of the N steps, and displays an icon corresponding to the step value of each code line on the code line. You can.

그리고, 상기 단계값에 대응하는 색상 또는 아이콘을 사용자로부터 지정받는 입력 단계;를 더 포함할 수 있다.And, it may further include an input step of receiving a color or icon corresponding to the step value from the user.

또한, 상기 커버리지 표시 단계는 상기 단계값이 기설정된 한계값 이상인 코드 라인에 대해서만 상이하게 표시할 수 있다.Additionally, the coverage display step may be displayed differently only for code lines whose step value is greater than or equal to a preset threshold.

본 발명에 따른 테스트 커버리지 표시 장치 및 표시 방법에 의하면, 코드 커버리지에 시각적인 차이를 즉각적으로 확인할 수 있기 때문에 사용자가 더욱 용이하게 테스트 품질을 확인할 수 있게 된다. According to the test coverage display device and display method according to the present invention, a visual difference in code coverage can be immediately confirmed, allowing users to more easily check test quality.

도 1은 본 발명에 따른 테스트 커버리지 표시 장치의 구성을 나타내는 블록도이다.
도 2는 본 발명에 따른 테스트 커버리지 표시 방법에서 단계값을 설정하는 과정을 설명하는 플로우차트이다.
도 3은 본 발명에 따른 테스트 커버리지 표시 방법에서 단계값을 설정하는 일 실시예를 설명하는 도면이다.
도 4 내지 6은 본 발명에 따른 테스트 커버리지 표시 방법에 있어서 다양한 실시예에 따른 표시 방법을 각각 도시한다.
1 is a block diagram showing the configuration of a test coverage display device according to the present invention.
Figure 2 is a flow chart explaining the process of setting step values in the test coverage display method according to the present invention.
Figure 3 is a diagram illustrating an embodiment of setting a step value in the test coverage display method according to the present invention.
4 to 6 respectively illustrate display methods according to various embodiments of the test coverage display method according to the present invention.

후술하는 본 발명에 대한 상세한 설명은, 본 발명이 실시될 수 있는 특정 실시 형태를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시 형태는 당업자가 본 발명을 실시할 수 있기에 충분하도록 상세히 설명된다. 본 발명의 다양한 실시 형태는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시 형태에 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시 형태로 구현될 수 있다. 또한, 각각의 개시된 실시 형태 내의 개별 구성요소의 위치 또는 배치는 본 발명의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 본 발명의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다.The detailed description of the present invention described below refers to the accompanying drawings, which show by way of example specific embodiments in which the present invention may be practiced. These embodiments are described in sufficient detail to enable any person skilled in the art to practice the invention. It should be understood that the various embodiments of the present invention are different from one another but are not necessarily mutually exclusive. For example, specific shapes, structures and characteristics described herein may be implemented in one embodiment or another without departing from the spirit and scope of the invention. Additionally, it should 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 invention. Accordingly, the detailed description that follows is not intended to be taken in a limiting sense, and the scope of the invention is limited only by the appended claims, together with all equivalents to what those claims assert, if properly described. Similar reference numbers in the drawings refer to identical or similar functions across various aspects.

도 1은 본 발명에 따른 테스트 커버리지 표시 장치의 구성을 나타내는 블록도이다.1 is a block diagram showing the configuration of a test coverage display device according to the present invention.

본 발명에 따른 테스트 커버리지 표시 장치(100)는 테스트 수행부(110), 커버리지 표시부(120) 및 저장부(130)를 포함한다.The test coverage display device 100 according to the present invention includes a test performance unit 110, a coverage display unit 120, and a storage unit 130.

테스트 수행부(110)는 소스 코드에 대한 코드 커버리지를 측정한다. 테스트 수행부(110)는 종래의 다양한 커버리지 측정 방식을 이용할 수 있다. 테스트 수행부(110)는 개발자 PC, 빌드 서버 또는 워크스테이션 등을 포함할 수 있다. 또한, 테스트 수행부(110)는 소정의 운영체제에 의해 구동되고, 소프트웨어의 설치 및 편집이 가능한 장치로서, 소정의 프로그램 모듈 또는 하드웨어들을 포함할 수 있다. 코드 커버리지(code coverage)는 소프트웨어의 테스트를 논할 때 얼마나 테스트가 충분한가를 나타내는 지표중 하나이다. 즉, 소프트웨어 테스트를 진행했을 때 코드 자체가 얼마나 실행되었냐는 것이다. 따라서, 테스트 진행 결과, 실행 부분과 미실행 부분을 포함할 수 있으며, 전체 코드 중에 실행 부분을 코드 커버리지로 정의할 수 있다. The test performance unit 110 measures code coverage of the source code. The test performing unit 110 may use various conventional coverage measurement methods. The test performance unit 110 may include a developer PC, build server, or workstation. In addition, the test execution unit 110 is a device that is driven by a certain operating system and is capable of installing and editing software, and may include certain program modules or hardware. Code coverage is one of the indicators that indicates how sufficient the testing is when discussing software testing. In other words, how much of the code itself was executed when the software was tested? Therefore, the test progress results can include executing parts and non-executing parts, and the executing part of the entire code can be defined as code coverage.

테스트 수행부(110)는 코드 커버리지를 측정하기 위한 시스템의 전반적인 제어를 담당하며, 소스코드 분석부, 이진코드 분석부, 명령주소 분석부 등의 구성을 포함할 수 있지만, 이에 한정되지 않는다. 여기서, 소스코드 분석부는 소스코드 분석정보를 생성할 수 있다. 여기서 소스코드는 c, c++ 등의 프로그램 언어일 수 있으며, 소스코드 분석부는 파서(parser) 모듈을 포함하며, 소스코드를 구성하는 구성 요소별로 노드에 대한 클래스를 정의하고, 연산자와 피연산자의 자료 유형 정보를 추출하여 노드를 생성하며, 생성된 노드에 기초하여 추상 구문 트리(Abstract Syntax Tree, AST)를 생성할 수 있다. 따라서, 생성된 소스코드 분석정보는 추상 구문 트리 정보를포함할 수 있다.The test execution unit 110 is responsible for overall control of the system to measure code coverage, and may include, but is not limited to, a source code analysis unit, a binary code analysis unit, and a command address analysis unit. Here, the source code analysis unit can generate source code analysis information. Here, the source code may be a program language such as C or C++, and the source code analysis unit includes a parser module, defines a class for the node for each component that makes up the source code, and data types of operators and operands. Information can be extracted to create nodes, and an abstract syntax tree (AST) can be created based on the generated nodes. Therefore, the generated source code analysis information may include abstract syntax tree information.

이진코드 분석부는 소스코드를 빌드하여 생성된 이진코드에 대한 이진코드 분석정보를 생성할 수 있다. 구체적으로, 이진코드 분석부는 소스코드를 빌드(build) 또는 컴파일(compile)하여 이진코드를 생성할 수 있으며, 생성된 이진코드에 대한 이진코드 분석정보를 생성할 수 있다. 여기서 이진코드 분석정보는 소스코드의 위치(예, 코딩 라인) 에 대응하는 이진코드의 주소정보를 포함할 수 있다. 이진코드 분석정보는/home/pakjea/hw/demo/helloc 소스코드를 빌드하여 생성된 이진코드 주소정보와 명령어, 그리고 이진코드를 포함할 수 있다.The binary code analysis unit can generate binary code analysis information about the binary code generated by building the source code. Specifically, the binary code analysis unit can generate binary code by building or compiling source code, and can generate binary code analysis information for the generated binary code. Here, the binary code analysis information may include address information of the binary code corresponding to the location of the source code (eg, coding line). Binary code analysis information may include binary code address information, instructions, and binary code generated by building the /home/pakjea/hw/demo/helloc source code.

명령주소 분석부는 이진코드가 임베디드 보드로 카피되어 생성된 카피이진코드가 실행되어 이러한 카피이진코드에 대응하는 명령주소 및 명령주소 분석정보를 생성할 수 있다. 구체적으로, 임베디드 보드에서 실행된 카피이진코드는 명령주소 추출부에 의해 명령주소가 추출되며, 명령주소 분석부는 명령주소 추출부에 의해 추출된 명령주소를 수신하고, 수신한 명령주소에 대한 명령주소 분석정보를 생성할 수 있다. 카피이진코드는 임베디드 보드에서 실행되어 카피이진코드에 대응하는 명령주소가 생성되며, 임베디드 보드에서 생성된 명령주소가 명령주소 추출부에 의해 추출될 수 있다. 이후, 명령주소 추출부에 의해 추출된 명령주소를 명령주소 분석부에서 수신하여 명령주소 분석정보를 생성할 수 있다. 여기서 명령주소는 이진코드 주소정보에 매핑되는 정보이며, 명령주소 분석정보는 추출된 명령주소 기분석된 이진코드 분석정보 중 일부의 정보(예, 이진코드 및 명령어)와 매핑된 소정의 정보를 포함한 정보일 수 있다.The command address analysis unit may execute the copy binary code generated by copying the binary code to the embedded board to generate a command address and command address analysis information corresponding to the copy binary code. Specifically, the command address of the copy binary code executed on the embedded board is extracted by the command address extraction unit, the command address analysis unit receives the command address extracted by the command address extraction unit, and the command address for the received command address is extracted. Analysis information can be generated. The copy binary code is executed on the embedded board to generate a command address corresponding to the copy binary code, and the command address generated on the embedded board can be extracted by the command address extractor. Thereafter, the command address extracted by the command address extraction unit may be received by the command address analysis unit to generate command address analysis information. Here, the command address is information mapped to binary code address information, and the command address analysis information includes predetermined information mapped to some information (e.g., binary code and command) among the extracted command address and interpreted binary code analysis information. It could be information.

테스트 수행부(110)는 상기 소스코드 분석정보, 이진코드 분석정보 및 명령주소 분석정보를 이용하여 소스코드의 커버리지를 측정하게 된다. 테스트 수행부(110)는 소스코드 분석부에 의해 생성된 소스코드 분석정보, 이진코드 분석부에 의해 생성된 이진코드 분석정보, 및 명령주소 분석부에 의해 생성된 명령주소 분석정보를 이용하여 소스코드의 커버리지를 측정할 수 있다. 이러한 소스코드의 커버리지는 소스코드 전부 중 실행된 코드의 비율을 나타내는 정보인 전체 커버리지 정보 및 상기 소스코드의 변경된 변경 부분 중 실행된 코드의 비율을 나타내는 정보인 변경 커버리지 정보를 포함할 수 있다. 또한, 변경 커버리지 정보는 변경 함수 커버리지 및 변경 라인 커버리지 정보를 포함할 수 있다.The test execution unit 110 measures the coverage of the source code using the source code analysis information, binary code analysis information, and command address analysis information. The test execution unit 110 uses the source code analysis information generated by the source code analysis unit, the binary code analysis information generated by the binary code analysis unit, and the command address analysis information generated by the command address analysis unit. You can measure the coverage of the code. Coverage of such source code may include total coverage information, which is information indicating the ratio of executed code among all source code, and change coverage information, which is information indicating the ratio of executed code among changed portions of the source code. Additionally, change coverage information may include change function coverage and change line coverage information.

본 발명에 따른 커버리지 표시 장치(100)의 테스트 수행부(110)는 테스트케이스별로 커버리지를 누적시킨다. 즉, 동일한 코드 위치가 다른 테스트케이스에 의해 수행될 수 있으므로, 추후 커버리지 횟수의 누적 계산을 위하여, 각각의 독립된 테스트케이스의 결과는 독립적으로 관리되며, 누적된 형태로 결과를 산출할 수 있다면 테스트 수행부(110)는 어떠한 방식으로 동작되어도 무관하다. 즉, 위에서 설명한 테스트 수행부(110)의 구성 및 동작은 일 실시예일 뿐이며, 종래의 다양한 커버리지 측정 방법 및 구성을 이용하여 다양하게 응용, 변형될 수 있을 것이다.The test execution unit 110 of the coverage display device 100 according to the present invention accumulates coverage for each test case. In other words, since the same code location can be performed by different test cases, the results of each independent test case are managed independently for the purpose of cumulative calculation of the number of coverages in the future, and the test is performed if the results can be calculated in accumulated form. The unit 110 may be operated in any manner. That is, the configuration and operation of the test performance unit 110 described above is only an example, and may be applied and modified in various ways using various conventional coverage measurement methods and configurations.

저장부(120)는 테스트 수행부(110)에서 측정된 코드 커버리지에 기초하여, 각 코드 라인별 커버 횟수의 누적 합계를 계산하고, 상기 누적 합계에 대응하는 단계값을 각 코드 라인별로 계산하여 저장할 수 있다. 따라서, 저장부(120)는 최소한의 연산기능을 가질 수 있다. 다른 실시예에서는, 저장부(120)가 단계값을 계산하기 위한 소정의 연산부(미도시)를 포함할 수도 있다. 한편, 위에서는 단계값 계산이 저장부(120)에서 이루어지는 것으로 상정하여 설명했으나, 단계값 계산은 테스트 수행부(110) 혹은 별도의 연산부(미도시)에서 이루어지고, 저장부(120)는 계산된 단계값만 수신하여 저장할 수도 있다. 즉, 단계값 계산의 주체는 반드시 저장부(120)일 필요는 없고, 테스트 수행부(110) 혹은 별도의 모듈이어도 무방하다. 여기서는, 저장부(120)가 단계값을 계산하고 저장하는 것으로 상정하여 설명하기로 한다.The storage unit 120 calculates a cumulative total of the number of covers for each code line based on the code coverage measured by the test execution unit 110, and calculates and stores a step value corresponding to the cumulative total for each code line. You can. Accordingly, the storage unit 120 may have a minimum computational function. In another embodiment, the storage unit 120 may include a predetermined operation unit (not shown) for calculating the step value. Meanwhile, the description above assumes that the step value calculation is performed in the storage unit 120, but the step value calculation is performed in the test performing unit 110 or a separate calculation unit (not shown), and the storage unit 120 performs the calculation. It is also possible to receive and store only the selected step values. In other words, the subject of step value calculation does not necessarily need to be the storage unit 120, but may be the test execution unit 110 or a separate module. Here, the description will be made assuming that the storage unit 120 calculates and stores the step value.

저장부(120)는, 전체 코드를 대상으로 하는 기준과 함수 내 코드를 대상으로 하는 기준으로 구분하여 최대 누적횟수와 최소 누적횟수를 계산하고, 최대 누적횟수와 최소 누적횟수에 기초하여 단계값을 계산한다.The storage unit 120 calculates the maximum and minimum accumulation counts by dividing them into standards targeting the entire code and standards targeting the code within the function, and calculates the step value based on the maximum and minimum accumulation counts. Calculate.

이때, 단계값은 아래 [수식1]에 의하여 계산될 수 있다.At this time, the step value can be calculated according to [Equation 1] below.

[수식 1][Formula 1]

단계값=floor((N/최대 누적횟수)*해당 라인의 누적횟수)Step value=floor((N/maximum cumulative number)*accumulated number of corresponding lines)

(여기서, N은 단계값의 총 개수)(where N is the total number of step values)

커버리지 표시부(130)는 저장부(120)에 저장된 단계값에 기초하여 각 코드 라인을 상이하게 표시할 수 있다. 구체적으로, 단계값이 총 N개의 단계를 포함하는 경우, 커버리지 표시부(130)는 N개의 단계 각각에 대하여 상이한 색상을 부여하고, 각각의 코드 라인의 단계값에 대응하는 색상을 코드 라인에 표시한다. The coverage display unit 130 may display each code line differently based on the step value stored in the storage unit 120. Specifically, when the step value includes a total of N steps, the coverage display unit 130 assigns a different color to each of the N steps and displays the color corresponding to the step value of each code line on the code line. .

다른 실시예에서, 커버리지 표시부(130)는 N개의 단계 각각에 대하여 상이한 아이콘을 부여하고, 각각의 코드 라인의 단계값에 대응하는 아이콘을 상기 코드 라인에 표시할 수도 있다. 이때, 단계값에 대응하는 색상이나 아이콘은 시스템에 미리 설정되어 있을 수도 있지만, 사용자 입력에 의하여 지정될 수도 있다. 이 경우에는 사용자 입력을 수신하기 위한 입력부(미도시)를 더 포함할 수 있다.In another embodiment, the coverage display unit 130 may assign a different icon to each of the N steps and display an icon corresponding to the step value of each code line on the code line. At this time, the color or icon corresponding to the step value may be preset in the system, but may also be designated by user input. In this case, it may further include an input unit (not shown) to receive user input.

또 다른 실시예에서, 커버리지 표시부(130)는 상기 단계값이 기설정된 한계값 이상인 코드 라인에 대해서만 상이하게 표시할 수도 있다.In another embodiment, the coverage display unit 130 may display differently only for code lines whose step value is greater than or equal to a preset threshold.

도 2는 본 발명에 따른 테스트 커버리지 표시 방법에서 단계값을 설정하는 과정을 설명하는 플로우차트이다. 구체적으로, 도 2의 플로우차트는 본 발명에 따른 커버리지 표시 장치(100)의 테스트 수행부(110) 및 저장부(120)에서 이루어지는 과정을 나타낸다.Figure 2 is a flow chart explaining the process of setting step values in the test coverage display method according to the present invention. Specifically, the flow chart in FIG. 2 shows the processes performed in the test performance unit 110 and the storage unit 120 of the coverage display device 100 according to the present invention.

테스트별로 커버리지를 분리하여 수집하기 위하여 각 테스트에 대한 반복 수행을 실시한다(S210). 각 테스트에 대한 반복 수행은, i번 테스트를 수행(S211)하고, i번 테스트의 커버리지를 수집(S212)한 뒤, i번 커버리지 결과를 저장(S213)하는 과정이 반복해서 이루어진다. In order to separate and collect coverage for each test, each test is repeatedly performed (S210). The repeated performance of each test involves repeatedly performing the i test (S211), collecting the coverage of the i test (S212), and storing the i coverage result (S213).

이후, 전체 테스트에 대한 코드 커버리지 획득되면, 각 코드 라인별로 커버 횟수에 대한 누적횟수를 계산한다. 이때, 계산된 누적횟수를 전체 코드를 대상으로 하는 제1기준과 함수 내 코드를 대상으로 하는 제2기준으로 구분하여, 최대 누적횟수와 최소 누적횟수를 계산한다.Afterwards, when code coverage for the entire test is obtained, the cumulative number of covers for each code line is calculated. At this time, the calculated cumulative number is divided into a first standard targeting the entire code and a second standard targeting the code within the function, and the maximum cumulative number and minimum cumulative number are calculated.

마지막으로, 각 기준별로 라인의 단계값을 추출한 뒤 저장부(130)에 저장한다(S230).Finally, the step value of the line is extracted for each criterion and stored in the storage unit 130 (S230).

도 2의 플로우차트에 도시하지는 않았으나, 단계값이 저장(230)되면, 이에 기초하여 각 코드 라인을 상이하게 표시하는 커버리지 표시 단계가 진행되며, 커버리지 표시 방법은 위의 커버리지 표시부(120)의 동작과 동일하므로 상세 설명은 생략한다. Although not shown in the flow chart of FIG. 2, when the step value is stored (230), a coverage display step is performed to display each code line differently based on this, and the coverage display method is the operation of the coverage display unit 120 above. Since it is the same as , detailed description is omitted.

도 3은 본 발명에 따른 테스트 커버리지 표시 방법에서 단계값을 설정하는 일 실시예를 설명하는 도면이다. Figure 3 is a diagram illustrating an embodiment of setting a step value in the test coverage display method according to the present invention.

도 2의 플로우차트에서 누적횟수 계산 단계(S220)에 의하여 도출된 각 커버리지의 누적횟수, 전체코드기반 순위 및 함수내 코드기반 순위는 도 3에 도시된 바와 같다. In the flow chart of FIG. 2, the cumulative count of each coverage, the overall code-based ranking, and the code-based ranking within the function derived by the cumulative count calculation step (S220) are as shown in FIG. 3.

도 3에 도시된 바와 같이, 커버리지 누적횟수에 의하여 전체 코드를 기반으로 한 순위를 알 수 있고, 함수 내 코드를 기반으로 한 순위를 알 수 있다. 본 발명에 따른 커버리지 표시부(120)는 전체 코드를 기반으로 한 순위에 기초하여 각 코드 라인을 상이하게 표시할 수 있을 뿐만 아니라, 함수 내 코드를 기반으로 한 순위에 기초하여 각 코드 라인을 상이하게 표시할 수 있다. As shown in Figure 3, the ranking based on the entire code can be known based on the cumulative number of coverages, and the ranking based on the code within the function can be known. The coverage display unit 120 according to the present invention can not only display each code line differently based on the ranking based on the entire code, but also display each code line differently based on the ranking based on the code within the function. It can be displayed.

물론, 전체 코드와 함수 내 코드 모두에 기초하여 각 코드라인을 식별 가능하게 표시할 수도 있다. 예를 들어, 전체 코드를 기반으로 한 순위에 기초하여 각 코드라인을 색상으로 식별시키는 동시에, 함수 내 코드를 기반으로 한 순위에 기초해서는 각 코드라인에 아이콘을 병기(부가, 표시)하는 방식을 이용할 수 있다. 또 다른 예로, 전체 코드를 기반으로 한 순위에 기초하여 각 코드라인을 아이콘으로 식별시키는 동시에, 함수 내 코드를 기반으로 한 순위에 기초해서는 상기 단계값이 기설정된 한계값 이상인 코드 라인에 대해서만 색상이나 폰트변형 등으로 상이하게 표시함으로써, 식별력을 향상시킬 수 있다.Of course, each line of code can also be marked for identification based on both the overall code and the code within the function. For example, each code line is identified with a color based on the ranking based on the entire code, and at the same time, an icon is added to (added to, displayed) each code line based on the ranking based on the code within the function. Available. As another example, based on the ranking based on the entire code, each code line is identified with an icon, while at the same time, based on the ranking based on the code within the function, only code lines whose step value is above a preset threshold are colored or displayed. Discernment can be improved by displaying things differently, such as by changing the font.

사용자는 전체 코드를 기반으로 한 순위에 기초하여 커버리지를 표시할 것인지, 함수 내 코드를 기반으로 한 순위에 기초하여 커버리지를 표시할 것인지, 혹은, 양자 모두에 기초하여 커버리지를 표시할 것인지를 설정할 수 있다. 입력부(미도시)는 사용자 입력을 수신하여 커버리지 표시부(120)에 전달하고, 커버리지 표시부(120)는 사용자 입력에 기초하여 다양한 방식으로 커버리지를 표시할 수 있을 것이다.The user can set whether to display coverage based on a ranking based on the entire code, a ranking based on the code within the function, or both. there is. The input unit (not shown) receives user input and transmits it to the coverage display unit 120, and the coverage display unit 120 may display coverage in various ways based on the user input.

도 4 내지 6은 본 발명에 따른 테스트 커버리지 표시 방법에 있어서 다양한 실시예에 따른 표시 방법을 각각 도시한다.4 to 6 respectively illustrate display methods according to various embodiments of the test coverage display method according to the present invention.

먼저, 도 4는 단계값에 따라 색상을 N단계로 구분하여 표시한 실시예를 도시한다. 도 4에 도시된 바와 같이, 커버리지 표시부(120)는 7단계로 색상을 구분해서 커버리지를 표시할 수도 있고, 10단계로 색상을 구분해서 커버리지를 표시할 수도 있다. 사용자는 커버리지에 표시된 색상에 기초하여 코드의 어느 부분이 더 많이 테스트되고 있는지를 즉각적으로 확인할 수 있다. First, Figure 4 shows an example in which colors are divided into N levels and displayed according to the level values. As shown in FIG. 4, the coverage display unit 120 may display coverage by dividing colors into 7 levels, or may display coverage by dividing colors into 10 levels. Users can instantly see which parts of their code are being tested more based on the colors displayed in the coverage.

이때, 색상 종류나 색상 구분 단계는 기설정될 수도 있지만, 입력부(미도시)를 통한 사용자 입력을 통해 선택될 수도 있을 것이다.At this time, the color type or color classification level may be preset, but may also be selected through user input through an input unit (not shown).

도 5는 단계값에 따라 상이한 아이콘을 표시하는 방식을 도시한다. 도 5에서는 날씨와 관련된 아이콘을 각 라인의 일측에 표시하였으나, 날씨 외의 다른 아이콘으로 변경될 수 있을 것이다. 사용자는 각 라인의 일측에 표시된 아이콘에 기초하여 코드의 어느 부분이 더 많이 테스트되고 있는지를 즉각적으로 확인할 수 있다. Figure 5 shows a method of displaying different icons according to step values. In Figure 5, icons related to weather are displayed on one side of each line, but they may be changed to icons other than weather. Users can immediately see which parts of the code are being tested more based on the icons displayed on one side of each line.

도 6은 특정값 이상의 테스트가 진행된 코드라인에 대해서만 식별가능하도록 표시하는 방식을 도시한다. 커버리지 표시부(120)는 단계값이 기설정된 한계값 이상인 코드 라인에 대해서만 상이한 방식으로 표시할 수 있다. 기설정된 한계값 이상인 코드 라인에 대해서는 도 6에서와 같이 점선이나 실선 등으로 표시할 수도 있으나, 위에서 언급한 바와 같이 색상이나 아이콘 등을 이용하여 표시하는 것도 가능하다.Figure 6 shows a method of displaying so that only code lines that have been tested above a certain value can be identified. The coverage display unit 120 may display in a different way only code lines whose step value is greater than or equal to a preset threshold. Code lines exceeding a preset threshold may be displayed with a dotted or solid line as shown in FIG. 6, but as mentioned above, it is also possible to display them using colors or icons.

도 4 내지 6에 도시된 다양한 표시 방법은, 전체 코드를 대상으로 한 순위 뿐만 아니라 함수 내 코드를 대상으로 한 순위에 대해서 개별적으로 적용될 수 있으며, 이에 따라 사용자는 전체 코드 및 함수 내 코드에 있어서 코드의 어느 부분이 더 많이 테스트되고 있는지, 일정 횟수(한계값) 이상 테스트된 코드 라인이 어디에 위치하는지를 즉각적으로 확인할 수 있다. The various display methods shown in FIGS. 4 to 6 can be applied individually not only to the ranking of the entire code but also to the ranking of the code within the function, and thus the user can rank the code in the entire code and the code within the function. You can immediately check which parts of the code are being tested more and where the lines of code that have been tested more than a certain number of times (threshold) are located.

위에서 설명한 다양한 실시예에 따른 테스트 커버리지 표시 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 컴퓨터 판독 가능 기록 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 본 발명의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The test coverage display method according to various embodiments described above may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. A computer-readable recording medium may include program instructions, data files, data structures, etc., singly or in combination. Program instructions recorded on the medium may be specially designed and constructed for the present invention or may be known and usable by those skilled in the art of computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. -Includes optical media (magneto-optical media) and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, etc. Examples of program instructions include machine language code, such as that produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the present invention, and vice versa.

상술한 다양한 실시예에 따른 테스트 커버리지 표시 방법은 기록 매체에 저장되는 컴퓨터에 의해 실행되는 컴퓨터 프로그램 또는 애플리케이션의 형태로도 구현될 수 있다.The test coverage display method according to the various embodiments described above may also be implemented in the form of a computer program or application executed by a computer stored in a recording medium.

이상에서 실시 형태를 중심으로 설명하였으나 이는 단지 예시일 뿐 본 발명을 한정하는 것이 아니며, 본 발명이 속하는 분야의 통상의 지식을 가진 자라면 본 실시 형태의 본질적인 특성을 벗어나지 않는 범위에서 이상에 예시되지 않은 여러 가지의 변형과 응용이 가능함을 알 수 있을 것이다. 예를 들어, 실시 형태에 구체적으로 나타난 각 구성 요소는 변형하여 실시할 수 있는 것이다. 그리고 이러한 변형과 응용에 관계된 차이점들은 첨부된 청구 범위에서 규정하는 본 발명의 범위에 포함되는 것으로 해석되어야 할 것이다.Although the above description focuses on the embodiment, this is only an example and does not limit the present invention, and those skilled in the art will be able to understand the above examples without departing from the essential characteristics of the present embodiment. You will see that various modifications and applications are possible. For example, each component specifically shown in the embodiments can be modified and implemented. And these variations and differences in application should be construed as being included in the scope of the present invention as defined in the appended claims.

100: 테스트 커버리지 표시 장치
110: 테스트 수행부
120: 저장부
130: 커버리지 표시부
100: test coverage display device
110: Test performance unit
120: storage unit
130: Coverage display unit

Claims (14)

소스 코드에 대한 코드 커버리지를 측정하는 테스트 수행부;
상기 테스트 수행부에서 측정된 코드 커버리지에 기초하여, 각 코드 라인별 커버 횟수의 누적 합계를 계산하고, 상기 누적 합계에 대응하는 단계값을 각 코드 라인별로 계산하여 저장하는 저장부; 및
상기 저장부에 저장된 단계값에 기초하여 각 코드 라인을 상이하게 표시하는 커버리지 표시부;를 포함하고,
상기 저장부는, 전체 코드를 대상으로 하는 제1 기준과 함수 내 코드를 대상으로 하는 제2 기준으로 구분하여 최대 누적횟수와 최소 누적횟수를 계산하고, 상기 최대 누적횟수와 최소 누적횟수에 기초하여 상기 단계값을 계산하며,
상기 표시부는 상기 제1 기준에 기초한 단계값에 기초하여 각 코드 라인을 색상 및 아이콘 중 어느 하나로 구분하여 식별시키는 동시에, 상기 제2 기준에 기초한 단계값에 기초하여 각 코드 라인을 상기 색상 및 상기 아이콘 중 다른 하나로 구분하여 식별시키는 테스트 커버리지 표시 장치.
A test execution unit that measures code coverage of source code;
A storage unit that calculates a cumulative total of the number of covers for each code line based on the code coverage measured by the test execution unit, and calculates and stores a step value corresponding to the cumulative total for each code line; and
It includes a coverage display unit that displays each code line differently based on the step value stored in the storage unit,
The storage unit calculates the maximum and minimum accumulation counts by dividing them into a first standard targeting the entire code and a second standard targeting the code within the function, and based on the maximum and minimum accumulation counts, Calculate the step value,
The display unit identifies each code line by one of a color and an icon based on the step value based on the first standard, and simultaneously identifies each code line with the color and the icon based on the step value based on the second standard. A test coverage display device that distinguishes and identifies one from the other.
삭제delete 제1항에 있어서,
상기 단계값은 아래 수식에 의하여 계산되는 테스트 커버리지 표시 장치.
단계값=floor((N/최대 누적횟수)*해당 라인의 누적횟수)
(여기서, N은 단계값의 총 개수)
According to paragraph 1,
A test coverage display device where the step value is calculated according to the formula below.
Step value=floor((N/maximum cumulative number)*accumulated number of corresponding lines)
(where N is the total number of step values)
제1항에 있어서,
상기 단계값은 총 N개의 단계를 포함하며,
상기 커버리지 표시부는 상기 N개의 단계 각각에 대하여 상이한 색상을 부여하고, 각각의 코드 라인의 단계값에 대응하는 색상을 상기 코드 라인에 표시하는 테스트 커버리지 표시 장치.
According to paragraph 1,
The step value includes a total of N steps,
A test coverage display device wherein the coverage display unit gives a different color to each of the N steps and displays a color corresponding to the step value of each code line on the code line.
제1항에 있어서,
상기 단계값은 총 N개의 단계를 포함하며,
상기 커버리지 표시부는 상기 N개의 단계 각각에 대하여 상이한 아이콘을 부여하고, 각각의 코드 라인의 단계값에 대응하는 아이콘을 상기 코드 라인에 표시하는 테스트 커버리지 표시 장치.
According to paragraph 1,
The step value includes a total of N steps,
A test coverage display device wherein the coverage display unit assigns a different icon to each of the N steps and displays an icon corresponding to a step value of each code line on the code line.
제4항 또는 제5항에 있어서,
상기 단계값에 대응하는 색상 또는 아이콘을 사용자로부터 지정받기 위한 입력부;를 더 포함하는 테스트 커버리지 표시 장치.
According to clause 4 or 5,
A test coverage display device further comprising an input unit for receiving a color or icon corresponding to the step value from the user.
제1항에 있어서,
상기 커버리지 표시부는 상기 단계값이 기설정된 한계값 이상인 코드 라인에 대해서만 상이하게 표시하는 테스트 커버리지 표시 장치.
According to paragraph 1,
A test coverage display device where the coverage display unit displays differently only for code lines where the step value is greater than or equal to a preset threshold.
소스 코드에 대한 코드 커버리지를 측정하는 테스트 수행 단계;
상기 테스트 수행 단계에서 측정된 코드 커버리지에 기초하여, 각 코드 라인별 커버 횟수의 누적 합계를 계산하고, 상기 누적 합계에 대응하는 단계값을 각 코드 라인별로 계산하여 저장하는 저장 단계; 및
상기 저장된 단계값에 기초하여 각 코드 라인을 상이하게 표시하는 커버리지 표시 단계;를 포함하고,
상기 저장 단계는, 전체 코드를 대상으로 하는 제1 기준과 함수 내 코드를 대상으로 하는 제2 기준으로 구분하여 최대 누적횟수와 최소 누적횟수를 계산하고, 상기 최대 누적횟수와 최소 누적횟수에 기초하여 상기 단계값을 계산하고,
상기 표시 단계는 상기 제1 기준에 기초한 단계값에 기초하여 각 코드 라인을 색상 및 아이콘 중 어느 하나로 구분하여 식별시키는 동시에, 상기 제2 기준에 기초한 단계값에 기초하여 각 코드 라인을 상기 색상 및 상기 아이콘 중 다른 하나로 구분하여 식별시키는 테스트 커버리지 표시 방법.
Performing tests to measure code coverage for source code;
A storage step of calculating a cumulative total of the number of covers for each code line based on the code coverage measured in the test performance step, and calculating and storing a step value corresponding to the cumulative total for each code line; and
A coverage display step of displaying each code line differently based on the stored step value,
In the storage step, the maximum accumulation count and minimum accumulation count are calculated by dividing into a first standard targeting the entire code and a second standard targeting code within the function, and based on the maximum accumulation count and minimum accumulation count. Calculate the step value,
The display step identifies each code line by either a color or an icon based on the step value based on the first standard, and at the same time identifies each code line with the color and the icon based on the step value based on the second standard. A way to display test coverage by identifying it with one of the icons.
삭제delete 제8항에 있어서,
상기 단계값은 아래 수식에 의하여 계산되는 테스트 커버리지 표시 방법.
단계값=floor((N/최대 누적횟수)*해당 라인의 누적횟수)
(여기서, N은 단계값의 총 개수)
According to clause 8,
A test coverage display method where the step value is calculated using the formula below.
Step value=floor((N/maximum cumulative number)*accumulated number of corresponding lines)
(where N is the total number of step values)
제8항에 있어서,
상기 단계값은 총 N개의 단계를 포함하며,
상기 커버리지 표시 단계는 상기 N개의 단계 각각에 대하여 상이한 색상을 부여하고, 각각의 코드 라인의 단계값에 대응하는 색상을 상기 코드 라인에 표시하는 테스트 커버리지 표시 방법.
According to clause 8,
The step value includes a total of N steps,
In the coverage display step, a different color is given to each of the N steps, and a color corresponding to the step value of each code line is displayed on the code line.
제8항에 있어서,
상기 단계값은 총 N개의 단계를 포함하며,
상기 커버리지 표시 단계는 상기 N개의 단계 각각에 대하여 상이한 아이콘을 부여하고, 각각의 코드 라인의 단계값에 대응하는 아이콘을 상기 코드 라인에 표시하는 테스트 커버리지 표시 방법.
According to clause 8,
The step value includes a total of N steps,
In the coverage display step, a different icon is assigned to each of the N steps, and an icon corresponding to a step value of each code line is displayed on the code line.
제11항 또는 제12항에 있어서,
상기 단계값에 대응하는 색상 또는 아이콘을 사용자로부터 지정받는 입력 단계;를 더 포함하는 테스트 커버리지 표시 방법.
According to claim 11 or 12,
A test coverage display method further comprising an input step of receiving a color or icon corresponding to the step value from the user.
제8항에 있어서,
상기 커버리지 표시 단계는 상기 단계값이 기설정된 한계값 이상인 코드 라인에 대해서만 상이하게 표시하는 테스트 커버리지 표시 방법.
According to clause 8,
A test coverage display method in which the coverage display step displays differently only for code lines whose step value is greater than or equal to a preset threshold.
KR1020210141791A 2021-10-22 2021-10-22 Apparatus and method for display the test coverage Active KR102603330B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020210141791A KR102603330B1 (en) 2021-10-22 2021-10-22 Apparatus and method for display the test coverage
PCT/KR2022/006552 WO2023068467A1 (en) 2021-10-22 2022-05-09 Test coverage display device and display method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210141791A KR102603330B1 (en) 2021-10-22 2021-10-22 Apparatus and method for display the test coverage

Publications (2)

Publication Number Publication Date
KR20230057711A KR20230057711A (en) 2023-05-02
KR102603330B1 true KR102603330B1 (en) 2023-11-17

Family

ID=86059244

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210141791A Active KR102603330B1 (en) 2021-10-22 2021-10-22 Apparatus and method for display the test coverage

Country Status (2)

Country Link
KR (1) KR102603330B1 (en)
WO (1) WO2023068467A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102618417B1 (en) * 2023-05-10 2023-12-28 쿠팡 주식회사 Operating method for electronic apparatus for providing information and electronic apparatus supporting thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009069922A (en) 2007-09-11 2009-04-02 Renesas Technology Corp Coverage measurement method, computer-readable recording medium and data processing system
JP2012027911A (en) * 2010-07-20 2012-02-09 General Electric Co <Ge> System and method for use in indicating execution of application code
US20180232296A1 (en) 2015-03-18 2018-08-16 New Iron Group, Inc. Diagnostic Tool and Method for Efficient Software Development

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8719789B2 (en) * 2011-03-07 2014-05-06 International Business Machines Corporation Measuring coupling between coverage tasks and use thereof
US9292419B1 (en) * 2013-06-04 2016-03-22 The Mathworks, Inc. Code coverage and confidence determination
KR101519450B1 (en) * 2013-07-12 2015-05-12 한국과학기술원 Auto-test generation device, method and recording medium using test coverage information for multi-thread program
US10956309B2 (en) * 2018-09-28 2021-03-23 Atlassian Pty Ltd. Source code management systems and methods
KR102165037B1 (en) 2018-12-03 2020-10-13 슈어소프트테크주식회사 Code coverage measuring apparatus, code coverage measuring method of the code coverage mearusing apparatus, and code coverage measuring system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009069922A (en) 2007-09-11 2009-04-02 Renesas Technology Corp Coverage measurement method, computer-readable recording medium and data processing system
JP2012027911A (en) * 2010-07-20 2012-02-09 General Electric Co <Ge> System and method for use in indicating execution of application code
US20180232296A1 (en) 2015-03-18 2018-08-16 New Iron Group, Inc. Diagnostic Tool and Method for Efficient Software Development

Also Published As

Publication number Publication date
WO2023068467A1 (en) 2023-04-27
KR20230057711A (en) 2023-05-02

Similar Documents

Publication Publication Date Title
US7681180B2 (en) Parameterized test driven development
CN101802792B (en) Method of automatic script generation for testing the effectiveness of operating software of a system on board an aircraft and device for implementing the method
US8627290B2 (en) Test case pattern matching
US8448146B2 (en) Generation of functional tests for re-hosted applications
US7904892B2 (en) Systems and methods for identifying and displaying dependencies
US8601436B2 (en) Simulation-based interface testing automation system and method for robot software components
Rodriguez et al. Software verification and validation technologies and tools
US20110125448A1 (en) Three-dimensional application program framework structure and a method for implementing an application program based on the same, and an automatic testing system based on a three-dimensional application software framework and a method therefor
CN106776338B (en) Test method, test device and server
US6298317B1 (en) Enhanced functional testing through the filtration of non-subtle mutations
US11144434B2 (en) Refining coverage analyses using context information
US20090217259A1 (en) Building Operating System Images Based on Applications
US20190179733A1 (en) Software test program generation
US10318403B2 (en) Code update based on detection of change in runtime code during debugging
CN104699617A (en) Automated testing method for games
CN113626326B (en) Dragging type zero code front end automatic test system based on image recognition
KR101460860B1 (en) GUI Test apparatus using test scenario model based on states and the method thereof
KR102603330B1 (en) Apparatus and method for display the test coverage
GB2460407A (en) Using coverage data to choose software regression tests
CN106919431B (en) Code comparison method, equipment and system in continuous integration
US7895575B2 (en) Apparatus and method for generating test driver
CN115033473B (en) Testing method and device based on software downtime location
CN116719736A (en) Test case generation method and device for testing software interface
KR102042996B1 (en) Method and apparatus for measuring code coverage not by using probes and computer readable recording medium having program the same
CN114265783B (en) Method and device for generating coverage rate data and electronic equipment

Legal Events

Date Code Title Description
PA0109 Patent application

Patent event code: PA01091R01D

Comment text: Patent Application

Patent event date: 20211022

PA0201 Request for examination
E902 Notification of reason for refusal
PE0902 Notice of grounds for rejection

Comment text: Notification of reason for refusal

Patent event date: 20230315

Patent event code: PE09021S01D

PG1501 Laying open of application
E701 Decision to grant or registration of patent right
PE0701 Decision of registration

Patent event code: PE07011S01D

Comment text: Decision to Grant Registration

Patent event date: 20230811

GRNT Written decision to grant
PR0701 Registration of establishment

Comment text: Registration of Establishment

Patent event date: 20231113

Patent event code: PR07011E01D

PR1002 Payment of registration fee

Payment date: 20231114

End annual number: 3

Start annual number: 1

PG1601 Publication of registration