JP6405972B2 - Operation verification apparatus, operation verification method, and operation verification program - Google Patents

Operation verification apparatus, operation verification method, and operation verification program Download PDF

Info

Publication number
JP6405972B2
JP6405972B2 JP2014251059A JP2014251059A JP6405972B2 JP 6405972 B2 JP6405972 B2 JP 6405972B2 JP 2014251059 A JP2014251059 A JP 2014251059A JP 2014251059 A JP2014251059 A JP 2014251059A JP 6405972 B2 JP6405972 B2 JP 6405972B2
Authority
JP
Japan
Prior art keywords
notification
output
log
order
program
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.)
Expired - Fee Related
Application number
JP2014251059A
Other languages
Japanese (ja)
Other versions
JP2016114998A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2014251059A priority Critical patent/JP6405972B2/en
Publication of JP2016114998A publication Critical patent/JP2016114998A/en
Application granted granted Critical
Publication of JP6405972B2 publication Critical patent/JP6405972B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明は、動作検証装置、動作検証方法及び動作検証プログラムに関する。   The present invention relates to an operation verification apparatus, an operation verification method, and an operation verification program.

近年のソフトウェア開発ではテスト駆動開発が主流となっている。テスト駆動開発において、開発者は開発対象のプログラムであるプロダクトコードを作成すると共に、そのプロダクトコードをテストするためのテストコードを作成する。そして、そのテストコードに基づいてプロダクトコードを動作させることにより、プロダクトコードの動作検証が実行される。   In recent software development, test-driven development has become mainstream. In test-driven development, a developer creates a product code that is a program to be developed, and also creates a test code for testing the product code. Then, the operation of the product code is executed by operating the product code based on the test code.

動作検証において発生した障害を解決するためには、障害の発生を再現することが求められる。しかしながら、情報処理機器を含む装置の動作には様々な要因が影響し、障害が発生した状況を忠実に再現することは容易ではない。そのような障害の再現のための技術として、装置の動作環境の情報を不揮発性記憶媒体に記憶しておき、その情報に基づいて動作環境を再現する方法が提案されている(例えば、特許文献1参照)。   In order to solve the failure that occurred in the operation verification, it is required to reproduce the occurrence of the failure. However, various factors affect the operation of the apparatus including the information processing device, and it is not easy to faithfully reproduce the situation where the failure has occurred. As a technique for reproducing such a failure, a method has been proposed in which information on the operating environment of a device is stored in a nonvolatile storage medium, and the operating environment is reproduced based on the information (for example, Patent Documents). 1).

特許文献1に開示された技術においては、温度や電圧等の動作環境を再現することは可能であるが、それ以外の要因によって発生する障害の再現には効果がない。特に、マルチスレッドのプログラムの場合、スレッドを処理するCPU(Central Processing Unit)の動作状態によっては、夫々異なるスレッドに含まれる2つの処理の順番が非常に低い頻度で入れ替わるようなことが起こり得る。   In the technique disclosed in Patent Document 1, it is possible to reproduce the operating environment such as temperature and voltage, but there is no effect in reproducing a failure caused by other factors. In particular, in the case of a multi-thread program, depending on the operating state of a CPU (Central Processing Unit) that processes threads, the order of two processes included in different threads may be switched at a very low frequency.

このような処理順序の入れ替わりが発生する頻度は、例えば1万回に1度という頻度である。従って、そのような障害を再現するためには、膨大な回数のテストを繰り返し実行する必要があり、テストに要する時間の増大やオペレータの作業負担の増大が問題となる。   The frequency at which such a change in the processing order occurs is, for example, once every 10,000 times. Therefore, in order to reproduce such a failure, it is necessary to repeatedly execute a large number of tests, which increases the time required for the test and increases the work load on the operator.

本発明は、このような課題を解決するためになされたものであり、処理順序の入れ替わりにより低確率で発生するプログラムの動作障害を確実に再現することを目的とする。   The present invention has been made to solve such a problem, and an object of the present invention is to reliably reproduce an operation failure of a program that occurs with a low probability due to a change in the processing order.

上記課題を解決するために、本発明の一態様は、プログラムの動作検証装置であって、前記プログラムに従った処理が実行されることにより並列して実行される処理に夫々組み込まれた命令によって出力される通知であって、所定の識別子が指定された通知を取得する通知取得部と、前記通知において指定される前記所定の識別子の優先度が設定された優先度設定情報に基づき、取得された前記通知に対して、設定された前記優先度の順に応答を行う応答部とを含み、前記命令は、前記通知を出力した後に前記応答を受けることによって完了し、次の処理に進むことが可能となる命令であることを特徴とする。   In order to solve the above-described problems, an aspect of the present invention is a program operation verification apparatus, which includes instructions each incorporated in a process executed in parallel by executing a process according to the program. A notification that is output and is acquired based on a notification acquisition unit that acquires a notification in which a predetermined identifier is specified, and priority setting information in which the priority of the predetermined identifier specified in the notification is set A response unit that responds to the notification in the order of the priorities set, and the command is completed by receiving the response after outputting the notification, and proceeds to a next process. It is an instruction that becomes possible.

本発明によれば、処理順序の入れ替わりにより低確率で発生するプログラムの動作障害を確実に再現することができる。   According to the present invention, it is possible to reliably reproduce an operation failure of a program that occurs with a low probability due to the change of the processing order.

本発明の実施形態に係る動作検証装置のハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the operation verification apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る動作検証装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the operation verification apparatus which concerns on embodiment of this invention. 本発明の実施形態に係るプロダクトコードの例を示す図である。It is a figure which shows the example of the product code which concerns on embodiment of this invention. 本発明の実施形態に係るテストコードの例を示す図である。It is a figure which shows the example of the test code which concerns on embodiment of this invention. 本発明の実施形態に係るログ登録順番テーブルの例を示す図である。It is a figure which shows the example of the log registration order table which concerns on embodiment of this invention. 本発明の実施形態に係る追加処理テーブルの例を示す図である。It is a figure which shows the example of the additional process table which concerns on embodiment of this invention. 本発明の実施形態に係る動作検証装置の動作を示すシーケンス図である。It is a sequence diagram which shows operation | movement of the operation verification apparatus which concerns on embodiment of this invention. 本発明の実施形態に係るログ制御部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the log control part which concerns on embodiment of this invention. 本発明の実施形態に係るログ出力時の動作を示すフローチャートである。It is a flowchart which shows the operation | movement at the time of the log output which concerns on embodiment of this invention. 本発明の実施形態に係るログ表示画面の例を示す図である。It is a figure which shows the example of the log display screen which concerns on embodiment of this invention. 本発明の実施形態に係る検証対象のプログラムの内容を示す図である。It is a figure which shows the content of the program of the verification object which concerns on embodiment of this invention. 本発明の実施形態に係る検証対象のプログラムの正常な動作を示すシーケンス図である。It is a sequence diagram which shows the normal operation | movement of the program for verification which concerns on embodiment of this invention. 本発明の実施形態に係る検証対象のプログラムにログ出力処理を追加した内容を示す図である。It is a figure which shows the content which added the log output process to the program of the verification object which concerns on embodiment of this invention. 本発明の実施形態に係る検証対象のプログラムを検証する際のログ登録順番テーブルを示す図である。It is a figure which shows the log registration order table at the time of verifying the program for verification which concerns on embodiment of this invention. 本発明の実施形態に係る検証対象のプログラムの検証動作を示すシーケンス図である。It is a sequence diagram which shows the verification operation | movement of the program for verification which concerns on embodiment of this invention.

以下、図面を参照して、本発明の実施形態について説明する。本実施形態においては、プログラム開発において作成されたプログラムの動作検証を行う方法について説明する。そのような方法において、低頻度で発生する障害を再現するため、並列して実行される夫々の処理の順番を制御することが本実施形態に係る要旨の1つである。   Embodiments of the present invention will be described below with reference to the drawings. In the present embodiment, a method for verifying the operation of a program created in program development will be described. In such a method, in order to reproduce a failure that occurs at a low frequency, it is one of the gist according to the present embodiment to control the order of the processes executed in parallel.

図1は、本実施形態に係る動作検証の方法を実現する動作検証装置のハードウェア構成を示すブロック図である。図1に示すように、本実施形態に係る動作検証装置は、一般的なサーバやPC等と同様の情報処理装置としての構成を含む。即ち、本実施形態に係る動作検証装置は、CPU(Central Processing Unit)10、RAM(Random Access Memory)20、ROM(Read Only Memory)30、HDD(Hard Disk Drive)40及びI/F50がバス80を介して接続されている。また、I/F50にはLCD(Liquid Crystal Display)60及び操作部70が接続されている。   FIG. 1 is a block diagram showing a hardware configuration of an operation verification apparatus that implements the operation verification method according to the present embodiment. As shown in FIG. 1, the operation verification apparatus according to the present embodiment includes a configuration as an information processing apparatus similar to a general server or PC. That is, the operation verification apparatus according to the present embodiment includes a CPU (Central Processing Unit) 10, a RAM (Random Access Memory) 20, a ROM (Read Only Memory) 30, an HDD (Hard Disk Drive) 40, and an I / F 50. Connected through. Further, an LCD (Liquid Crystal Display) 60 and an operation unit 70 are connected to the I / F 50.

CPU10は演算手段であり、動作検証装置全体の動作を制御する。RAM20は、情報の高速な読み書きが可能な揮発性の記憶媒体であり、CPU10が情報を処理する際の作業領域として用いられる。ROM30は、読み出し専用の不揮発性記憶媒体であり、ファームウェア等のプログラムが格納されている。HDD40は、情報の読み書きが可能な不揮発性の記憶媒体であり、OS(Operating System)や各種の制御プログラム、アプリケーション・プログラム等が格納される。   The CPU 10 is a calculation means and controls the operation of the entire operation verification apparatus. The RAM 20 is a volatile storage medium capable of reading and writing information at high speed, and is used as a work area when the CPU 10 processes information. The ROM 30 is a read-only nonvolatile storage medium and stores a program such as firmware. The HDD 40 is a non-volatile storage medium that can read and write information, and stores an OS (Operating System), various control programs, application programs, and the like.

I/F50は、バス80と各種のハードウェアやネットワーク等を接続し制御する。LCD60は、ユーザが動作検証装置の状態を確認するための視覚的ユーザインタフェースである。操作部70は、キーボードやマウス等、ユーザが動作検証装置に情報を入力するためのユーザインタフェースである。尚、動作検証装置を遠隔制御で動作するサーバとして構成する場合には、LCD60や操作部70等のユーザインタフェースは省略可能である。   The I / F 50 connects and controls the bus 80 and various hardware and networks. The LCD 60 is a visual user interface for the user to check the state of the operation verification device. The operation unit 70 is a user interface for the user to input information to the operation verification device, such as a keyboard and a mouse. When the operation verification device is configured as a server that operates by remote control, the user interface such as the LCD 60 and the operation unit 70 can be omitted.

このようなハードウェア構成において、ROM30に格納されたプログラムや、HDD40若しくは図示しない光学ディスク等の記憶媒体からRAM20にロードされたプログラムに従ってCPU10が演算を行うことにより、ソフトウェア制御部が構成される。このようにして構成されたソフトウェア制御部と、ハードウェアとの組み合わせによって、本実施形態に係る動作検証装置の機能を実現する機能ブロックが構成される。   In such a hardware configuration, the software control unit is configured by the CPU 10 performing calculations according to a program stored in the ROM 30 or a program loaded into the RAM 20 from a storage medium such as the HDD 40 or an optical disk (not shown). A functional block that realizes the function of the operation verification apparatus according to the present embodiment is configured by a combination of the software control unit configured as described above and hardware.

次に、本実施形態に係る動作検証装置の機能構成について図2のブロック図を参照して説明する。図2に示すように、本実施形態に係る動作検証装置1は、テスト実行部110、テスト対象記憶部111及びログ制御部120を含む。また、ログ制御部120は、順番制御部121、ログ出力部122、登録順番情報管理部123、追加処理管理部124及び登録順番記憶部125を含む。特に、ログ制御部120を実現するためのプログラムが、動作検証プログラムとして用いられる。   Next, the functional configuration of the operation verification apparatus according to the present embodiment will be described with reference to the block diagram of FIG. As illustrated in FIG. 2, the operation verification apparatus 1 according to the present embodiment includes a test execution unit 110, a test target storage unit 111, and a log control unit 120. Further, the log control unit 120 includes an order control unit 121, a log output unit 122, a registration order information management unit 123, an additional process management unit 124, and a registration order storage unit 125. In particular, a program for realizing the log control unit 120 is used as an operation verification program.

テスト実行部110は、テスト対象記憶部111に記憶されたテスト対象のプログラムのソースコードをビルドした上で実行する。また、本実施形態に係るテスト実行部110は、テスト対象のプログラム中に組み込まれたログ出力処理に際してログ制御部120との間で情報をやり取りし、ログ制御部120にログ出力を実行させる。   The test execution unit 110 builds and executes the source code of the test target program stored in the test target storage unit 111. In addition, the test execution unit 110 according to the present embodiment exchanges information with the log control unit 120 in the log output process incorporated in the test target program, and causes the log control unit 120 to execute log output.

テスト対象記憶部111はテスト対象のプログラムのソースコードが記憶される記憶部であり、図1において説明したHDD40等によって実現される。ここで、テスト対象記憶部111に記憶されるソースコードの内容について説明する。図3は、テスト対象のプログラムのソースコードのうち、最終的に製品となるテスト対象のソースコードであるプロダクトコードを示す図である。   The test target storage unit 111 is a storage unit that stores a source code of a test target program, and is realized by the HDD 40 described with reference to FIG. Here, the contents of the source code stored in the test target storage unit 111 will be described. FIG. 3 is a diagram illustrating a product code that is a source code of a test target that finally becomes a product among source codes of a test target program.

図3に示すプロダクトコードは、“関数A”、“関数B”および“追加処理関数C”を含む。“関数A”、“関数B”は、最終的に製品となるプログラムに含まれる関数である。これに対して、“追加処理関数C”は、“関数A”、“関数B”が最終的に製品となって動作する際の環境を再現するために組み込まれる関数である。   The product code shown in FIG. 3 includes “function A”, “function B”, and “additional processing function C”. “Function A” and “Function B” are functions that are included in a program that finally becomes a product. On the other hand, the “additional processing function C” is a function incorporated in order to reproduce the environment when “function A” and “function B” finally operate as products.

図3においては、説明の容易化のため、簡易な処理からなるプログラムを例として説明する。“関数A”は、本来の処理として「変数aをインクリメント」することを示す処理を含む。また、“関数B”は、本来の処理として「変数bをデクリメント」することを示す処理を含む。 In FIG. 3, for ease of explanation, a program consisting of simple processing will be described as an example. “Function A” includes processing indicating “increment variable a 1 ” as the original processing. “Function B” includes a process indicating that “variable b 1 is decremented” as an original process.

これに対して、本実施形態に係る動作検証に際して、“関数A”には、「“aaa”という文字列をログ出力」することを示す処理が組み込まれる。また“関数B”には、「“bbb”という文字列をログ出力」することを示す処理が組み込まれる。このようにログ出力の処理を組み込み、そのログ出力の順番を制御することによって“関数A”、“関数B”夫々に含まれる処理の順番を制御することが本実施形態に係る要旨の1つである。   On the other hand, in the operation verification according to the present embodiment, “function A” incorporates a process indicating that “a character string“ aaa ”is output as a log”. The “function B” incorporates a process indicating that “a character string“ bbb ”is output as a log”. One aspect of the present embodiment is to control the order of processing included in each of “function A” and “function B” by incorporating log output processing and controlling the order of log output. It is.

“追加処理関数C”は、「“ccc”という文字列をログ出力」することを示す処理を含む。この処理は、本来のプロダクトコードに含まれる処理ではなく、プロダクトコードの動作検証を行う上で、プロダクトコードが実際の運用で動作する際の環境を再現するために組み込まれる。   The “addition processing function C” includes a process indicating that “a character string“ ccc ”is output as a log”. This process is not a process included in the original product code, but is incorporated in order to reproduce an environment in which the product code operates in actual operation when performing an operation verification of the product code.

図4は、テスト対象のプログラムのソースコードのうち、動作検証のためにプロダクトコードを動作させるための機能を提供するプログラムのソースコードであるテストコードを示す図である。図4に示すテストコードは、“ログ出力順番登録命令”、“追加処理登録命令”、“関数実行命令”を含む。   FIG. 4 is a diagram illustrating a test code that is a source code of a program that provides a function for operating a product code for operation verification among source codes of a test target program. The test code shown in FIG. 4 includes a “log output order registration instruction”, an “additional process registration instruction”, and a “function execution instruction”.

“ログ出力順番登録命令”は、上述した「“aaa”という文字列をログ出力」、「“bbb”という文字列をログ出力」といったログ出力の順番の登録命令である。図4においては、“aaa”という文字列のログ出力が1番目で、“bbb”という文字列のログ出力が2番目であることが指定されている。   The “log output order registration command” is a log output order registration command such as “log output of character string“ aaa ”” and “log output of character string“ bbb ””. In FIG. 4, it is specified that the log output of the character string “aaa” is the first and the log output of the character string “bbb” is the second.

また、“制御前後出力”は、ログ出力の順番を制御する際に、どのタイミングでログ出力を行うかを指定する情報である。“制御前後出力”の場合、ログの出力が要求されたタイミング、即ち制御前と、ログ出力の順番が到達したタイミング、即ち制御後の2通りのタイミングでログ出力を行うことが指定されている。   Further, “output before and after control” is information for designating at what timing log output is performed when controlling the order of log output. In the case of “output before and after control”, it is specified that the log output is performed at the timing when the log output is requested, that is, before the control and at the timing when the log output order arrives, that is, after the control. .

この他、“制御前出力”であれば、ログの出力が要求されたタイミングでログ出力は行うが、指定されたログ出力の順番が満たされるまでログ出力の完了を通知せずに待機することによってログ出力の要求元の処理が次のステップに進まないようにする。また、“制御後出力”であれば、ログの出力が要求されたタイミングではログ出力を行わずに待機することによってログ出力の要求元の処理が次のステップに進まないようにする。そして、指定されたログ出力の順番が満たされた段階でログの出力を行うと共にログの出力の完了を通知する。   In addition, if it is “output before control”, log output is performed at the timing when log output is requested, but it waits without notifying completion of log output until the specified log output order is satisfied. This prevents the log output requester from proceeding to the next step. If the output is “post-control output”, the process of the log output request source does not proceed to the next step by waiting without outputting the log at the timing when the log output is requested. Then, the log output is performed at the stage where the specified log output order is satisfied, and the completion of the log output is notified.

“制御前後出力”、“制御前出力”、“制御後出力”いずれの場合においても、指定された制御順番が満たされるまで、要求されたログ出力に対する完了通知を行わずに、要求元の処理が次のステップに進まないようにすることは同一である。このような制御が、本実施形態に係る要旨の1つである。   In either case of “pre-control output”, “pre-control output”, or “post-control output”, processing of the request source is not performed until completion of the requested log output until the specified control order is satisfied. It is the same that keeps from going to the next step. Such control is one of the gist according to the present embodiment.

図5は、図4に示す“ログ出力順番登録命令”によってログ制御部120に登録される情報であるログ登録順番テーブルを示す図である。図5に示すように、指定された通りの情報、即ち、ログ出力の命令を識別するための識別子となるログの文字列が、ログ出力の実行タイミングを指定する情報と関連付けられた情報が登録される。   FIG. 5 is a diagram showing a log registration order table which is information registered in the log control unit 120 by the “log output order registration command” shown in FIG. As shown in FIG. 5, information as specified, that is, a log character string serving as an identifier for identifying a log output instruction is registered as information associated with information specifying the execution timing of log output. Is done.

“追加処理登録命令”は、上述した“追加処理関数C”によって提供される機能の実行条件を登録する命令である。図4の例の場合、“aaa”という文字列のログ出力が実行される前に、追加処理関数Cを実行するべきことが登録される。図6は、このような“追加処理登録命令”によってログ制御部120に登録される情報である追加処理テーブルを示す図である。図6に示す追加処理テーブルが追加処理設定情報として用いられる。図6に示すように、指定された通りの情報、即ち、追加処理の内容及び追加処理の実行タイミングを指定する情報が登録される。   The “additional process registration command” is a command for registering the execution condition of the function provided by the “additional processing function C” described above. In the example of FIG. 4, it is registered that the additional processing function C should be executed before the log output of the character string “aaa” is executed. FIG. 6 is a diagram showing an additional processing table which is information registered in the log control unit 120 by such an “additional processing registration command”. The additional process table shown in FIG. 6 is used as additional process setting information. As shown in FIG. 6, information as specified, that is, information specifying the content of the additional process and the execution timing of the additional process is registered.

“関数実行命令”は、図3に示す“関数A”や“関数B”等のプロダクトコードに含まれる関数の実行命令である。図4の例の場合、“関数A”、“関数B”が非同期で実行されることが指定されている。これにより、“関数A”、“関数B”によって実行される処理は、並列して実行される処理となる。   The “function execution instruction” is an execution instruction for a function included in a product code such as “function A” or “function B” shown in FIG. In the example of FIG. 4, it is specified that “function A” and “function B” are executed asynchronously. Thereby, the processing executed by “function A” and “function B” is processing executed in parallel.

ログ制御部120は、上述したようにテスト実行部110からのログ出力の要求に基づいてログ出力を行う。その際、出力されるログの内容に基づいた出力順番の制御を行うことにより、間接的にテスト対象のプログラムに含まれる処理の実行順を制御する。この機能が本実施形態に係る要旨の1つである。   The log control unit 120 performs log output based on the log output request from the test execution unit 110 as described above. At that time, the execution order of processes included in the test target program is indirectly controlled by controlling the output order based on the contents of the output log. This function is one of the gist according to the present embodiment.

順番制御部121は、テスト実行部110から受け付けたログ出力の要求に基づいて出力順番の確認や追加処理の有無の確認を行い、出力順番が満たされたらログ出力部122にログ出力を実行させるための処理を行う。ログ出力部122は、順番制御部121からの命令に従ってログ出力を実行する。ログ出力部122によるログ出力の結果、出力対象の文字列等の情報が特定のデータに書き出され、若しくはLCD60に表示される。   Based on the log output request received from the test execution unit 110, the order control unit 121 confirms the output order and the presence / absence of additional processing, and causes the log output unit 122 to execute log output when the output order is satisfied. Process. The log output unit 122 executes log output in accordance with an instruction from the order control unit 121. As a result of the log output by the log output unit 122, information such as a character string to be output is written in specific data or displayed on the LCD 60.

登録順番情報管理部123は、ログ出力の実行順番の管理を行う。そのため、登録順番情報管理部123は、図4において説明した“ログ出力順番登録命令”に従ってログ出力の実行順番の登録要求を受けると、図5において説明したようなログ登録順番テーブルを登録順番記憶部125に記憶させる。   The registration order information management unit 123 manages the execution order of log output. Therefore, upon receiving a log output execution order registration request in accordance with the “log output order registration command” described in FIG. 4, the registration order information management unit 123 stores the log registration order table as described in FIG. Store in the unit 125.

また、テスト実行部110からログ出力要求を受けた順番制御部121は、指定された文字列のログの出力順番を登録順番情報管理部123に確認する。登録順番情報管理部123は、登録順番記憶部125に記憶したログ登録順番テーブルに基づいてログ出力の実行順番を確認して順番制御部121に応答する。   In addition, the order control unit 121 that has received the log output request from the test execution unit 110 confirms the output order of the log of the designated character string with the registration order information management unit 123. The registration order information management unit 123 confirms the execution order of log output based on the log registration order table stored in the registration order storage unit 125 and responds to the order control unit 121.

追加処理管理部124は、追加処理の管理を行う。そのため、追加処理管理部124は、図4において説明した“追加処理登録命令”に従って追加処理の登録要求を受けると、図6において説明したような追加処理テーブルを登録順番記憶部125に記憶させる。   The additional process management unit 124 manages additional processes. Therefore, when the additional process management unit 124 receives a registration request for the additional process in accordance with the “additional process registration command” described in FIG. 4, the additional process management unit 124 stores the additional process table described in FIG. 6 in the registration order storage unit 125.

登録順番記憶部125は、図5において説明したような登録順番テーブルや、図6において説明したような追加処理テーブルを記憶する記憶部であり、図1において説明したHDD40等により実現される。そして、登録順番記憶部125は、登録順番情報管理部123や、追加処理管理部124からの要求に応じて情報を提供する。   The registration order storage unit 125 is a storage unit that stores a registration order table as described with reference to FIG. 5 and an additional processing table as described with reference to FIG. 6, and is realized by the HDD 40 described with reference to FIG. The registration order storage unit 125 provides information in response to requests from the registration order information management unit 123 and the additional processing management unit 124.

次に、図3〜図6に示す情報に基づいて動作検証が実行された場合の動作について図7を参照して説明する。図7に示すシーケンスが実行される際の前提として、テスト実行部110は、テスト対象記憶部111に記憶されたプロダクトコード及びテストコードのビルドを行い、それらのソースコードに基づいた実行ファイルを生成してプログラムを実行する。   Next, the operation when the operation verification is executed based on the information shown in FIGS. 3 to 6 will be described with reference to FIG. As a premise when the sequence shown in FIG. 7 is executed, the test execution unit 110 builds the product code and the test code stored in the test target storage unit 111 and generates an execution file based on the source code. And run the program.

図7に示すように、まずはテストコードによって提供されるモジュール(以降、テストコードモジュールとする)が、ログ制御順登録(S701)及び追加処理登録(S703)を実行する。S701、S703の処理は、図4に示す“ログ出力順番登録命令”や“追加処理登録命令”に相当する処理に従って実行される。   As shown in FIG. 7, first, a module provided by a test code (hereinafter referred to as a test code module) executes log control order registration (S701) and additional process registration (S703). The processing of S701 and S703 is executed according to processing corresponding to the “log output order registration command” and “additional processing registration command” shown in FIG.

テスト実行部110からログ制御順登録の要求を受けたログ制御部120においては、登録順番情報管理部123が順番制御部121から要求を受け、図5に示すような登録順番テーブルを登録順番記憶部125に記憶させる(S702)。また、テスト実行部110から追加処理登録の要求を受けたログ制御部120においては、追加処理管理部124が順番制御部121から要求を受け、図6に示すような追加処理テーブルを登録順番記憶部125に記憶させる(S704)。   In the log control unit 120 that has received the log control order registration request from the test execution unit 110, the registration order information management unit 123 receives the request from the order control unit 121, and stores the registration order table as shown in FIG. The data is stored in the unit 125 (S702). In addition, in the log control unit 120 that has received a request for registration of additional processing from the test execution unit 110, the additional processing management unit 124 receives a request from the order control unit 121 and stores an additional processing table as shown in FIG. The data is stored in the unit 125 (S704).

続いて、テストコードモジュールは、図4に示す“関数実行命令”に相当する処理に従って“関数A”、“関数B”夫々によって実現されるモジュールの処理を開始させる(S705)。上述したように、図4に示す“関数実行命令”においては“関数A”、“関数B”は非同期で実行される。従って、関数A、関数B夫々のモジュールは、独立して図3に示すソースコードの記述内容に従った処理を開始する。   Subsequently, the test code module starts the processing of the module realized by each of “function A” and “function B” according to the processing corresponding to the “function execution instruction” shown in FIG. 4 (S705). As described above, in the “function execution instruction” shown in FIG. 4, “function A” and “function B” are executed asynchronously. Therefore, each of the function A and function B modules independently starts processing according to the description contents of the source code shown in FIG.

図7に示すように、関数Bのモジュールはまず“bbb”という文字列のログの出力要求を行う(S706)。このログの出力要求は、ログ制御部120のログ出力部122によって提供されるログ出力機能の呼び出し命令である。従って、関数Bのモジュールはログ制御部120に対して“bbb”という文字列のログの出力要求を行い、その応答を待つこととなる。   As shown in FIG. 7, the module of the function B first issues a log output request for the character string “bbb” (S706). This log output request is a call instruction for a log output function provided by the log output unit 122 of the log control unit 120. Therefore, the module of the function B requests the log control unit 120 to output a log of a character string “bbb” and waits for a response.

“bbb”というログの出力要求を受けたログ制御部120においては、ログ出力の要求を受けた文字列に基づいて順番の制御や追加処理の制御が行われる。ここで、ログ出力の要求を受け付けたログ制御部120の動作について、図8を参照して説明する。   In response to the log output request “bbb”, the log control unit 120 performs order control and additional process control based on the character string received the log output request. Here, the operation of the log control unit 120 that has received a log output request will be described with reference to FIG.

図8に示すように、ログ制御部120は、ログ出力の要求を受け付けると(S801)、順番制御部121が、上述したように登録順番情報管理部123に問い合わせることによって、その出力対象の文字列が順番の制御対象であるか否か確認する(S802)。その結果、制御対象でなければ(S802/NO)、順番制御部121は、ログ出力部122に対して要求に応じたログ出力を実行させ(S809)、ログ出力の要求元に対して完了通知を行って(S808)処理を終了する。   As shown in FIG. 8, when the log control unit 120 receives a log output request (S801), the order control unit 121 makes an inquiry to the registration order information management unit 123 as described above, thereby outputting the character to be output. It is confirmed whether or not the column is a sequential control target (S802). As a result, if it is not a control target (S802 / NO), the sequence control unit 121 causes the log output unit 122 to execute log output in response to the request (S809), and notifies the log output request source of completion. (S808) to finish the process.

他方、制御対象であった場合(S802/YES)、次に順番制御部121は、ログ出力のタイミングとして、制御前の出力が指定されているか否か確認する(S803)。その結果、“制御前後出力”若しくは“制御前出力”のように、制御前の出力が指定されていた場合(S803/YES)、順番制御部121は、ログ出力部122にログ出力を実行させる(S804)。   On the other hand, if it is a control target (S802 / YES), next, the order control unit 121 checks whether or not the output before control is designated as the log output timing (S803). As a result, when the output before the control is designated, such as “output before and after control” or “output before control” (S803 / YES), the order control unit 121 causes the log output unit 122 to execute log output. (S804).

制御前の出力が指定されていない場合(S803/NO)、若しくはS804の処理が完了した場合、順番制御部121は、要求された文字列のログの出力順番の実行順に到達したか否か確認する(S805)。S805の処理は、換言すると、要求された文字列のログの出力順番の実行順よりも早い実行順のログ出力及び完了通知が全て完了したか否か確認する処理である。   When the output before the control is not designated (S803 / NO), or when the process of S804 is completed, the order control unit 121 checks whether or not the execution order of the output order of the log of the requested character string has been reached. (S805). In other words, the process of S805 is a process of confirming whether or not the log output and completion notification in the execution order earlier than the execution order of the output order of the log of the requested character string have been completed.

順番制御部121は、S801において要求されたログ出力の実行順に到達するまで待機し(S805/NO)、実行順に到達すると(S805/YES)、ログ出力のタイミングとして、制御前の出力が指定されているか否か確認する(S806)。その結果、“制御前後出力”若しくは“制御後出力”のように、制御後の出力が指定されていた場合(S806/YES)、順番制御部121は、ログ出力部122にログ出力を実行させる(S807)。   The order control unit 121 waits until it reaches the execution order of the log output requested in S801 (S805 / NO), and when it reaches the execution order (S805 / YES), the output before control is designated as the log output timing. It is confirmed whether it is (S806). As a result, when output after control is designated, such as “output before and after control” or “output after control” (YES in S806), the order control unit 121 causes the log output unit 122 to execute log output. (S807).

制御後の出力が指定されていない場合(S806/NO)、若しくはS807の処理が完了した場合、順番制御部121は、S801において要求されたログ出力の要求元に対して完了通知を行い(S808)、処理を終了する。このような処理により、ログ出力要求を受けたログ制御部120の動作が完了する。   When the output after control is not specified (S806 / NO), or when the process of S807 is completed, the order control unit 121 notifies the requester of the log output requested in S801 of completion (S808). ), The process is terminated. By such processing, the operation of the log control unit 120 that has received the log output request is completed.

ここで、図6に示すように登録された追加処理テーブルに基づく追加処理の制御は、図8に示すS804及びS807、即ち、ログ出力のタイミングで実行される。図9を参照して、図8のS804、S807の動作の詳細について説明する。   Here, the control of the additional processing based on the registered additional processing table as shown in FIG. 6 is executed at S804 and S807 shown in FIG. 8, that is, the log output timing. Details of the operations in S804 and S807 in FIG. 8 will be described with reference to FIG.

図9に示すように、ログ出力に際して、順番制御部121は、追加処理管理部124に対して、追加処理のタイミングとして、制御前の実行が指定されているか否か確認する(S901)。S901の判断の結果、制御前の実行が指定されていれば、順番制御部121は、指定されている追加処理の実行を制御する(S902)。   As illustrated in FIG. 9, when outputting the log, the order control unit 121 checks with the additional processing management unit 124 whether execution before control is designated as the timing of the additional processing (S901). If execution before control is specified as a result of the determination in S901, the order control unit 121 controls execution of the specified additional processing (S902).

制御前の実行が指定されていなかった場合(S901/NO)、若しくはS902の処理が完了した場合、順番制御部121は、ログ出力部122にログ出力を実行させる(S903)。その後、順番制御部121は、追加処理管理部124に対して、追加処理のタイミングとして、制御後の実行が指定されているか否か確認する(S904)。   When execution before control is not designated (S901 / NO), or when the processing of S902 is completed, the order control unit 121 causes the log output unit 122 to execute log output (S903). Thereafter, the order control unit 121 confirms whether or not post-control execution is specified as the timing of the additional processing to the additional processing management unit 124 (S904).

S904の判断の結果、制御後の実行が指定されていれば、順番制御部121は、指定されている追加処理の実行を制御する(S905)。制御後の実行が指定されていなかった場合(S904/NO)、若しくはS905の処理が完了すると、順番制御部121は、ログ出力に際しての動作を完了する。   If execution after control is specified as a result of the determination in S904, the order control unit 121 controls execution of the specified additional processing (S905). When execution after control is not designated (S904 / NO), or when the processing of S905 is completed, the order control unit 121 completes the operation for log output.

図7に戻り、シーケンスの説明を再開する。図7の例の場合、追加処理は図6に示すように“bbb”のログ出力には指定されていない。そして、図5に示すように“bbb”のログ出力は制御前後の出力が指定されている。従って、図8、図9に示すような動作に基づき、ログ制御部120においては、ログ出力部122が“bbb”の文字列の制御前出力を実行する(S708)。   Returning to FIG. 7, the description of the sequence is resumed. In the case of the example in FIG. 7, the additional process is not specified for the log output “bbb” as shown in FIG. 6. As shown in FIG. 5, the output before and after the control is designated as the log output of “bbb”. Accordingly, based on the operations shown in FIGS. 8 and 9, in the log control unit 120, the log output unit 122 executes the pre-control output of the character string “bbb” (S708).

そして、図5に示すように、“bbb”のログ出力は2番目であり、未だ1番目の“aaa”のログ出力が完了していないため、“bbb”のログ出力に対する完了通知は行わずに待機する。他方、関数Aのモジュールは、関数Bのモジュールの動作とは非同期で、図3に示すソースコードに記述されたように、変数aのインクリメント処理を行い(S707)、続いて“aaa”という文字列のログ出力要求を行う(S709)。 Then, as shown in FIG. 5, the log output of “bbb” is the second and the log output of the first “aaa” has not been completed yet, so the completion notification for the log output of “bbb” is not performed. To wait. On the other hand, the module of the function A is asynchronous with the operation of the module of the function B, and increments the variable a 1 as described in the source code shown in FIG. 3 (S707), followed by “aaa”. A log output request for a character string is made (S709).

関数Aのモジュールから“aaa”のログ出力要求を受けたログ制御部120は、図8、図9において説明した動作を実行する。この場合、ログ制御部120は、図6において「“aaa”出力前 追加処理関数C」と記述されている情報に基づき、まず追加処理関数Cによって実現されるモジュールの処理を実行させる(S710)。即ち、S710においては、順番制御部121が追加処理実行制御部として機能する。これにより、関数Cのモジュールは、図3に示すソースコードのように、“ccc”という文字列のログ出力をログ制御部120に要求する(S711)。   The log control unit 120 that has received the log output request “aaa” from the module of the function A executes the operation described with reference to FIGS. In this case, based on the information described as “additional processing function C before output“ aaa ”” in FIG. 6, the log control unit 120 first executes the processing of the module realized by the additional processing function C (S710). . That is, in S710, the order control unit 121 functions as an additional process execution control unit. Thereby, the module of the function C requests the log control unit 120 to output the log of the character string “ccc” as in the source code shown in FIG. 3 (S711).

ログ制御部120においては、“ccc”という文字列のログ出力の要求を受けて図8において説明した動作が同様に実行される。“ccc”という文字列は順番制御対象とはなっていないため、ログ出力部122がそのまま“ccc”という文字列のログ出力を行い、順番制御部121は関数Cのモジュールに対して完了通知を行う。   In response to the log output request for the character string “ccc”, the log control unit 120 performs the operation described in FIG. Since the character string “ccc” is not a target for order control, the log output unit 122 outputs the log of the character string “ccc” as it is, and the order control unit 121 sends a completion notification to the function C module. Do.

続いて、順番制御部121は、ログ出力部122に対して順番制御前のログ出力を実行させる(S714)。図5に示すように、“aaa”の文字列のログ出力の制御順は1番目であり、順番は満たされている。そのため、順番制御部121は、続いて順番制御後のログ出力をログ出力部122に実行させ(S715)、S709におけるログ出力要求の要求元である関数Aのモジュールに対して完了通知を行う(S716)。これにより、関数Aのモジュールにおいては、S709におけるログ出力の要求処理の次のステップに進むことが可能となる。   Subsequently, the order control unit 121 causes the log output unit 122 to execute log output before order control (S714). As shown in FIG. 5, the log output control sequence of the character string “aaa” is first, and the order is satisfied. Therefore, the order control unit 121 subsequently causes the log output unit 122 to execute log output after the order control (S715), and sends a completion notification to the function A module that is the request source of the log output request in S709 ( S716). As a result, the module of the function A can proceed to the next step of the log output request process in S709.

他方、S715において“aaa”の文字列のログ出力が実行されたことにより、図5に示すようにログ出力の制御順において1番目に指定されたログ出力が実行されたこととなる。これにより、2番目に指定された“bbb”の文字列のログ出力の実行順に到達することとなる。従って、順番制御部121は、“bbb”の文字列のログ出力要求について、図8のS805において“YES”の判断を行い、順番制御後のログ出力をログ出力部122に実行させる(S717)。そして、S706におけるログ出力要求の要求元である関数Bのモジュールに対して完了通知を行う(S718)。   On the other hand, when the log output of the character string “aaa” is executed in S715, the log output designated first in the log output control order is executed as shown in FIG. As a result, the execution order of the log output of the character string “bbb” specified second is reached. Therefore, the order control unit 121 determines “YES” in S805 of FIG. 8 for the log output request for the character string “bbb”, and causes the log output unit 122 to execute log output after the order control (S717). . Then, the completion notification is sent to the module of the function B that is the request source of the log output request in S706 (S718).

これにより、関数Bのモジュールにおいては、S706におけるログ出力の要求処理の次のステップに進むことが可能となる。その結果、図3に示すソースコードの記述の通り、変数bのデクリメント処理を実行する(S718)。このような処理により、本実施形態に係る動作検証装置の動作が完了する。 Thereby, in the module of the function B, it is possible to proceed to the next step of the log output request process in S706. As a result, the variable b 1 is decremented as described in the source code shown in FIG. 3 (S718). By such processing, the operation of the operation verification apparatus according to the present embodiment is completed.

関数Bの処理である変数bのデクリメント処理は、図3に示すように、“bbb”という文字列のログ出力の後に実行される。そして、“bbb”のログ出力の順番は“aaa”のログ出力の後に指定されており、“aaa”のログ出力は図3に示すように変数aのインクリメント処理の後の処理である。 As shown in FIG. 3, the decrement process of the variable b 1 as the process of the function B is executed after the log output of the character string “bbb”. The order of logging "bbb" is specified after the logging "aaa", logging "aaa" is the processing after the increment processing variables a 1, as shown in FIG.

結果的に、関数Bの処理である変数bのデクリメント処理を、確実に関数Aの処理である変数aのインクリメント処理の後に実行させることが可能となる。このように、ログ制御部120を介するログ出力処理をソースコード中に埋め込み、そのログ出力の順番を制御することによって、並列して実行される処理の実行順を制御することが本実施形態に係る要旨の1つである。 As a result, the decrement process of the variable b 1 that is the process of the function B can be surely executed after the increment process of the variable a 1 that is the process of the function A. In this embodiment, it is possible to control the execution order of processes executed in parallel by embedding log output processing via the log control unit 120 in the source code and controlling the order of log output. This is one of the gist.

図10は、図7の処理が実行された結果のログ出力の態様として、ログがLCD60に表示される場合の態様を示す図である。図10に示すように、“bbb”、“ccc”、“aaa”、“aaa”、“bbb”の順でログ出力が実行されたことが分かる。このような表示のうち、1つめの“bbb”及び1つめの“aaa”は、制御前出力によって出力されるログである。   FIG. 10 is a diagram illustrating an aspect in which a log is displayed on the LCD 60 as an aspect of log output as a result of the execution of the processing in FIG. 7. As shown in FIG. 10, it can be seen that log output was executed in the order of “bbb”, “ccc”, “aaa”, “aaa”, and “bbb”. Among such displays, the first “bbb” and the first “aaa” are logs output by the pre-control output.

図10の例においては、1つめの“aaa”や、それに伴って追加処理で出力される“ccc”よりも先に“bbb”が出力されていることが分かる。従って、S706の処理が、S707よりも先に処理されたことを間接的に確認することが可能である。このような間接的な処理順番の確認が、ログの制御前出力の意義である。   In the example of FIG. 10, it can be seen that “bbb” is output before the first “aaa” and “ccc” output in the additional process. Therefore, it is possible to indirectly confirm that the process of S706 has been performed before S707. Such indirect confirmation of the processing order is the significance of the output before log control.

尚、図3、図4及び図7の例においては、テストコード中にプロダクトコード内の関数の実行命令が含まれる場合を例としている。しかしながら、これは一例であり、プロダクトコード内に含まれるテスト対象の関数を実行するための命令をプロダクトコード内に含め、その命令を起動するための命令をテストコード内に含めても良い。   3, 4, and 7, the case where the execution instruction of the function in the product code is included in the test code is taken as an example. However, this is an example, and an instruction for executing a function to be tested included in the product code may be included in the product code, and an instruction for starting the instruction may be included in the test code.

いずれの場合であっても、動作検証を行う対象のプログラムであって、並列して実行される複数のプログラム内にログ出力命令を組み込み、出力対象のログの内容に応じた順番制御を行うことによって、上記の目的を達成することが可能である。   In any case, it is a program to be verified, incorporate log output instructions into multiple programs executed in parallel, and perform order control according to the contents of the log to be output Thus, the above object can be achieved.

次に、低確率で発生する障害の例及びその障害を再現するためのログ出力命令の挿入、順番制御について説明する。図11は、ログ出力命令が挿入される前の本来のプロダクトコードを示す図である。図11に示すプロダクトコードは、原稿を撮影するスキャナにおいて、命令に応じてスキャナエンジンを制御してスキャンを実行する機能を提供するプログラムの例である。図11に示すように、本来のプロダクトコードには、関数A及び関数Bの2つの関数が含まれる。   Next, an example of a failure that occurs at a low probability, and log output command insertion and order control for reproducing the failure will be described. FIG. 11 is a diagram showing an original product code before the log output instruction is inserted. The product code shown in FIG. 11 is an example of a program that provides a function of controlling a scanner engine according to a command and executing a scan in a scanner that captures an original. As shown in FIG. 11, the original product code includes two functions, function A and function B.

関数Aは、図11に示すように、「関数Bからイベント通知を受けたら動作開始」する処理、「イベント通知」する処理を含む。また、関数Bは、「命令に応じて読取動作指示」する処理、「エンジンからイベント通知を受けたら関数Aにイベント通知」する処理、「エンジンから完了通知を受けたら完了通知」する処理を含む。   As shown in FIG. 11, the function A includes a process of “starting operation upon receiving an event notification from the function B” and a process of “event notification”. The function B includes a process of “instructing a reading operation in response to a command”, a process of “notifying the function A when an event notification is received from the engine”, and a process of “notifying completion when a completion notification is received from the engine”. .

図12は、図11に示すプロダクトコードのテスト動作を示すシーケンス図である。図12に示すように、まずはテストコードのモジュールによって関数A、関数Bが実行され(S1201)、更に、関数Bに対して読取命令が行われる(S1202)   FIG. 12 is a sequence diagram showing a test operation of the product code shown in FIG. As shown in FIG. 12, first, the function A and the function B are executed by the module of the test code (S1201), and further, a read command is executed for the function B (S1202).

これにより、関数Bのモジュールが読取命令を受けてスキャナエンジンを制御するエンジンドライバに対して読取動作の指示を行う(S1203)。これにより、エンジンドライバは、読取動作のイベントが発生したことを関数Bのモジュールに対して通知し(S1204)、スキャナエンジンを制御してスキャンを実行させる。   As a result, the module of the function B receives the reading command and instructs the engine driver that controls the scanner engine to perform a reading operation (S1203). As a result, the engine driver notifies the function B module that a reading operation event has occurred (S1204), and controls the scanner engine to execute scanning.

エンジンドライバからイベント通知を受けた関数Bのモジュールは、関数Aのモジュールに対してイベント通知を行う(S1205)。これにより、関数Aのモジュールは、テストコードのモジュールに対してイベント通知を行う(S1206)。   The function B module that has received the event notification from the engine driver sends an event notification to the function A module (S1205). As a result, the function A module notifies the test code module of an event (S1206).

他方、スキャナエンジンを制御してスキャンを実行させたエンジンドライバは、スキャンが完了すると読取動作の指示元である関数Bのモジュールに対して完了通知を行う(S1207)。完了通知を受けた関数Bのモジュールは、テストコードのモジュールに対して完了通知を行う(S1208)。結果的に、テストコードのモジュールは、スキャンが開始される際のイベント通知を受けた後に、完了通知を受けることとなる。   On the other hand, when the scan is completed, the engine driver that controls the scanner engine sends a completion notification to the function B module that is the instruction source of the reading operation (S1207). The module of the function B that has received the completion notification sends a completion notification to the test code module (S1208). As a result, the test code module receives a completion notification after receiving an event notification when scanning is started.

S1204からS1207の処理の間にはスキャンを実行する期間があり、相応の期間が空いている。そのため、大半の場合にはS1206の処理は、S1208よりも先に実行される。   There is a period during which scanning is executed between the processes of S1204 to S1207, and a corresponding period is available. Therefore, in most cases, the process of S1206 is executed before S1208.

しかしながら、S1206の処理とS1208の処理とは直接関係しているわけではなく、順番が規定されているわけではないため、非常に低頻度ではあるが、S1208の処理がS1206の処理を追い越してしまう場合がある。その場合、テストコードのモジュールは、スキャンが開始される際のイベント通知を受ける前に、完了通知を受けることとなる。そのような状態を再現するために、本実施形態に係る動作検証の方法が用いられる。   However, since the process of S1206 and the process of S1208 are not directly related and the order is not specified, the process of S1208 overtakes the process of S1206 although it is very infrequent. There is a case. In this case, the test code module receives a completion notice before receiving an event notice when scanning is started. In order to reproduce such a state, the operation verification method according to the present embodiment is used.

図13は、図11に示すプロダクトコードに対して、順番制御のためのログ出力命令を埋め込んだ例を示す図である。図13に示すように、関数Aには、「イベント通知」の処理の前に「“event”という文字列をログ出力」する処理が組み込まれる。また、関数Bには、「エンジンから完了通知を受けたら完了通知」の処理の後に「“response”という文字列をログ出力」する処理が組み込まれる。   FIG. 13 is a diagram showing an example in which a log output command for order control is embedded in the product code shown in FIG. As illustrated in FIG. 13, the function A includes a process of “logging the character string“ event ”” before the “event notification” process. Further, the function B incorporates a process of “logging a character string“ response ”” after the process of “completion notification upon receipt of completion notification from the engine”.

図14は、図13に示すように埋め込まれたログ出力命令の順番制御に対応したログ登録順番テーブルを示す図である。図14に示すように、“response”のログ出力が1番目で、“event”のログ出力が2番目であることが指定されると共に、いずれも制御後出力であることが指定される。   FIG. 14 is a diagram showing a log registration order table corresponding to the order control of the log output instructions embedded as shown in FIG. As shown in FIG. 14, it is specified that the log output of “response” is the first, the log output of “event” is the second, and both are output after control.

図15は、図13に示すようにログ出力命令が埋め込まれたプロダクトコードのテスト動作を示すシーケンス図である。図15に示すように、S1501〜S1505については、図12のS1201〜S1205と同様に処理が実行される。   FIG. 15 is a sequence diagram showing the test operation of the product code in which the log output command is embedded as shown in FIG. As shown in FIG. 15, processes in S1501 to S1505 are executed in the same manner as S1201 to S1205 in FIG. 12.

関数Bのモジュールからイベント通知を受けた関数Aのモジュールは、図13に示すように関数Bのモジュールからのイベント通知に応じて動作を開始し、まずはログ制御部120に対して“event”という文字列のログ出力要求を行う(S1506)。ログ制御部120は、関数Aのモジュールからログ出力要求を受けると、図8の動作を実行する。   Upon receiving the event notification from the function B module, the function A module starts the operation in response to the event notification from the function B module as shown in FIG. A log output request for a character string is made (S1506). When the log control unit 120 receives a log output request from the module of the function A, the log control unit 120 executes the operation of FIG.

しかしながら、図14に示すように“event”のログ出力は“response”のログ出力の後に順番が登録されており、且つ制御後出力である。そのため、ログ制御部120は、図8のS805において“NO”の判断をし、ログ出力の制御順番が満たされるまで待機する。   However, as shown in FIG. 14, the log output of “event” is registered after the log output of “response”, and is an output after control. Therefore, the log control unit 120 determines “NO” in S805 of FIG. 8 and waits until the log output control order is satisfied.

他方、エンジンドライバは、スキャンが完了すると読取動作の指示元である関数Bのモジュールに対して完了通知を行う(S1507)。完了通知を受けた関数Bのモジュールは、テストコードのモジュールに対して完了通知を行う(S1508)。続いて、関数Bのモジュールは、図14に示すように、ログ制御部120に対して“response”という文字列のログ出力要求を行う(S1509)。   On the other hand, when the scan is completed, the engine driver sends a completion notification to the function B module that is the instruction source of the reading operation (S1507). The module of the function B that has received the completion notification sends a completion notification to the test code module (S1508). Subsequently, as shown in FIG. 14, the module of the function B makes a log output request for the character string “response” to the log control unit 120 (S1509).

ログ制御部120は、関数Bのモジュールからログ出力要求を受けると、図8の動作を実行する。図14に示すように、“response”のログ出力は1番目に順番が登録されていると共に制御後出力であるため、ログ出力部122が“response”のログ出力を実行する(S1510)。そして、順番制御部121が関数Bのモジュールに対して完了通知を行う(S1511)。   When receiving a log output request from the function B module, the log control unit 120 executes the operation of FIG. As illustrated in FIG. 14, since the log output of “response” is the first registered order and is an output after control, the log output unit 122 executes log output of “response” (S1510). Then, the order control unit 121 sends a completion notification to the function B module (S1511).

これにより、S1506において要求を受け付けた“event”のログ出力の順番が満たされることとなるため、ログ出力部122が“event”のログ出力を実行する(S1512)。そして、順番制御部121が関数Aのモジュールに対して完了通知を行う(S1513)。   As a result, the order of log output of “event” that received the request in S1506 is satisfied, and the log output unit 122 executes log output of “event” (S1512). Then, the order control unit 121 sends a completion notification to the function A module (S1513).

ログ出力の完了通知を受けた関数Aのモジュールにおいては、図13に示す次のステップに進み、テストコードのモジュールに対してイベント通知を行う(S1514)。このような制御により、関数Bのモジュールが実行する完了通知が、関数Aのモジュールが実行するイベント通知を追い越してしまう状況を再現することが可能となる。   Upon receiving the log output completion notification, the module of the function A proceeds to the next step shown in FIG. 13, and notifies the test code module of an event (S1514). By such control, it is possible to reproduce a situation where the completion notification executed by the function B module overtakes the event notification executed by the function A module.

以上、説明したように、本実施形態に係る動作検証方法においては、並列して実行される処理夫々に対して、外部のモジュールにログ出力を要求するための命令を埋め込む。そのログ出力の要求は、ログ出力が完了するまで次の処理に進めないような命令となっている。   As described above, in the operation verification method according to the present embodiment, an instruction for requesting log output to an external module is embedded in each of the processes executed in parallel. The log output request is an instruction that cannot proceed to the next processing until the log output is completed.

そして、ログ出力の要求を受け付ける外部のモジュールは、指定された順番の通りにログ出力の完了通知を行うように制御する。これにより、並列して実行される処理夫々の処理の順番は、命令が埋め込まれたログ出力の順番が制御されることによって間接的に制御されることとなる。従って、処理順序の入れ替わりにより低確率で発生するプログラムの動作障害を確実に再現することが可能となる。   Then, an external module that receives a log output request performs control so that a log output completion notification is performed in the specified order. As a result, the order of processing executed in parallel is indirectly controlled by controlling the order of log output in which instructions are embedded. Therefore, it is possible to reliably reproduce the program operation failure that occurs with a low probability due to the change of the processing order.

尚、上記実施形態においては、テスト対象のプロダクトコードに対して、ログ制御部120にログ出力を要求するための命令を埋め込み、ログ制御部120がログ出力の順番を制御する態様を説明した。ログ出力を要求するための命令は、ログ制御部120から完了通知を受けなければ完了せず、そのためプロダクトコード側の処理においては、次の処理に進むことが出来ない。これにより、ログ制御部120が、プロダクトコードにおいて並列して実行される処理の実行順を制御することが可能となる。   In the above-described embodiment, a mode has been described in which a command for requesting log output to the log control unit 120 is embedded in the product code to be tested, and the log control unit 120 controls the order of log output. The command for requesting log output is not completed unless a completion notification is received from the log control unit 120. Therefore, in the process on the product code side, the process cannot proceed to the next process. Thereby, the log control unit 120 can control the execution order of the processes executed in parallel in the product code.

即ち、ログ制御部120において順番制御部121が通知取得部及び応答部として機能し、ログ出力部122が処理実行部として機能する場合を例として説明した。また、図5に示すログ登録順番テーブルが優先度設定情報として用いられる場合を例として説明した。   That is, the case where the order control unit 121 functions as a notification acquisition unit and a response unit and the log output unit 122 functions as a process execution unit in the log control unit 120 has been described as an example. Further, the case where the log registration order table shown in FIG. 5 is used as priority setting information has been described as an example.

しかしながら、プロダクトコードに埋め込む命令は、ログ出力を要求するための命令に限らず、外部のモジュールに特定の識別子が指定された通知を行い、その通知に対する応答を待って次の処理に進むことが許可されるような命令であれば良い。そして、そのような命令によって出力された通知に対する応答の順番が制御されることにより、上記と同様の効果を得ることが可能である。   However, the instruction to be embedded in the product code is not limited to an instruction for requesting log output, and a notification in which a specific identifier is designated is given to an external module, and a response to the notification is waited for before proceeding to the next processing. Any instruction that is allowed is acceptable. Then, by controlling the order of responses to notifications output by such a command, it is possible to obtain the same effect as described above.

従って、上記実施形態においては、そのような命令をログ出力要求の実行命令とし、指定される特定の識別子として出力されるログの内容を示す文字列として説明したが、これは一例である。何らかの識別子を指定した通知を出力する命令をプロダクトコードに埋め込み、ログ制御部120に相当するモジュールがその通知を受け付けて応答の順番を制御することにより、上記と同様の効果を得ることが可能である。   Therefore, in the above-described embodiment, such an instruction is an execution instruction for a log output request and has been described as a character string indicating the content of a log output as a specified specific identifier, but this is an example. It is possible to obtain the same effect as described above by embedding a command for outputting a notification specifying some identifier in the product code, and the module corresponding to the log control unit 120 receives the notification and controls the order of responses. is there.

他方、そのように埋め込む命令をログ出力の要求とすることにより、出力されたログを確認することによって実際にどのような順番で処理が実行されたかを確認することが可能となる。従って、順番制御のための、外部のモジュールに処理を要求し、その要求の完了通知をまって次の処理に進むことが許可されるような命令は、ログ出力を要求する命令であることが好ましい。   On the other hand, by making such an instruction to be embedded into a log output request, it is possible to confirm in what order the processing was actually executed by checking the output log. Therefore, an instruction that requests processing from an external module for order control, and is allowed to proceed to the next process after receiving a notification of completion of the request may be an instruction requesting log output. preferable.

また、本実施形態において順番制御の対象となるのは並列して実行される処理である。従ってマルチスレッドの処理であることは前提である。上記実施形態の場合、図3、図4に示すようなプロダクトコード及びテストコードはまとめてビルドされ、1つのプロセスとして実行される。そのような1つのプロセスの中でマルチスレッドにより並列して実行される処理が順番制御の対象となる。   Further, in the present embodiment, the target of order control is processing executed in parallel. Therefore, it is a premise that the processing is multi-threaded. In the case of the above embodiment, the product code and test code as shown in FIGS. 3 and 4 are built together and executed as one process. Processing that is executed in parallel by multithreads in such one process is subject to order control.

しかしながら、マルチプロセスであっても同様に適用可能である。例えば、図3に示すプロダクトコードに含まれる“関数A”、“関数B”及びテストコードが夫々異なる実行ファイルとしてビルドされて異なるプロセスとして実行される場合が考えられる。この場合、“関数A”、“関数B”夫々に対応する処理は異なるプロセスで並列して実行されることとなる。   However, even multi-processes can be similarly applied. For example, a case where “function A”, “function B”, and test code included in the product code shown in FIG. 3 are built as different execution files and executed as different processes may be considered. In this case, the processes corresponding to “function A” and “function B” are executed in parallel by different processes.

このような場合であっても、異なるプロセスであるテストコードのプロセスに対してログ出力を要求するような命令を“関数A”、“関数B”夫々に組み込むことにより、上記と同様に順番制御を行うことが可能となる。   Even in such a case, it is possible to control the order in the same manner as described above by incorporating an instruction for requesting log output to a test code process which is a different process in each of “function A” and “function B”. Can be performed.

また、上記実施形態においては、追加処理管理部124を設けることにより、追加処理を実現する場合を例として説明した。これは、図11、図13に示すように、ソースコードの編集が可能なプログラム以外の外部プログラムとの連動が求められる場合において、外部プログラムの動作によって実行される処理を代行する等の効果がある。従って、追加処理管理部124は必須ではなく、必要に応じて設ければ良い。   Further, in the above-described embodiment, the case where the additional processing is realized by providing the additional processing management unit 124 has been described as an example. This is because, as shown in FIGS. 11 and 13, in the case where the linkage with an external program other than the program capable of editing the source code is required, the processing executed by the operation of the external program is substituted. is there. Therefore, the additional process management unit 124 is not essential and may be provided as necessary.

1 動作検証装置
10 CPU
20 RAM
30 ROM
40 HDD
50 I/F
60 LCD
70 操作部
80 バス
110 テスト実行部
111 テスト対象記憶部
120 ログ制御部
121 順番制御部
122 ログ出力部
123 登録順番情報管理部
124 追加処理管理部
125 登録順番記憶部
1 operation verification device 10 CPU
20 RAM
30 ROM
40 HDD
50 I / F
60 LCD
DESCRIPTION OF SYMBOLS 70 Operation part 80 Bus | bath 110 Test execution part 111 Test object memory | storage part 120 Log control part 121 Order control part 122 Log output part 123 Registration order information management part 124 Additional process management part 125 Registration order storage part

特開2012−128489号公報JP 2012-128489 A

Claims (10)

プログラムの動作検証装置であって、
前記プログラムに従った処理が実行されることにより並列して実行される処理に夫々組み込まれた命令によって出力される通知であって、所定の識別子が指定された通知を取得する通知取得部と、
前記通知において指定される前記所定の識別子の優先度が設定された優先度設定情報に基づき、取得された前記通知に対して、設定された前記優先度の順に応答を行う応答部とを含み、
前記命令は、前記通知を出力した後に前記応答を受けることによって完了し、次の処理に進むことが可能となる命令であることを特徴とする動作検証装置。
A program operation verification device,
A notification obtaining unit that obtains a notification in which a predetermined identifier is specified, which is a notification output by an instruction incorporated in each of the processes executed in parallel by executing the process according to the program;
A response unit configured to respond to the acquired notification in the order of the set priorities based on the priority setting information in which the priority of the predetermined identifier specified in the notification is set;
The operation verification apparatus according to claim 1, wherein the instruction is an instruction that is completed by receiving the response after outputting the notification and can proceed to a next process.
前記通知は、所定の処理の実行を要求する通知であり、
取得された前記通知に基づき、前記所定の処理を実行する処理実行部を含むことを特徴とする請求項1に記載の動作検証装置。
The notification is a notification requesting execution of a predetermined process,
The operation verification apparatus according to claim 1, further comprising a process execution unit that executes the predetermined process based on the acquired notification.
前記通知は、前記通知において指定された識別子の出力を要求する通知であり、
前記処理実行部は、前記通知において指定されている前記所定の識別子を出力することを特徴とする請求項2に記載の動作検証装置。
The notification is a notification requesting output of an identifier specified in the notification;
The operation verification apparatus according to claim 2, wherein the process execution unit outputs the predetermined identifier specified in the notification.
前記通知において指定される前記所定の識別子の出力に際して実行される追加処理が設定された追加処理設定情報に基づき、前記通知において指定されている前記所定の識別子の出力に際して設定された前記追加処理の実行を制御する追加処理実行制御部を含むことを特徴とする請求項3に記載の動作検証装置。   Based on the additional process setting information in which an additional process to be executed when the predetermined identifier specified in the notification is output is set, the additional process set when the predetermined identifier specified in the notification is output. The operation verification apparatus according to claim 3, further comprising an additional process execution control unit that controls execution. 前記追加処理設定情報は、前記追加処理の実行タイミングを指定する情報を含み、
前記追加処理実行制御部は、指定されたタイミングで前記追加処理の実行を制御することを特徴とする請求項4に記載の動作検証装置。
The additional process setting information includes information specifying the execution timing of the additional process,
The operation verification apparatus according to claim 4, wherein the additional process execution control unit controls execution of the additional process at a designated timing.
前記追加処理設定情報は、前記通知において指定される前記所定の識別子の出力の前及び出力の後の少なくとも一方を前記追加処理の実行タイミングとして指定する情報を含むことを特徴とする請求項5に記載の動作検証装置。   The said additional process setting information contains the information which designates at least one before the output of the said predetermined | prescribed identifier designated in the said notification as an execution timing of the said additional process as described in Claim 5. The operation verification apparatus described. 前記優先度設定情報は、前記通知において要求される処理の実行タイミングを指定する情報が前記所定の識別子に関連付けて記憶された情報であり、
前記処理実行部は、取得された前記通知に基づき、指定された前記所定の識別子に関連付けられたタイミングで前記所定の処理を実行することを特徴とする請求項2乃至6いずれか1項に記載の動作検証装置。
The priority setting information is information in which information specifying the execution timing of the process requested in the notification is stored in association with the predetermined identifier,
The said process execution part performs the said predetermined process at the timing linked | related with the specified said predetermined identifier based on the acquired said notification. Operation verification device.
前記優先度設定情報は、前記通知が取得されたタイミング及び取得された前記通知において指定された前記所定の識別子の優先度に応じた順番に到達したタイミングの少なくとも一方を指定する情報が前記識別子に関連付けて記憶された情報であることを特徴とする請求項7に記載の動作検証装置。   The priority setting information includes information specifying at least one of the timing at which the notification is acquired and the timing at which the notification arrives in an order corresponding to the priority of the predetermined identifier specified in the acquired notification. The operation verification apparatus according to claim 7, wherein the operation verification apparatus is information stored in association with each other. プログラムの動作検証方法であって、
前記プログラムに従った処理が実行されることにより並列して実行される処理に、所定の識別子が指定された通知を出力する命令であって、前記通知を出力した後に応答を受けることによって完了して次の処理に進むことが可能となる命令を前記プログラムに組み込み、
前記通知において指定される前記所定の識別子の優先度を優先度設定情報として設定し、
前記通知が組み込まれたプログラムに従った処理を実行し、
前記並列して実行される処理に夫々組み込まれた命令によって出力される通知であって、前記所定の識別子が指定された通知を取得し、
前記優先度設定情報に基づき、取得された前記通知に対して、設定された前記優先度の順に応答を行うことを特徴とする動作検証方法。
A method for verifying the operation of a program,
A command for outputting a notification in which a predetermined identifier is specified for processing executed in parallel by executing processing according to the program, and is completed by receiving a response after outputting the notification. Incorporated into the program is an instruction that allows the program to proceed to the next process,
Setting priority of the predetermined identifier specified in the notification as priority setting information;
Execute a process according to the program in which the notification is embedded;
A notification output by an instruction incorporated in each of the processes executed in parallel, the notification specifying the predetermined identifier is acquired;
An operation verification method comprising: responding to the acquired notification based on the priority setting information in order of the set priority.
プログラムの動作を検証する動作検証プログラムであって、
検証対象である前記プログラムに従った処理が実行されることにより並列して実行される処理に夫々組み込まれた命令によって出力される通知であって、所定の識別子が指定された通知を取得するステップと、
前記通知において指定される前記所定の識別子の優先度が設定された優先度設定情報に基づき、取得された前記通知に対して、設定された前記優先度の順に応答を行うステップとを情報処理装置に実行させ、
前記命令は、前記通知を出力した後に前記応答を受けることによって完了し、次の処理に進むことが可能となる命令であることを特徴とする動作検証プログラム。
An operation verification program for verifying the operation of the program,
A step of obtaining a notification that is output by an instruction incorporated in each of the processes that are executed in parallel by executing the process according to the program to be verified, and that is designated with a predetermined identifier. When,
A step of responding to the acquired notification in the order of the set priorities based on the priority setting information in which the priority of the predetermined identifier specified in the notification is set To run
The operation verification program according to claim 1, wherein the instruction is an instruction that is completed by receiving the response after outputting the notification and is allowed to proceed to a next process.
JP2014251059A 2014-12-11 2014-12-11 Operation verification apparatus, operation verification method, and operation verification program Expired - Fee Related JP6405972B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014251059A JP6405972B2 (en) 2014-12-11 2014-12-11 Operation verification apparatus, operation verification method, and operation verification program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014251059A JP6405972B2 (en) 2014-12-11 2014-12-11 Operation verification apparatus, operation verification method, and operation verification program

Publications (2)

Publication Number Publication Date
JP2016114998A JP2016114998A (en) 2016-06-23
JP6405972B2 true JP6405972B2 (en) 2018-10-17

Family

ID=56141762

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014251059A Expired - Fee Related JP6405972B2 (en) 2014-12-11 2014-12-11 Operation verification apparatus, operation verification method, and operation verification program

Country Status (1)

Country Link
JP (1) JP6405972B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6908827B2 (en) * 2017-03-28 2021-07-28 富士通株式会社 Test equipment, test methods, test programs and test systems

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002007147A (en) * 2000-04-21 2002-01-11 Matsushita Electric Ind Co Ltd Real time os simulator
JP4879782B2 (en) * 2007-03-07 2012-02-22 株式会社エヌ・ティ・ティ・データ Program profiling method and program
JP2009238176A (en) * 2008-03-28 2009-10-15 Toshiba Corp Information processing apparatus and program verifying method

Also Published As

Publication number Publication date
JP2016114998A (en) 2016-06-23

Similar Documents

Publication Publication Date Title
TWI400652B (en) Dual operating system parallel processing methods, recording media and computer program products
JP5198584B2 (en) Enhanced server virtual machine configuration for server-based clients
US9348982B2 (en) Information processing system, an operating device, and a computer-readable storage medium
EP2755136B1 (en) Remote backup system and remote backup method thereof
WO2010001555A1 (en) Execution order decision device, execution order decision program, execution order decision circuit, and information processing device
KR102642219B1 (en) Image formation apparatus, control method therefor, and computer readable storage medium
US20150178030A1 (en) Network device, control method for network device, and storage medium thereof
KR20180045818A (en) Program, system, and information processing method
JP5052361B2 (en) Image processing system and image processing method
JP6405972B2 (en) Operation verification apparatus, operation verification method, and operation verification program
US20150317103A1 (en) Printing apparatus that updates software installed therein, method of controlling the same, and storage medium
US20170094090A1 (en) Information processing apparatus, method for controllingthe same, and storage medium
JP2010140231A (en) Workflow server, method of controlling workflow server, program, and recording medium
JP5420358B2 (en) Batch processing execution method and batch processing execution system
JP2008305021A (en) Information processor and application management method
JP4597032B2 (en) Computer system, basic program startup method, and loader program
JP7023807B2 (en) Management system, information processing device, setting management method, and program
JP7277694B2 (en) Information processing device, its control method and program
JP6555908B2 (en) Information processing apparatus, control method therefor, and program
CN111431699A (en) Method, device and system for quickly validating face authentication function
JP6467298B2 (en) Server operation work history management device, system, method, and program
WO2022249240A1 (en) Activation system and activation method
JP5023169B2 (en) Required patch list creation apparatus and method
JP7311740B2 (en) Information processing system, its control method, and program
JP5240861B2 (en) Control device, data migration system, data migration method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171205

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180718

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: 20180821

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180903

R151 Written notification of patent or utility model registration

Ref document number: 6405972

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees