JP6668808B2 - Untested portion detection device, untested portion detection method, and program - Google Patents

Untested portion detection device, untested portion detection method, and program Download PDF

Info

Publication number
JP6668808B2
JP6668808B2 JP2016028977A JP2016028977A JP6668808B2 JP 6668808 B2 JP6668808 B2 JP 6668808B2 JP 2016028977 A JP2016028977 A JP 2016028977A JP 2016028977 A JP2016028977 A JP 2016028977A JP 6668808 B2 JP6668808 B2 JP 6668808B2
Authority
JP
Japan
Prior art keywords
test result
program module
unit
location
test
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
JP2016028977A
Other languages
Japanese (ja)
Other versions
JP2017146834A (en
Inventor
聡史 澤田
聡史 澤田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP2016028977A priority Critical patent/JP6668808B2/en
Publication of JP2017146834A publication Critical patent/JP2017146834A/en
Application granted granted Critical
Publication of JP6668808B2 publication Critical patent/JP6668808B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明は、未テスト箇所検出装置、未テスト箇所検出方法、および、プログラム、特に、運用で実行されている処理ルートの中のテストされていない箇所を検出する、未テスト箇所検出装置、未テスト箇所検出方法、および、プログラムに関する。   The present invention relates to an untested portion detecting device, an untested portion detecting method, and a program, and more particularly, to an untested portion detecting device, an untested portion detecting device, which detects an untested portion in a processing route executed in operation. The present invention relates to a location detection method and a program.

特許文献1は、分岐点において、確実に通過経路を追跡することができる動的トレース情報解析方式を開示する。   Patent Literature 1 discloses a dynamic trace information analysis method capable of reliably tracking a passing route at a branch point.

特許文献2は、プログラムをテスト用に加工せずに、通常の検査工程でテストカバレージを自動的に測定できるようにする方式を開示する。   Patent Literature 2 discloses a method for automatically measuring test coverage in a normal inspection process without processing a program for testing.

特開平2-206847号公報JP-A-2-206847 特開平5−282177号公報JP-A-5-282177

重要なシステムの場合には、システムを構成するすべてのプログラムについて十分なテストが実施されるが、あまり重要ではないシステムの場合には、いくつかの処理ルートがテストされない場合も有る。   In the case of an important system, a sufficient test is performed for all programs constituting the system, but in the case of a less important system, some processing routes may not be tested.

さらに、システムを構成するプログラムには、当該システムで利用しないと想定される処理ルートが含まれることがあり、それらの処理ルートはテストされないことがある。ところが、実際の運用時になると、タイミングや外部の異常により、プログラムは想定しない動作をおこし、プログラムのテストされていない処理ルートが実行される可能性がある。   Further, a program constituting a system may include processing routes that are assumed not to be used in the system, and the processing routes may not be tested. However, at the time of actual operation, there is a possibility that a program performs an unexpected operation due to timing or an external abnormality, and a processing route on which the program has not been tested is executed.

テストされていない処理ルートであっても、プログラムは正常に動作することも多く、必ずしも問題となるわけではないが、テストされていない処理ルートはテストされている処理ルートよりバグが潜在する可能性は高い。   Untested processing routes often run correctly and are not necessarily a problem, but untested processing routes can be more buggy than tested processing routes. Is expensive.

また、バグは、入力データの内容や処理のタイミングが発生条件となっている場合がある。そのため、テストされていない処理ルートが動作しているシステムにおいては、テストされていない処理ルートが動作していないシステムに比べて、入力データや処理するタイミングの変化によりバグが顕在化する可能性が高い。   In some cases, the bug is caused by the content of input data and the timing of processing. Therefore, in a system in which a processing route that has not been tested is running, a bug may be more apparent due to a change in input data or processing timing than in a system in which a processing route that has not been tested is not running. high.

これに関連して、特許文献1や特許文献2が開示するように、実行されている処理ルートが分かるようにトレースを出力する方法が知られている。しかし、トレースを出力するだけでは、実行されている処理ルートがテストされているか否かを判定することはできない。   In this connection, as disclosed in Patent Literature 1 and Patent Literature 2, there is known a method of outputting a trace so that the processing route being executed can be known. However, it is not possible to determine whether or not the executed processing route is being tested only by outputting the trace.

実行されている処理ルートのなかから、テストされていないルートを検知することは、そのシステムで障害が発生するリスクを予測して予防するために、重要な課題となっている。   Detecting an untested route among executed processing routes is an important issue in order to predict and prevent a risk of a failure occurring in the system.

本発明は、上記課題を解決する為の、未テスト箇所検出装置、未テスト箇所検出方法、および、プログラムを提供することを目的とする。   An object of the present invention is to provide an untested portion detecting device, an untested portion detecting method, and a program for solving the above problems.

本発明の1実施の形態の未テスト箇所検出装置は、プログラムモジュールを実行する実行手段と、前記プログラムモジュール中のテスト済み箇所を示す箇所識別子を記憶するテスト結果格納手段と、前記プログラムモジュールに挿入されている起動命令が実行されると起動されて、当該起動命令の挿入箇所を示す前記箇所識別子を取得し、取得した前記箇所識別子が前記テスト結果格納手段に格納されているか否かを判定し、判定結果を出力するテスト結果検索手段と、を備える。   According to an embodiment of the present invention, there is provided an untested portion detection device, comprising: an execution unit that executes a program module; a test result storage unit that stores a location identifier indicating a tested location in the program module; When the boot instruction is executed, the boot instruction is activated, the location identifier indicating the insertion location of the boot instruction is acquired, and it is determined whether the acquired location identifier is stored in the test result storage unit. And a test result search means for outputting a judgment result.

本発明の1実施の形態の未テスト箇所検出方法は、プログラムモジュール中のテスト済み箇所を示す箇所識別子をテスト結果格納手段に記憶し、前記プログラムモジュールを実行して、挿入されている起動命令が実行されると、当該起動命令の挿入箇所を示す前記箇所識別子を取得し、取得した前記箇所識別子が前記テスト結果格納手段に格納されているか否かを判定し、判定結果を出力するテスト結果検索を行う。   According to one embodiment of the present invention, an untested portion detection method stores a location identifier indicating a tested portion in a program module in a test result storage unit, executes the program module, and determines whether an inserted startup instruction is When executed, a test result search that obtains the position identifier indicating the insertion position of the activation instruction, determines whether the obtained position identifier is stored in the test result storage unit, and outputs a determination result I do.

本発明の1実施の形態のプログラムは、プログラムモジュール中のテスト済み箇所を示す箇所識別子をテスト結果格納手段に記憶する処理と、前記プログラムモジュールを実行して、挿入されている起動命令が実行されると、当該起動命令の挿入箇所を示す前記箇所識別子を取得し、取得した前記箇所識別子が前記テスト結果格納手段に格納されているか否かを判定し、判定結果を出力する処理と、をコンピュータに実行させる。   According to an embodiment of the present invention, there is provided a program for storing a location identifier indicating a tested location in a program module in a test result storage unit, executing the program module, and executing an inserted startup instruction. And acquiring the location identifier indicating the insertion location of the activation instruction, determining whether the acquired location identifier is stored in the test result storage unit, and outputting a determination result. To run.

本発明にかかる未テスト箇所検出装置は、システムの運用時に、テストされていない処理ルートが実行されていることを検知する。   An untested portion detection device according to the present invention detects that an untested processing route is being executed during system operation.

図1は、第1の実施の形態にかかる、未テスト箇所検出装置11と起動命令埋め込み装置10の構成を示す図である。FIG. 1 is a diagram illustrating a configuration of an untested portion detection device 11 and a start command embedding device 10 according to the first embodiment. 図2は、プログラムソースコード100の例を示す図である。FIG. 2 is a diagram showing an example of the program source code 100. 図3は、埋め込み済みプログラムソースコード101(func1)の例を示す図である。FIG. 3 is a diagram showing an example of the embedded program source code 101 (func1). 図4は、テスト結果格納ファイル304に格納されるデータ例を示している。FIG. 4 shows an example of data stored in the test result storage file 304. 図5は、ログファイル305に格納されるデータ例を示している。FIG. 5 shows an example of data stored in the log file 305. 図6は、埋め込み部300の動作フローチャートである。FIG. 6 is an operation flowchart of the embedding unit 300. 図7は、テスト結果記録部302の動作フローチャートである。FIG. 7 is an operation flowchart of the test result recording unit 302. 図8は、テスト結果検索部303の動作フローチャートである。FIG. 8 is an operation flowchart of the test result search unit 303. 図9は、第2の実施の形態において、プログラム名と行数と共に、未テスト箇所検出装置11内で一意の域別子を渡すとした場合の、埋め込み済みプログラムソースコード101(func1)の例を示す図である。FIG. 9 shows an example of the embedded program source code 101 (func1) when a unique area identifier is passed in the untested portion detection device 11 along with the program name and the number of lines in the second embodiment. FIG. 図10は、第2の実施の形態のテスト結果格納ファイル304に格納されるデータ例を示している。FIG. 10 illustrates an example of data stored in the test result storage file 304 according to the second embodiment. 図11は、第3の実施の形態にかかる、未テスト箇所検出装置11の構成を示す図である。FIG. 11 is a diagram illustrating a configuration of the untested portion detection device 11 according to the third embodiment.

<第1の実施の形態>
<概要>
図1は、第1の実施の形態にかかる、未テスト箇所検出装置11と起動命令埋め込み装置10の構成を示す図である。未テスト箇所検出装置11と起動命令埋め込み装置10は、コンピュータの構成、および、機能を包含している。
<First embodiment>
<Overview>
FIG. 1 is a diagram illustrating a configuration of an untested portion detection device 11 and a start command embedding device 10 according to the first embodiment. The untested portion detection device 11 and the activation command embedding device 10 include the configuration and functions of a computer.

起動命令埋め込み装置10において、起動命令埋め込み部200は、未テスト箇所検出装置11で動作するプログラムモジュール102のソースコードの、例えば、分岐や関数呼び出しの箇所に、埋め込み部300を起動するコード(以降、起動命令)を埋め込む。図中、プログラムソースコード100が、プログラムモジュール102のソースコードである。起動命令埋め込み部200は、プログラムソースコード100に起動命令を埋め込んで、埋め込み済みプログラムソースコード101を生成する。   In the activation instruction embedding device 10, the activation instruction embedding unit 200 includes a code (hereinafter, referred to as a code for activating the embedding unit 300 at a location of a branch or a function call in the source code of the program module 102 operating on the untested location detection device 11). , Start instruction). In the figure, a program source code 100 is a source code of a program module 102. The start command embedding unit 200 embeds a start command in the program source code 100 to generate an embedded program source code 101.

起動命令埋め込み装置10において、埋め込み済みプログラムソースコード101は、コンパイル等の処理を経て、実行可能なプログラムモジュール102になる。   In the boot instruction embedding device 10, the embedded program source code 101 becomes an executable program module 102 through processing such as compilation.

プログラムモジュール102は、未テスト箇所検出装置11で実行される。そのとき、プログラムモジュール102で、起動命令埋め込まれたルートが実行されると、起動命令が埋め込み部300を起動する。このとき、起動命令は、埋め込み部300に対して、埋め込み部300を起動している起動命令が埋め込まれている箇所の情報、例えば、起動しているプログラム名と、起動命令が埋め込まれている行数を渡す。   The program module 102 is executed by the untested portion detection device 11. At this time, when the route in which the start command is embedded is executed by the program module 102, the start instruction starts the embedding unit 300. At this time, the start command includes information on a location where the start command for starting the embedding unit 300 is embedded in the embedding unit 300, for example, the name of the running program and the start command. Pass the number of rows.

テストフェーズでは、プログラムモジュール102から起動された埋め込み部300は、プログラム名と行数を渡して、テスト結果記録部302を起動する。テスト結果記録部302は、渡されたプログラム名と行数がテストで実行されたことをテスト結果格納ファイル304に記録する。   In the test phase, the embedding unit 300 activated by the program module 102 activates the test result recording unit 302 by passing the program name and the number of lines. The test result recording unit 302 records in the test result storage file 304 that the passed program name and the number of lines have been executed in the test.

運用フェーズでは、プログラムモジュール102から起動された埋め込み部300は、プログラム名と行数を渡して、テスト結果検索部303を起動する。テスト結果検索部303は、テスト結果が記録されたテスト結果格納ファイル304を検索し、渡されたプログラム名と行数が既に記録されているか否か、すなわち、当該箇所のテストが実行されているか否か、を確認する。テスト結果検索部303は、テストが実行されていないプログラム名と行数だった場合、ログファイル305にそのプログラム名と行数を出力する。   In the operation phase, the embedding unit 300 activated from the program module 102 activates the test result search unit 303 by passing the program name and the number of lines. The test result search unit 303 searches the test result storage file 304 in which the test results are recorded, and determines whether or not the passed program name and the number of lines have already been recorded, that is, whether or not the test at the relevant location has been executed. Confirm whether or not. The test result search unit 303 outputs the name of the program and the number of lines to the log file 305 when the name of the program and the number of lines where the test is not executed.

これにより、未テスト箇所検出装置11は、プログラムモジュール102の運用中に、テストを実施していない処理ルートが実行されていないかを確認する。そのような処理ルートは、タイミングや外部の異常によって、さらに別のルートが実行されて問題が発生する可能性を含んでいる。このため、未テスト箇所検出装置11は、テストを実施していない処理ルートが実行されているという、障害の予兆の一つを検知することが可能となる。   As a result, the untested portion detection device 11 checks whether a processing route that has not been tested is not executed during the operation of the program module 102. Such a processing route includes the possibility that another route will be executed and a problem will occur depending on timing or an external abnormality. For this reason, the untested portion detection device 11 can detect one of the signs of a failure that the processing route for which the test is not performed is being executed.

<構成>
次に、本発明の実施例の構成について図面を参照して詳細に説明する。
<Structure>
Next, the configuration of an embodiment of the present invention will be described in detail with reference to the drawings.

図1を参照すると、本実施の形態のシステムは、起動命令埋め込み装置10と未テスト箇所検出装置11を含む。起動命令埋め込み装置10は、プログラムモジュール102を生成する。未テスト箇所検出装置11は、システムのテストフェーズおよび運用フェーズで、プログラムモジュール102を実行する。   Referring to FIG. 1, the system according to the present embodiment includes a start command embedding device 10 and an untested portion detecting device 11. The activation command embedding device 10 generates the program module 102. The untested portion detection device 11 executes the program module 102 in the test phase and the operation phase of the system.

起動命令埋め込み装置10は、第1の実行部201と、起動命令埋め込み部200とを備え、プログラムソースコード100から、埋め込み済みプログラムソースコード101を、さらに、プログラムモジュール102を生成する。未テスト箇所検出装置11は、第2の実行部306、埋め込み部300、フェーズ情報ファイル301、テスト結果記録部302、テスト結果検索部303、テスト結果格納ファイル304と、ログファイル305を備え、プログラムモジュール102を実行する。   The boot instruction embedding device 10 includes a first execution unit 201 and a boot instruction embedding unit 200, and generates an embedded program source code 101 and a program module 102 from the program source code 100. The untested portion detection device 11 includes a second execution unit 306, an embedding unit 300, a phase information file 301, a test result recording unit 302, a test result search unit 303, a test result storage file 304, and a log file 305. Execute the module 102.

第1の実行部201、および、第2の実行部306は、コンピュータとしての標準的な機能を果たす構成要素を包含する。第1の実行部201、および、第2の実行部306は、例えば、プロセッサ、メモリ、コンパイラ、OS(Operating System)を包含する。   The first execution unit 201 and the second execution unit 306 include components that perform standard functions as a computer. The first execution unit 201 and the second execution unit 306 include, for example, a processor, a memory, a compiler, and an OS (Operating System).

プログラムソースコード100は、システムで動作するプログラムモジュール102を生成するためのソースコードである。図2は、プログラムソースコード100の例を示す図である。   The program source code 100 is a source code for generating a program module 102 that operates in the system. FIG. 2 is a diagram showing an example of the program source code 100.

埋め込み済みプログラムソースコード101は、起動命令埋め込み部200により作成された、埋め込み部300を起動するコードが埋め込まれたソースコードである。   The embedded program source code 101 is a source code in which a code for activating the embedding unit 300 created by the activation instruction embedding unit 200 is embedded.

起動命令埋め込み部200は、プログラムソースコード100に対し、埋め込み部300を起動する起動命令を埋め込み、埋め込み済みプログラムソースコード101を生成する。起動命令埋め込み部200は、埋め込み部300を起動するコードを、プログラム名と起動する行数を埋め込み部300に渡すように生成する。   The start instruction embedding unit 200 embeds a start instruction for activating the embedding unit 300 in the program source code 100, and generates an embedded program source code 101. The activation command embedding unit 200 generates a code for activating the embedding unit 300 so as to pass the program name and the number of lines to be activated to the embedding unit 300.

図3は、埋め込み済みプログラムソースコード101(func1)の例を示す図である。図3の例において、埋め込み済みプログラムソースコード101は、分岐命令の始点と、分岐後の2つの終点に起動命令が埋め込まれている。この例において、埋め込み部300はサブルーチンの形態で実装され、起動命令は当該サブルーチンを呼び出す命令“routine”として示されている。図3は、さらに、起動命令“routine”が、埋め込み部300に、起動命令が含まれるプログラム名(func1)と当該プログラム内で起動命令が埋め込まれた行数(2,4,7)を、パラメータとして渡す記述例を示している。   FIG. 3 is a diagram showing an example of the embedded program source code 101 (func1). In the example of FIG. 3, in the embedded program source code 101, a start instruction is embedded at a start point of a branch instruction and at two end points after the branch. In this example, the embedding unit 300 is implemented in the form of a subroutine, and the activation instruction is shown as an instruction “routine” for calling the subroutine. FIG. 3 shows that the start instruction “routine” further includes, in the embedding unit 300, the program name (func1) including the start instruction and the number of lines (2, 4, 7) in which the start instruction is embedded in the program. An example of a description passed as a parameter is shown.

プログラムモジュール102は、第1の実行部201により、埋め込み済みプログラムソースコード101から生成されたモジュールである。第1の実行部201の、例えば、プロセッサがコンパイラを実行して、埋め込み済みプログラムソースコード101からプログラムモジュール102を生成する。   The program module 102 is a module generated from the embedded program source code 101 by the first execution unit 201. For example, a processor of the first execution unit 201 executes a compiler to generate a program module 102 from the embedded program source code 101.

プログラムモジュール102は、未テスト箇所検出装置11で動作するプログラムの実行モジュールである。   The program module 102 is an execution module of a program that operates on the untested portion detection device 11.

起動命令埋め込み装置10が生成したプログラムモジュール102は、未テスト箇所検出装置11にコピーされて動作する。未テスト箇所検出装置11において、プログラムモジュール102は、第2の実行部306により実行される。例えば、プログラムモジュール102は、第2の実行部306のメモリに格納され、プロセッサにより実行される。   The program module 102 generated by the boot command embedding device 10 is copied to the untested portion detection device 11 and operates. In the untested portion detection device 11, the program module 102 is executed by the second execution unit 306. For example, the program module 102 is stored in the memory of the second execution unit 306, and is executed by the processor.

プログラムモジュール102が実行され、制御が起動命令が埋め込まれた箇所に至ると、埋め込み済みプログラムソースコード101に埋め込まれていた起動命令が実行され、埋め込み部300を起動する。   When the program module 102 is executed and the control reaches a location where the start command is embedded, the start command embedded in the embedded program source code 101 is executed, and the embedding unit 300 is started.

埋め込み部300は、プログラム名と行数を渡されて、プログラムモジュール102から起動される。起動されると、埋め込み部300は、まず、フェーズ情報ファイル301を参照する。埋め込み部300は、テストフェーズだった場合、プログラム名と行数を渡してテスト結果記録部302を起動し、運用フェーズだった場合は、プログラム名と行数を渡してテスト結果検索部303を起動する。   The embedding unit 300 is started from the program module 102 by passing the program name and the number of lines. When activated, the embedding unit 300 first refers to the phase information file 301. The embedding unit 300 starts the test result recording unit 302 by passing the program name and the number of lines in the test phase, and starts the test result search unit 303 by passing the program name and the number of lines in the operation phase. I do.

フェーズ情報ファイル301は、プログラムモジュール102がシステムのテストフェーズで動作しているか運用フェーズで動作しているかを示す情報を記憶している。この情報は、例えば、未テスト箇所検出装置11の起動時に運用管理者により設定される。   The phase information file 301 stores information indicating whether the program module 102 is operating in the test phase or the operation phase of the system. This information is set, for example, by the operation manager when the untested portion detection device 11 is started.

テスト結果記録部302は、埋め込み部300から渡されたプログラム名と行数を、テスト結果格納ファイル304へ記録する。   The test result recording unit 302 records the program name and the number of lines passed from the embedding unit 300 in the test result storage file 304.

テスト結果検索部303は、埋め込み部300から渡されたプログラム名と行数が、テスト結果格納ファイル304に記録されているかを検索し、検索結果を出力する。当該プログラム名と行数が、テスト結果格納ファイル304に記録されていなかった場合、テスト結果検索部303は、埋め込み部300から渡されたプログラム名と行数はテストが実施されていないと判断し、ログファイル305へプログラム名と行数を出力する。テスト結果検索部303は、検索結果をメモリに蓄積しておき、後に、図示しないコンソール装置に出力しても良い。   The test result search unit 303 searches whether the program name and the number of lines passed from the embedding unit 300 are recorded in the test result storage file 304, and outputs a search result. If the program name and the number of lines are not recorded in the test result storage file 304, the test result search unit 303 determines that the program name and the number of lines passed from the embedding unit 300 have not been tested. Then, the program name and the number of lines are output to the log file 305. The test result search unit 303 may store the search results in a memory and output the search results to a console device (not shown) later.

テスト結果格納ファイル304は、プログラムモジュール102において、テストが実施された箇所の情報、例えば、プログラム名と当該プログラム内の行数が記録される。図4は、テスト結果格納ファイル304に格納されるデータ例を示している。図4は、例えば、プログラムモジュール102において、関数func1の2行目は、テストされていることを示している。   In the test result storage file 304, information on a place where a test is performed in the program module 102, for example, a program name and the number of lines in the program are recorded. FIG. 4 shows an example of data stored in the test result storage file 304. FIG. 4 shows that, for example, in the program module 102, the second line of the function func1 is being tested.

ログファイル305は、プログラムモジュール102のなかで、テストフェーズには動作せずに、運用フェーズで動作した箇所の情報、例えば、プログラム名と行数が記録される。図5は、ログファイル305に格納されるデータ例を示している。図5は、例えば、関数func1の7行目は、テストされていないにもかかわらず、運用フェーズで実行されたことを示している。   The log file 305 records information of a part of the program module 102 that did not operate in the test phase but operated in the operation phase, for example, a program name and the number of lines. FIG. 5 shows an example of data stored in the log file 305. FIG. 5 shows, for example, that the seventh line of the function func1 has been executed in the operation phase even though it has not been tested.

起動命令埋め込み装置10の起動命令埋め込み部200は、論理回路で構成される。起動命令埋め込み部200は、第1の実行部201が実行するプログラムによって実現されても良い。すなわち、起動命令埋め込み部200は、第1の実行部201内のメモリに格納されて、プロセッサにより実行されるプログラムにより実現されても良い。   The start command embedding unit 200 of the start command embedding device 10 is configured by a logic circuit. The start command embedding unit 200 may be realized by a program executed by the first execution unit 201. That is, the start command embedding unit 200 may be realized by a program stored in a memory in the first execution unit 201 and executed by the processor.

未テスト箇所検出装置11の埋め込み部300、テスト結果記録部302、テスト結果検索部303は、論理回路で構成される。埋め込み部300、テスト結果記録部302、テスト結果検索部303は、第2の実行部306が実行するプログラムによって実現されても良い。すなわち、テスト結果記録部302、テスト結果検索部303は、第2の実行部306内のメモリに格納されて、プロセッサにより実行されるプログラムにより実現されても良い。   The embedding unit 300, the test result recording unit 302, and the test result search unit 303 of the untested portion detection device 11 are configured by logic circuits. The embedding unit 300, the test result recording unit 302, and the test result search unit 303 may be realized by a program executed by the second execution unit 306. That is, the test result recording unit 302 and the test result search unit 303 may be realized by a program stored in the memory in the second execution unit 306 and executed by the processor.

フェーズ情報ファイル301、テスト結果格納ファイル304と、ログファイル305は、未テスト箇所検出装置11が備える、ディスク装置である。   The phase information file 301, the test result storage file 304, and the log file 305 are disk devices included in the untested location detection device 11.

<動作>
次に、図6、図7、図8のフローチャートを参照して本実施の形態の未テスト箇所検出装置11の動作について詳細に説明する。
<Operation>
Next, the operation of the untested portion detecting device 11 of the present embodiment will be described in detail with reference to the flowcharts of FIGS.

図6は、埋め込み部300の動作フローチャートである。   FIG. 6 is an operation flowchart of the embedding unit 300.

まず、埋め込み部300は、プログラムモジュール102から起動されると、フェーズ情報ファイル301を参照し、システムのテストフェーズで動作しているのか、運用フェーズで動作しているのかを確認する(図6のステップ1)。テストフェーズの場合、埋め込み部300は、プログラムモジュール102から渡されたプログラム名と行数を渡して、テスト結果記録部302を起動する(ステップ2)。運用フェーズの場合、埋め込み部300は、プログラムモジュール102から渡されたプログラム名と行数を渡して、テスト結果検索部303を起動する(ステップ3)。   First, when the embedding unit 300 is started from the program module 102, the embedding unit 300 refers to the phase information file 301 and checks whether the system is operating in the test phase or the operation phase of the system (see FIG. 6). Step 1). In the test phase, the embedding unit 300 activates the test result recording unit 302 by passing the program name and the number of lines passed from the program module 102 (step 2). In the operation phase, the embedding unit 300 starts the test result search unit 303 by passing the program name and the number of lines passed from the program module 102 (Step 3).

図7は、テスト結果記録部302の動作フローチャートである。   FIG. 7 is an operation flowchart of the test result recording unit 302.

テスト結果記録部302は、埋め込み部300から渡されたプログラム名と行数が、テスト結果格納ファイル304に記録されているか否かを検索する(図7のステップ11)。当該プログラム名と行数記録されていなかった場合、テスト結果記録部302は、当該プログラム名と行数をテスト結果格納ファイル304に記録する(ステップ2)。   The test result recording unit 302 searches whether or not the program name and the number of lines passed from the embedding unit 300 are recorded in the test result storage file 304 (Step 11 in FIG. 7). If the program name and the number of lines have not been recorded, the test result recording unit 302 records the program name and the number of lines in the test result storage file 304 (Step 2).

図8は、テスト結果検索部303の動作フローチャートである。   FIG. 8 is an operation flowchart of the test result search unit 303.

テスト結果検索部303は、埋め込み部300から渡されたプログラム名と行数が、テスト結果格納ファイル304に記録されているか否かを検索する(図8のステップ21)。記録されていなかった場合、テスト結果検索部303は、当該プログラム名と行数をログファイル305に記録する(図8のステップ22)。   The test result search unit 303 searches whether or not the program name and the number of lines passed from the embedding unit 300 are recorded in the test result storage file 304 (Step 21 in FIG. 8). If not recorded, the test result search unit 303 records the program name and the number of lines in the log file 305 (Step 22 in FIG. 8).

<変形例>
未テスト箇所検出装置11は、起動命令埋め込み装置10と一体化して構成しても良い。すなわち、未テスト箇所検出装置11が、起動命令埋め込み部200も備えていても良い。
<Modification>
The untested portion detection device 11 may be configured integrally with the activation command embedding device 10. That is, the untested portion detection device 11 may also include the activation command embedding unit 200.

未テスト箇所検出装置11は、例えば初期設定時に、テスト結果格納ファイル304の情報をあらかじめメモリに読み込み込んでおいても良い。そして、テスト結果記録部302、および、テスト結果検索部303は、検索時にはメモリ上を検索することで、検索処理を高速化するという構成にしてもよい。   For example, at the time of initial setting, the untested portion detection device 11 may read information of the test result storage file 304 into a memory in advance. Then, the test result recording unit 302 and the test result search unit 303 may be configured to search the memory at the time of search, thereby speeding up the search process.

テスト結果格納ファイル304のデータは、テスト実行者が人手で格納しても良い。その場合、プログラムモジュール102に埋め込まれた起動命令は、直接、テスト結果検索部303を起動しても良く、埋め込み部300は無くても良い。   The data of the test result storage file 304 may be manually stored by the test executor. In that case, the start command embedded in the program module 102 may directly start the test result search unit 303, and the embedded unit 300 may not be provided.

<効果>
第1の効果は、未テスト箇所検出装置11は、テストで動作しなかった処理ルートがシステムの運用中に動作したことを運用中に検知できることである。その理由は、テスト結果検索部303が、テスト結果格納ファイル304を参照して、テストで動作した処理ルートかどうかをシステムの運用中に判定しているためである。
<Effect>
The first effect is that the untested portion detection device 11 can detect during operation that a processing route that did not operate in the test operated during operation of the system. The reason is that the test result search unit 303 refers to the test result storage file 304 and determines during the operation of the system whether or not the processing route has been operated in the test.

第2の効果は、ログファイル305への出力量を削減するできることである。その理由は、テスト結果検索部303は、テストで動作しなかった処理ルートのトレースだけをログファイル305に出力しているためである。   The second effect is that the amount of output to the log file 305 can be reduced. The reason is that the test result search unit 303 outputs only the trace of the processing route that did not operate in the test to the log file 305.

<第2の実施形態>
第1の実施の形態においては、プログラムモジュール102から埋め込み部300へ渡す箇所情報をプログラム名と行数としていた。プログラムモジュール102は、埋め込み部300へ、プログラム名と行数の代わりに、未テスト箇所検出装置11内で一意の域別子を渡すという構成にしてもよい。さらに、プログラムモジュール102は、埋め込み部300へ、プログラム名と行数と共に、未テスト箇所検出装置11内で一意の域別子を渡すという構成にしてもよい。
<Second embodiment>
In the first embodiment, the location information passed from the program module 102 to the embedding unit 300 is the program name and the number of lines. The program module 102 may be configured to pass, to the embedding unit 300, a unique area identifier in the untested portion detection device 11 instead of the program name and the number of lines. Further, the program module 102 may be configured to pass a unique area identifier in the untested portion detection device 11 along with the program name and the number of lines to the embedding unit 300.

図9は、プログラム名と行数と共に、未テスト箇所検出装置11内で一意の域別子を渡すとした場合の、埋め込み済みプログラムソースコード101(func1)の例を示す図である。図9の例において、埋め込み済みプログラムソースコード101は、分岐命令の始点、と分岐後の2つの終点に起動命令が埋め込まれている。この例において、埋め込み部300はサブルーチンの形態で実装され、起動命令は当該サブルーチンを呼び出す命令“routine”として示されている。   FIG. 9 is a diagram showing an example of the embedded program source code 101 (func1) when a unique area identifier is passed in the untested portion detection device 11 along with the program name and the number of lines. In the example of FIG. 9, in the embedded program source code 101, a start instruction is embedded at a start point of a branch instruction and at two end points after the branch. In this example, the embedding unit 300 is implemented in the form of a subroutine, and the activation instruction is shown as an instruction “routine” for calling the subroutine.

図9は、さらに、起動命令が含まれるプログラム名(func1)、当該プログラム内での起動命令が埋め込まれた行数(2,4,7)と共に、未テスト箇所検出装置11内で一意の域別子(1,2,3)を埋め込み部300に渡す場合の、パラメータの記述例を示している。   FIG. 9 further shows a program name (func1) including a start instruction, the number of lines (2, 4, 7) in which the start instruction is embedded in the program, and a unique area in the untested portion detection device 11. An example of description of parameters when passing another (1,2,3) to the embedding unit 300 is shown.

その場合、テスト結果記録部302は、テスト結果格納ファイル304に、プログラム名と行数ではなく、一意の識別子についてそれぞれテストで動作したかどうかを記録しても良い。   In this case, the test result recording unit 302 may record, in the test result storage file 304, whether or not the test has been performed for each unique identifier, instead of the program name and the number of lines.

図10は、第2の実施の形態のテスト結果格納ファイル304に格納されるデータ例を示している。図10は、例えば、プログラムモジュール102において、識別子の1をパラメータとする起動命令を埋め込んだ箇所が、テストされていることを示している。一方、図10は、識別子の2をパラメータとする起動命令を埋め込んだ箇所が、テストされていないことを示している。   FIG. 10 illustrates an example of data stored in the test result storage file 304 according to the second embodiment. FIG. 10 shows that, for example, a place where a start instruction having the identifier 1 as a parameter is embedded in the program module 102 is tested. On the other hand, FIG. 10 shows that the place where the start instruction having the identifier 2 as a parameter is embedded is not tested.

本実施の形態の未テスト箇所検出装置11は、テスト結果記録部302、および、テスト結果検索部303の処理を高速化することができる。その理由は、テスト結果記録部302、および、テスト結果検索部303は、一意の識別子をインデックスとして用いることで、すぐにテストで動作したかどうかの情報を取得することができるためである。   The untested portion detection device 11 of the present embodiment can speed up the processing of the test result recording unit 302 and the test result search unit 303. The reason is that the test result recording unit 302 and the test result search unit 303 can immediately acquire information as to whether or not the test has been performed by using the unique identifier as an index.

<第3の実施の形態>
図11は、第3の実施の形態にかかる、未テスト箇所検出装置11の構成を示す図である。未テスト箇所検出装置11は、第2の実行部306と、テスト結果格納部307と、テスト結果検索部303とを備える。
<Third embodiment>
FIG. 11 is a diagram illustrating a configuration of the untested portion detection device 11 according to the third embodiment. The untested portion detection device 11 includes a second execution unit 306, a test result storage unit 307, and a test result search unit 303.

第2の実行部306は、プログラムモジュール102を実行する。   The second execution unit 306 executes the program module 102.

テスト結果格納部307は、プログラムモジュール102中のテスト済み箇所を示す箇所識別子を記憶する。テスト結果格納部307は、テスト結果格納ファイル304でも良いし、他のものでも良い。テスト結果格納部307は、例えば、ネットワーク経由で、データを収集するような装置であっても良い。   The test result storage unit 307 stores a location identifier indicating a tested location in the program module 102. The test result storage unit 307 may be the test result storage file 304 or another file. The test result storage unit 307 may be, for example, a device that collects data via a network.

テスト結果検索部303は、プログラムモジュール102に挿入されている起動命令が実行されると、当該起動命令の挿入箇所を示す箇所識別子を取得し、取得した箇所識別子がテスト結果格納部307に格納されているか否かを判定し、判定結果を出力する。   When the start command inserted into the program module 102 is executed, the test result search unit 303 acquires a location identifier indicating a location where the start instruction is inserted, and the acquired location identifier is stored in the test result storage unit 307. Is determined, and a determination result is output.

本実施の形態の効果は、未テスト箇所検出装置11は、テストで動作しなかった処理ルートがシステムの運用中に動作したことを運用中に検知できることである。その理由は、テスト結果検索部303が、テスト結果格納部307を使用して、テストで動作した処理ルートかどうかをシステムの運用中に判定しているためである。   The effect of the present embodiment is that the untested portion detection device 11 can detect during operation that a processing route that did not operate in the test operated during operation of the system. The reason is that the test result search unit 303 uses the test result storage unit 307 to determine during the operation of the system whether or not the processing route has been operated in the test.

以上、実施形態を参照して本願発明を説明したが、本願発明は上記実施形態に限定されるものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。   Although the present invention has been described with reference to the exemplary embodiments, the present invention is not limited to the above exemplary embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.

10 起動命令埋め込み装置
11 未テスト箇所検出装置
100 プログラムソースコード
101 埋め込み済みプログラムソースコード
102 プログラムモジュール
200 起動命令埋め込み部
201 第1の実行部
300 埋め込み部
301 フェーズ情報ファイル
302 テスト結果記録部
303 テスト結果検索部
304 テスト結果格納ファイル
305 ログファイル
306 第2の実行部
307 テスト結果格納部
DESCRIPTION OF SYMBOLS 10 Start-up instruction embedding apparatus 11 Untested part detection apparatus 100 Program source code 101 Embedded program source code 102 Program module 200 Start-up instruction embedding part 201 First execution part 300 Embedding part 301 Phase information file 302 Test result recording part 303 Test result Search unit 304 Test result storage file 305 Log file 306 Second execution unit 307 Test result storage unit

Claims (8)

プログラムモジュールを実行する実行手段と、
前記プログラムモジュール中のテスト済み箇所を示す箇所識別子を記憶するテスト結果格納手段と、
前記プログラムモジュールに挿入されている起動命令が実行されると起動されて、運用中かテスト中かを判定し、運用中であればテスト結果検索手段を起動し、テスト中であればテスト結果記録手段を起動する埋め込み手段と、
前記埋め込み手段から起動されて、前記起動命令の挿入箇所を示す前記箇所識別子を取得し、取得した前記箇所識別子が前記テスト結果格納手段に格納されているか否かを判定し、判定結果を出力する前記テスト結果検索手段と、
前記埋め込み手段から起動されて、当該起動命令の挿入箇所を示す前記箇所識別子を取得し、取得した前記箇所識別子を前記テスト結果格納手段に記録する、前記テスト結果記録手段と、
を備える、未テスト箇所検出装置。
Execution means for executing the program module;
Test result storage means for storing a location identifier indicating a tested location in the program module,
The program module is started when a start command inserted in the program module is executed, and determines whether the program module is in operation or under test. If the apparatus is in operation, the test result search unit is started. An embedding means for activating the means;
Activated from the embedding unit , obtain the location identifier indicating the insertion location of the activation command , determine whether the acquired location identifier is stored in the test result storage unit, and output a determination result. The test result search means;
The test result recording unit, which is activated from the embedding unit, acquires the location identifier indicating the insertion location of the activation instruction, and records the acquired location identifier in the test result storage unit.
An untested portion detection device comprising:
ログ記憶手段を、さらに備え、
前記テスト結果検索手段は、取得した前記箇所識別子が前記テスト結果格納手段に格納されていない場合に、ログを前記ログ記憶手段に出力する、請求項1の未テスト箇所検出装置。
Further comprising a log storage means,
2. The untested location detecting apparatus according to claim 1, wherein the test result search unit outputs a log to the log storage unit when the acquired location identifier is not stored in the test result storage unit.
前記プログラムモジュールは、前記起動命令が実行されると当該起動命令が埋め込まれたルーチンのルーチン名と、前記ルーチン内のソースコード行番号を入力パラメータとして前記埋め込み手段に出力し、前記埋め込み手段は、前記ルーチン名と前記行番号を、前記起動命令の挿入箇所を示す前記箇所識別子として前記テスト結果記録手段、および、前記テスト結果検索手段に入力する、請求項1又は2の未テスト箇所検出装置。 The program module may output to the embedding means when the activation command is executed and the routine name of the routine to which the activation instruction is embedded, the line number of the source code in the routine as an input parameter, said embedding means, 3. The untested portion detecting device according to claim 1, wherein the routine name and the line number are input to the test result recording unit and the test result searching unit as the location identifier indicating a location where the activation instruction is inserted. 前記プログラムモジュールのソースコードを入力して、前記プログラムモジュールのソースコードに、前記ルーチン名と前記行番号を入力パラメータとして指定した、前記起動命令を埋め込む起動命令埋め込み手段を、さらに備える、請求項の未テスト箇所検出装置。 4. The method according to claim 3 , further comprising a start instruction embedding unit that inputs the source code of the program module, and embeds the start instruction in which the routine name and the line number are specified as input parameters in the source code of the program module. Untested location detector. 前記プログラムモジュールは、前記起動命令が実行されると前記プログラムモジュール内一意の識別子を入力パラメータとして前記埋め込み手段に出力し、前記埋め込み手段は、前記一意の識別子を、前記起動命令の挿入箇所を示す前記箇所識別子として前記テスト結果記録手段、および、前記テスト結果検索手段に入力する、請求項1乃至請求項の何れか1項の未テスト箇所検出装置。 The program module outputs the unique identifier in the program module as an input parameter to the embedding unit when the start instruction is executed, and the embedding unit indicates the unique identifier indicating a place where the start instruction is inserted. the test result recording means as said position identifier, and the test input to the search results means, untested point detecting device of any one of claims 1 to 4. プログラムモジュール中のテスト済み箇所を示す箇所識別子をテスト結果格納手段に記憶し、
前記プログラムモジュールを実行して、当該プログラムモジュールに挿入されている起動命令が実行されると、運用中かテスト中かを判定し、運用中であれば、当該起動命令の挿入箇所を示す前記箇所識別子を取得し、取得した前記箇所識別子が前記テスト結果格納手段に格納されているか否かを判定し、判定結果を出力するテスト結果検索を行いテスト中であれば、当該起動命令の挿入箇所を示す前記箇所識別子を取得し、取得した前記箇所識別子を前記テスト結果格納手段に記録する、未テスト箇所検出方法。
A location identifier indicating a tested location in the program module is stored in the test result storage means,
When the program module is executed and a start instruction inserted in the program module is executed, it is determined whether the program is in operation or under test. An identifier is obtained, a determination is made as to whether the obtained location identifier is stored in the test result storage means, a test result search for outputting a determination result is performed , and if a test is being performed , the insertion location of the start instruction is determined. An untested part detection method , comprising: obtaining the part identifier indicating the following; and recording the obtained part identifier in the test result storage means .
取得した前記箇所識別子が前記テスト結果格納手段に格納されていない場合に、ログを出力する、請求項の未テスト箇所検出方法。 7. The method according to claim 6 , wherein a log is output when the acquired location identifier is not stored in the test result storage unit. プログラムモジュールを実行する実行処理と、
前記プログラムモジュール中のテスト済み箇所を示す箇所識別子をテスト結果格納手段に記憶するテスト結果格納処理と、
前記プログラムモジュールに挿入されている起動命令が実行されると、運用中かテスト中かを判定し、運用中であればテスト結果検索処理を行い、テスト中であればテスト結果記録処理を行う埋め込み処理と、
該起動命令の挿入箇所を示す前記箇所識別子を取得し、取得した前記箇所識別子が前記テスト結果格納手段に格納されているか否かを判定し、判定結果を出力する、前記テスト結果検索処理と、
当該起動命令の挿入箇所を示す前記箇所識別子を取得し、取得した前記箇所識別子を前記テスト結果格納手段に記録する、前記テスト結果記録処理と、
をコンピュータに実行させるプログラム。
An execution process for executing the program module;
A test result storing process of storing the location identifier indicating the tested points in the program module to the test result storage means,
When the start instruction inserted in the program module is executed, it is determined whether the operation is being performed or the test is being performed. If the operation is being performed, the test result search process is performed. If the test is being performed, the test result recording process is performed. Processing,
Acquires the location identifier indicating the insertion position of those said activation command, it is determined whether or not the location identifier obtained is stored in the test result storing means, and outputs the determination result, and the test results search process ,
Acquiring the location identifier indicating the insertion location of the activation instruction, recording the acquired location identifier in the test result storage means, the test result recording process,
A program that causes a computer to execute.
JP2016028977A 2016-02-18 2016-02-18 Untested portion detection device, untested portion detection method, and program Active JP6668808B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016028977A JP6668808B2 (en) 2016-02-18 2016-02-18 Untested portion detection device, untested portion detection method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016028977A JP6668808B2 (en) 2016-02-18 2016-02-18 Untested portion detection device, untested portion detection method, and program

Publications (2)

Publication Number Publication Date
JP2017146834A JP2017146834A (en) 2017-08-24
JP6668808B2 true JP6668808B2 (en) 2020-03-18

Family

ID=59681427

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016028977A Active JP6668808B2 (en) 2016-02-18 2016-02-18 Untested portion detection device, untested portion detection method, and program

Country Status (1)

Country Link
JP (1) JP6668808B2 (en)

Also Published As

Publication number Publication date
JP2017146834A (en) 2017-08-24

Similar Documents

Publication Publication Date Title
US10019240B2 (en) Method and apparatus for detecting code change
KR100868762B1 (en) Method of error detecting method for embedded sofeware
US9898387B2 (en) Development tools for logging and analyzing software bugs
US7536678B2 (en) System and method for determining the possibility of adverse effect arising from a code change in a computer program
US8397104B2 (en) Creation of test plans
US10049031B2 (en) Correlation of violating change sets in regression testing of computer software
KR102537875B1 (en) Method and apparatus for dinamically injecting fault for vehicle ecu software test
US9262299B1 (en) Simulation observability and control of all hardware and software components of a virtual platform model of an electronics system
US9262305B1 (en) Simulation observability and control of all hardware and software components of a virtual platform model of an electronics system
US20140032969A1 (en) Post-silicon validation using a partial reference model
Gotovos et al. Test-driven development of concurrent programs using concuerror
CN109614107B (en) Integration method and device of software development kit
JP6245006B2 (en) Test case generation apparatus, method, and program
US11288171B2 (en) Data verification apparatus, method and medium for determining whether referring parts of source code are executed
CN107045474B (en) Program flow tracking method and device in Fuzz test
JP2011145824A (en) Information processing apparatus, fault analysis method, and fault analysis program
JP2013218492A (en) Software test automatic evaluation device and method
JP6668808B2 (en) Untested portion detection device, untested portion detection method, and program
JP6878707B2 (en) Test equipment, test methods and test programs
JP4763743B2 (en) Program operation comparison apparatus and method and program
JP2005338987A (en) Exception test support program and device
CN109522049B (en) Verification method and device for shared register in synchronous multithreading system
US9940068B2 (en) Device and method for determining memory leaks
KR101858594B1 (en) Method and apparatus for detecting anti-reversing code
CN110096888B (en) Method and system for accelerating verification and analyzing SMM potential safety hazard

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190115

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191031

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191112

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200109

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200128

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200210

R150 Certificate of patent or registration of utility model

Ref document number: 6668808

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150