JP2012248118A - Program execution trace information aggregation program, device, and method - Google Patents
Program execution trace information aggregation program, device, and method Download PDFInfo
- Publication number
- JP2012248118A JP2012248118A JP2011121055A JP2011121055A JP2012248118A JP 2012248118 A JP2012248118 A JP 2012248118A JP 2011121055 A JP2011121055 A JP 2011121055A JP 2011121055 A JP2011121055 A JP 2011121055A JP 2012248118 A JP2012248118 A JP 2012248118A
- Authority
- JP
- Japan
- Prior art keywords
- node
- event
- trace information
- call
- information
- 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.)
- Granted
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明はアプリケーションプログラムのトレース情報技術に関する。 The present invention relates to trace information technology for application programs.
近年、コンピュータシステムの発達により、世の中の様々な場面でコンピュータシステムが活用されるようになってきている。一度構築したコンピュータシステムでも歳月を経ることで、改良を行う必要が生じる。あるいはシステム全体を見直す必要が生じることがある。既に作成したプログラムの一部に修正を行う場合には、まず既存のプログラムの機能や、複数の処理単位の呼出構造を把握する必要がある。 In recent years, with the development of computer systems, computer systems have come to be used in various scenes in the world. Even computer systems that have been built once need to be improved over time. Or it may be necessary to review the entire system. When modifying a part of an already created program, it is necessary to first understand the function of the existing program and the calling structure of a plurality of processing units.
通常、プログラムには、その設計仕様書が存在するが、プログラムが設計仕様書を完全に満足していない場合も存在する。また、仕様変更を繰り返すうちに、設計仕様書自体が整理された形で保存されていない場合も多い。したがって、プログラムを実際に動作させて、そのプログラムの挙動を解析することが必要とされる。 Usually, a program has a design specification, but there are cases where the program does not completely satisfy the design specification. In many cases, the design specifications themselves are not stored in an organized manner as the specification changes are repeated. Therefore, it is necessary to actually run the program and analyze the behavior of the program.
プログラムは、複数の処理単位を含んでいるため、その処理単位の各々を実現するプログラムの要素の集合体として、全体のプログラムが構成されている場合がほとんどである。したがって、個々の処理単位に分けてプログラムを開発し、また改良を加える場合が多い。このプログラムにおける処理単位は、一般にメソッド、関数、ルーチンなどと呼ばれる。本明細書では、この一定の機能を実現するプログラムの処理単位を代表する語として「メソッド」の語を用いて説明する場合がある。したがって、以下の記載において、「メソッド」と明記されていても、この語は関数、ルーチンなど、一定の機能を実現するプログラムの「処理単位」を意味するものとして、理解すべきである点に留意する必要がある。 Since a program includes a plurality of processing units, the entire program is almost always configured as an aggregate of program elements that realize each processing unit. Therefore, there are many cases where a program is developed and improved in each processing unit. A processing unit in this program is generally called a method, a function, a routine, or the like. In the present specification, the word “method” may be used as a word representing a processing unit of a program that realizes the certain function. Therefore, in the following description, even if “method” is specified, this word should be understood as meaning a “processing unit” of a program that realizes a certain function such as a function or a routine. It is necessary to keep in mind.
プログラムのソースを分析して、個々のメソッドの呼出構造を取得する方法がある。しかしながら、実行時に決定する呼出構造などがあるため、正確な呼出構造を把握するためには、実際にプログラムを実行したことで得られる実行履歴を取得する必要がある。 There is a method for analyzing the source of a program and obtaining the calling structure of each method. However, since there is a call structure determined at the time of execution, in order to grasp an accurate call structure, it is necessary to acquire an execution history obtained by actually executing the program.
このために、プログラムを実行し、プログラムの実行履歴であるトレース情報を取得して、詳細な動作を取得することが出来る。しかしながら、多くの場合、メソッド数の組み合わせや呼出数は膨大であるため、トレース情報は膨大になる。特に、繰り返し処理などがある場合には、同じメソッドに対する呼出が複数回行われることがあり、そのことがトレース情報のデータ量を増やしている。この膨大な情報をそのまま扱うことは難しい。
また、プログラムの実行結果を解析する手法として、カバレッジテストが知られている。カバレッジテストとは、プログラムを実行した際に、ソースコードのどの部分が実際に実行されたか、その実行回数などを調べることをいう。しかしながら、ソースコードのカバレッジ情報では、テストケースが実行する行番号情報は取得するが、条件文、繰り返し文での動作や呼び出し構造のパターンを抽出することができない。このため、構造情報を取得することが出来ない。従って、メソッド間の呼出関係などの情報を取得することは出来ない。
For this reason, it is possible to execute a program, acquire trace information that is an execution history of the program, and acquire a detailed operation. However, in many cases, the combination of the number of methods and the number of calls are enormous, so the trace information becomes enormous. In particular, when there is repetitive processing or the like, a call to the same method may be performed a plurality of times, which increases the data amount of trace information. It is difficult to handle this enormous amount of information as it is.
Also, a coverage test is known as a technique for analyzing the execution result of a program. The coverage test refers to checking which part of the source code is actually executed, the number of times of execution, and the like when the program is executed. However, in the coverage information of the source code, the line number information executed by the test case is acquired, but it is not possible to extract the operation in the conditional statement and the repeated statement and the pattern of the call structure. For this reason, structure information cannot be acquired. Therefore, information such as the calling relationship between methods cannot be acquired.
カバレッジ情報の代わりに、プログラム情報を変数と関数の「要素リスト」の形式で持ち、「要素リスト」を依存グラフとして持つ技術が知られている(特許文献1)。しかしながら、この技術では、呼出構造を把握していないため、同じ要素が繰り返し出現する場合や、異なる組み合わせで出現する構造を区別できない。 A technique is known that has program information in the form of an “element list” of variables and functions instead of coverage information, and has an “element list” as a dependency graph (Patent Document 1). However, since this technique does not grasp the calling structure, it is impossible to distinguish between structures where the same element repeatedly appears or structures that appear in different combinations.
また、モデルとテスト、テストとトレース情報、トレース情報とソース、を保持することで、作業を効率化する技術が知られている(特許文献2)。これは、プログラムの管理方法に関するものであるため、ソース内の呼出構造を把握できない。 In addition, a technique is known that improves work efficiency by holding a model and test, test and trace information, and trace information and source (Patent Document 2). Since this is related to a program management method, the call structure in the source cannot be grasped.
また、事象グループを定義し、トレース情報内の事象グループを識別することで、パターンを取得し、トレース情報を集約する技術が知られている(特許文献3)。この方法は、解析者がそのグループの識別方法を与える必要があり、その定義情報に基づいてトレース情報・ログ情報を集約する。従って、事象グループとして定義していないものは、トレース情報から識別ができないため、集約ができない。定義していない箇所の情報を取得するには、例えば全ダンプ情報を取得している。 In addition, a technique is known in which a pattern is acquired and trace information is aggregated by defining an event group and identifying the event group in the trace information (Patent Document 3). In this method, an analyst needs to give a method for identifying the group, and trace information and log information are aggregated based on the definition information. Therefore, items that are not defined as event groups cannot be aggregated because they cannot be identified from the trace information. In order to acquire information of a part that is not defined, for example, all dump information is acquired.
また、ユーザの操作履歴情報として、画面内で設定した項目の状態を、画面をオブジェクト、各項目をオブジェクト内情報として、包含関係の情報を、ツリー構造を含む情報として保持する技術が知られている(特許文献4)。この技術は、項目情報として、表示情報(表示/非表示)、矩形の位置、矩形の選択状況などを保持する。時系列の情報は各オブジェクト情報の前後関係を把握するために保持しているが、ユーザ端末の操作を他の端末で再現する技術を開示するに止まるものである。 In addition, as a user operation history information, a technology is known that holds the state of items set in the screen, the screen as an object, each item as in-object information, and inclusion information as information including a tree structure. (Patent Document 4). This technique holds display information (display / non-display), a rectangular position, a rectangular selection status, and the like as item information. Although the time-series information is held in order to grasp the context of each object information, it only discloses a technique for reproducing the operation of the user terminal on another terminal.
上記に示したとおり、いずれもメソッド間の呼出関係を保持しながら、予め定義したパターン以外のデータを含んだトレース情報を集約することができないため、効率的な分析を行うことが出来ない。 As described above, since none of the trace information including data other than the predefined pattern can be aggregated while maintaining the calling relationship between methods, efficient analysis cannot be performed.
本プログラム、装置及び方法は、上記実情に鑑みなされたもので、大容量のトレース情報に対して、呼出構造を保持しながら、トレース情報を集約することを目的の一つとしている。 The present program, apparatus, and method have been made in view of the above circumstances, and an object thereof is to collect trace information while maintaining a call structure for a large amount of trace information.
本プログラムの一観点によれば、アプリケーションプログラムに含まれる複数の処理単位の各々をノードに対応させ、前記アプリケーションプログラムに対するテストケースの実行トレース情報に含まれる複数のイベントに基づいて、最上位ノードを出発点としてノードを追跡しながら、前記複数の処理単位の各々の呼出構造を、前記ノード間を結ぶツリー構造として記憶部に記憶するプログラムであって、前記実行トレース情報から、N番目のイベントを読み込み、前記N番目のイベントが処理単位の呼出開始イベントの場合には、現在追跡しているノードから、前記呼出開始イベントが示す処理単位に対応する子ノードに移動すべきことを決定し、前記N番目のイベントが処理単位の呼出終了イベントの場合には、現在追跡しているノードよりも最上位ノード側の親ノードに移動すべきことを決定することによって、ノードを追跡し、前記決定において前記子ノードに移動すべきことが決定された場合に、前記現在追跡しているノードの子ノードに前記呼出開始イベントが示す処理単位に対応するノードが既に存在するか否かを判定し、前記判定において存在しないと判定された場合には、移動すべき前記子ノードを前記記憶部に記憶された前記ツリー構造に追加記憶する、処理をコンピュータに実行させるプログラムが提供される。 According to one aspect of this program, each of a plurality of processing units included in an application program is associated with a node, and a top node is determined based on a plurality of events included in execution trace information of a test case for the application program. A program for storing a call structure of each of the plurality of processing units in a storage unit as a tree structure connecting the nodes while tracking a node as a starting point, and from the execution trace information, an Nth event Read, if the Nth event is a call start event of a processing unit, determine that it should move from the currently tracked node to a child node corresponding to the processing unit indicated by the call start event; If the Nth event is a processing unit call end event, the currently tracked no The node being tracked by deciding to move to the parent node on the topmost node side, and if the decision determines to move to the child node, the currently tracking node It is determined whether or not a node corresponding to the processing unit indicated by the call start event already exists in the child node, and if it is determined that the node does not exist in the determination, the child node to be moved is stored in the storage unit. There is provided a program for causing a computer to execute processing, which is additionally stored in the tree structure stored in the computer.
本プログラムでは、アプリケーションプログラムが同一処理を複数回実行する場合に、呼び出し構造を保持しながら、その実行トレース情報を集約できるので、特に繰り返し処理が多い場合、少ない情報量で実行トレース情報を保持することが出来る。 In this program, when the application program executes the same process multiple times, the execution trace information can be aggregated while maintaining the call structure, so that the execution trace information can be held with a small amount of information, particularly when there are many repeated processes. I can do it.
図1(a)及び(b)は、アプリケーションプログラムの実行トレース情報の例を示している。トレース情報には、説明の便宜上、行番号を付してある。各行番号に対応する1つのトレースデータは、1つのイベントを意味している。図1(a)は、テストケース名として、Test1が与えられた、トレース情報を示している。図1(b)は、同一のアプリケーションプログラムの実行トレース情報であるが、図1(a)のトレース情報とは別個に取得されたトレース情報であり、テストケース名としてTest2が与えられている。通常、アプリケーションプログラムの実行トレースデータは、アプリケーションプログラムの特定の機能に着目して、取得される。したがって、個々のトレース情報の名前として付与されたテストケース名は、特定の機能単位情報としての意味を持つ場合がある。なお、本発明はこの点に限定されるものではない。
FIGS. 1A and 1B show examples of application program execution trace information. The trace information is given a line number for convenience of explanation. One trace data corresponding to each line number means one event. FIG. 1A shows the trace information in which Test1 is given as the test case name. FIG. 1B shows execution trace information of the same application program, but is trace information acquired separately from the trace information of FIG. 1A, and
図1(c)は、トレース情報の記述形式を説明するための図である。「>A」は、メソッドAの呼出開始を意味する。「<A」は、メソッドAの呼出終了を意味する。また、(arg1,arg2)(v1,v2)において、arg1,arg2、は引数の型を示し、v1,v2は、それぞれ、引数の値を示す。また、return(a3),(v3)において、a3は戻り値の型を示し、v3は戻り値を示す。 FIG. 1C is a diagram for describing a description format of trace information. “> A” means the start of calling method A. “<A” means the end of calling method A. In (arg1, arg2) (v1, v2), arg1, arg2 indicate argument types, and v1, v2 indicate argument values, respectively. In return (a3) and (v3), a3 indicates a return value type, and v3 indicates a return value.
図1(a)の例えば行番号1の>Aは、Aという名前のメソッドの呼出が開始されたことを意味する。例えば、メソッドAの例として、画面上のボタンを押すと特定の写真を画面に表示するメソッドを例に説明する。この場合には、>Aは、ボタンがマウスによりクリックされ、メソッドAが呼び出されたイベントを意味する。図1(a)の行番号2の>Bは、メソッドBが呼出開始されたことを意味する。そして、行番号11の>Aは、メソッドAの呼出が終了したイベントを示している。これは、例えばメソッドAにより、写真の表示が終了したイベントを意味する。
For example,> A in
また、図1(b)の行番号7は、>D (arg1,arg2),(v1,v2)となっている。これは、メソッドDが呼出開始されたことを意味し、引数の型がそれぞれarg1,arg2である引数の値v1,v2が、その時に与えられたイベントを意味する。行番号8は、<D return (a3),(v3)となっており、メソッドDの呼出終了を意味し、メソッドDの戻り値として、型a3の戻り値v3が返されたことを意味する。
Further, the
図1に示すように、本発明の一実施形態では、あるアプリケーションプログラムに対して、必要な入力データを用意し、そのアプリケーションプログラムを実行して得られる実行履歴であるトレース情報を取得する。ただし、図1に示されたトレース情報は、複雑であり、実際のトレース情報は膨大なものとなる。このため、一実施形態では、そのトレース情報に対して、呼出構造を作成する。この呼出構造を基に、ツリー構造を作成する。ツリー構造の例は、図2Bを用いて後述する。 As shown in FIG. 1, in one embodiment of the present invention, necessary input data is prepared for an application program, and trace information, which is an execution history obtained by executing the application program, is acquired. However, the trace information shown in FIG. 1 is complicated, and the actual trace information becomes enormous. For this reason, in one embodiment, a call structure is created for the trace information. Based on this call structure, a tree structure is created. An example of the tree structure will be described later with reference to FIG. 2B.
一実施形態におけるトレース情報は、1つの処理単位に対して、1つのイベント情報を取得できる形で記録されているものとする。例えば、1つのメソッド呼び出し、メソッド終了をそれぞれテキスト形式で、1行で記述されていて、トレース情報読込み時には、行単位でその情報を読み込む。このことで、一回の読込みで、対応する一つの処理単位の情報を取得する。なお、本発明は、上述の記載に限定されるものではなく、トレース情報の形式は、1つのイベントを順番に取得できるようなデータ形式であれば、どのようなものであってもよいことは言うまでもない。 It is assumed that the trace information in one embodiment is recorded in a form in which one event information can be acquired for one processing unit. For example, one method call and method end are each described in a text format in one line, and when reading trace information, the information is read line by line. In this way, information of one corresponding processing unit is acquired by one reading. Note that the present invention is not limited to the above description, and the trace information format may be any data format as long as one event can be acquired in order. Needless to say.
メソッドの呼出構造とは、メソッドの呼出開始後、そのメソッドが別のメソッドを呼び出した場合に、その呼び出し先のメソッドを子ノード、現在追跡中のノードに相当する呼出元のメソッドを親ノードとして構築することで作成する。呼び出し先の情報を読み込むとき、現在追跡中のノードを子ノードに移動する。呼び出しが終了したとき、再度呼び出し元メソッドのノードへ移動する。呼出構造の最上位のノードは、トレース情報の開始地点を示すものであり、最上位ノードと呼ぶ。また、現在追跡中のノードとは、ツリー構造上において、本実施形態が注目しているノードを意味する。この現在追跡中のノードは、トレース情報のイベントを一つ読み込む毎に、ツリー構造に沿って、最上位ノード側の親ノード、又は、最上位ノードと反対方向に位置する子ノードに、必要に応じて移動して行く。この移動の詳細は、以下の説明に示されている。 The method call structure is that when a method calls another method after the method call starts, the callee method is the child node, and the caller method corresponding to the currently tracked node is the parent node. Create by building. When reading the callee information, the currently tracked node is moved to the child node. When the call ends, it moves to the node of the caller method again. The highest node in the call structure indicates the starting point of the trace information and is called the highest node. Further, the node currently being tracked means a node that is focused on by the present embodiment on the tree structure. Every time one trace information event is read, this currently tracked node is required to be a parent node on the top node side or a child node located in the opposite direction to the top node along the tree structure. Go and move accordingly. Details of this movement are given in the following description.
呼出構造は、トレース情報の実行順にそのまま構造を作成するのではなく、同一構造である箇所については集約して作成する。呼出構造を集約して保持することで、メソッド間の関係を保ちながら、かつ、大容量のトレース情報を集約して保存することを実現している。 The call structure is not created as it is in the order of execution of the trace information, but the parts having the same structure are collectively created. By collecting and holding the call structure, it is possible to collect and store a large amount of trace information while maintaining the relationship between methods.
呼出構造を集約するときに、処理単位の情報も合わせて取得する。これは、実行するアプリケーションプログラムのテストケースのトレース情報の処理単位の属性を構造上に記憶させておく。このことにより、属性の種類および値で検索を行うことを実現できる。例えば、処理単位に対して、実行回数を記録することで、繰り返し構造を集約した情報を記憶することを実現する。また、メソッドの引数値および戻り値を取得できる場合は、引数値、戻り値の情報を属性値として記録してもよい。 When the call structure is aggregated, processing unit information is also acquired. This stores the attribute of the processing unit of the trace information of the test case of the application program to be executed in the structure. As a result, it is possible to implement a search using the attribute type and value. For example, by recording the number of executions for each processing unit, it is possible to store information that aggregates repeated structures. In addition, when the method argument value and return value can be acquired, the argument value and return value information may be recorded as attribute values.
呼出構造の作成は、予め取得したトレース情報に対して作成することも可能であるが、アプリケーションプログラムの実行時に同時に作成してもよい。従って、実行中に情報を集約しながら記録することができるので、ログ情報を集約して保存する方法としても利用できる。 The call structure can be created for the previously acquired trace information, but it may be created simultaneously with the execution of the application program. Therefore, since information can be recorded while being aggregated during execution, it can also be used as a method for collecting and storing log information.
次に、本発明の一実施形態の各構成について記述する。 Next, each configuration of one embodiment of the present invention will be described.
図2Aは、本発明の一実施形態の機能構成を示す図である。 FIG. 2A is a diagram showing a functional configuration of an embodiment of the present invention.
最上位ノード取得部202では、過去にアプリケーションの呼出構造データがあった場合は、その情報を入力として、呼出構造作成時の最上位ノード204を取得して出力する。トレース情報の最初の入力であった場合、最上位ノード204を定義する。他のトレース情報に基づき、既に作成したアプリケーションの呼出構造データ224内に最上位ノードが存在したときには、そのノードを取得する。
When there is call structure data of an application in the past, the highest
イベント読込部208では、リアルタイムに取得されるか、あるいはメモリに蓄積されたアプリケーションプログラムのトレース情報206から、1つのイベントを読み込む。
The
ノード追跡部210は、トレース情報から読み込まれた1つのイベントのデータであるメソッドの呼出開始、又はメソッドの呼出終了を含む情報と、最上位ノードを入力とする。初期段階では、現在追跡中のノードを最上位ノードに設定する。
The
読み込まれたイベントがメソッドの呼出開始イベントの場合には、現在追跡中のノードから、前記呼出開始イベントが示す処理単位に対応する子ノードに、現在追跡中のノードを移動すべきことを決定し、読み込まれたイベントがメソッドの呼出終了イベントの場合には、現在追跡中のノードよりも最上位ノード側の親ノードに、現在追跡中のノードを移動すべきことを決定する。 If the read event is a method call start event, it is determined that the currently tracked node should be moved from the currently tracked node to a child node corresponding to the processing unit indicated by the call start event. If the read event is a method call end event, it is determined that the currently tracked node should be moved to the parent node on the uppermost node side of the currently tracked node.
メソッド呼出開始後、別のメソッドを呼び出した場合に呼び出し先メソッドである子ノードへ、現在追跡中のノードを移動し、そのノードを基点に次のトレース情報を読み込む。メソッドの呼出が終了したときは、呼出元ノードである親ノードへ、現在追跡中のノードを移動させる。 When another method is called after the method call is started, the currently traced node is moved to the child node that is the callee method, and the next trace information is read from that node as a base point. When the method call is completed, the currently tracked node is moved to the parent node that is the caller node.
同一呼出構造存在判定部214で、現時点までに作成した呼出構造と、現在追跡中のノード、および、トレース情報を取得し、現在追跡中のノードの子ノードに、トレース情報から取得したメソッドの呼出開始に対応するノードと同一のノードが存在するかどうかを判断し、その判断結果を出力する。
呼出構造ノード追加部218では、現在追跡中のノード212と同一構造判定結果216を入力として、ノードの追加を行い、ノードを追加した呼出構造データを生成する。子ノードの追加は、親ノードの識別情報を基に子ノードの識別情報を追加する。例えば、各ノードにIDを付与し、子ノードに、固有のIDを設定する。このIDは、ノードのデータ構造へのポインタ情報として利用してもよい。この処理によって子ノードが追加される。
The same call structure
The call structure
呼出構造属性追加部222で、読み込まれたイベントに関連する処理単位に関係する情報であるテストケース名などの情報、呼び出された回数を、引数、戻り値などの情報を該当ノードの属性として追加して記憶する。複数の種類の属性があった場合には、その属性情報をそれぞれ追加する。
The call structure
これらの情報は、アプリケーションの呼出構造データ224として、記憶装置に記憶される。これは、データ加工部228によって、必要に応じて加工され、表示・ユーザーインターフェース部226で、ツリー構造や、リスト構造として表示される。また、表示・ユーザーインターフェース部226は、ユーザからの検索指示や、属性の特定などの入力を受け付け、データ加工部228に、適切なデータ加工を指示する。加工されたデータは表示・ユーザーインターフェース部226に戻され、ユーザに表示してもよい。
These pieces of information are stored in the storage device as application
図2Bは、本発明の一実施形態におけるツリー構造を示す図である。図2B(a)は、アプリケーションプログラムの実行トレースデータをツリー表示した例をしめしている。ツリー構造は、ノードTop250、ノードA260、及びノードB270で構成されており、矢印で接続されている。ノードTop250は、ツリー構造の最上位ノードを示しており、ツリーの始まりを示すものである。ノードA260は、メソッドAが実行されたことを意味する。これは、ノードTop250直下に接続されているため、アプリケーションプログラムの実行トレースデータにおいて、メソッドAが最初に実行されたことが分かる。その下に続くノードB270は、メソッドBが実行されたことを意味する。したがって、このリスト構造の場合には、少なくともメソッドAの実行の次にメソッドBが実行されたことが視覚的に理解できる。
FIG. 2B is a diagram illustrating a tree structure according to an embodiment of the present invention. FIG. 2B (a) shows an example in which execution trace data of an application program is displayed as a tree. The tree structure includes a
図2B(b)は、図2B(a)の各ノードの呼出構造データの内容を示したものである。呼出構造データ251は、ノードTop250に対応している。呼出構造データ261は、ノードB260に対応している。呼出構造データ271は、ノードC270に対応している。呼出構造データ251には、呼出構造データをユニークに特定するためのID251が付与されている。このIDは、ノードを特定するためのポインタ情報として利用してもよい。Name254は、ノード名であり、メソッド名と同じ名前を用いても良い。Child256は、存在する子ノードのIDが記述される。この場合、ノードTop250の子ノードは、ノードA260であるため、ノードA260のIDの値“1”が記述されている。子ノードが複数あれば、複数のエントリーが記述される。Test258は、属性値の例であり、用いられたトレース情報のトレース情報名が記述される、Countの項目は、ノードに対応するメソッドの実行回数を意味する。ノードTop250は、実際のメソッドには対応しないが、便宜上Countの値として“1”が記述されている。呼出構造データ261、及び呼出構造データ261についても、同様のデータ構造を有していることが分かる。
FIG. 2B (b) shows the contents of the call structure data of each node in FIG. 2B (a). The
図3に、一実施形態の全体処理フローを示す。 FIG. 3 shows the overall processing flow of one embodiment.
まず、ステップ302で、過去に作成された最上位ノードがあれば、これを最上位ノードとして取得する。最上位ノードが存在しない場合には、上述のように最上位ノードが生成されるので、その最上位ノードを取得する。
First, in
次に、ステップ304において、トレース情報から、1つのイベントを読み出す。読み出されたイベントは、ステップ306において、メソッドの呼出開始であるかがチェックされる。この結果がNOであれば、ステップ308において、イベントがメソッドの呼出終了かがチェックされる。この結果がNOであれば、ステップ304に戻る。
Next, in
次に、ステップ306の判断結果がYES(メソッドの呼出開始である)場合について説明する。
Next, the case where the determination result in
メソッドの呼出開始であった場合、同一呼出構造存在判定部214で、現時点までに作成した呼出構造を取得し、現在追跡中のノードの子ノードの中に、メソッドに対応するノードと同一のノードが存在するかを判断する(ステップ312)。子ノードに同一のものが存在した場合、同一と判断したノードを特定する。そして、ステップ118に進む。
If it is the start of the method call, the same call structure
また、ステップ312において、同一の子ノードが存在しないと判断された場合には、ステップ314に移行する。ここでは、呼出構造のツリー構造に子ノードを追加する。そして、この追加された子ノードを現在追跡中のノードとする。
If it is determined in
ここで、ステップ316の処理を説明する。ステップ308において、メソッドが呼出終了である場合に、ステップ316が実行される。ここでは、メソッドの呼出終了であることを、記憶しておく。現在追跡中のノードの移動は行われない。この記憶した情報は、ステップ331において用いられる。この場合には、属性情報を記憶する一連の処理が終了した後に、ステップ332において、現在追跡中のノードを一つ上の階層に移す処理が行われる点に留意すべきである。
Here, the processing of
ここで、ステップ118以下の処理について説明する。ステップ118において、イベントが示す属性値を取得する。属性値としては、たとえば、メソッドの引数、メソッドの戻り値、テストケース名、メソッドの実行回数、同じ引数が用いられた回数、同じ戻り値が戻された回数、引数や戻り値の型などが挙げられる。なお、属性値は、上述の例に限定されるものではない。 Here, the processing after step 118 will be described. In step 118, the attribute value indicated by the event is acquired. Examples of attribute values include method arguments, method return values, test case names, method execution times, the number of times the same argument was used, the number of times the same return value was returned, and the type of the argument or return value. Can be mentioned. The attribute value is not limited to the above example.
たとえば、該当のノードに同一のテストケース名が既に属性として記録されている場合は、その情報を取得し、実行回数を1つ加算する。もし、該当のノードにテストケース名がなかった場合は、新たに属性情報として、テストケース名を追加し、実行回数を1回として設定する。 For example, when the same test case name is already recorded as an attribute in the corresponding node, the information is acquired and the execution count is incremented by one. If there is no test case name in the corresponding node, a test case name is newly added as attribute information, and the number of executions is set as one.
なお、ステップ320乃至324は、引数を属性値として蓄積する場合の取り扱い手法の例を示している。
また、ステップ320乃至330は、テストケースを属性値として蓄積する場合の取り扱い手法を示している。
ステップ331及びステップ332については、既に説明したとおりステップ308において取得し、ステップ106で蓄積した情報に基づいて、現在追跡中のノードを一つ上の階層に移す取り扱い手法の例を示している。
ステップ334において、全てのトレース情報のイベントを読み込んで処理したかがチェックされる。
In
トレース情報の1つのイベント(データ単位の情報)を取得した後、次のイベントを読み込む。 After acquiring one event (information in data unit) of the trace information, the next event is read.
次に、同一のアプリケーションプログラムの実行に係る別のテストケースに対するトレース情報を読み込んだときには、そのテストケース名を機能情報として保持しながら、既に作成された呼出構造データに追加する形でトレース情報の呼出構造を作成し、そのテストケース名を属性として保存する。このことで、異なるテストケースに対する情報を同じ呼出構造上に構築する。なお、必要に応じて、呼出構造データをテストケース名で検索することにより、特定のテストケースの呼出構造データに基づくツリー構造を抽出してもよい。また、例えば2つのテストケースを与えて、その呼出構造データの差分をツリー構造上にハイライト表示させてもよい。また、その他の属性データを検索キーとして使用し、呼出構造を抽出し、ツリー表示させても良い。また、表示は、ツリー構造の表示以外に、リスト形式の表示や、グラフ形式の表示など、用途に応じて、表示形式を変更しても良い。 Next, when the trace information for another test case related to the execution of the same application program is read, the trace information is added to the already created call structure data while retaining the test case name as function information. Create a call structure and save the test case name as an attribute. This builds information for different test cases on the same call structure. If necessary, a tree structure based on the call structure data of a specific test case may be extracted by searching the call structure data by the test case name. Also, for example, two test cases may be given and the difference between the call structure data may be highlighted on the tree structure. Alternatively, other attribute data may be used as a search key to extract a call structure and display it in a tree view. In addition to the tree structure display, the display format may be changed according to the application, such as a list format display or a graph format display.
図4は、最上位ノード取得部の処理を示している。ステップ402において、現在保持している呼出構造を取得する。ステップ404で、呼出構造が存在するか否かがチェックされる。過去において、本実施形態を実行し、呼出構造データが存在する場合には、呼出構造を取得し、その中から最上位ノードを取得する。ステップ404において、過去に保持した呼出構造が存在しない場合には、最上位ノードを定義する(ステップ408)。この最上位ノードを出発点として、ツリー構造の呼出構造が構築されることになる。
FIG. 4 shows the processing of the highest node acquisition unit. In
図5は、同一呼出構造存在判定部の処理フローを示す。このフローは、図3におけるステップ310に対応する。まず、現在追跡中のノードを取得する(ステップ502)。そして、現在追跡中のノードの子ノードを取得する(ステップ504)。ステップ506において、調査する子ノードが存在しないかを判定する。存在しない場合には、ステップ512に進んで、呼出開始されたメソッドに対応するノードと同一のノードが子ノードに存在しないことを出力する。ステップ506で、調査する子ノードが存在する場合には、子ノードの1つに注目して、ステップ508に進む。ここで、呼出開始されたメソッドに対応するノードと同一のノードが子ノードに存在するかが、チェックされる。注目している子ノードが同一の子ノードであると特定し、これを出力する。ステップ508で、同一の子ノードが見つからない場合には、次の子ノードをチェックするためにステップ504に戻り、同様のチェックを繰り返す。ステップ506において、調査する全ての子ノードをチェックし終えた場合には、ステップ512に進んで、呼出開始されたメソッドに対応するノードと同一のノードが子ノードに存在しないことを出力する。
FIG. 5 shows a processing flow of the same call structure existence determination unit. This flow corresponds to step 310 in FIG. First, the node currently being tracked is acquired (step 502). Then, a child node of the currently tracked node is acquired (step 504). In
プログラムを実行して得られたトレース情報から実際に呼出構造データを作成する一実施形態を説明する。 An embodiment in which call structure data is actually created from trace information obtained by executing a program will be described.
トレース情報の例は、既に図1を用いて説明した。トレース情報には、メソッドの呼出開始、メソッドの呼出終了、および対応するメソッド名を含む情報が記述されている。一つのメソッド呼び出し、メソッド終了をそれぞれ、テキスト形式で、一行で記述し、トレース情報読込み時には、行単位でその情報を読み込む。このことで、一回の読込みで、対応する処理単位の一つのイベントの情報を取得する。図1に示した例では、二つのファイルがあり、それぞれ、Test1とTest2という名称のトレース情報が保存されている。トレース情報は、テストケース名が付与されている。Test1とTest2は、テストケース名の例である。各テストケースでは、A、B、C、Dというメソッド名が記述されている。
An example of the trace information has already been described with reference to FIG. In the trace information, information including a method call start, a method call end, and a corresponding method name is described. Each method call and method end is described in text format on one line, and when reading trace information, the information is read line by line. As a result, the information of one event of the corresponding processing unit is acquired by one reading. In the example shown in FIG. 1, there are two files, and trace information named
確認したい機能をテストケースに対応付けて利用してもよい。また、アプリケーションプログラムが運用中の場合は、利用者の操作単位でトレース情報を取得して、そのトレース情報を利用してもよい。トレース情報の構成要素をイベントと呼ぶ。本実施形態では、1行のデータが1つのイベントに対応する。なお、本発明は、この実施形態に限定されない。 A function to be confirmed may be used in association with a test case. In addition, when the application program is in operation, the trace information may be acquired in units of user operations and used. A component of trace information is called an event. In the present embodiment, one line of data corresponds to one event. Note that the present invention is not limited to this embodiment.
図1(a)と図6とを参照する。トレース情報を一行ずつ読み込み、呼出構造を作成する。初めて読み込む情報であるため、最上位ノードとして、ノードTopを新たに定義し、現在追跡中のノードとしてノードTopを設定する。最上位ノード取得部202の出力結果として、図6に示すようにノードTop602を出力する。
Please refer to FIG. 1 (a) and FIG. Read trace information line by line to create a call structure. Since the information is read for the first time, the node Top is newly defined as the highest node, and the node Top is set as the node currently being tracked. As the output result of the highest
次に、図1に示したTest1のデータを読み込むと、行番号1は、Aというメソッド名の呼出開始であることが記述されている。同一呼出構造存在判定部214では、入力として受け取ったメソッドAに対して、現在追跡中のノードの子ノードとしてメソッドAに対応するものが存在するか否かを判断する。ここでは、ノードTop602しか存在しないため、同一呼出構造存在判定部214の出力として、ノードAと同一の子ノードは存在しないという判断結果を出力する。
Next, when the data of
次に、Topの子ノードとしてノードA604を追加し、現在追跡中のノードをノードA604へ移動する。また、現在、ノードA604に対して、属性として、テストケース名、Test1を属性に定義し、初めての実行であるため、実行回数を1回と設定する。メソッドAでは、特に引数値、戻り値などの情報は保持していないため、その他の属性値は追加しない。ここで、トレース情報から読み込んだ1行に対する処理を終了し、トレース情報に次の行が存在する場合、次の行を読み込む。
Next, node A604 is added as a child node of Top, and the node currently being tracked is moved to node A604. Also, for the
トレース情報Test1の次の行番号2を読み込むと、メソッドBの呼出開始であることが記述されている。現在追跡中のノードは、現在、ノードA604であり、ノードA604の子ノードとして、ノードBが存在するかどうかを同一呼出構造存在判定部214で判断し、その結果を取得する。ノードA604は一つも子ノードを持たないため、同一のノードは存在しないという結果が得られる。従って、ノードB606をノードA604の子ノードとして追加する。追加後、現在の追跡ノードをノードB606に設定する。ノードB606に対して、属性として、テストケース名、Test1を属性に定義し、初めての実行であるため、実行回数を1回と設定する。メソッドBでは、特に引数値、戻り値などの情報は保持していないため、その他の属性値は追加しない。以上でこの行に対する処理を終了し、次の行を読み込む。
When the
トレース情報Test1の次の行番号3を読み込むと、メソッドCの呼出開始であることが記述されている。現在追跡中のノードは、現在、ノードB606であり、ノードB606の子ノードとして、ノードCが存在するかどうかを同一呼出構造存在判定部214で判断し、その結果を取得する。ノードB606は一つも子ノードを持たないため、同一のノードは存在しないという結果が得られる。従って、ノードC608をノードB606の子ノードとして追加する。追加後、現在の追跡ノードをノードC608に設定する。ノードC608に対して、属性として、テストケース名、Test1を属性に定義し、初めての実行であるため、実行回数を1回と設定する。メソッドCでは、特に引数値、戻り値などの情報は保持していないため、その他の属性値は追加しない。以上でこの行に対する処理を終了し、次の行を読み込む。
When the
トレース情報Test1の次の行番号4を読み込むと、メソッドCの呼出終了であることが記述されている。現在追跡中のノードであるノードC608の親ノードであるBを現在追跡中のノードに変更する。
When the
トレース情報Test1の次の行番号5を読み込むと、Bの呼出終了であることが記述されている。現在追跡中のノードであるノードB606の親ノードであるノードA604を現在追跡中のノードに変更する。
When the
トレース情報Test1の次の行番号6を読み込むと、メソッドBの呼出開始であることが記述されている。現在追跡中のノードは、現在、ノードA606であり、ノードA606の子ノードとして、ノードBが存在するかどうかを同一呼出構造存在判定部214で判断し、その結果を取得する。ノードA604は一つの子ノードを持ち、かつそのノードは、ノードB606であるため、ここでは、同一呼出構造が存在すると判断し、その結果を出力する。従って、ノードA604の子ノードとして、新たなノードBを追加せず、同一と判断したノードB606を現在追跡中のノードとして設定する。Bに対して、属性として、テストケース名、Test1を設定するが、対象のノードB606には、Test1の属性が既に定義されている。今回は2回目の実行であるため、実行回数を1回から2回へと1を加算して設定する。メソッドBでは、特に引数値、戻り値などの情報は保持していないため、その他の属性値は追加しない。以上でこの行に対する処理を終了し、次の行を読み込む。
When the
トレース情報Test1の次の行番号7を読み込むと、メソッドCの呼出開始であることが記述されている。現在追跡中のノードは、現在、ノードB606であり、ノードB606の子ノードとして、ノードCが存在するかどうかを同一呼出構造存在判定部214で判断し、その結果を取得する。ノードB606は一つの子ノードを持ち、かつそのノードは、ノードC608であるため、ここでは、同一呼出構造が存在すると判断し、その結果を出力する。従って、ノードB606の子ノードとして、新たなノードCを追加せず、同一と判断したノードC608を現在追跡中のノードとして設定する。ノードC608に対して、属性として、テストケース名、Test1を設定するが、対象のCには、Test1の属性が既に定義されている。今回は2回目の実行であるため、実行回数を1回から2回へと1を加算して設定する。メソッドCでは、特に引数値、戻り値などの情報は保持していないため、その他の属性値は追加しない。以上でこの行に対する処理を終了し、次の行を読み込む。
When the
トレース情報Test1の次の行番号8を読み込むと、メソッドCの呼出終了であることが記述されている。現在追跡中のノードであるノードC608の親ノードであるノードB606を現在追跡中のノードに変更する。
When the
トレース情報Test1の次の行番号9を読み込むと、メソッドBの呼出終了であることが記述されている。現在追跡中のノードであるノードB606の親ノードであるノードA604を現在追跡中のノードに変更する。
When the
トレース情報Test1の次の行番号10を読み込むと、メソッドBの呼出開始であることが記述されている。現在追跡中のノードは、現在、ノードA604であり、ノードA604の子ノードとして、ノードBが存在するかどうかを同一呼出構造存在判定部214で判断し、その結果を取得する。ノードA604は一つの子ノードを持ち、かつそのノードは、ノードB606であるため、ここでは、同一呼出構造が存在すると判断し、その結果を出力する。従って、ノードA604の子ノードとして、新たなノードBを追加せず、同一と判断したノードB606を現在追跡中のノードとして設定する。ノードB606に対して、属性として、テストケース名、Test1を設定するが、対象のノードB606には、Test1の属性が既に定義されている。今回は3回目の実行であるため、実行回数を2回から3回へと1を加算して設定する。メソッドBでは、特に引数値、戻り値などの情報は保持していないため、その他の属性値は追加しない。以上でこの行に対する処理を終了し、次の行を読み込む。
When the
トレース情報Test1の次の行番号11を読み込むと、メソッドAの呼出開始であることが記述されている。現在追跡中のノードは、現在、ノードB606であり、ノードB606の子ノードとして、ノードAが存在するかどうかを同一呼出構造存在判定部214で判断し、その結果を取得する。ノードB606は一つの子ノードを持つが、その子ノードは、ノードC608であるため、ノードAを子ノードには持たない。従って、ノードAをノードB606の子ノードとして定義し、現在追跡中のノードをノードB606から新たに追加した子ノードであるノードA610に設定する。属性として、テストケース名、Test1を属性に定義し、初めてのノードの追加であるため、実行回数を1回と設定する。メソッドAでは、特に引数値、戻り値などの情報は保持していないため、その他の属性値は追加しない。ここで、トレース情報から読み込んだ一行に対する処理を終了し、トレース情報に次の行が存在する場合、次の行を読み込む。
When the
トレース情報Test1の次の行番号12を読み込むと、メソッドBの呼出開始であることが記述されている。現在追跡中のノードは、現在、ノードA610であり、ノードA610の子ノードとして、ノードBが存在するかどうかを同一呼出構造存在判定部214で判断し、その結果を取得する。ノードA610は一つも子ノードを持たないため、同一のノードは存在しないと言う結果が得られる。従って、ノードBをノードA610の子ノードとして追加する。追加後、現在の追跡ノードをノードB612に設定する。メソッドBに対して、属性として、テストケース名、Test1を属性に定義し、初めての実行であるため、実行回数を1回と設定する。メソッドBでは、特に引数値、戻り値などの情報は保持していないため、その他の属性値は追加しない。以上でこの行に対する処理を終了し、次の行を読み込む。
When the
トレース情報Test1の次の行番号13を読み込むと、メソッドBの呼出終了であることが記述されている。現在追跡中のノードであるノードB612の親ノードであるノードA610を現在追跡中のノードに変更する。
When the
トレース情報Test1の次の行番号14を読み込むと、ノードAの呼出終了であることが記述されている。現在追跡中のノードであるノードA610の親ノードであるノードB606を現在追跡中のノードに変更する。
When the
トレース情報Test1の次の行番号15を読み込むと、メソッドBの呼出終了であることが記述されている。現在追跡中のノードであるノードB606の親ノードであるノードA604を現在追跡中のノードに変更する。
When the
トレース情報Test1の次の行番号16を読み込むと、メソッドAの呼出終了であることが記述されている。現在追跡中のノードであるノードA604の親ノードであるノードTop602を現在追跡中のノードに変更する。
When the
トレース情報Test1に対するデータは全て読み込み、次のデータがないため、Test1の呼出構造を作成した。現時点までに作成した呼出構造のツリー構造イメージ図を図6に示す。また、このイメージ図に相当する実際のデータ例を図7に示す。図7で示すデータ形式では、項目としてノードのID、ノード名(メソッド名)、子ノード情報と、機能単位情報(テストケース情報)の4種類を持ってもよい。図7における呼出構造データ702、704、706、708、710、712は、それぞれ、図6のツリー構造におけるノード602、604、606、608、610、612のデータの内容を示している。
Since all the data for the trace information Test1 is read and there is no next data, a call structure for Test1 is created. FIG. 6 shows a tree structure image diagram of the call structure created so far. An actual data example corresponding to this image diagram is shown in FIG. The data format shown in FIG. 7 may have four types of items: node ID, node name (method name), child node information, and functional unit information (test case information). The
図7に示したそれぞれの呼出構造のノードのデータ構造の例を図8(b)に示す。各ノードは、メソッドに対して作成するため、そのノードの識別子としてのID、ノード名、子ノード情報の配列、機能単位情報であるテストケースの配列を持つ。子ノードへのアクセスは、IDを通じてアクセスするため、その情報の一覧をChild配列で保持する。テストケース情報については、テストケース名とそのテストケースに対応する実行回数を組み合わせて保持してもよい。このことで、テストケースに対する実行回数を保持する。図7には例として配列として記述したが、リスト構造として、動的に数を増やすことが出来る形にしてもよい。図8(b)における、データ項目802乃至808については、図2Bで説明した。これに加えて、Args(type,value)810は、引数を属性として記憶する領域を示す。引数の型typeと、値valueを対にして記憶しておく。また、Return(type,value)は、戻り値を属性として記憶しておく領域を示す。戻り値の型typeと、値valueを対にして記憶しておく。
FIG. 8B shows an example of the data structure of each call structure node shown in FIG. Since each node is created for a method, it has an ID as an identifier of the node, a node name, an array of child node information, and an array of test cases that are functional unit information. Since the child node is accessed through the ID, a list of the information is held in a Child array. The test case information may be held by combining the test case name and the number of executions corresponding to the test case. This holds the number of executions for the test case. Although FIG. 7 shows an example as an array, the list structure may be configured to dynamically increase the number. The
次に、図1で示したトレース情報Test2に対しても、同様に呼出構造を作成する。ここで、Test1に対して作成している呼出構造の上に、Test2の構造を作成する。 Next, a call structure is similarly created for the trace information Test2 shown in FIG. Here, the structure of Test2 is created on the call structure created for Test1.
Test2のトレース情報のイベントを一行ずつ読み込み、呼出構造を作成する。この場合、呼出構造は既にTest1に対して作成しているため、最上位ノードとして、Test1で作成したノードTop602を取得して、現在追跡中のノードとしてノードTop602を設定する。最上位ノード取得部の出力結果として、ノードTop602が出力される。
The event of the trace information of Test2 is read line by line to create a call structure. In this case, since the call structure has already been created for Test1, the node Top602 created in Test1 is acquired as the highest node, and the node Top602 is set as the node currently being tracked. The
図9と図1(b)を参照する。Test2のデータを読み込む処理について説明する。図1(b)の行番号1は、Aというメソッド名の呼出開始であることが記述されている。同一呼出構造存在判定部214では、入力として受け取ったメソッドAに対応するノードAが、現在追跡中のノードTop602の子ノードとして存在するか否かを判断する。既に、ノードTop602は一つの子ノードを持ち、かつそのノードは、ノードA604であるため、ここでは、同一呼出構造が存在すると判断し、その結果を出力する。従って、ノードTop602の子ノードとして、新たなノードAを追加せず、同一と判断したノードA604を現在追跡中のノードとして設定する。現在追跡中のノードをノードA604へ移動する。また、現在、ノードA604に対して、属性として、テストケース名Test2を属性として追加し、Test2としては、初めての実行であるため、Test2に対する実行回数を1回と設定する。メソッドAでは、特に引数値、戻り値などの情報は保持していないため、その他の属性値は追加しない。ここで、トレース情報から読み込んだ行番号1に対する処理を終了し、トレース情報に次の行が存在する場合、次の行を読み込む。
Please refer to FIG. 9 and FIG. Processing for reading Test2 data will be described.
トレース情報Test2の行番号2を読み込むと、メソッドBの呼出開始であることが記述されている。現在追跡中のノードは、ノードA604であり、ノードA602の子ノードとして、ノードBが存在するかどうかを同一呼出構造存在判定部214で判断し、その結果を取得する。ノードA604は一つの子ノードを持ち、かつそのノードは、ノードB606であるため、ここでは、同一呼出構造が存在すると判断し、その結果を出力する。従って、ノードA604の子ノードとして、新たなノードBを追加せず、同一と判断したノードB606を現在追跡中のノードとして設定する。ノードB606に対して、属性として、テストケース名Test2としては、初めての実行であるため、Test2に対する実行回数を1回と設定する。メソッドBでは、特に引数値、戻り値などの情報は保持していないため、その他の属性値は追加しない。ここで、トレース情報から読み込んだ一行に対する処理を終了し、トレース情報に次の行が存在する場合、次の行を読み込む。
When the
トレース情報Test2の次の行番号3を読み込むと、メソッドCの呼出開始であることが記述されている。現在追跡中のノードは、現在、ノードB606であり、ノードB606の子ノードとして、ノードCが存在するかどうかを同一呼出構造存在判定部214で判断し、その結果を取得する。ノードB606は一つの子ノードを持ち、かつそのノードは、ノードC608であるため、ここでは、同一呼出構造が存在すると判断し、その結果を出力する。従って、ノードB606の子ノードとして、新たなノードCを追加せず、同一と判断したノードC608を現在追跡中のノードとして設定する。ノードC608に対して、属性として、テストケース名、Test2を設定するが、対象のノードC608には、Test2としては、初めての実行であるため、Test2に対する実行回数を1回と設定する。メソッドCでは、特に引数値、戻り値などの情報は保持していないため、その他の属性値は追加しない。ここで、トレース情報から読み込んだ一行に対する処理を終了し、トレース情報に次の行が存在する場合、次の行を読み込む。
When the
トレース情報Test2の次の行番号4を読み込むと、メソッドCの呼出終了であることが記述されている。現在追跡中のノードであるノードC608の親ノードであるノードB606を現在追跡中のノードに変更する。
When the
トレース情報Test2の次の行番号5を読み込むと、メソッドBの呼出終了であることが記述されている。現在追跡中のノードであるノードB606の親ノードであるノードA604を現在追跡中のノードに変更する。
When the
トレース情報Test2の次の行番号6を読み込むと、メソッドBの呼出開始であることが記述されている。現在追跡中のノードは、ノードA604であり、ノードA604の子ノードとして、ノードBが存在するかどうかを同一呼出構造存在判定部で判断し、その結果を取得する。ノードA604は一つの子ノードを持ち、かつそのノードは、ノードB606であるため、ここでは、同一呼出構造が存在すると判断し、その結果を出力する。従って、ノードA604の子ノードとして、新たなノードBを追加せず、同一と判断したノードB606を現在追跡中のノードとして設定する。ノードB606に対して、属性として、テストケース名、Test2を設定するが、対象のノードB606には、Test2の属性が既に定義されている。今回は2回目の実行であるため、実行回数を1回から2回へと1を加算して設定する。メソッドBでは、特に引数値、戻り値などの情報は保持していないため、その他の属性値は追加しない。以上でこの行に対する処理を終了し、次の行を読み込む。
When the
トレース情報Test2の次の行番号7を読み込むと、メソッドDの呼出開始であることが記述されている。現在追跡中のノードは、現在、ノードB606であり、ノードB606の子ノードとして、ノードDが存在するかどうかを同一呼出構造存在判定部214で判断し、その結果を取得する。ノードB606は二つの子ノードを持つが、いずれもノードDではないため、ここでは、同一呼出構造が存在しないと判断し、その結果を出力する。従って、ノードB606の子ノードとして、新たなノードDを追加し、ノードD902を現在追跡中のノードとして設定する。ノードD902に対して、属性として、テストケース名、Test2を設定するが、初めての実行であるため、Test2に対する実行回数を1回と設定する。メソッドDでは、引数値として、arg1、arg2の2つの型情報、値としてそれぞれ、v1、v2を属性として取得し、保存する。
When the
トレース情報Test2の次の行番号8を読み込むと、メソッドDの呼出終了であることが記述されている。そして、戻り値の型情報として、a3、戻り値として、v3が記述されている。このように、メソッドの呼出終了のイベントに、何らかの記録すべき属性が存在する場合には、現在追跡中のノードを親ノードに変更する前に、これらの属性を保存する。属性の保存が完了した後に、現在追跡中のノードであるノードD902の親ノードであるノードB606を現在追跡中のノードに変更する。したがって、メソッド呼出終了の場合には、メソッド呼出開始の場合と比較して、次のノード(親ノード)に移行するタイミングが異なる点に留意する必要がある。この点は、図3のステップ316、331及び332に関連して、既に説明した。ここで、トレース情報から読み込んだ一行に対する処理を終了し、トレース情報に次の行が存在する場合、次の行を読み込む。
When the
トレース情報Test2の次の行番号9を読み込むと、メソッドBの呼出終了であることが記述されている。現在追跡中のノードであるノードB606の親ノードであるノードA604を現在追跡中のノードに変更する。
When the
トレース情報Test2の次の行番号10を読み込むと、メソッドAの呼出終了であることが記述されている。現在追跡中のノードであるノードA604の親ノードであるノードTop602を現在追跡中のノードに変更する。
When the
以上により、Test1とTest2の二つのテストケースに対する呼出構造が作成された。作成された呼出構造のツリー構造イメージを図9に示す。また、作成された呼出構造データの例を図10に示す。図10において、例えば、呼出構造1020は、図9におけるノードD902のデータの内容を示している。ここでは、引数及び戻り値が、それぞれArgs1022、Return1024として、属性として記憶されていることが分かる。その他の項目については、他の図で既に説明しているので、説明は省略する。
As described above, call structures for two test cases, Test1 and Test2, were created. FIG. 9 shows a tree structure image of the created call structure. An example of the created call structure data is shown in FIG. In FIG. 10, for example, the
図11(b)に、呼出構造データのデータ構造の例を示す。図8(b)に示した場合に加えて、引数値、戻り値がある。属性情報を記録する場合、引数の値に応じて、一組として管理する数が変わるので、可変長のデータ構造として管理してもよい。個々の引数に関しては、引数の型情報と値を一組として保持してもよい。戻り値も、型情報と値を組み合わせとして保持してもよい。 FIG. 11B shows an example of the data structure of the call structure data. In addition to the case shown in FIG. 8B, there are an argument value and a return value. When the attribute information is recorded, the number managed as a set varies depending on the value of the argument, so it may be managed as a variable length data structure. For each argument, the argument type information and value may be held as a set. The return value may also be held as a combination of type information and value.
単純にトレース情報を記録する場合には、同じ処理を複数回動作させると、その実行した回数分だけ、トレース情報量が比例して増加することとなる。これに対して、実施形態で示した構成では、同一呼び出しに対して重複を避けたツリー構造を作成し、各ノード上の属性値を更新すればよいため、少ない情報量で、トレース情報を記録することができる。 When simply recording trace information, if the same process is operated a plurality of times, the amount of trace information increases in proportion to the number of executions. On the other hand, in the configuration shown in the embodiment, it is only necessary to create a tree structure that avoids duplication for the same call and update the attribute value on each node. can do.
従って、特に繰り返し処理が多い場合、大量のトレースを行っても、少ない情報量で記録することが出来る。図12に、比較の一例を示す。図12(a)は、ノードの集約を行わない場合のツリー構造を示している。図12(b)は、上述の一実施形態によってノードの集約を行った場合のツリー構造を示す。この比較でノード数は、8個から6個に減っているが、個々のノード間の関係や情報量は、同じである。現実のトレース情報においては、トレース情報量が膨大になるため、本実施形態の情報集約の効果は非常に大きくなる。 Therefore, especially when there are many repetitive processes, even if a large amount of tracing is performed, it is possible to record with a small amount of information. FIG. 12 shows an example of comparison. FIG. 12A shows a tree structure when nodes are not aggregated. FIG. 12B shows a tree structure when nodes are aggregated according to the above-described embodiment. In this comparison, the number of nodes is reduced from 8 to 6, but the relationship between the individual nodes and the amount of information are the same. In actual trace information, the amount of trace information becomes enormous, so the effect of information aggregation of this embodiment becomes very large.
例えば、プログラムの変更時などで、広い範囲のトレース情報を比較しなければならないときに、プログラムの変更前後のトレース情報の比較を容易に行うことができる。 For example, when it is necessary to compare a wide range of trace information when changing a program, it is possible to easily compare the trace information before and after the change of the program.
また、従来の実行履歴情報として利用するカバレッジ情報と違い、呼出構造を保持することで、あるメソッドを呼出している呼び出し元や、そのメソッドが呼ぶ、呼び出し先の情報を追跡することが可能であるため、メソッド間の関係を容易に把握することが出来る。 Also, unlike the coverage information used as conventional execution history information, by holding the call structure, it is possible to track the caller calling a method and the callee information called by that method. Therefore, the relationship between methods can be easily grasped.
さらに属性値に、実行回数を保持することで、呼出構造の中で頻繁に実行される箇所と、そうでない箇所が容易に特定出来る。 Further, by holding the number of times of execution in the attribute value, it is possible to easily identify the part that is frequently executed and the part that is not so in the call structure.
また、データの値に依存して、繰り返し処理やジャンプ先が動的に変更されるようなプログラムに対しても、その動作の挙動を的確に把握することができる。このような動的な変更を行うプログラムは、ソースの記述から、その挙動を把握することは非常に困難である。 In addition, it is possible to accurately grasp the behavior of an operation even for a program in which the repetition process and the jump destination are dynamically changed depending on the data value. It is very difficult to grasp the behavior of such a program that changes dynamically from the description of the source.
テストケース名を保持していることで、テストケース別にその呼出関係の調査を行うことにも利用できる。また、その他の属性で呼出構造を検索することで、その属性の観点から、呼出関係を把握することも容易に行える。 By holding the test case name, it can be used for investigating the calling relationship for each test case. In addition, by retrieving the call structure with other attributes, it is possible to easily grasp the call relationship from the viewpoint of the attributes.
また、一実施形態では、イベントを読み込む毎に、メソッドの呼出構造の情報を作成しているため、予め呼出構造のパターンを定義しておく必要がない。したがって、種々のプログラムに対して、柔軟に対応することができる。 In one embodiment, since the method call structure information is created each time an event is read, there is no need to define a call structure pattern in advance. Therefore, it is possible to flexibly cope with various programs.
図13は、複数のテストケースによって作成された呼出構造から、特定のテストケースの呼出構造を抽出してツリー構造として表示する例を示している。図13(a)は、Test1及びTest2の両者を用いて集約されたツリー構造である。図13(b)は、この呼出構造のデータに対し、Test1を検索キーとして検索し、ツリー構造を構築した例を示している。この実施形態により、特定のテストケースの観点から、アプリケーションプログラムの呼出構造を容易に把握できる。 FIG. 13 shows an example in which a call structure of a specific test case is extracted from a call structure created by a plurality of test cases and displayed as a tree structure. FIG. 13A shows a tree structure that is aggregated using both Test1 and Test2. FIG. 13 (b) shows an example in which a tree structure is constructed by searching Test1 with the search structure data as a search key. According to this embodiment, the calling structure of the application program can be easily grasped from the viewpoint of a specific test case.
図14は、複数のテストケースの呼出構造の差分を抽出して強調表示する例を示している。図14(a)は、Test1及びTest2の両者を用いて集約されたツリー構造である。図14(b)は、Test1及びTest2の両者の呼出構造の差分がハイライト表示されることを示している。すなわち、ノードA1402及びノードB1406は、Test1のみに存在するノードを示している。そして、ノードD1406は、Test2にのみに存在するノードを示している。その他の、ハイライト表示されていないノードは、Test1及びTest2の両者に共通するノードを示している。このような差分を表示する実施形態により、たとえばアプリケーションプログラムの変更前(Test1)と変更後(Test2)のプログラム実行動作の相違点を視覚的に容易に把握することができる。また、各ノードの呼出構造のリスト表示(不図示)を参照すれば、その相違の詳細を把握することもできる。
FIG. 14 shows an example of extracting and highlighting the difference between the call structures of a plurality of test cases. FIG. 14A shows a tree structure that is aggregated using both
図15は、一実施形態のハードウエア構成を示している。ハードウエアには、CPU1502、メモリ1504、動的メモリ1506、媒体を読み書きするドライブ1508、通信インターフェース1510、表示装置1513等に画像信号を送るビデオインターフェース1512、I/Oインターフェース1514、I/Oとしてのキーボード1516、マウス1518、プリンタ1520が含まれる。
FIG. 15 shows a hardware configuration of an embodiment. The hardware includes a
また、プログラムに係る本発明は、機械読み取り可能な記録媒体に格納されてもよい。機械読み取り可能な記録媒体には、磁気記録媒体、光ディスク、光磁気記録媒体、半導体メモリなどがある。磁気記録媒体には、HDD、フレキシブルディスク(FD)、磁気テープ(MT)などがある。光ディスクには、DVD(Digital Versatile Disc)、DVD−RAM、CD−ROM(Compact Disc−Read Only Memory)、CD−R(Recordable)/RW(ReWritable)などがある。また、光磁気記録媒体には、MO(Magneto−Optical disk)などがある。 Further, the present invention relating to a program may be stored in a machine-readable recording medium. Examples of the machine-readable recording medium include a magnetic recording medium, an optical disk, a magneto-optical recording medium, and a semiconductor memory. Magnetic recording media include HDDs, flexible disks (FD), magnetic tapes (MT) and the like. Examples of the optical disk include a DVD (Digital Versatile Disc), a DVD-RAM, a CD-ROM (Compact Disc-Read Only Memory), and a CD-R (Recordable) / RW (ReWriteable). Magneto-optical recording media include MO (Magneto-Optical disk).
なお、上述の実施形態では、実行トレース情報において、メソッドの実行順序は、ツリー構造をたどることを前提としている。したがって、例えば、複数のスレッドが同時に動作するプログラムのトレースを対象とする場合には、特定のスレッドIDに注目して、実行トレースを取ればよい。あるいは、実行トレース情報から特定のスレッドIDを抽出して、上述の実施形態を実施すればよい。 In the above-described embodiment, it is assumed that the execution order of methods follows a tree structure in the execution trace information. Therefore, for example, when tracing a program in which a plurality of threads operate simultaneously, an execution trace may be taken by paying attention to a specific thread ID. Alternatively, a specific thread ID may be extracted from the execution trace information and the above-described embodiment may be performed.
なお、プログラム及び方法の発明の各ステップは、矛盾のないかぎり、順番を入れ替えて実施しても良い。そして、請求項に係る発明において、このように順番を入れ替えた発明も、当然にその請求項に係る発明の技術的範囲に属することは言うまでもない。 It should be noted that the steps of the invention of the program and method may be carried out by changing the order as long as there is no contradiction. In the claimed invention, it goes without saying that an invention whose order has been changed in this way naturally belongs to the technical scope of the claimed invention.
以上の複数の実施形態に関し、更に以下の付記を開示する。
(付記1)
アプリケーションプログラムに含まれる複数の処理単位の各々をノードに対応させ、前記アプリケーションプログラムに対するテストケースの実行トレース情報に含まれる複数のイベントに基づいて、最上位ノードを出発点としてノードを追跡しながら、前記複数の処理単位の各々の呼出構造を、前記ノード間を結ぶツリー構造として記憶部に記憶するプログラムであって、
前記実行トレース情報から、N番目のイベントを読み込み、
前記N番目のイベントが処理単位の呼出開始イベントの場合には、現在追跡しているノードから、前記呼出開始イベントが示す処理単位に対応する子ノードに移動すべきことを決定し、前記N番目のイベントが処理単位の呼出終了イベントの場合には、現在追跡しているノードよりも最上位ノード側の親ノードに移動すべきことを決定することによって、ノードを追跡し、
前記決定において前記子ノードに移動すべきことが決定された場合に、前記現在追跡しているノードの子ノードに前記呼出開始イベントが示す処理単位に対応するノードが既に存在するか否かを判定し、
前記判定において存在しないと判定された場合には、移動すべき前記子ノードを前記記憶部に記憶された前記ツリー構造に追加記憶する、
処理をコンピュータに実行させるプログラム。
(付記2)
前記イベントには属性が含まれ、前記N番目のイベントに含まれる属性を抽出し、該抽出した属性を前記N番目のイベントに関連するノードに対応づけて前記記憶部に記憶する、
処理を更にコンピュータに実行させる付記1記載のプログラム。
(付記3)
前記属性は、前記処理単位の引数、前記処理単位の戻り値、前記処理単位の実行回数、及び前記テストケースの識別情報のうち、いずれか1つを含む、
付記1又は2記載のプログラム。
(付記4)
指定された属性に基づいて、ツリー構造に関連する情報を加工して出力する、
処理を更にコンピュータに実行させる付記1乃至3のうちいずれか1項記載のプログラム。
(付記5)
前記加工して出力する処理は、第1のテストケースによって出力されたツリー構造と、第2のテストケースによって出力されたツリー構造との相違点を出力する、
処理を更にコンピュータに実行させる付記4記載のプログラム。
(付記6)
前記加工して出力する処理は、第1のテストケースによって出力されたツリー構造と、第2のテストケースによって出力されたツリー構造とが一致するか否かを判断した結果を出力する、
処理を更にコンピュータに実行させる付記4又は5記載のプログラム。
(付記7)
アプリケーションプログラムに含まれる複数の処理単位の各々をノードに対応させ、前記アプリケーションプログラムに対するテストケースの実行トレース情報に含まれる複数のイベントに基づいて、最上位ノードを出発点としてノードを追跡しながら、前記複数の処理単位の各々の呼出構造を、前記ノード間を結ぶツリー構造として記憶部に記憶する方法であって、
前記実行トレース情報から、N番目のイベントを読み込み、
前記N番目のイベントが処理単位の呼出開始イベントの場合には、現在追跡しているノードから、前記呼出開始イベントが示す処理単位に対応する子ノードに移動すべきことを決定し、前記N番目のイベントが処理単位の呼出終了イベントの場合には、現在追跡しているノードよりも最上位ノード側の親ノードに移動すべきことを決定することによって、ノードを追跡し、
前記決定において前記子ノードに移動すべきことが決定された場合に、前記現在追跡しているノードの子ノードに前記呼出開始イベントが示す処理単位に対応するノードが既に存在するか否かを判定し、
前記判定において存在しないと判定された場合には、移動すべき前記子ノードを前記記憶部に記憶された前記ツリー構造に追加記憶する、
ことを特徴とする方法。
(付記8)
前記イベントには属性が含まれ、前記N番目のイベントに含まれる属性を抽出し、該抽出した属性を前記N番目のイベントに関連するノードに対応づけて前記記憶部に記憶する、
ことを特徴とする付記7記載の方法。
(付記9)
前記属性は、前記処理単位の引数、前記処理単位の戻り値、前記処理単位の実行回数、及び前記テストケースの識別情報のうち、いずれか1つを含む、
ことを特徴とする付記7又は8記載の方法。
(付記10)
指定された属性に基づいて、ツリー構造に関連する情報を加工して出力する、
ことを特徴とする付記7乃至9のうちいずれか1項記載の方法。
(付記11)
前記加工して出力する処理は、第1のテストケースによって出力されたツリー構造と、第2のテストケースによって出力されたツリー構造との相違点を出力する、
ことを特徴とする付記10記載の方法。
(付記12)
前記加工して出力する処理は、第1のテストケースによって出力されたツリー構造と、第2のテストケースによって出力されたツリー構造とが一致するか否かを判断した結果を出力する、
ことを特徴とする付記10又は11記載の方法。
(付記13)
アプリケーションプログラムに含まれる複数の処理単位の各々をノードに対応させ、前記アプリケーションプログラムに対するテストケースの実行トレース情報に含まれる複数のイベントに基づいて、最上位ノードを出発点としてノードを追跡しながら、前記複数の処理単位の各々の呼出構造を、前記ノード間を結ぶツリー構造として記憶部に記憶する装置であって、
前記実行トレース情報から、N番目のイベントを読み込む、イベント読込部と、
前記N番目のイベントが処理単位の呼出開始イベントの場合には、現在追跡しているノードから、前記呼出開始イベントが示す処理単位に対応する子ノードに移動すべきことを決定し、前記N番目のイベントが処理単位の呼出終了イベントの場合には、現在追跡しているノードよりも最上位ノード側の親ノードに移動すべきことを決定することによって、ノードを追跡する、ノード追跡部と、
前記決定において前記子ノードに移動すべきことが決定された場合に、前記現在追跡しているノードの子ノードに前記呼出開始イベントが示す処理単位に対応するノードが既に存在するか否かを判定する、同一呼出構造存在判定部と、
前記判定において存在しないと判定された場合には、移動すべき前記子ノードを前記記憶部に記憶された前記ツリー構造に追加記憶する、呼出構造ノード追加部と、
を有することを特徴とする装置。
(付記14)
前記イベントには属性が含まれ、前記N番目のイベントに含まれる属性を抽出し、該抽出した属性を前記N番目のイベントに関連するノードに対応づけて前記記憶部に記憶する、呼出構造属性追加部、
を更に有することを特徴とする付記13記載の装置。
(付記15)
前記属性は、前記処理単位の引数、前記処理単位の戻り値、前記処理単位の実行回数、及び前記テストケースの識別情報のうち、いずれか1つを含む、
付記13又は14記載の装置。
(付記16)
指定された属性に基づいて、ツリー構造に関連する情報を加工して出力する、データ加工部、
を更に有する付記13乃至15のうちいずれか1項記載の装置。
(付記17)
前記データ加工部は、第1のテストケースによって出力されたツリー構造と、第2のテストケースによって出力されたツリー構造との相違点を出力する、
付記16記載の装置。
(付記18)
前記データ加工部は、第1のテストケースによって出力されたツリー構造と、第2のテストケースによって出力されたツリー構造とが一致するか否かを判断した結果を出力する、
付記16又は17記載の装置。
The following additional notes are disclosed with respect to the plurality of embodiments described above.
(Appendix 1)
Each of a plurality of processing units included in an application program is associated with a node, and based on a plurality of events included in execution trace information of a test case for the application program, while tracking the node starting from the highest node, A program for storing a calling structure of each of the plurality of processing units in a storage unit as a tree structure connecting the nodes,
Read the Nth event from the execution trace information,
If the Nth event is a call start event of a processing unit, it is determined that the current tracking node should move to a child node corresponding to the processing unit indicated by the call start event, and the Nth event If the event is an invocation event of a processing unit, the node is traced by determining that it should move to the parent node on the highest node side than the node currently being traced,
When it is determined in the determination that the node should be moved to the child node, it is determined whether a node corresponding to the processing unit indicated by the call start event already exists in the child node of the currently tracked node. And
If it is determined in the determination that it does not exist, the child node to be moved is additionally stored in the tree structure stored in the storage unit,
A program that causes a computer to execute processing.
(Appendix 2)
The event includes an attribute, extracts an attribute included in the Nth event, and stores the extracted attribute in the storage unit in association with a node related to the Nth event.
The program according to
(Appendix 3)
The attribute includes any one of an argument of the processing unit, a return value of the processing unit, an execution count of the processing unit, and identification information of the test case.
(Appendix 4)
Process and output information related to the tree structure based on the specified attributes.
The program according to any one of
(Appendix 5)
The process of processing and outputting outputs the difference between the tree structure output by the first test case and the tree structure output by the second test case.
The program according to
(Appendix 6)
The process of processing and outputting outputs the result of determining whether or not the tree structure output by the first test case matches the tree structure output by the second test case.
The program according to
(Appendix 7)
Each of a plurality of processing units included in an application program is associated with a node, and based on a plurality of events included in execution trace information of a test case for the application program, while tracking the node starting from the highest node, A method of storing a calling structure of each of the plurality of processing units in a storage unit as a tree structure connecting the nodes,
Read the Nth event from the execution trace information,
If the Nth event is a call start event of a processing unit, it is determined that the current tracking node should move to a child node corresponding to the processing unit indicated by the call start event, and the Nth event If the event is an invocation event of a processing unit, the node is traced by determining that it should move to the parent node on the highest node side than the node currently being traced,
When it is determined in the determination that the node should be moved to the child node, it is determined whether a node corresponding to the processing unit indicated by the call start event already exists in the child node of the currently tracked node. And
If it is determined in the determination that it does not exist, the child node to be moved is additionally stored in the tree structure stored in the storage unit,
A method characterized by that.
(Appendix 8)
The event includes an attribute, extracts an attribute included in the Nth event, and stores the extracted attribute in the storage unit in association with a node related to the Nth event.
The method according to
(Appendix 9)
The attribute includes any one of an argument of the processing unit, a return value of the processing unit, an execution count of the processing unit, and identification information of the test case.
The method according to
(Appendix 10)
Process and output information related to the tree structure based on the specified attributes.
10. The method according to any one of
(Appendix 11)
The process of processing and outputting outputs the difference between the tree structure output by the first test case and the tree structure output by the second test case.
The method according to
(Appendix 12)
The process of processing and outputting outputs the result of determining whether or not the tree structure output by the first test case matches the tree structure output by the second test case.
(Appendix 13)
Each of a plurality of processing units included in an application program is associated with a node, and based on a plurality of events included in execution trace information of a test case for the application program, while tracking the node starting from the highest node, An apparatus for storing a calling structure of each of the plurality of processing units in a storage unit as a tree structure connecting the nodes,
An event reading unit for reading the Nth event from the execution trace information;
If the Nth event is a call start event of a processing unit, it is determined that the current tracking node should move to a child node corresponding to the processing unit indicated by the call start event, and the Nth event A node tracking unit that tracks a node by determining that the event should be moved to a parent node on the highest node side of the currently tracked node,
When it is determined in the determination that the node should be moved to the child node, it is determined whether a node corresponding to the processing unit indicated by the call start event already exists in the child node of the currently tracked node. The same call structure existence determination unit;
A call structure node adding unit that additionally stores the child node to be moved in the tree structure stored in the storage unit when it is determined that the node does not exist in the determination;
A device characterized by comprising:
(Appendix 14)
The event includes an attribute, extracts an attribute included in the Nth event, and stores the extracted attribute in the storage unit in association with a node related to the Nth event. Additional part,
The apparatus according to
(Appendix 15)
The attribute includes any one of an argument of the processing unit, a return value of the processing unit, an execution count of the processing unit, and identification information of the test case.
The apparatus according to
(Appendix 16)
A data processing unit that processes and outputs information related to the tree structure based on specified attributes,
The device according to any one of
(Appendix 17)
The data processing unit outputs a difference between the tree structure output by the first test case and the tree structure output by the second test case;
The apparatus according to
(Appendix 18)
The data processing unit outputs a result of determining whether or not the tree structure output by the first test case matches the tree structure output by the second test case.
The apparatus according to
202 最上位ノード取得部
208 イベント読込部
210 ノード追跡部
214 同一呼出構造存在判定部
218 呼出構造ノード追加部
222 呼出構造属性追加部
226 表示・ユーザーインターフェース部
228 データ加工部
202 Top-level
Claims (8)
前記実行トレース情報から、N番目のイベントを読み込み、
前記N番目のイベントが処理単位の呼出開始イベントの場合には、現在追跡しているノードから、前記呼出開始イベントが示す処理単位に対応する子ノードに移動すべきことを決定し、前記N番目のイベントが処理単位の呼出終了イベントの場合には、現在追跡しているノードよりも最上位ノード側の親ノードに移動すべきことを決定することによって、ノードを追跡し、
前記決定において前記子ノードに移動すべきことが決定された場合に、前記現在追跡しているノードの子ノードに前記呼出開始イベントが示す処理単位に対応するノードが既に存在するか否かを判定し、
前記判定において存在しないと判定された場合には、移動すべき前記子ノードを前記記憶部に記憶された前記ツリー構造に追加記憶する、
処理をコンピュータに実行させるプログラム。 Each of a plurality of processing units included in an application program is associated with a node, and based on a plurality of events included in execution trace information of a test case for the application program, while tracking the node starting from the highest node, A program for storing a calling structure of each of the plurality of processing units in a storage unit as a tree structure connecting the nodes,
Read the Nth event from the execution trace information,
If the Nth event is a call start event of a processing unit, it is determined that the current tracking node should move to a child node corresponding to the processing unit indicated by the call start event, and the Nth event If the event is an invocation event of a processing unit, the node is traced by determining that it should move to the parent node on the highest node side than the node currently being traced,
When it is determined in the determination that the node should be moved to the child node, it is determined whether a node corresponding to the processing unit indicated by the call start event already exists in the child node of the currently tracked node. And
If it is determined in the determination that it does not exist, the child node to be moved is additionally stored in the tree structure stored in the storage unit,
A program that causes a computer to execute processing.
処理を更にコンピュータに実行させる請求項1記載のプログラム。 The event includes an attribute, extracts an attribute included in the Nth event, and stores the extracted attribute in the storage unit in association with a node related to the Nth event.
The program according to claim 1, further causing the computer to execute processing.
請求項1又は2記載のプログラム。 The attribute includes any one of an argument of the processing unit, a return value of the processing unit, an execution count of the processing unit, and identification information of the test case.
The program according to claim 1 or 2.
処理を更にコンピュータに実行させる請求項1乃至3のうちいずれか1項記載のプログラム。 Process and output information related to the tree structure based on the specified attributes.
The program according to claim 1, further causing the computer to execute processing.
処理を更にコンピュータに実行させる請求項4記載のプログラム。 The process of processing and outputting outputs the difference between the tree structure output by the first test case and the tree structure output by the second test case.
The program according to claim 4, further causing the computer to execute processing.
処理を更にコンピュータに実行させる請求項4又は5記載のプログラム。 The process of processing and outputting outputs the result of determining whether or not the tree structure output by the first test case matches the tree structure output by the second test case.
6. The program according to claim 4, further causing the computer to execute processing.
前記実行トレース情報から、N番目のイベントを読み込み、
前記N番目のイベントが処理単位の呼出開始イベントの場合には、現在追跡しているノードから、前記呼出開始イベントが示す処理単位に対応する子ノードに移動すべきことを決定し、前記N番目のイベントが処理単位の呼出終了イベントの場合には、現在追跡しているノードよりも最上位ノード側の親ノードに移動すべきことを決定することによって、ノードを追跡し、
前記決定において前記子ノードに移動すべきことが決定された場合に、前記現在追跡しているノードの子ノードに前記呼出開始イベントが示す処理単位に対応するノードが既に存在するか否かを判定し、
前記判定において存在しないと判定された場合には、移動すべき前記子ノードを前記記憶部に記憶された前記ツリー構造に追加記憶する、
ことを特徴とする方法。 Each of a plurality of processing units included in an application program is associated with a node, and based on a plurality of events included in execution trace information of a test case for the application program, while tracking the node starting from the highest node, A method of storing a calling structure of each of the plurality of processing units in a storage unit as a tree structure connecting the nodes,
Read the Nth event from the execution trace information,
If the Nth event is a call start event of a processing unit, it is determined that the current tracking node should move to a child node corresponding to the processing unit indicated by the call start event, and the Nth event If the event is an invocation event of a processing unit, the node is traced by determining that it should move to the parent node on the highest node side than the node currently being traced,
When it is determined in the determination that the node should be moved to the child node, it is determined whether a node corresponding to the processing unit indicated by the call start event already exists in the child node of the currently tracked node. And
If it is determined in the determination that it does not exist, the child node to be moved is additionally stored in the tree structure stored in the storage unit,
A method characterized by that.
前記実行トレース情報から、N番目のイベントを読み込む、イベント読込部と、
前記N番目のイベントが処理単位の呼出開始イベントの場合には、現在追跡しているノードから、前記呼出開始イベントが示す処理単位に対応する子ノードに移動すべきことを決定し、前記N番目のイベントが処理単位の呼出終了イベントの場合には、現在追跡しているノードよりも最上位ノード側の親ノードに移動すべきことを決定することによって、ノードを追跡する、ノード追跡部と、
前記決定において前記子ノードに移動すべきことが決定された場合に、前記現在追跡しているノードの子ノードに前記呼出開始イベントが示す処理単位に対応するノードが既に存在するか否かを判定する、同一呼出構造存在判定部と、
前記判定において存在しないと判定された場合には、移動すべき前記子ノードを前記記憶部に記憶された前記ツリー構造に追加記憶する、呼出構造ノード追加部と、
を有することを特徴とする装置。 Each of a plurality of processing units included in an application program is associated with a node, and based on a plurality of events included in execution trace information of a test case for the application program, while tracking the node starting from the highest node, An apparatus for storing a calling structure of each of the plurality of processing units in a storage unit as a tree structure connecting the nodes,
An event reading unit for reading the Nth event from the execution trace information;
If the Nth event is a call start event of a processing unit, it is determined that the current tracking node should move to a child node corresponding to the processing unit indicated by the call start event, and the Nth event A node tracking unit that tracks a node by determining that the event should be moved to a parent node on the highest node side of the currently tracked node,
When it is determined in the determination that the node should be moved to the child node, it is determined whether a node corresponding to the processing unit indicated by the call start event already exists in the child node of the currently tracked node. The same call structure existence determination unit;
A call structure node adding unit that additionally stores the child node to be moved in the tree structure stored in the storage unit when it is determined that the node does not exist in the determination;
A device characterized by comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011121055A JP5772233B2 (en) | 2011-05-30 | 2011-05-30 | Program execution trace information aggregation program, apparatus, and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011121055A JP5772233B2 (en) | 2011-05-30 | 2011-05-30 | Program execution trace information aggregation program, apparatus, and method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012248118A true JP2012248118A (en) | 2012-12-13 |
JP5772233B2 JP5772233B2 (en) | 2015-09-02 |
Family
ID=47468482
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011121055A Expired - Fee Related JP5772233B2 (en) | 2011-05-30 | 2011-05-30 | Program execution trace information aggregation program, apparatus, and method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5772233B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016081323A (en) * | 2014-10-17 | 2016-05-16 | 株式会社東芝 | Control program maintenance device, and control program maintenance method |
JP2020503576A (en) * | 2016-10-11 | 2020-01-30 | グリーン ヒルズ ソフトウェア,インコーポレイテッド | System and method for trace data summarization and visualization |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000020354A (en) * | 1998-07-07 | 2000-01-21 | Hitachi Ltd | Editor for number of execution steps |
JP2009104489A (en) * | 2007-10-24 | 2009-05-14 | Fuji Electric Holdings Co Ltd | Apparatus and method for testing code clone |
-
2011
- 2011-05-30 JP JP2011121055A patent/JP5772233B2/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000020354A (en) * | 1998-07-07 | 2000-01-21 | Hitachi Ltd | Editor for number of execution steps |
JP2009104489A (en) * | 2007-10-24 | 2009-05-14 | Fuji Electric Holdings Co Ltd | Apparatus and method for testing code clone |
Non-Patent Citations (4)
Title |
---|
CSNG201000516005; 伊藤芳朗,他3名: 'プログラム変更前後での実行履歴の差分検出手法' 情報処理学会研究報告 ソフトウェア工学(SE) No167, 20100415, pp.1-8, 社団法人情報処理学会 * |
CSNG201000935001; 櫻井孝平,他2名: 'Traceglasses:欠陥の効率良い発見手法を実現するトレースに基づくデバッガ' 情報処理学会論文誌 トランザクション 第3巻,第3号, 20101015, pp.1-17, 一般社団法人情報処理学会 * |
JPN6014048976; 伊藤芳朗,他3名: 'プログラム変更前後での実行履歴の差分検出手法' 情報処理学会研究報告 ソフトウェア工学(SE) No167, 20100415, pp.1-8, 社団法人情報処理学会 * |
JPN6014048979; 櫻井孝平,他2名: 'Traceglasses:欠陥の効率良い発見手法を実現するトレースに基づくデバッガ' 情報処理学会論文誌 トランザクション 第3巻,第3号, 20101015, pp.1-17, 一般社団法人情報処理学会 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016081323A (en) * | 2014-10-17 | 2016-05-16 | 株式会社東芝 | Control program maintenance device, and control program maintenance method |
JP2020503576A (en) * | 2016-10-11 | 2020-01-30 | グリーン ヒルズ ソフトウェア,インコーポレイテッド | System and method for trace data summarization and visualization |
US10795803B2 (en) | 2016-10-11 | 2020-10-06 | Green Hills Software Llc | Systems and methods for summarization and visualization of trace data |
JP2021180020A (en) * | 2016-10-11 | 2021-11-18 | グリーン ヒルズ ソフトウェア,インコーポレイテッド | Systems and methods for summarization and visualization of trace data |
JP6991204B2 (en) | 2016-10-11 | 2022-01-12 | グリーン ヒルズ ソフトウェア,インコーポレイテッド | Systems and methods for summarizing and visualizing trace data |
JP2022043324A (en) * | 2016-10-11 | 2022-03-15 | グリーン ヒルズ ソフトウェア,インコーポレイテッド | Systems and methods for summarization and visualization of trace data |
JP7051269B2 (en) | 2016-10-11 | 2022-04-11 | グリーン ヒルズ ソフトウェア,インコーポレイテッド | Systems and methods for summarizing and visualizing trace data |
US11314625B2 (en) | 2016-10-11 | 2022-04-26 | Green Hills Software, Inc. | Systems and methods for summarization and visualization of trace data |
JP7336545B2 (en) | 2016-10-11 | 2023-08-31 | グリーン ヒルズ ソフトウェア,インコーポレイテッド | System and method for trace data summarization and visualization |
Also Published As
Publication number | Publication date |
---|---|
JP5772233B2 (en) | 2015-09-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107622014B (en) | Test report generation method and device, readable storage medium and computer equipment | |
CN110928772B (en) | Test method and device | |
JP5767471B2 (en) | Apparatus and method for evaluating test completeness | |
US8214805B2 (en) | Method and system for graphical user interface testing | |
KR101732764B1 (en) | Intelligent code differencing using code clone detection | |
CN111818123B (en) | Network front-end remote playback method, device, equipment and storage medium | |
US9760347B2 (en) | Method and system to identify GUI objects for non-markup-language-presented applications | |
US9176840B2 (en) | Tool for analyzing and resolving errors in a process server | |
US8135572B2 (en) | Integrated debugger simulator | |
CN106657192B (en) | Method and equipment for presenting service calling information | |
EP2932393B1 (en) | Automated correlation and analysis of callstack and context data | |
US20070150870A1 (en) | Method and apparatus for context oriented computer program tracing and visualization | |
US10678679B1 (en) | System, method, and computer program for automated application programming interface (API) regression testing | |
JP2009265810A (en) | Status transition test support device, status transition test support program and status transition test support method | |
Pimentel et al. | Tracking and analyzing the evolution of provenance from scripts | |
US10073764B1 (en) | Method for instruction sequence execution analysis and visualization | |
JP4737624B2 (en) | Specific work support system for application failure causes | |
JP5772233B2 (en) | Program execution trace information aggregation program, apparatus, and method | |
US10417113B1 (en) | System, method, and computer program for web testing and automation offline storage and analysis | |
WO2007098615A1 (en) | Legacy application modernization by capturing, processing and analysing business processes | |
JP2007122207A (en) | Program analysis program, program analyzing device and program analyzing method | |
US20100251211A1 (en) | Generating and using code-based diagrams | |
JP7380851B2 (en) | Test script generation device, test script generation method and program | |
CN112732578A (en) | Code performance evaluation method and device | |
Leemans | Enhancement & inductive visual miner |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140304 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20141107 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20141118 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20141226 |
|
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: 20150602 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150615 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5772233 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |