JP2010067188A - Information processor for supporting programming, information processing system, and programming support method and program - Google Patents

Information processor for supporting programming, information processing system, and programming support method and program Download PDF

Info

Publication number
JP2010067188A
JP2010067188A JP2008235221A JP2008235221A JP2010067188A JP 2010067188 A JP2010067188 A JP 2010067188A JP 2008235221 A JP2008235221 A JP 2008235221A JP 2008235221 A JP2008235221 A JP 2008235221A JP 2010067188 A JP2010067188 A JP 2010067188A
Authority
JP
Japan
Prior art keywords
code
test case
change
executed
source code
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
Application number
JP2008235221A
Other languages
Japanese (ja)
Other versions
JP5208635B2 (en
Inventor
Masaru Kumagai
賢 熊谷
Yoshitaka Matsumoto
吉高 松本
Kentaro Takiguchi
健太郎 瀧口
Hamzaoui Karim
ハムザウィ・カリーム
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.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Priority to JP2008235221A priority Critical patent/JP5208635B2/en
Publication of JP2010067188A publication Critical patent/JP2010067188A/en
Application granted granted Critical
Publication of JP5208635B2 publication Critical patent/JP5208635B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an information processor for supporting programming, an information processing system, and an information processing method and program. <P>SOLUTION: A verification server 110 for detecting a change in a source code includes a source code reading part 210 for acquiring a new version and an old version of the source code, a source code comparing part 220 for comparing code difference between the new version and the old version, a difference code registering part 230 for extracting a differed code and generating a difference code set, and a source code executing part 240 for acquiring test cases added after the old version in accordance with the change to execute the test cases in order to execute all codes relating to a specific function of the changed source code, calculates a product set of the difference code set and an executed code set, and generates a specific difference code set in which a code changed in relation to a specific function unit is defined as an element node. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、プログラミング支援技術に関し、より詳細には、複数の開発者による連携したプログラミングを支援するための情報処理装置、情報処理システム、プログラミング支援方法およびプログラムに関する。   The present invention relates to a programming support technology, and more particularly to an information processing apparatus, an information processing system, a programming support method, and a program for supporting cooperative programming by a plurality of developers.

現在、特定の業務を実行するためのアプリケーションを提供するソフトウェアは、膨大な量のソースコードから構成されている。また、ソースコードについても、アプリケーション本体を構成するプログラムの他、ダイナミックリンク・ライブラリ、プラグイン・プログラムなどランタイムに呼出された後アプリケーションにより制御されるプログラムなど、その属性も多岐にわたっている。このようなアプリケーション開発において、機能に対応するソースコードの特定コードを識別する作業は、機能の理解や、ソースコードのバグ修正に先立つ作業として、重要な作業となっている。   Currently, software that provides an application for executing a specific task is composed of an enormous amount of source code. The source code also has various attributes such as a program that is called at runtime and controlled by the application, such as a dynamic link library and a plug-in program, in addition to the program constituting the application main body. In such application development, an operation for identifying a specific code of a source code corresponding to a function is an important operation as an operation prior to understanding the function and correcting a bug in the source code.

従来型のソフトウェア開発では、アプリケーションについての仕様書と機能との対応付けが重視されているので、要求追加などの仕様変更の際には、仕様書とソースコードとの間の同期を保つために、ソースコード間の対応付けを容易に認識させるツール(例えば、インターナショナル・ビジネスマシーンズ・コーポレーション社製のRational(登録商標) Requisite Pro(商標))などを使用して、ユニット間の対応付けを管理する。   In conventional software development, the emphasis is on the correspondence between application specifications and functions, so in order to maintain synchronization between the specifications and source code when changing specifications such as adding requirements. , Manage the correspondence between units using a tool that easily recognizes the correspondence between source codes (for example, Rational (Registered Trademark) Requisite Pro (trademark) manufactured by International Business Machines Corporation) .

しかしながら、アプリケーションに要求される機能がますます多種多様になり、また製品サイクルも短期間化する傾向にあるので、アプリケーションの開発効率をより高める目的で、近年、XP(エクストリーム・プログラミング:eXtreme Programming)などに代表されるように、多数の開発者が連携してプログラム作成を行う、アジャイルなソフトウェア開発が普及してきている。XPに代表されるアジャイルなソフトウェア開発においては、コーディングと、テストとが重要となり、また仕様変更に対応したソースコードは、元の仕様書に記述されていない新しいソースコードが存在する場合も発生する。このため、最新の機能に対応するソースコードを特定しようとすると、仕様書を参照するのみでは追加された新規な機能に関連するソースコードを特定することに多大な時間を要し、またXP環境におけるプログラム開発の管理は、ますます困難になる。   However, since the functions required for applications are becoming more and more diverse and the product cycle tends to be shortened, XP (Extreme Programming: eXtreme Programming) has recently been aimed at increasing the efficiency of application development. As represented by agile, agile software development in which many developers collaborate to create programs has become widespread. In agile software development represented by XP, coding and testing are important, and the source code corresponding to the specification change may occur even when new source code that is not described in the original specification exists. . For this reason, when trying to identify the source code corresponding to the latest function, it takes a lot of time to identify the source code related to the added new function only by referring to the specification, and the XP environment. Managing program development in the world becomes increasingly difficult.

ソースコード間のコードの相違を識別する問題に対応するために、従来から、UNIX(登録商標)などでシェル・コマンドとして用意されているdiffコマンド(http://www.gnu.org/software/diffutils/diffutils.html:非特許文献1)が用いられている。diffコマンドは、2つのファイルを指定し、2つのファイル間で追加・削除・変更された行を判別する処理を実行するシェル・コマンドであり、バージョンの異なる2つのソースコードについて追加された、ソースコードのコード・セットを特定することが可能である。多くのバージョン管理システムにおいてもdiffコマンドは、内部的に使用されており、diffコマンドは、プログラムの2つのバージョン間での編集箇所を抽出するなど編集内容を確認することに関し、その有効性が認識されている。   In order to cope with the problem of identifying a difference in code between source codes, a diff command (http://www.gnu.org/software/) conventionally prepared as a shell command in UNIX (registered trademark) or the like. diffutils / diffutils.html: Non-Patent Document 1) is used. The diff command is a shell command that specifies two files and executes a process to determine the lines that have been added, deleted, or changed between the two files. Sources added for two source codes with different versions It is possible to identify the code set of the code. In many version control systems, the diff command is used internally, and the diff command recognizes its effectiveness with respect to checking the editing contents, such as extracting the editing part between two versions of the program. Has been.

また、同様な機能を有するOSレベルでのコマンドとしては例えば、MS−DOS(登録商標)におけるcompコマンドを挙げることができ、compコマンドもMD−DOSシェルから実行させることで、テキストなどで記述されたソースコードの相違を検出することができる。その他、アプリケーション・レベルでファイル比較を実行するプログラムも知られている。   As an OS level command having a similar function, for example, the comp command in MS-DOS (registered trademark) can be cited, and the comp command is also written in text by being executed from the MD-DOS shell. Can detect differences in source code. Other programs that perform file comparison at the application level are also known.

上述したように、2つのソースコード間で相違するコードを検出するプログラムは知られている。しかしながら、アジャイルなプログラム開発環境では、2つのソースコード・バージョンの間で、複数の特定機能ユニットにわたって追加変更され、これらが同時にテストされる場合があり、上述したdiffコマンドなどでは、特定機能ユニットに関連付けられるソースコードのうちの追加・修正などの変更を受けたコード・セットを特定することは困難であった。図13に従来のdiffコマンドを使用するソースコードの概略的な変更検査手順1300を示す。   As described above, a program for detecting a code that differs between two source codes is known. However, in an agile program development environment, there are cases where additions and changes are made across a plurality of specific functional units between two source code versions and these are tested at the same time. It has been difficult to identify code sets that have undergone changes such as additions and modifications in the associated source code. FIG. 13 shows a schematic change inspection procedure 1300 of the source code using the conventional diff command.

ソースコードは、図13に示すように、機能モジュールを提供する各ユニットの変更に対応して、異なるバージョン名を付してチェンジセット1310〜チェンジ1340として進化してゆく。図13に示した従来例では、1つのチェンジセット、例えばチェンジセット1320は、それぞれ「A.clacc_v1」、「B.class_v0」、「C.class_v0」といったバージョン名が付されたユニット1322、1324、1326から構成されている。   As shown in FIG. 13, the source code evolves as a change set 1310 to a change 1340 with a different version name corresponding to the change of each unit providing the functional module. In the conventional example shown in FIG. 13, one change set, for example, a change set 1320, includes units 1322, 1324 with version names such as “A.clac_v1”, “B.class_v0”, and “C.class_v0”, respectively. 1326.

チェンジセット1320では、ユニット1322が、それ以前のチェンジセット1310の対応するバージョン名「A.class_v0」のユニット1312から機能αが修正されている。さらにチェンジセット1330では、ユニット1324およびユニット1326に、それぞれ機能βの変更が行われている。そして、その結果、各修正を受けたチェンジセット1330は、それぞれバージョン名「B.class_v1」、「C.class_v1」が付されたユニット1334、1336を含むものとされている。   In the change set 1320, the function α of the unit 1322 is modified from the unit 1312 of the version name “A.class_v0” corresponding to the previous change set 1310. Further, in the change set 1330, the function β is changed to the unit 1324 and the unit 1326, respectively. As a result, the change set 1330 that has received each modification includes units 1334 and 1336 with version names “B.class_v1” and “C.class_v1”, respectively.

さらにチェンジセット1340では、プログラマによるユニットの変更を受け、機能γおよび機能ωが修正される変更を受けている。この結果、チェンジセット1340は、バージョン名「A.class_v2」、「B.class_v1」、「C.class_v2」とされたユニット1342、1344、1346を含んだ構成とされている。   Further, in the change set 1340, the function γ and the function ω are changed in response to the unit change by the programmer. As a result, the change set 1340 includes units 1342, 1344, 1346 having version names “A.class_v2”, “B.class_v1”, and “C.class_v2”.

図13に示した変更検査手順1300を使用して、従来のdiffプログラムを適用するソースコード変更検査手順について検討する。図13に示した各特定機能ユニットの検査についてみれば、チェンジセット1310からチェンジセット1320の間は、単一の特定機能に関連するユニット1312およびユニット1322だけが変更されている。このため、diffコマンドを使用しても同一の機能ユニットに関連するコードが抽出でき、diffプログラムでも複数の特定機能ユニットにまたがったコード・セットが並列的に抽出されないので、混乱は少ないということができる。   A source code change inspection procedure to which a conventional diff program is applied will be examined using the change inspection procedure 1300 shown in FIG. As for the inspection of each specific function unit shown in FIG. 13, only the unit 1312 and the unit 1322 related to a single specific function are changed between the change set 1310 and the change set 1320. For this reason, the code related to the same functional unit can be extracted even if the diff command is used, and the code set extending over a plurality of specific functional units is not extracted in parallel even in the diff program. it can.

また、チェンジセット1320からチェンジセット1330の間では、機能βに関連する複数のユニットが変更されている。この場合、機能βに関連するユニットが特定のプログラマまたはプログラマ・グループにより作成されている場合不都合は少ないということができる。一方で、機能βに関連するユニット1334およびユニット1336が異なるプログラマまたはプログラマ・グループにより作成されている場合、機能βに関連するコードであっても、別々に検査を実行することが好ましい場合がある。   Also, between the change set 1320 and the change set 1330, a plurality of units related to the function β are changed. In this case, it can be said that there is little inconvenience when the unit related to the function β is created by a specific programmer or a group of programmers. On the other hand, if unit 1334 and unit 1336 related to function β are created by different programmers or groups of programmers, it may be preferable to perform the tests separately even for code related to function β. .

上述した従来例は、プログラミングがある程度ストリームライン化されており、テスト間で複数の特定機能の追加が想定されない場合や、特定機能に関連するユニットが複数にまたがらない場合には、充分有効である。   The above-described conventional example is sufficiently effective when the programming is streamlined to some extent and it is not expected that a plurality of specific functions are added between tests, or when there are no units related to a specific function. is there.

しかしながら、複数のプログラマが分散してプログラミングを行うプログラミング環境では、別の問題が発生する。例えば図13で、チェンジセット1320からチェンジセット1330への変更で、単独の機能が複数のユニットにまたがっているような場合、diffコマンドで一括して相違するコードを出力しても、プログラマが異なる場合もある。このような場合、プログラマは、自己が関与していないコードと自己が関与するコードとの間の関連性を解釈し、理解するための時間を浪費する。   However, another problem occurs in a programming environment in which a plurality of programmers perform programming in a distributed manner. For example, in FIG. 13, when a change from the change set 1320 to the change set 1330 causes a single function to extend over a plurality of units, even if different codes are output collectively with the diff command, the programmers are different. In some cases. In such a case, the programmer wastes time to interpret and understand the relationship between code that is not involved and code that is involved.

さらに、チェンジセット1330からチェンジセット1340の間について行われた変更について検討する。チェンジセット1330からチェンジセット1340の間では、機能γおよび機能ωが同時に追加されている。さらに機能γおよび機能Aの変更を行ったプログラマは、同一ではない場合が発生する。このような場合、単にdiffプログラムを使用してソースコードの相違を抽出するだけでは、各特定機能ユニットごとに変更内容を特定できないという問題が発生する。また、diffコマンドなどでソースコードの変更を検査した場合、当該ソースコードの変更に全く関連しない特定ユニットのコード・セットまで抽出されてしまい、プログラマによるデバッグ処理や、コード・セットの理解に対し、混乱を生じさせることにもなる。   Further, consider the changes made between change set 1330 and change set 1340. A function γ and a function ω are simultaneously added between the change set 1330 and the change set 1340. Furthermore, the programmers who have changed the function γ and the function A may not be the same. In such a case, there is a problem that the contents of change cannot be specified for each specific functional unit simply by extracting the difference in the source code using the diff program. In addition, when the change of the source code is inspected with the diff command or the like, the code set of a specific unit that is not related at all to the change of the source code is extracted, and for the debugging process by the programmer and the understanding of the code set, It will also cause confusion.

2つのプログラムバージョン間で機能の相違を無視して単に差分を抽出するソースコード解析システムは、例えば特開2004−326337号公報(特許文献1)に記載されている。特許文献1では、2つのバージョン間での差分を検出することは可能とするが、差分に関連づけられる機能特有のコードを識別せずに、単純に静的な差分を抽出する。そして、抽出された差分情報に基づいて、ソースコードの解析結果の絞込みを行うものである。しかしながら、絞り込みは、前回バージョンと現行バージョンとの間の差分しか識別することができず、特定機能に依存したプログラムの差分を抽出することを可能とするものではない。   A source code analysis system that simply extracts a difference while ignoring a difference in function between two program versions is described in, for example, Japanese Patent Application Laid-Open No. 2004-326337 (Patent Document 1). In Patent Document 1, it is possible to detect a difference between two versions, but a static difference is simply extracted without identifying a function-specific code associated with the difference. Then, the analysis result of the source code is narrowed down based on the extracted difference information. However, the narrowing down can identify only the difference between the previous version and the current version, and does not make it possible to extract the difference of the program depending on the specific function.

さらに特許文献1に記載された方法は、各機能を提供するためのユニットをオブジェクトとして構成する、所謂オブジェクト指向プログラミングにより構成されるアプリケーションについて、単に差分しか抽出しないので、各オブジェクトに固有のソースコードの差分を識別できず、オブジェクト指向プログラミング技術を使用して作成されるソースコードの変更検証および実行検査に適したものということができなかった。   Furthermore, the method described in Patent Document 1 extracts only differences for an application configured by so-called object-oriented programming, in which a unit for providing each function is configured as an object. Therefore, a source code unique to each object is extracted. The difference between the two cannot be identified, and it cannot be said that it is suitable for the verification and execution inspection of the source code created using the object-oriented programming technique.

また、特開2007−4255号公報(特許文献2)では、2つソースコードのバージョンを比較して比較結果情報を生成し、現行バージョンを実行形式に変換してテストケースにより試験を行い、試験を行った時刻と、現行ソースコードが格納された時刻とを使用して試験結果情報に対応する比較結果情報を取得し、出力するプログラムを開示する。特許文献2に記載された処理のフローチャートを図14に示す。図14に示す処理は、リポジトリに登録されているうち、テストをPASSしたファイルを特定し、テストをPASSしたファイルとそれよりも新しいファイルとの差分コードを出力する処理を実行する。そして、テストをPASSしたファイルよりも新しいファイルで非正常な結果が得られた場合に、当該非正常な実行結果を、差分コードに対応付けて出力させている。   Japanese Patent Laid-Open No. 2007-4255 (Patent Document 2) compares two source code versions to generate comparison result information, converts the current version into an execution format, and performs a test using a test case. A program for acquiring and outputting comparison result information corresponding to test result information using the time when the current source code is stored and the time when the current source code is stored is disclosed. FIG. 14 shows a flowchart of the processing described in Patent Document 2. The process shown in FIG. 14 executes a process of identifying a file that has passed a test and registering a difference code between a file that has passed the test and a newer file than that registered in the repository. When an abnormal result is obtained with a file that is newer than the file that passed the test, the abnormal execution result is output in association with the difference code.

特許文献2に記載されたデバッグ支援方法も、旧ファイルと新ファイルとの差を識別し、当該差分コードに対応付けて実行結果を表示させることは可能である。しかしながら、新旧ファイルの差分コードに関連付けて実行結果を表示させるだけでは、当該差分コードがどの機能に対応しているのかについては、新ファイルのスクリプトを参照して当該コードのコーディング位置などを判断しなければ判断できず、プログラマは、新ファイルをトレースし、そのコーディング上の機能的な意味を判断しなければならず、ソースコードの全体的な検討を必要とする点で非効率であり、アジャイルなプログラミング環境にそのまま適用することは困難である。   The debugging support method described in Patent Document 2 can also identify the difference between the old file and the new file and display the execution result in association with the difference code. However, just by displaying the execution result in association with the difference code of the old and new files, as to what function the difference code supports, refer to the script of the new file and determine the coding position of the code. Otherwise, the programmer must trace the new file, determine the functional meaning of the coding, is inefficient and requires a holistic review of the source code, and is agile It is difficult to apply to a simple programming environment as it is.

また、特許文献2では、予めテストスクリプトの一覧に登録されたコード部分しかテスト対象とすることができず、仕様書に記載されていないものの、仕様変更に対応して新たに追加されたコード領域がある場合、全くテストされず、XPなどのアジャイルなプログラミング技術には適していないという問題点がある。   Further, in Patent Document 2, only code portions registered in the list of test scripts in advance can be tested, and code regions newly added in response to specification changes are not described in the specifications. Is not tested at all and is not suitable for agile programming techniques such as XP.

加えて近年のプログラミング技術は、オブジェクト指向プログラミングが普及しており、各機能ごとに機能ブロックとしてコーディングされる場合が多い。このような場合、予め予定したテスト項目を設定し、テストを実行するのでは、仕様変更に迅速な対応を行うことができず、複数の変更が加えられたり、以前のソースコードには記述されていなかったコード・セットが出現する可能性のあるXPなどのプログラム開発環境に対応することができないという問題点は、依然として残されたままであった。
http://www.gnu.org/software/diffutils/diffutils.html 特開2004−326337号公報 特開2007−4255号公報
In addition, in recent programming techniques, object-oriented programming has become widespread and is often coded as a function block for each function. In such a case, setting test items that are scheduled in advance and executing the test cannot quickly respond to specification changes, and multiple changes can be made or described in the previous source code. The problem of not being able to cope with a program development environment such as XP in which a code set that was not present may appear still remained.
http://www.gnu.org/software/diffutils/diffutils.html JP 2004-326337 A JP 2007-4255 A

以上のように、ソースコードの変更を検出し、ソースコードの変更を検査する手法は、これまで種々知られているものの、特定機能ユニットに関連するソースコードの変更を検出し、特定機能ユニットに関連して相違するコードの差を抽出することにより、プログラミング支援を可能とするものではない。   As described above, although various methods for detecting a change in the source code and inspecting the change in the source code have been known so far, a change in the source code related to the specific functional unit is detected and the specific functional unit is detected. It does not enable programming support by extracting differences between related and different codes.

すなわち、これまで、テストケースによるテストを繰り返すことでソースコードが進化的に完成されて行くアジャイルなソフトウェア開発環境に対し、適切、かつ効率的に適用することができるプログラミング支援技術が必要とされていた。   In other words, there has been a need for programming support technology that can be applied appropriately and efficiently to an agile software development environment in which source code is evolved and completed by repeating tests using test cases. It was.

さらに、これまで、ソースコードに対して新規な機能が追加された場合にでも、ソースコードの解析から新規な機能を効率的に抽出して技術的な解釈を容易にし、さらにバグの存在元をユニットごとに識別することで、ソースコード上での問題コードを特定する効率を向上するプログラミング支援技術が必要とされていた。   Furthermore, even when new functions have been added to the source code so far, new functions can be efficiently extracted from the analysis of the source code to facilitate technical interpretation, and the origin of bugs can be identified. There has been a need for a programming support technology that improves the efficiency of identifying problem codes in source code by identifying each unit.

加えて、ソースコードの進化に対応したテストケースを実行させることにより単に最新の機能に対応するソースコードの中でも、古くから実装されていた部分ではなく、その時点でソースコード上でしか存在しないソースコード上の新規なソースコード・セットであってもこれらを特定し、効果的な実行検査を可能とするプログラミング支援技術が必要とされていた。   In addition, by executing a test case corresponding to the evolution of the source code, the source code corresponding to the latest function is not the part that has been implemented for a long time, but the source that exists only in the source code at that time There was a need for programming assistive technology that would identify even a new set of source code on the code and enable effective execution checking.

本発明は、上述した従来技術の問題点に鑑みてなされたものであり、本発明の情報処理装置は、ソースコードの変更があった場合、当該変更に関連するコードを網羅的に実行するテストケースを作成し、適切なテストケース識別子を付して、変更したソースコードの機能ユニットに対応付けて登録する。   The present invention has been made in view of the above-described problems of the prior art, and the information processing apparatus according to the present invention is a test that comprehensively executes the code related to the change when the source code is changed. Create a case, attach an appropriate test case identifier, and register it in association with the functional unit of the changed source code.

ソースコードの実行検査を実行する場合、ソースコードの新バージョンと、新バージョン以前に作成されたソースコードである旧バージョンとの間の差分コードを抽出する。抽出された差分コードは、複数の機能に対応して旧バージョンから新バージョンの登録までの間にソースコードの複数の特定機能ユニットが変更されている可能性がある。   When executing the execution inspection of the source code, a difference code between the new version of the source code and the old version which is the source code created before the new version is extracted. In the extracted difference code, there is a possibility that a plurality of specific functional units of the source code are changed between the old version and the new version corresponding to a plurality of functions.

本発明では、旧バージョンが登録された後に追加登録されたテストケースを検索して抽出し、抽出されたテストケースを使用して新バージョンの実行検査を行う。さらにテストケースは、旧バージョンが登録された後、新バージョンが登録されるまでに登録されたものから検索して抽出することがソースコードの変更検証の同期性を確保する上で好ましい。テストケースは、プログラマが変更したソースコード部分を実行させる最小単位のスクリプトまたはプログラムとして提供される。   In the present invention, a test case additionally registered after the old version is registered is searched and extracted, and the execution inspection of the new version is performed using the extracted test case. Furthermore, it is preferable to retrieve and extract test cases from those registered after the old version is registered and before the new version is registered, in order to ensure the synchronization of the change verification of the source code. The test case is provided as a minimum unit script or program for executing a source code portion changed by a programmer.

そして、ソースコードの実行検査は、ソースコードの行と実行命令とを対応付けて管理され、命令の実行に対応する行の識別を、行単位で処理することにより、当該テストケースにおいて実行されたコードを抽出した実行済コード集合が作成される。この実行済コード集合は、要素コードの実行順にソートされて、実行トレースを提供する。   The source code execution inspection is managed in association with the source code line and the execution instruction, and is executed in the test case by processing the line identification corresponding to the execution of the instruction in units of lines. An executed code set from which codes are extracted is created. This executed code set is sorted in the order of element code execution to provide an execution trace.

本発明の情報処理装置は、ソースコード変更検査処理において、旧バージョンから新バージョンの登録までの間に登録されたテストケースを、順次実行させ、旧バージョンと新バージョンとの間で差分コードとして抽出されたコード・セットを特定機能ユニットごとに分類して、特定機能ごとに特定差分コードとして出力する。この結果、差分コードとして抽出された新バージョンのコードは、特定機能ユニットごとに分類された後、以後の処理のために提供される。この結果、プログラマは、ソースコード全体に立ち戻って変更箇所の解釈および理解を行う労力を回避することができ、より効率的なプログラミング開発が可能となる。   The information processing apparatus of the present invention sequentially executes the test cases registered between the old version and the new version in the source code change inspection process, and extracts the difference code between the old version and the new version The obtained code set is classified for each specific function unit, and is output as a specific difference code for each specific function. As a result, the new version code extracted as the difference code is classified for each specific functional unit and then provided for subsequent processing. As a result, the programmer can avoid the effort of going back to the entire source code and interpreting and understanding the changed portion, thereby enabling more efficient programming development.

さらに、本発明では、命令の実行をソースコードの行に対応付けて管理することにより、ソースコードについて変更された特定機能ごとのデバッグ処理を可能する。このため、XPなどにより他のプログラマが別途変更したコード・セットに煩わされることなく、自己の作成した、または特定機能ユニットに関連する変更についての実行検査に専念でき、効率的にバグに対応することが可能となる。   Furthermore, according to the present invention, by managing the execution of instructions in association with the lines of the source code, it is possible to perform a debugging process for each specific function changed for the source code. For this reason, it is possible to concentrate on execution inspections on changes created by the programmer or related to a specific functional unit without being bothered by code sets that have been changed separately by other programmers such as XP, so that bugs can be handled efficiently. It becomes possible.

さらには、テストケースの実行トレースを調べることで、最新の機能に対応するソースコードの中から、仕様書に記載されておらず、ソースコード上のみでしか存在しないソースコードのコード・セットを特定することが可能となり、特定のソリューション開発において、ユーザニーズへの対応状況の検査およびそのコードに特化したデバッグ処理が可能となる。   Furthermore, by examining the execution trace of the test case, the code set of the source code that is not described in the specification and exists only on the source code is identified from the source code corresponding to the latest functions. In particular solution development, it becomes possible to inspect the response status to the user needs and to perform debugging processing specialized for the code.

本発明によれば、ソースコードに対して複数の機能に対応して複数の変更がなされている場合であっても効率的に差分コードとソースコードが提供しようとする機能との対応付けを可能とし、さらに機能ごとのデバッグを可能とするので、より効率的なプログラム開発が可能な、プログラミングを支援するための情報処理装置、情報処理システム、プログラミング支援方法、およびプログラムが提供できる。   According to the present invention, it is possible to efficiently associate a difference code with a function to be provided by the source code even when a plurality of changes are made to the source code corresponding to a plurality of functions. In addition, since debugging can be performed for each function, it is possible to provide an information processing apparatus, an information processing system, a programming support method, and a program for supporting programming that enable more efficient program development.

以下、本発明を実施形態をもって説明するが、本発明は後述する実施形態に限定されるものではない。図1は、本実施形態の情報処理システム100の実施形態を示す。図1に示す情報処理システム100は、ソースコードのプログラミングにおけるソースコードへの変更を検証するための検証サーバ110と、検証サーバ110がソースコードをテストするために使用するテストケースを格納するテストケース・サーバ120とを含んで構成されている。   Hereinafter, although this invention is demonstrated with embodiment, this invention is not limited to embodiment mentioned later. FIG. 1 shows an embodiment of an information processing system 100 according to this embodiment. An information processing system 100 shown in FIG. 1 stores a verification server 110 for verifying changes to the source code in programming of the source code, and a test case for storing a test case used by the verification server 110 to test the source code. A server 120 is included.

検証サーバ110は、検証対象となるソースコードを格納したソースコード・データベース140(以下、テストケースDBとして参照する。)を管理しており、定期的または管理者などの外部指令に応答して、蓄積されたソースコードの検証を実行する。ソースコードDB140は、例えばS_v1、S_V2、…、S_v4などのバージョン名が付され、またテストケースDBに登録された時刻に対応するタイムスタンプなどが付され、複数のソースコード160が登録されている。   The verification server 110 manages a source code database 140 (hereinafter referred to as a test case DB) that stores a source code to be verified, and periodically or in response to an external command from an administrator, The accumulated source code is verified. The source code DB 140 is given a version name such as S_v1, S_V2,..., S_v4, and a time stamp corresponding to the time registered in the test case DB, and a plurality of source codes 160 are registered. .

ソースコードを作成するための言語は、特に制限はなく、例えば、フォートラン、COBOL、PASCAL、PL−1、BASIC、C、C++、Java(登録商標)、Java(登録商標)Beans、Java(登録商標)Applet、Java(登録商標)Script、Perl、Rubyなどを挙げることができる。また、ソースコードは、コンパイラにより実行オブジェクトを作成して命令を実行させる実行形式でもよいし、インタプリタなどを介して行単位で実行される実行形式でもよい。   The language for creating the source code is not particularly limited. For example, Fortran, COBOL, PASCAL, PL-1, BASIC, C, C ++, Java (registered trademark), Java (registered trademark) Beans, Java (registered trademark) ) Applet, Java (registered trademark) Script, Perl, Ruby and the like. The source code may be an execution format in which an execution object is created by a compiler and an instruction is executed, or an execution format that is executed line by line via an interpreter or the like.

また、テストケース・サーバ120は、ソースコードの変更に関連するテストケース170を格納するテストケース・データベース150(以下、テストケースDBとして参照する。)を管理している。説明する実施形態では、検証サーバ110は、検証処理を実行するタイミングが到来すると、テストケースDB150に登録され、TC_1、TC_2、…、TC_4などとの識別子が付された複数のテストケース170から特定のテストケースを抽出する。検証サーバ110は、テストケース・サーバ120から、テストするべきテストケース170を取得し、ソースコードの検証を開始する。   The test case server 120 manages a test case database 150 (hereinafter referred to as a test case DB) that stores test cases 170 related to source code changes. In the embodiment to be described, when the timing for executing the verification process arrives, the verification server 110 is specified from a plurality of test cases 170 registered in the test case DB 150 and assigned identifiers such as TC_1, TC_2,. Extract test cases. The verification server 110 acquires the test case 170 to be tested from the test case server 120 and starts verifying the source code.

図1に示した実施形態では、検証サーバ110と、テストケース・サーバ120とは、LAN、WAN、インターネットなどのネットワーク130を介して相互接続されていて、TCP/IPプロトコルの下で、ファイル送受信を行っている。テストケース・サーバ120は、検証サーバ110からテストケース170の照会要求を受領すると、テストケース・サーバ120は、照会に対応するテストケース170を検索する。テストケース・サーバ120は、テストケースが検索されると、検索されたテストケースを検証サーバ110に送付することで、検証サーバ110にテストケースを取得させて、検証処理を可能とする。   In the embodiment shown in FIG. 1, the verification server 110 and the test case server 120 are interconnected via a network 130 such as a LAN, WAN, or the Internet, and send and receive files under the TCP / IP protocol. It is carried out. When the test case server 120 receives the inquiry request for the test case 170 from the verification server 110, the test case server 120 searches for the test case 170 corresponding to the inquiry. When the test case is searched, the test case server 120 sends the searched test case to the verification server 110, thereby causing the verification server 110 to acquire the test case and enabling the verification process.

また、ネットワーク130には、複数のネットワーク・クライアント112〜118(以下、単にクライアントとして参照する。)が接続されている。クライアント112〜118は、プログラマがソースコードの特定の機能ユニットまたは特定のコード・セットを変更しており、不定期的、または定期的に検証サーバ110にソースコードを送付している。なお、本実施形態では、ソースコードの変更とは、ソースコードに対するコード・セットの追加およびコード・セットの修正・削除の処理を含む。   A plurality of network clients 112 to 118 (hereinafter simply referred to as clients) are connected to the network 130. In the clients 112 to 118, the programmer has changed a specific functional unit or a specific code set of the source code, and the source code is sent to the verification server 110 irregularly or periodically. In the present embodiment, the source code change includes a process of adding a code set to the source code and correcting / deleting the code set.

特定の実施形態では、検証サーバ110は、新たな変更ユニットを受領すると、適切な記憶領域に一定期間蓄積しておく。その後、ソースコードをバージョンアップするタイミングの到来に対応して検証サーバ110は、変更ユニットに対応する旧ユニットのコード領域を、変更ユニットで上書きし、新たなバージョン名を付してソースコードをソースコード・データベース140に登録する。この際、検証サーバ110は、ソースコードを固有に識別するバージョン名やタイムスタンプを付してソースコードDB140にソースコードを登録する。   In certain embodiments, upon receipt of a new change unit, the verification server 110 accumulates in a suitable storage area for a period of time. After that, the verification server 110 overwrites the code area of the old unit corresponding to the changed unit with the changed unit in response to the arrival of the timing to upgrade the source code, and adds the new version name to the source code. Register in the code database 140. At this time, the verification server 110 registers the source code in the source code DB 140 with a version name and time stamp uniquely identifying the source code.

以下、ソースコードDB140に格納されているソースコードのうち、最新のバージョンを新バージョンとして参照し、それよりも古いソースコードを旧バージョンとして参照する。なお、検証サーバ110は、バージョン名の他、作成したタイムスタンプ、作成者コードなどを登録し、以後の変更履歴ログなどとして参照可能としてもよい。   Hereinafter, the latest version of the source code stored in the source code DB 140 is referred to as the new version, and the source code older than that is referred to as the old version. In addition to the version name, the verification server 110 may register a created time stamp, a creator code, and the like so that it can be referred to as a subsequent change history log or the like.

さらにクライアント112〜118にアクセスするプログラマは、ソースコードの変更を行うと、テストケースを作成し、図1の実施形態では、テストケース・サーバ120に送付する。テストケース170は、ソースコードのうち、変更に関連する特定機能ユニットを構成するコード・セットを実行させることが可能であって、かつテストケース自体で検証サーバ110が実行可能な形式のスクリプトまたはプログラムとして記述される。   Further, the programmer accessing the clients 112 to 118 creates a test case when the source code is changed, and sends it to the test case server 120 in the embodiment of FIG. The test case 170 can execute a code set constituting a specific functional unit related to the change in the source code, and can be executed by the verification server 110 in the test case itself. Is described as

さらに、テストケース170には、テストケース名、テストケースが対象とする特定機能ユニット名、タイムスタンプ、プログラマ名などのテストケース識別子を記述しておくことがでる。これらのテストケース識別子は、検証サーバ110の検証処理に先立って検証サーバ110が検証するべきテストケースを検索する際のインデックスとして使用することができる。   Further, the test case 170 can describe a test case identifier such as a test case name, a specific function unit name targeted by the test case, a time stamp, and a programmer name. These test case identifiers can be used as indexes when searching for test cases to be verified by the verification server 110 prior to the verification process of the verification server 110.

図1に示した情報処理システム100では、検証サーバ110と、テストケース・サーバ120とは、分離した構成として説明されている。しかしながら、情報処理システム100の他の実施形態では、検証サーバ110と、テストケース・サーバ120とを機能的に統合して、単一の検証サーバとして構成することもできる。当該他の実施形態では、情報処理システム100は、プログラマは、クライアント112〜118を介して変更したユニットとともに当該変更に対応するテストケースを検証サーバ110に送付する構成として実装される。当該他の実施形態では、検証サーバ110は、変更に関連する特定機能ユニットの変更バージョンと、テストケースとを受領する。   In the information processing system 100 illustrated in FIG. 1, the verification server 110 and the test case server 120 are described as separate configurations. However, in another embodiment of the information processing system 100, the verification server 110 and the test case server 120 may be functionally integrated to form a single verification server. In the other embodiment, the information processing system 100 is implemented as a configuration in which the programmer sends a test case corresponding to the change to the verification server 110 together with the unit changed via the clients 112 to 118. In the other embodiment, the verification server 110 receives a changed version of a specific functional unit related to the change and a test case.

検証サーバ110は、適切なタイミングの到来に対応してソースコードの新バージョンを生成し、ソースコードDB140に登録する。その後、受領したテストケースを検索して取得し、取得したテストケースを実行させて、新バージョンの検証を実行する。検証結果は、検証サーバ110の検証結果ログとして検証サーバ110が管理することもできるし、検証結果をデバッグ結果に加工した後、クライアント112〜118に返す構成とすることができる。クライアント112〜118は、当該検証結果を受領し、異常がない場合には、次のユニットの開発に着手する。   The verification server 110 generates a new version of the source code in response to the arrival of appropriate timing and registers it in the source code DB 140. Thereafter, the received test case is searched and acquired, the acquired test case is executed, and the new version is verified. The verification result can be managed by the verification server 110 as a verification result log of the verification server 110, or can be configured so that the verification result is processed into a debug result and then returned to the clients 112 to 118. The clients 112 to 118 receive the verification result, and when there is no abnormality, start development of the next unit.

また、異常がある場合には、当該異常の箇所を解析し、対応付ける追加・変更を実行し、再度検証サーバ110に送付する。この場合、テストケースも送付することになるが、デバッグの結果を反映させる箇所についてのテストケースはすでに作成済みであるので、既製のテストケースを、再度検証サーバ110またはテストケース・サーバ120に送付することで対応することができる。また、デバッグのため、検証サーバ110に対して使用するテストケースを明示的に指定してデバッグ処理を依頼することもできる。   If there is an abnormality, the abnormality part is analyzed, the corresponding addition / change is executed, and the result is sent to the verification server 110 again. In this case, a test case is also sent, but since a test case for a location that reflects the debug result has already been created, the ready-made test case is sent again to the verification server 110 or the test case server 120. You can respond by doing. In addition, for debugging, it is possible to explicitly specify a test case to be used for the verification server 110 and request debugging processing.

変更箇所に異常がある場合に、検証サーバ110に対して明示的にデバッグ処理を依頼する実施形態を採用する場合でも、検証サーバ110は、他のプログラマが作成したコード領域のデバッグ結果を送付することなく、プログラマ自身が作成した特定機能ユニットに関連するデバッグ結果を受領することができる。この結果、他のプログラマが作成した機能またはコード領域と切り離してユニットのデバッグおよび開発が可能となり、開発効率が向上する。また、本実施形態では、特定のプログラマがどの領域のコーディングを行っているかを相互に知ることなく、プログラム開発に専念することが可能となるとともに、プログラム内容に関する情報管理が容易となる。   Even when adopting an embodiment that explicitly requests debug processing from the verification server 110 when there is an abnormality in the changed part, the verification server 110 sends the debug result of the code area created by another programmer. The debugging result related to the specific functional unit created by the programmer can be received. As a result, the unit can be debugged and developed separately from functions or code areas created by other programmers, and development efficiency is improved. Further, in the present embodiment, it is possible to concentrate on program development without mutually knowing which area a specific programmer is coding, and it becomes easy to manage information regarding the program contents.

検証サーバ110またはテストケース・サーバ120は、汎用サーバ装置を使用して実装することができる。上述した汎用サーバ装置は、PENTIUM(登録商標)、PENTIUM(登録商標)互換チップ、などのCISCアーキテクチャのマイクロプロセッサ、または、POWER PC(登録商標)などのRISCアーキテクチャのマイクロプロセッサを実装することができ、マイクロプロセッサは、シングルコアでもマルチコアでもかまわない。   The verification server 110 or the test case server 120 can be implemented using a general-purpose server device. The above-described general-purpose server device can be mounted with a CISC architecture microprocessor such as PENTIUM (registered trademark) or PENTIUM (registered trademark) compatible chip, or a RISC architecture microprocessor such as POWER PC (registered trademark). The microprocessor can be single-core or multi-core.

また、汎用サーバ装置は、WINDOWS(登録商標)200X、UNIX(登録商標)、LINUX(登録商標)、AIX(登録商標)などのオペレーティング・システムにより制御されており、C++、JAVA(登録商標)、JAVA(登録商標)SCRIPT、PERL、RUBYなどのプログラミング言語を使用して実装される、CGI、サーブレット、APACHEなどのサーバ・プログラムを実行し、クライアント112〜118との間でトランザクションを行っている。この他、汎用サーバは、RAM、L2、L3キャッシュ、ハードディスク装置などを実装し、各種の処理を可能としている。なお、検証サーバ110、テストケース・サーバ120を一体として構成する実施形態では、各サーバの機能は、汎用コンピュータとして統合した実装形式とすることもできる。   The general-purpose server device is controlled by an operating system such as WINDOWS (registered trademark) 200X, UNIX (registered trademark), LINUX (registered trademark), or AIX (registered trademark), and includes C ++, JAVA (registered trademark), Server programs such as CGI, servlet, and APACHE, which are implemented using programming languages such as JAVA (registered trademark) SCRIPT, PERL, and RUBY, are executed, and transactions are performed with clients 112 to 118. In addition, the general-purpose server is mounted with a RAM, an L2, L3 cache, a hard disk device, and the like to enable various processes. In the embodiment in which the verification server 110 and the test case server 120 are configured integrally, the functions of the servers can be implemented in a form integrated as a general-purpose computer.

クライアント112〜118は、本実施形態では、プログラマがコーディングし、各サーバ110、120にアクセスするために使用される。この目的から、クライアント112〜118は、パーソナル・コンピュータ、ワークステーション、またはサーバなどを使用して構成することができる。また、クライアント112〜118は、特定機能ユニットを変更し、検証サーバ110、テストケース・サーバ120との間でTCP/IPなどのトランザクション・プロトコルに基づき、HTTP、FTPなどのファイル転送プロトコルを使用して変更ユニットおよびテストケースを転送することができる限り、本実施形態では、その実装形式に特に限定はない。   In this embodiment, the clients 112 to 118 are coded by a programmer and used to access the servers 110 and 120. For this purpose, the clients 112-118 can be configured using a personal computer, workstation, server, or the like. Further, the clients 112 to 118 change the specific functional unit and use a file transfer protocol such as HTTP or FTP based on a transaction protocol such as TCP / IP between the verification server 110 and the test case server 120. As long as the change unit and the test case can be transferred, the implementation format is not particularly limited in this embodiment.

図2は、本実施形態の検証サーバ110のソフトウェア・ブロック200を示す。検証サーバ110は、ソースコードDB140から新バージョンのソースコードと、新バージョンのソースコード以前に作成された旧バージョンとを読込んで、新バージョンと旧バージョンのコードを比較し、新バージョンと旧バージョンの差分コードを取得する。本実施形態で、差分コードとは、新バージョンと、旧バージョンとの間で例えばdiffコマンドにより検出された不一致のコードであって、新バージョンに存在し、旧バージョンに存在していないコード、そして旧バージョンに存在し、新バージョンに存在していないコードとして定義される。   FIG. 2 shows the software block 200 of the verification server 110 of this embodiment. The verification server 110 reads the new version of the source code from the source code DB 140 and the old version created before the new version of the source code, compares the new version with the code of the old version, and compares the new version with the old version. Get the difference code. In this embodiment, the difference code is a mismatch code detected by, for example, the diff command between the new version and the old version, and is present in the new version and not in the old version, and Defined as code that exists in the old version but not in the new version.

検証サーバ110は、さらにテストケースDB150などを検索してテストケースを取得した後、テストケースを実行させ、差分コードのうち、特定機能ユニットに関連するコード・セットを抽出し、特定差分コード集合280として出力させている。本実施形態では、特定差分コードとは、特定機能ユニット自体または特定機能ユニット内で、テストケースの実行により単独で実行させることができる特定機能ユニット内の特定のコード・セットを意味する。なお、図2に示した各ソフトウェア・ブロック200は、情報処理装置がRAMなどのプログラム実行空間に本実施形態のプログラムおよびデータを読込んで、マイクロプロセッサがプログラムを実行することにより情報処理装置上の機能手段として実現されている。   The verification server 110 further searches the test case DB 150 and the like to acquire the test case, and then executes the test case, extracts a code set related to the specific functional unit from the difference codes, and sets the specific difference code set 280. As output. In the present embodiment, the specific difference code means a specific code set in a specific functional unit that can be executed independently by executing a test case within the specific functional unit itself or within the specific functional unit. Each software block 200 shown in FIG. 2 is stored on the information processing apparatus when the information processing apparatus reads the program and data of this embodiment into a program execution space such as a RAM and the microprocessor executes the program. It is realized as a functional means.

上述した処理を実行するため、図2に示す実施形態の検証サーバ110は、ソースコード読取部210と、ソースコード比較部220と、差分コード登録部230とを含んでいる。ソースコード読取部210は、ソースコードDB140から、例えばソースコードのバージョン名、タイムスタンプなどを参照して、最新のソースコード、すなわち新バージョンを読込む。また、ソースコード読取部210は、好ましい実施形態では、最新のバージョンの直前のバージョン名またはタイムスタンプなどで指定される、以前に作成されたソースコード、すなわち旧バージョンとを読出し、バッファメモリなど適切な記憶領域に、新バージョン210aおよび旧バージョン210bとして格納する。   In order to execute the processing described above, the verification server 110 of the embodiment shown in FIG. 2 includes a source code reading unit 210, a source code comparison unit 220, and a difference code registration unit 230. The source code reading unit 210 reads the latest source code, that is, a new version from the source code DB 140 with reference to, for example, the version name of the source code, a time stamp, and the like. In the preferred embodiment, the source code reading unit 210 reads a previously created source code, that is, an old version specified by a version name or a time stamp immediately before the latest version, etc. Are stored as a new version 210a and an old version 210b.

なお、読取る旧バージョンは、検証処理の目的に応じて、直前のバージョンではなく、さらに過去に作成されたバージョンであってもよい。どのソースコードを旧バージョンとして採用する場合でも、対応する機能のテストケースを使用することで、テストケースにより特定される機能の検証が可能である。   Note that the old version to be read may be a version created in the past instead of the previous version depending on the purpose of the verification process. Regardless of which source code is adopted as the old version, the function specified by the test case can be verified by using the test case of the corresponding function.

ソースコード比較部220は、diffコマンド、compコマンド、システムレベル・コマンドではなく、ファイル比較アプリケーションなど、ソースコードを比較することができるプログラムを含んで構成することができる。ソースコード比較部220は、バッファリングされた各バージョン210a、210bを読出して、新旧バージョンのソースコードにそれぞれコード行番号などのコード行識別値を割当てる。   The source code comparison unit 220 may include a program that can compare source codes, such as a file comparison application, instead of a diff command, a comp command, and a system level command. The source code comparison unit 220 reads the buffered versions 210a and 210b and assigns code line identification values such as code line numbers to the old and new versions of the source code.

その後、ソースコードの比較を実行し、新バージョンと、旧バージョンとの間で相違するコードを抽出する。その後、ソースコード比較部220の結果は、差分コード登録部230に送られ、差分コード登録部230は、ソースコード比較部220が出力した相違するコードを受領して差分コードとして登録する。差分コードの登録形式は、これまで知られたいかなる登録形式でも使用することができる。なお、差分コードの登録形式は、テーブルまたはリストとし、差分コード集合とすることが、以後の集合演算など好適に利用することができ、またデータベース・プログラムを使用して、検索および集合演算が可能となるので、好ましい実施形態である。   Thereafter, the source code is compared, and the code that is different between the new version and the old version is extracted. Thereafter, the result of the source code comparison unit 220 is sent to the difference code registration unit 230, and the difference code registration unit 230 receives the different code output from the source code comparison unit 220 and registers it as a difference code. The registration format of the difference code can be any registration format known so far. The registration format of the difference code can be a table or list, and a difference code set can be used suitably for subsequent set operations, and search and set operations can be performed using a database program. Therefore, this is a preferred embodiment.

さらに、検証サーバ110は、テストケース取得部250と、ソースコード実行部240と、特定差分コード抽出部270とを含んでいる。テストケース取得部250は、説明する実施形態では、テストケースDB150に対してテストケース170の照会要求を発行する。照会要求には、テストケースのタイムスタンプ、機能名、作成者名などを検索インデックスとして使用することができる。その後、検証サーバ110は、テストケース・サーバ120から、照会要求に適合したテストケースを取得し、ソースコード実行部240に渡す。ソースコード実行部240は、テストケースを受領して実行形式のオブジェクトまたはバイトコードなどの命令を作成し、ソースコードの行単位で、テストケースにより呼出されるコードを実行する。本実施形態で、命令とは、アセンブラ、機械語、またはJAVA(登録商標)の場合には、バイトコードなどを意味する。   Furthermore, the verification server 110 includes a test case acquisition unit 250, a source code execution unit 240, and a specific difference code extraction unit 270. In the embodiment to be described, the test case acquisition unit 250 issues a test case 170 inquiry request to the test case DB 150. In the inquiry request, the test case time stamp, function name, creator name, etc. can be used as a search index. Thereafter, the verification server 110 acquires a test case that matches the inquiry request from the test case server 120 and passes it to the source code execution unit 240. The source code execution unit 240 receives a test case, creates an instruction such as an execution-type object or byte code, and executes the code called by the test case for each line of the source code. In this embodiment, an instruction means an assembler, a machine language, or a byte code in the case of JAVA (registered trademark).

ソースコード実行部240は、当該命令の実行結果をコード実行検査部260に渡して、命令の実行とコードとの対応付けおよびコード内容の取得、実行結果の取得などを可能としている。また、コードの特定は、種々の方法を使用して行うことができるが、ソースコード比較部220が生成した行番号などのコード行識別値を使用して行うことができる。コード実行検査部260は、コード行と、命令とを対応付けた対応テーブルおよび実行済コード集合を管理している。この目的で、ソースコード実行部240およびコード実行検査部260は、デバッガを使用して実装することができ、採用するデバッガとしては、これまで知られたいかなるデバッガでも採用することができる。   The source code execution unit 240 passes the execution result of the instruction to the code execution inspection unit 260, thereby enabling the execution of the instruction and the code, acquisition of the code contents, acquisition of the execution result, and the like. The code can be identified using various methods, but can be performed using a code line identification value such as a line number generated by the source code comparison unit 220. The code execution inspection unit 260 manages a correspondence table in which code lines are associated with instructions and an executed code set. For this purpose, the source code execution unit 240 and the code execution inspection unit 260 can be implemented using a debugger, and any debugger known so far can be adopted as the debugger to be adopted.

コード実行検査部260は、新バージョンの命令が実行されると、対応テーブルを参照して対応するコードを取得し、実行済コードとして当該コードを実行済コード集合に登録する。なお、実行済コード集合のコードを実行順にソーティングしたファイルは、実行トレースとして利用することができる。   When the new version of the instruction is executed, the code execution inspection unit 260 refers to the correspondence table, acquires the corresponding code, and registers the code as an executed code in the executed code set. A file in which the codes of the executed code set are sorted in the execution order can be used as an execution trace.

特定差分コード抽出部270は、差分コード登録部230が登録した差分コード集合と実行済コード集合とを読出し、各集合についての積集合を計算し、特定機能ユニットに関連するコードを抽出する。その後、特定差分コード抽出部270は、抽出されたコードを要素ノードとする特定差分コード集合280を登録する。   The specific difference code extraction unit 270 reads the difference code set and the executed code set registered by the difference code registration unit 230, calculates a product set for each set, and extracts codes related to the specific functional unit. Thereafter, the specific difference code extraction unit 270 registers a specific difference code set 280 having the extracted code as an element node.

なお、特定差分コード集合280を生成する処理の他の実施形態で、コード実行検査部260は、ソースコード実行部240から、実行された命令に対応するコードのコード識別値に加えて、当該コードのコード内容、実行結果がFAILであるか、またはPASSであるかの判定を含むデータを使用して実行済コード集合を生成することができる。この実施形態の場合、特定差分コード抽出部270は、差分コード集合に登録された行番号などの対応する実行済コード集合の登録要素を抽出し、特定差分コード集合280を作成することができる。説明する当該実施形態は、特定差分コード集合280は、ソースコードの特定機能ユニットに関連するコードのデバッグ結果を提供することができる。   In another embodiment of the process of generating the specific difference code set 280, the code execution checking unit 260 receives the code from the source code execution unit 240 in addition to the code identification value of the code corresponding to the executed instruction. The executed code set can be generated using data including the determination of whether the execution result is FAIL or PASS. In the case of this embodiment, the specific difference code extraction unit 270 can extract a registered element of a corresponding executed code set such as a line number registered in the difference code set to create a specific difference code set 280. In the described embodiment, the specific differential code set 280 can provide debug results for code associated with a specific functional unit of source code.

図3は、本実施形態の検証サーバ110による特定差分コード集合280の生成処理300を、行番号などのコード識別値で指定されるコードを各集合の要素ノードとして示した図である。図3に示す生成処理300においては、新バージョンが含む全コードの集合が集合310として示されている。検証サーバ110は、集合310のノードを、変更されないまま残されているコードである継承コード340を、要素ノードとして含む継承コード集合320と、変更または追加などの変更を受けたコード370、380を要素ノードとして含む差分コード集合330とに分離する。なお当該分離は、差分コード登録部230が実行する。なお、集合350は、説明する実施形態では、テストケースにより実行されない特定機能に帰属されるコード370を含む集合である。また、集合360は、差分コード集合330のうち、テストケースにより実行された特定差分コード集合360である。   FIG. 3 is a diagram showing the generation process 300 of the specific difference code set 280 by the verification server 110 of the present embodiment, with codes specified by code identification values such as line numbers as element nodes of each set. In the generation process 300 shown in FIG. 3, a set of all codes included in the new version is shown as a set 310. The verification server 110 includes the inherited code set 320 that includes the inherited code 340 that is the code that remains unchanged as the element node, and the code 370 and 380 that has been changed or added. Separated into a differential code set 330 included as an element node. The separation is performed by the difference code registration unit 230. In the embodiment to be described, the set 350 is a set including a code 370 belonging to a specific function that is not executed by the test case. The set 360 is a specific differential code set 360 executed by a test case in the differential code set 330.

また、特定差分コード抽出部270は、コード実行検査部260の検査により、テストケースの実行に際して実行済みとなったコードである実行済ノード集合の要素ノードと、差分コード集合330の要素ノードとについて積集合を計算する。当該積集合の結果は、要素ノード380を要素とする特定差分コード集合360を与える。   Further, the specific difference code extraction unit 270 checks the element nodes of the executed node set and the element nodes of the difference code set 330, which are codes that have been executed when the test case is executed by the code execution checking unit 260. Compute the intersection. The result of the product set gives a specific difference code set 360 having the element node 380 as an element.

特定差分コード抽出部270は、実行済コード集合が含む全ノードについて積集合を計算した後、特定差分コード集合360を確定させ、検証サーバ110の出力として適切な記憶装置に格納し、検証ログファイルなどとして登録させている。また、他の実施形態では、特定差分コード集合360をクライアント112〜118などに送信し、プログラマによるデバッグ処理などを支援するために利用させ、処理を終了する。   The specific difference code extraction unit 270 calculates the product set for all the nodes included in the executed code set, determines the specific difference code set 360, stores it in an appropriate storage device as the output of the verification server 110, and stores the verification log file. And so on. In another embodiment, the specific difference code set 360 is transmitted to the clients 112 to 118 and used for supporting a debugging process by a programmer, and the process ends.

図4は、本実施形態の検証サーバ110が実行するプログラミング支援方法を構成するコード変更検出処理の概略的なフローチャートを示す。図4の処理は、ステップS400から開始し、ステップS401で機能追加前の旧バージョンと、コードが変更された新バージョンとを読込む。ステップS402では、diffコマンドを含むソースコード比較部220により比較を実行し、新バージョンが含む差分コードのコード識別子を取得し、差分コード集合330に登録する。ステップS403では、特定の機能のみを起動するテストケースを実行させて、実行された命令に対応するコードを実行済コード集合に登録していき、実行済コード集合を作成する。本実施形態で、実行トレースを作成する場合、実行済コード集合の要素ノードを、実行順にソーティングし、適切なリストまたはテーブルとして登録することにより生成される。なお、好ましい実施形態では、実行済コード集合は、実行トレースと同一のデータとして構成することができる。   FIG. 4 shows a schematic flowchart of a code change detection process constituting a programming support method executed by the verification server 110 of this embodiment. The processing in FIG. 4 starts from step S400, and in step S401, the old version before the addition of the function and the new version whose code has been changed are read. In step S <b> 402, the source code comparison unit 220 including the diff command performs comparison, acquires the code identifier of the difference code included in the new version, and registers it in the difference code set 330. In step S403, a test case that activates only a specific function is executed, a code corresponding to the executed instruction is registered in the executed code set, and an executed code set is created. In this embodiment, when creating an execution trace, the element nodes of the executed code set are generated by sorting them in the order of execution and registering them as an appropriate list or table. In a preferred embodiment, the executed code set can be configured as the same data as the execution trace.

ステップS404では、実行済コード集合に登録されたコードが差分コード集合330の要素ノードとして含まれているか否かを判断して積集合を計算し、実行済コード集合に登録されたコードが差分コード集合330に登録されている場合、特定差分コード集合360の要素ノードとして登録し、ステップS405で処理を終了させる。   In step S404, it is determined whether or not the code registered in the executed code set is included as an element node of the difference code set 330, the product set is calculated, and the code registered in the executed code set is the difference code. If it is registered in the set 330, it is registered as an element node of the specific difference code set 360, and the process ends in step S405.

図5は、本実施形態で、コード実行検査部260が実行する、実行済コード集合を生成する処理のフローチャートを示す。図5の処理は、ステップS500から開始し、ステップS501で、実行済コード集合を初期化し、さらに実行命令と新バージョンのソースコードとの対応テーブルを作成する。ステップS502では、ソースコード実行部240により命令を実行させ、ステップS503で、実行された命令に対応するコードのコード識別値を、対応テーブルを参照して取得する。   FIG. 5 shows a flowchart of processing for generating an executed code set executed by the code execution checking unit 260 in the present embodiment. The processing in FIG. 5 starts from step S500, and in step S501, an executed code set is initialized, and a correspondence table between an execution instruction and a new version of source code is created. In step S502, the source code execution unit 240 executes the instruction, and in step S503, the code identification value of the code corresponding to the executed instruction is acquired with reference to the correspondence table.

さらにステップS504で、コード実行検査部260は、取得したコードが実行済コード集合の要素ノードとしてすでに登録されているか否かを判断し、登録されていない場合(no)、ステップS508で取得したコードのコード識別値を実行済コード集合に登録する。また、コード実行検査部260は、他の実施形態においてコード識別値に加え、コード内容および実行結果をソースコード実行部240から取得して、実行済コード集合の要素ノードを作成することができる。   Further, in step S504, the code execution checking unit 260 determines whether or not the acquired code is already registered as an element node of the executed code set, and if not registered (no), the code acquired in step S508. Are registered in the executed code set. In addition, in another embodiment, the code execution inspection unit 260 can acquire the code contents and the execution result from the source code execution unit 240 in addition to the code identification value, and create an element node of the executed code set.

一方、ステップS504で、実行済コード集合に取得した行番号がすでに登録されている場合(yes)には、コード実行検査部260は、処理をステップS505に進め、新バージョンのソースコードの全命令を実行完了したか否かを判断する。ステップS505の判断の結果、全命令の実行が完了していない場合(no)処理をステップS502に分岐させて処理を反復させる。また、ステップS505で全命令の実行が完了したと判断された場合(yes)、処理をステップS506に分岐させて実行済コード集合を確定させ、この実施形態では、さらに実行済コード集合の要素ノードをコードの実行順にソーティングして実行トレースを作成して、処理をステップS507で終了させる。その後、コード実行検査部260は、特定差分コード抽出部270に通知を行い、特定差分コードの抽出を依頼する。   On the other hand, if the acquired line number has already been registered in the executed code set in step S504 (yes), the code execution inspection unit 260 proceeds to step S505 to execute all instructions of the new version of the source code. It is determined whether or not execution has been completed. If it is determined in step S505 that execution of all instructions has not been completed (no), the process branches to step S502 and the process is repeated. If it is determined in step S505 that execution of all instructions has been completed (yes), the process branches to step S506 to determine the executed code set. In this embodiment, the element node of the executed code set is further determined. Are sorted in the code execution order to create an execution trace, and the process ends in step S507. Thereafter, the code execution inspection unit 260 notifies the specific difference code extraction unit 270 to request extraction of the specific difference code.

図6は、本実施形態が適用されるソースコードのバージョンと、当該バージョンに対応するテストケースの抽出処理600の実施形態を示す。ソースコードは、複数のプログラマにより独立して、コード領域または関数などのユニット単位で作成される。そして、特定ソリューションを解決するためのプログラムが完成するまで、プログラムに対する機能の変更が、繰返し行われ、ソースコードがバージョンアップされている。例えば、ソースコード610では、機能αに対応するユニット612が追加されていて、バージョン名として、バージョンvx.xが与えられている。バージョンの登録履歴は、テストケース・サーバ120と検証サーバ110との間で、ソースコード・バージョンと、テストケースとを対応付けるように同期化処理が行われており、適切なテストケースを、検証するべきソースコード・バージョンに対応付けられている。 FIG. 6 shows an embodiment of a source code version to which the present embodiment is applied and a test case extraction process 600 corresponding to the version. The source code is created in units of units such as code areas or functions independently by a plurality of programmers. Then, until the program for solving the specific solution is completed, the function of the program is repeatedly changed, and the source code is upgraded. For example, in the source code 610, a unit 612 corresponding to the function α is added, and version v x. x is given. The version registration history is synchronized between the test case server 120 and the verification server 110 so that the source code version is associated with the test case, and an appropriate test case is verified. Corresponding to the source code version to be.

また、プログラマは、ユニット612を追加した場合、ユニット612の全コードを実行させることができるテストケース614を作成し、テストケース・サーバ120に登録する。   Further, when the unit 612 is added, the programmer creates a test case 614 that can execute all the codes of the unit 612 and registers it in the test case server 120.

その後、プログラマによりソースコードに対して機能βに対応するユニット622が追加されたソースコード620が、バージョン名=バージョンvx.x+1として登録される。このとき、テストケース・サーバ120には、プログラマから、テストケース624が送付され、登録される。さらにその後、プログラマにより、機能Aおよび機能γに対応するユニット632、634が追加されていて、追加されたソースコードに対してバージョン名=バージョンvx.x+2が付されている。本実施形態では、バージョンvx.x+2が新バージョンであり、バージョンvx.x+1が旧バージョンである。ソースコード630では、追加機能Aおよび追加機能γに対応して、機能Aの全コードおよび機能γの全コードを実行するためのテストケース636、638がテストケース・サーバ120に登録される。 Thereafter, the source code 620 in which the unit 622 corresponding to the function β is added to the source code by the programmer is represented by version name = version v x. Registered as x + 1 . At this time, a test case 624 is sent from the programmer to the test case server 120 and registered. Further, after that, units 632 and 634 corresponding to the function A and the function γ are added by the programmer, and the version name = version v x. x + 2 is attached. In this embodiment, the version v x. x + 2 is the new version, version v x. x + 1 is the old version. In the source code 630, corresponding to the additional function A and the additional function γ, test cases 636 and 638 for executing all the codes of the function A and all the codes of the function γ are registered in the test case server 120.

本実施形態の検証サーバ110は、ソースコードに追加または修正された特定機能ユニットを分離してテストケースを読込み、ソースコードを実行することにより、特定の機能に関連する差分コードを識別することを可能とする。この目的のため、テストケース取得部250は、例えば新バージョン=バージョンvx.x+2が登録された時点までに登録されたテストケースのうち、テストの目的に応じたテストケースを抽出する処理を実行する。テストケース取得部250がテストケースを抽出するための判断基準としては、種々の実施形態を採用することができる。 The verification server 110 of this embodiment identifies a differential code related to a specific function by reading a test case by separating a specific functional unit added or modified in the source code and executing the source code. Make it possible. For this purpose, the test case acquisition unit 250 uses, for example, new version = version v x. A process for extracting a test case corresponding to the purpose of the test from the test cases registered up to the time point when x + 2 is registered is executed. Various embodiments can be adopted as a criterion for the test case acquisition unit 250 to extract a test case.

例えば、テストケースを取得する場合の、第1の実施形態では、新バージョンであるソースコード630と、旧バージョンのソースコード620とについて割り当てられる同期情報を参照し、旧バージョンが登録された後、新バージョンが登録されるまでにテストケース・サーバ120に登録されたテストケースを順次抽出する実施形態である。なお、同期情報は、ソースコードおよびテストケースの対応付けを行うことができる限り、タイムスタンプでも良いし、シリアル番号でも良いし、その他時系列的な動機付けを可能とする限り、いかなる値、フォーマットとすることができる。この実施形態について図6を使用して説明すると、例えば、新バージョンのソースコード630が登録された時刻では、テストケース614、テストケース624の他、新バージョンの登録までにテストケース636、638の2テストケースが登録されている。各テストケース614、624、636、638には、それぞれテストケース・サーバ120に登録された時刻を示すタイムスタンプが付されている。   For example, in the first embodiment when acquiring a test case, after referring to the synchronization information assigned to the source code 630 which is the new version and the source code 620 of the old version, the old version is registered, In this embodiment, test cases registered in the test case server 120 are sequentially extracted until a new version is registered. The synchronization information may be a time stamp or serial number as long as the source code can be associated with the test case. It can be. This embodiment will be described with reference to FIG. 6. For example, at the time when the new version of the source code 630 is registered, the test cases 636 and 638 are registered before the new version is registered in addition to the test case 614 and the test case 624. Two test cases are registered. Each test case 614, 624, 636, 638 is given a time stamp indicating the time registered in the test case server 120.

第1の実施形態では、例えば、テストケース636が先に登録され、テストケース638が時間的に後に登録され、その後に新バージョンvx.x+2が登録されたものとして説明する。検証サーバ110は、旧バージョンの同期情報を参照し、当該同期情報より以後に登録されたテストケース636、638を読込んで、順に例えば実行キューに登録する。その後、テストケース636を実行させて、テストケース636に対応する特定差分コード集合を生成する。その後、テストケース638を実行させてテストケース638に対応する第2特定差分コード集合を生成することにより、特定の機能ごとに関連する差分コードを識別して抽出することが可能となる。 In the first embodiment, for example, the test case 636 is registered first, the test case 638 is registered later in time, and then the new version v x. A description will be given assuming that x + 2 is registered. The verification server 110 refers to the synchronization information of the previous version, reads the test cases 636 and 638 registered after that from the synchronization information, and sequentially registers them in, for example, the execution queue. Thereafter, the test case 636 is executed, and a specific difference code set corresponding to the test case 636 is generated. Thereafter, the test case 638 is executed to generate a second specific difference code set corresponding to the test case 638, so that it is possible to identify and extract a difference code related to each specific function.

特定差分コード集合は、テストケースごとに独立したデータセットとして作成することもできるし、テストケースごとに生成される特定差分コード集合を統合して、テストケースごとに識別されたリストとして作成することもできる。特定差分コード集合を、プログラマに対してデバッグ結果として提示する実施形態の場合には、テストケースごとに異なる特定差分コード集合を生成する実施形態が、以後のデバッグ結果を報告する上では好ましい。   A specific differential code set can be created as an independent data set for each test case, or a specific differential code set generated for each test case can be integrated and created as a list identified for each test case. You can also. In the embodiment in which the specific difference code set is presented as a debug result to the programmer, an embodiment in which a different specific difference code set is generated for each test case is preferable in reporting subsequent debug results.

生成された特定差分コード集合は、検証サーバ110の検証ログファイルとして格納することもできる。さらに、特定差分コード集合は、特定差分コード集合の要素ノードの実行結果とともに検証サーバ110から、デバッグ結果報告としてテストケースを作成したプログラマが管理するクライアントまたは管理者の端末コンピュータに返却され、以後の処理に利用することができる。   The generated specific difference code set can also be stored as a verification log file of the verification server 110. Furthermore, the specific difference code set is returned from the verification server 110 together with the execution result of the element node of the specific difference code set to the client or administrator terminal computer managed by the programmer who created the test case as a debug result report. Can be used for processing.

テストケースを抽出する際の第2の実施形態は、追加・修正されたユニットにテストケースを指定するケース指示コードを埋込んでおく実施形態である。ケース指示コードは、ユニット名、機能名、(作成者+バージョン名)の識別値セットなどを使用することができ、ファイル名、コメント行などとして埋め込むことができる。第2の実施形態の場合、テストケース取得部250は、ファイル名、ユニット名などの指示コードを新バージョンから取得する。   The second embodiment for extracting a test case is an embodiment in which a case instruction code for designating a test case is embedded in an added / modified unit. The case instruction code can use a unit name, function name, (creator + version name) identification value set, etc., and can be embedded as a file name, a comment line, or the like. In the case of the second embodiment, the test case acquisition unit 250 acquires instruction codes such as a file name and a unit name from the new version.

その後、テストケースDB150に対してテストケースの照会要求を発行し、対応するテストケースを取得し、ソースコード実行部240に実行させることができる。この実施形態の場合、複数のテストケースが抽出された場合、登録時刻などの順に実行キューにテストケースを登録し、実行させる点では第1の実施形態と同様である。また、抽出された特定差分コード集合を適宜統合して検証ログまたはデバッグ結果を作成してもよい。   Thereafter, a test case inquiry request can be issued to the test case DB 150 to obtain a corresponding test case, which can be executed by the source code execution unit 240. In the case of this embodiment, when a plurality of test cases are extracted, the test cases are registered in the execution queue in the order of registration time and executed, and the same as in the first embodiment. Further, the verification log or the debug result may be created by appropriately integrating the extracted specific difference code sets.

図7は、本実施形態が適用されるソースコード700の実施形態を示す。図7に示すソースコード700は、特定機能を提供するユニットに対応する旧バージョンであり、プログラマは、ソースコード700に対して機能追加、機能変更などを目的としてクライアント112〜118においてコーディングを行う。コーディングが終了した後、変更コードを、新バージョンの作成のために検証サーバ110に送付する。   FIG. 7 shows an embodiment of source code 700 to which this embodiment is applied. A source code 700 illustrated in FIG. 7 is an old version corresponding to a unit that provides a specific function, and a programmer performs coding on the source code 700 in the clients 112 to 118 for the purpose of adding a function or changing a function. After coding is complete, the change code is sent to the verification server 110 for creation of a new version.

図8は、プログラマによるコーディングの結果、変更された新バージョンのソースコード800を示す。新バージョンでは、function1()で指定される機能とは異なる、function2()および関連する機能が追加され、複数の機能に対応するコードを含んだ構成に変更されている。なお、特定のコード行については削除されているがより詳細には後述する。   FIG. 8 shows a new version of source code 800 that has been modified as a result of coding by the programmer. In the new version, function2 () and related functions, which are different from the functions specified by function1 (), have been added, and the configuration has been changed to include code corresponding to multiple functions. A specific code line has been deleted, but will be described in detail later.

図7および図8を参照して理解されるように、旧バージョンと新バージョンとの間で、どのコードが変更されたかを直感的に認識することは困難である。そして、この状況下で、これらのコードを一括して検証・デバッグ処理しても、XPなどのプログラミング開発環境にあるプログラマは、却ってソースコードの理解および解釈に余分な時間を費やすことになる。このため、特定機能ユニットに関連付けてコード・セットを抽出することが必要である。   As can be understood with reference to FIGS. 7 and 8, it is difficult to intuitively recognize which code has been changed between the old version and the new version. In this situation, even if these codes are collectively verified and debugged, a programmer in a programming development environment such as XP spends extra time understanding and interpreting the source code. For this reason, it is necessary to extract a code set in association with a specific functional unit.

図9は、ソースコード比較部220による比較結果の実施形態を示す。ソースコード比較部220は、diffコマンドを含んで構成されており、新バージョンおよび旧バージョンにそれぞれ行番号を付し、コード内容が不一致のコード行を識別して行マーキング、コード・リストなどの形式で差分コードを抽出する。例えば図9を使用して説明すると、図9では、コード領域910は、新バージョンにおいて削除されたコード領域であり、コード領域920、940は、新バージョンで変更された機能Aに対応するコード領域である。   FIG. 9 shows an embodiment of a comparison result by the source code comparison unit 220. The source code comparison unit 220 includes a diff command, adds line numbers to the new version and the old version, identifies code lines whose code contents do not match, forms line marking, code list, etc. To extract the difference code. For example, referring to FIG. 9, in FIG. 9, the code area 910 is a code area deleted in the new version, and the code areas 920 and 940 are code areas corresponding to the function A changed in the new version. It is.

また、コード領域930は、新バージョンで追加された機能Bに対応するコード領域である。差分コード登録部230は、図9に示した差分コードであって、新バージョンに存在するコードの行番号を抽出し、差分コード集合として登録する。図9に示した実施形態では、行番号12、13、行番号20−30、行番号42−46が、差分コード集合の要素ノードとして登録される。   The code area 930 is a code area corresponding to the function B added in the new version. The difference code registration unit 230 extracts the line number of the code that is the difference code shown in FIG. 9 and exists in the new version, and registers it as a difference code set. In the embodiment shown in FIG. 9, line numbers 12 and 13, line numbers 20-30, and line numbers 42-46 are registered as element nodes of the difference code set.

図10は、図8に示した新バージョンのためのテストケース1000の実施形態を示す。なお、図10に示したテストケース1000は、図9のソースコードのコード領域特定機能Aに関連するコードを特定するためのテストケースである。テストケース1000は、新バージョンのソースコード800が含む特定機能に関連する関数およびメソッドを網羅的に呼び出すようにしてコーディングされ、例示的な実施形態では、例えばtestcase_compomnentAなどとしてファイル名が付され、テストケース・サーバに登録された時刻が、同期情報として付されて登録されている。   FIG. 10 shows an embodiment of a test case 1000 for the new version shown in FIG. A test case 1000 shown in FIG. 10 is a test case for specifying a code related to the code area specifying function A of the source code in FIG. The test case 1000 is coded to exhaustively call functions and methods related to specific functions included in the new version of the source code 800. In the exemplary embodiment, the test case 1000 is given a file name, for example, testcase_compomnentA. The time registered in the case server is added and registered as synchronization information.

テストケース取得部250は、ケース指示コードや、タイムスタンプなどの同期情報を参照してテストケースを特定し、複数のテストケースが取得された場合、実行キューに格納し、複数のテストケースについて順次的にソースコードを実行させ、その実行トレースを使用して特定差分コード集合を生成させている。   The test case acquisition unit 250 identifies a test case with reference to synchronization information such as a case instruction code and a time stamp. When a plurality of test cases are acquired, the test case acquisition unit 250 stores the test cases in the execution queue and sequentially The source code is executed, and a specific differential code set is generated using the execution trace.

図11は、テストケース1000を実行したときに生成される実行トレースの実施形態を、実行されたコード領域に対応付けて示した図である。実行トレース1100は、テストケース1000によって呼出されたソースコード800のコード行が実行された順にコード識別値をソーティングして登録されている。実行トレースの要素ノードは、例えば、コードの行番号、コード内容、実行結果などを含ませて、実行済コード集合の要素ノードと同様の構成として生成することができる。図11に示した実施形態では、実行トレース1100では、各コード行の実行結果も併せて表示されていて、実行トレース1100は、デバッグ結果も提供している。   FIG. 11 is a diagram showing an embodiment of an execution trace generated when the test case 1000 is executed in association with the executed code area. The execution trace 1100 is registered by sorting the code identification values in the order in which the code lines of the source code 800 called by the test case 1000 are executed. The element node of the execution trace can be generated as the same configuration as the element node of the executed code set by including the line number of the code, the code contents, the execution result, and the like. In the embodiment shown in FIG. 11, the execution trace 1100 also displays the execution result of each code line, and the execution trace 1100 also provides the debug result.

図11には、実行トレース1100にリストされたコード行の内容を、説明の便宜上、ソースコード800に実行トレースの実行順を重畳して示した実行コード・リスト1150を示す。実行コード・リスト1150は、実行トレースのコード内容として実行トレース自体に含ませることができる。実行コード・リスト1150を参照すると、まず実行番号(1)で関数super()が呼出され、実行番号(2)で、SampleCommon()が宣言された後、実行番号(3)で値sum、numが計算され、その計算のために実行番号(4)、(5)で関数commonMethod1()、commonMethod2()が呼出されている。実行番号(5)では、実行番号(6)で関数privateMethod1()が呼出され、privateMethod1()では、戻り値=sum/numが計算されていて、0で除算するエラーが発生している。   FIG. 11 shows an execution code list 1150 showing the contents of the code lines listed in the execution trace 1100 with the execution trace execution order superimposed on the source code 800 for convenience of explanation. The execution code list 1150 can be included in the execution trace itself as the code contents of the execution trace. Referring to the execution code list 1150, first, the function super () is called with the execution number (1), SampleCommon () is declared with the execution number (2), and then the values sum and num are set with the execution number (3). Are calculated, and the functions commonMethod1 () and commonMethod2 () are called at the execution numbers (4) and (5) for the calculation. In the execution number (5), the function privateMethod1 () is called at the execution number (6). In the privateMethod1 (), the return value = sum / num is calculated, and an error that divides by 0 occurs.

なお、図10を参照すると、テストケース1000は、sum/numの値が返された時点で処理を終了する。コード領域930に対応するコードは、呼出されずに終了している。このため、テストケース1000は、特定機能ユニットのみを呼出し、実行させていることが分かる。
また、実行番号(6)で発生したエラーは、実行結果としてFAILが付され、実行トレース1100に追加されている。
Referring to FIG. 10, the test case 1000 ends the process when the sum / num value is returned. The code corresponding to the code area 930 is terminated without being called. Therefore, it can be seen that the test case 1000 calls and executes only a specific functional unit.
In addition, an error that has occurred in the execution number (6) is assigned FAIL as an execution result and added to the execution trace 1100.

図11に示した実行トレース1100は、テーブル、リストの形式として検証サーバ110が管理する。また、情報処理システム100の特定の実装形式および目的に応じて管理者にレポートすることもできる。また、さらに他の実施形態では、ソースコードおよびテストケースを作成したプログラマに、特定差分コード集合360または実行トレース1100をデバッグ処理結果として送付することもできる。   The execution trace 1100 illustrated in FIG. 11 is managed by the verification server 110 as a table / list format. In addition, it is possible to report to an administrator according to a specific mounting format and purpose of the information processing system 100. In still another embodiment, the specific differential code set 360 or the execution trace 1100 can be sent as a debug processing result to the programmer who created the source code and the test case.

実行トレース1100を直接管理者またはプログラマにレポートするのではなく、特定差分コード集合360を作成してする場合に、特定差分コード集合360に、コード識別値に対応付けてコード内容および実行結果を含ませてもよい。この実施形態の場合、特定差分コード集合360のみを対象とするデバッグ結果が生成され、プログラマに対し送付することができる。またデバッグ結果は、または検証サーバ110が検証結果ログとして登録することもできる。本実施形態のプログラミング支援の目的に応じていかなるようにデータ可能されてもよい。   When creating the specific difference code set 360 instead of reporting the execution trace 1100 directly to the administrator or programmer, the specific difference code set 360 includes code contents and execution results in association with the code identification values. You may not. In the case of this embodiment, a debug result for only the specific difference code set 360 is generated and can be sent to the programmer. The debug result can also be registered as a verification result log by the verification server 110. Any data may be possible depending on the purpose of the programming support of the present embodiment.

図12は、図11に示した実行トレースを与えるソースコード800を使用して、特定差分コード集合360が生成される処理の概略図である。なお、図12には、特定差分コード集合360の実施形態も示されている。ソースコード800は、図11に示すように、行番号1〜48までを含んでおり、これらのうち、行番号12、13、行番号20〜30、行番号42〜46が差分コードとして識別される。そして、行番号1〜11、行番号14〜19、行番号31〜41は、変更のない旧バージョンから継承したコードである。検証サーバ110は、差分コード登録部230を起動して、図12に示すようにソースコード800のコードを継承コード集合1220と、差分コード集合={集合1230∪集合1250}とに分類する。   FIG. 12 is a schematic diagram of a process in which the specific difference code set 360 is generated using the source code 800 that gives the execution trace shown in FIG. FIG. 12 also shows an embodiment of the specific difference code set 360. As shown in FIG. 11, the source code 800 includes line numbers 1 to 48. Of these, line numbers 12 and 13, line numbers 20 to 30, and line numbers 42 to 46 are identified as difference codes. The Line numbers 1 to 11, line numbers 14 to 19, and line numbers 31 to 41 are codes inherited from the old version without any change. The verification server 110 activates the differential code registration unit 230 and classifies the codes of the source code 800 into an inherited code set 1220 and a differential code set = {set 1230∪set 1250} as shown in FIG.

そして、ソースコード実行部240による実行命令をコード実行検査部260が検査し、実行済コード集合および実行トレースを生成し、差分コード集合{集合1230∪集合1250}に含まれる要素ノードであって、実行トレースにも存在するコード1240を特定差分コード集合1250の要素として分離して登録する。図12では、実行済コード集合1270を参考のために破線で示す。この結果、ソースコード800が含むコードが、継承コード集合1220、特定差分コード集合1250、および差分コード集合1230に分類される。これらの集合のうち、コード1240からなる特定差分コード集合1250を検証結果として生成することで、特定機能ユニットごとに検証を行うことが可能となる。   The code execution inspection unit 260 inspects an execution instruction from the source code execution unit 240, generates an executed code set and an execution trace, and is an element node included in the difference code set {set 1230 集合 set 1250}, A code 1240 that also exists in the execution trace is separated and registered as an element of the specific difference code set 1250. In FIG. 12, the executed code set 1270 is indicated by a broken line for reference. As a result, the codes included in the source code 800 are classified into an inherited code set 1220, a specific differential code set 1250, and a differential code set 1230. Of these sets, by generating a specific difference code set 1250 made up of codes 1240 as a verification result, verification can be performed for each specific functional unit.

図12に示した特定差分コード集合1250は、ソースコード800のうち、図11に示した機能Aに関連する差分コードのみを含み、その要素ノードは、行番号12、13、行番号42〜46のコード識別値、また他の実施形態ではコード内容および実行結果を含むものとされる。なお、図9のコード領域930に対応する行番号20〜30のコードは、差分コード集合1230に登録されたままとされている。   The specific differential code set 1250 shown in FIG. 12 includes only the differential code related to the function A shown in FIG. 11 in the source code 800, and its element nodes are line numbers 12, 13, and line numbers 42 to 46. Code identification values, and in other embodiments, code contents and execution results. Note that the codes of line numbers 20 to 30 corresponding to the code area 930 in FIG. 9 remain registered in the difference code set 1230.

以上説明したように、本実施形態では、ソースコードが複数の変更を受けている可能性がある場合に、特定の機能を指定して変更を受けたコードのみを抽出することができるので、より効率的なデバッグ処理を可能とし、効率的なプログラミング支援技術を提供することができる。   As described above, in this embodiment, when there is a possibility that the source code has undergone a plurality of changes, it is possible to extract only the code that has been changed by designating a specific function. Efficient debugging processing is possible, and efficient programming support technology can be provided.

さらに本実施形態によれば、複数のプログラマが並列的にソリューションを進化させて行く、アジャイルな環境下でのプログラム開発における、FVT(Function Verification Test)またはSVT(Site Verification Test)の効率を向上させることができる。   Furthermore, according to the present embodiment, the efficiency of FVT (Function Verification Test) or SVT (Site Verification Test) is improved in program development under an agile environment in which a plurality of programmers evolve a solution in parallel. be able to.

本実施形態の上記機能は、C、C++、Java(登録商標)、Java(登録商標)Beans、Java(登録商標)Applet、Java(登録商標)Script、Perl、Rubyなど、レガシープログラミング言語またはオブジェクト指向プログラミング言語などで記述された装置実行可能なプログラムにより実現でき、当該プログラムは、ハードディスク装置、CD−ROM、MO、フレキシブルディスク、EEPROM、EPROMなどの装置可読な記録媒体に格納して頒布することができ、また他装置が可能な形式でネットワークを介して伝送することができる。   The functions of the present embodiment are legacy programming languages or object-oriented such as C, C ++, Java (registered trademark), Java (registered trademark) Beans, Java (registered trademark) Applet, Java (registered trademark) Script, Perl, and Ruby. It can be realized by a device-executable program written in a programming language or the like, and the program can be stored in a device-readable recording medium such as a hard disk device, CD-ROM, MO, flexible disk, EEPROM, EPROM and distributed. It can also be transmitted over the network in a format that other devices are capable of.

これまで本実施形態につき説明してきたが、本発明は、上述した実施形態に限定されるものではなく、他の実施形態、追加、変更、削除など、当業者が想到することができる範囲内で変更することができ、いずれの態様においても本発明の作用・効果を奏する限り、本発明の範囲に含まれるものである。   Although the present embodiment has been described so far, the present invention is not limited to the above-described embodiment, and other embodiments, additions, changes, deletions, and the like can be conceived by those skilled in the art. It can be changed, and any aspect is within the scope of the present invention as long as the effects and effects of the present invention are exhibited.

本実施形態の情報処理システム100の機能ブロック図。The functional block diagram of the information processing system 100 of this embodiment. 本実施形態の検証サーバ110のソフトウェア・ブロック図。The software block diagram of the verification server 110 of this embodiment. 本実施形態の検証サーバ110による特定差分コード集合280の生成処理300を、コード識別値で指定されるコードを各集合のノードとして示した図。The figure which showed the generation process 300 of the specific difference code set 280 by the verification server 110 of this embodiment as a node of each set by the code designated by the code identification value. 本実施形態の検証サーバ110が実行するコード変更検出処理の概略的なフローチャート。4 is a schematic flowchart of code change detection processing executed by the verification server 110 according to the present embodiment. 本実施形態で、コード実行検査部260が実行する処理のフローチャート。The flowchart of the process which the code execution test | inspection part 260 performs in this embodiment. 本実施形態が適用されるソースコードのバージョンと、当該バージョンに対応するテストケースの抽出処理600の実施形態を示した図。The figure which showed embodiment of the version of the source code to which this embodiment is applied, and the extraction process 600 of the test case corresponding to the said version. 本実施形態が適用されるソースコード700の実施形態を示した図。The figure which showed embodiment of the source code 700 with which this embodiment is applied. プログラマによるコーディングの結果、変更された新バージョンのソースコード800を示した図。The figure which showed the source code 800 of the new version changed as a result of the coding by the programmer. ソースコード比較部220による比較結果の実施形態を示した図。The figure which showed embodiment of the comparison result by the source code comparison part 220. FIG. 図8に示した新バージョンのためのテストケース1000の実施形態を示した図。FIG. 9 shows an embodiment of a test case 1000 for the new version shown in FIG. テストケース1000を実行したときに生成される実行トレースの実施形態を、実行されたコード領域に対応付けて示した図。The figure which matched the embodiment of the execution trace produced | generated when the test case 1000 was performed matched with the executed code area | region. 図11に示した実行トレースを与えるソースコード800を使用して、特定差分コード集合360が生成される処理の概略図。FIG. 12 is a schematic diagram of processing in which a specific differential code set 360 is generated using the source code 800 that gives the execution trace shown in FIG. 11. 従来のdiffコマンドを使用するソースコードの概略的な変更検査手順1300を示した図。The figure which showed the rough change inspection procedure 1300 of the source code which uses the conventional diff command. 2つソースコードのバージョンを比較して比較結果情報を生成し、現行バージョンを実行形式に変換してテストケースにより試験する従来処理のフローチャート。The flowchart of the conventional process which compares the version of two source codes, produces | generates comparison result information, converts the current version into an execution format, and tests with a test case.

符号の説明Explanation of symbols

100…情報処理システム、110…検証サーバ、112〜118…ネットワーク・クライアント、120…テストケース・サーバ、130…ネットワーク、140…ソースコード・データベース、150…テストケース・データベース、160…ソースコード、170…テストケース、200…ソフトウェア・ブロック(検証サーバ)、210…ソースコード読取部、220…ソースコード比較部、230…差分コード登録部、240…ソースコード実行部、250…テストケース取得部、260…コード実行検査部、270…特定差分コード抽出部、280…特定差分コード集合 DESCRIPTION OF SYMBOLS 100 ... Information processing system 110 ... Verification server, 112-118 ... Network client, 120 ... Test case server, 130 ... Network, 140 ... Source code database, 150 ... Test case database, 160 ... Source code, 170 Test case 200 Software block (verification server) 210 Source code reading unit 220 Source code comparison unit 230 Difference code registration unit 240 Source code execution unit 250 Test case acquisition unit 260 ... code execution inspection unit, 270 ... specific difference code extraction unit, 280 ... specific difference code set

Claims (21)

ソースコードの変更を検出する情報処理装置であって、前記情報処理装置は、
前記ソースコードの新バージョンと旧バージョンとを取得するソースコード読取部と、
前記新バージョンと前記旧バージョンとの間でコードの相違を比較するソースコード比較部と、
相違した前記コードを抽出して差分コード集合を生成する差分コード登録部と、
変更された前記ソースコードの特定機能ユニットに関連する全コードを実行させるため、変更に対応して前記旧バージョン以降に追加されたテストケースを取得して前記テストケースを実行させるソースコード実行部と、
前記テストケースの実行により実行されたコードを検出し、実行済コード集合に登録するコード実行検査部と、
前記差分コード集合と前記実行済コード集合の積集合を計算して前記特定機能ユニットに関連して変更されたコードを要素ノードとする特定差分コード集合を生成する特定差分コード抽出部と
を含む、情報処理装置。
An information processing apparatus for detecting a change in source code, wherein the information processing apparatus includes:
A source code reading unit for acquiring a new version and an old version of the source code;
A source code comparison unit for comparing code differences between the new version and the old version;
A differential code registration unit for extracting the different codes and generating a differential code set;
A source code execution unit for acquiring a test case added after the old version corresponding to the change and executing the test case in order to execute all code related to the specific functional unit of the changed source code; ,
A code execution inspection unit for detecting the code executed by the execution of the test case and registering it in the executed code set;
A specific differential code extraction unit that calculates a product set of the differential code set and the executed code set and generates a specific differential code set having a code changed in association with the specific functional unit as an element node; Information processing device.
前記情報処理装置は、テストケース取得部を含み、前記テストケース取得部は、前記新バージョンが登録される以前に追加され、前記特定機能ユニットの前記変更に関連するコードを実行させるテストケースを検索して取得する、請求項1に記載の情報処理装置。   The information processing apparatus includes a test case acquisition unit, and the test case acquisition unit is added before the new version is registered, and searches for a test case that executes a code related to the change of the specific functional unit. The information processing apparatus according to claim 1, acquired by 前記コード実行検査部は、前記実行済コード集合の前記要素ノードを実行順に登録する実行トレースを生成する、請求項2に記載の情報処理装置。   The information processing apparatus according to claim 2, wherein the code execution inspection unit generates an execution trace that registers the element nodes of the executed code set in an execution order. 前記実行済コード集合の前記要素ノードは、実行されたコードのコード識別値および実行結果を含み、前記特定差分コード集合は、前記特定機能ユニットの変更に対応するデバッグ結果を提供する、請求項3に記載の情報処理装置。   The element node of the executed code set includes a code identification value and an execution result of the executed code, and the specific differential code set provides a debug result corresponding to the change of the specific functional unit. The information processing apparatus described in 1. 前記ソースコードの変更は、エクストリーム・プログラミング環境で実行され、前記情報処理装置は、前記特定機能ユニットの変更に対する機能検証試験またはサイト検証試験を実行する、請求項4に記載の情報処理装置。   The information processing apparatus according to claim 4, wherein the source code change is executed in an extreme programming environment, and the information processing apparatus executes a function verification test or a site verification test for the change of the specific function unit. 前記特定差分コード集合は、前記ソースコードの変更に対応付けられた前記テストケースごとに作成される、請求項5に記載の情報処理装置。   The information processing apparatus according to claim 5, wherein the specific difference code set is created for each of the test cases associated with the change of the source code. ソースコードの変更を検出する検証サーバを含む情報処理システムであって、前記情報処理システムは、
ネットワークを介して接続され、前記ソースコードの特定機能ユニットを変更するネットワーク・クライアントと、
前記ネットワーク・クライアントによる特定機能ユニットに関連するコード・セットを受領してソースコードの旧バージョンから新バージョンを生成して前記旧バージョンおよび前記新バージョンを登録する検証サーバとを含み、前記検証サーバは、
前記ソースコードの新バージョンと旧バージョンとを取得するソースコード読取部と、
前記新バージョンと前記旧バージョンとの間でコードの相違を比較するソースコード比較部と、
相違した前記コードを抽出して差分コード集合を生成する差分コード登録部と、
変更された前記ソースコードの前記特定機能ユニットに関連する全コードを実行させるため変更に対応して前記旧バージョン以降に追加されたテストケースを取得して前記テストケースを実行させるソースコード実行部と、
前記テストケースの実行により実行されたコードを検出し、実行済コード集合に登録するコード実行検査部と、
前記差分コード集合と前記実行済コード集合の積集合を計算して前記特定機能ユニットに関連して変更されたコードを要素ノードとする特定差分コード集合を生成する特定差分コード抽出部と
を含む、情報処理システム。
An information processing system including a verification server for detecting a change in source code, wherein the information processing system includes:
A network client connected via a network and changing a specific functional unit of the source code;
A verification server that receives a code set associated with a specific functional unit by the network client, generates a new version from an old version of source code, and registers the old version and the new version, the verification server comprising: ,
A source code reading unit for acquiring a new version and an old version of the source code;
A source code comparison unit for comparing code differences between the new version and the old version;
A differential code registration unit for extracting the different codes and generating a differential code set;
A source code execution unit for acquiring a test case added after the old version corresponding to the change and executing the test case in order to execute all code related to the specific functional unit of the changed source code; ,
A code execution inspection unit for detecting the code executed by the execution of the test case and registering it in the executed code set;
A specific differential code extraction unit that calculates a product set of the differential code set and the executed code set and generates a specific differential code set having a code changed in association with the specific functional unit as an element node; Information processing system.
前記検証サーバは、テストケース取得部を含み、前記テストケース取得部は、前記新バージョンが登録される以前に追加され、前記特定機能ユニットの前記変更に関連するコードを実行させるテストケースを検索して取得する、請求項7に記載の情報処理システム。   The verification server includes a test case acquisition unit, and the test case acquisition unit searches for a test case that is added before the new version is registered and that executes code related to the change of the specific functional unit. The information processing system according to claim 7, wherein the information processing system is acquired. 前記コード実行検査部は、前記実行済コード集合の前記要素ノードを実行順に登録する実行トレースを生成する、請求項8に記載の情報処理システム。   The information processing system according to claim 8, wherein the code execution inspection unit generates an execution trace for registering the element nodes of the executed code set in an execution order. 前記実行済コード集合の前記要素ノードは、実行されたコードのコード識別値および実行結果を含み、前記特定差分コード集合は、前記特定機能ユニットの変更に対応するデバッグ結果を提供する、請求項9に記載の情報処理システム。   The element node of the executed code set includes a code identification value of an executed code and an execution result, and the specific differential code set provides a debug result corresponding to the change of the specific functional unit. Information processing system described in 1. 前記ソースコードの変更は、エクストリーム・プログラミング環境で実行され、前記検証サーバは、前記特定機能ユニットの変更に対する機能検証試験またはサイト検証試験を実行する、請求項10に記載の情報処理システム。   The information processing system according to claim 10, wherein the source code change is executed in an extreme programming environment, and the verification server executes a function verification test or a site verification test for the change of the specific functional unit. 情報処理装置がソースコードの変更を特定機能ユニットに関連付けて検出するプログラミング支援方法であって、前記プログラミング支援方法は、前記情報処理装置が、
前記ソースコードの新バージョンと旧バージョンとを取得するステップと、
前記新バージョンと前記旧バージョンとの間でコードの相違を比較するステップと、
相違した前記コードを抽出して差分コード集合を生成するステップと、
変更された前記ソースコードの特定機能ユニットに関連する全コードを実行させるため変更に対応して前記旧バージョン以降に追加されたテストケースを取得して前記テストケースを実行させるステップと、
前記テストケースの実行により実行されたコードを検出し、実行済コード集合に登録するステップと、
前記差分コード集合と前記実行済コード集合の積集合を計算して前記特定機能ユニットに関連して変更されたコードを要素ノードとする特定差分コード集合を生成するステップと
を実行する、プログラミング支援方法。
A programming support method in which an information processing device detects a change in source code in association with a specific function unit, the programming support method comprising:
Obtaining a new version and an old version of the source code;
Comparing code differences between the new version and the old version;
Extracting the different codes to generate a differential code set;
Obtaining a test case added after the previous version in response to a change in order to execute all the code related to the specific functional unit of the changed source code, and executing the test case;
Detecting code executed by execution of the test case and registering it in an executed code set;
A step of calculating a product set of the differential code set and the executed code set to generate a specific differential code set having a code changed in association with the specific functional unit as an element node. .
前記プログラミング支援方法は、さらに前記テストケースを取得するステップを含み、前記テストケースを取得するステップは、前記新バージョンが登録される以前に追加され、前記特定機能ユニットの前記変更に関連するコードを実行させるテストケースを検索して取得するステップを含む、請求項12に記載の方法。   The programming support method further includes the step of obtaining the test case, and the step of obtaining the test case is added before the new version is registered, and includes code related to the change of the specific functional unit. The method according to claim 12, comprising searching and obtaining a test case to be executed. 前記テストケースを実行させるステップは、前記実行済コード集合の前記要素ノードを実行順に登録する実行トレースを生成するステップを含み、さらに、前記プログラミング支援方法は、
前記実行済コード集合の前記要素ノードに、実行されたコードのコード識別値および実行結果を追加するステップと、
前記特定差分コード集合により、前記特定機能ユニットの変更に対応するデバッグ結果を提供するステップとを含む、請求項13に記載の方法。
The step of executing the test case includes a step of generating an execution trace that registers the element nodes of the executed code set in an execution order, and the programming support method further includes:
Adding a code identification value and an execution result of the executed code to the element node of the executed code set;
The method according to claim 13, further comprising: providing a debug result corresponding to the change of the specific functional unit by the specific differential code set.
前記ソースコードの変更は、エクストリーム・プログラミング環境で実行され、前記プログラミング支援方法は、前記特定機能ユニットの変更に対する機能検証試験またはサイト検証試験を実行するステップを含み、さらに前記特定差分コード集合を、前記ソースコードの変更に対応付けられた前記テストケースごとに作成するステップを含む、請求項14に記載の方法。   The source code change is performed in an extreme programming environment, and the programming support method includes a step of performing a function verification test or a site verification test on the change of the specific functional unit, and 15. The method of claim 14, comprising creating for each test case associated with a change in the source code. 情報処理装置がソースコードの変更を特定機能ユニットに関連付けて検出するプログラミング支援方法を実行するための情報処理実行可能なプログラムであって前記プログラムは、前記情報処理装置が、
前記ソースコードの新バージョンと旧バージョンとを取得するステップと、
前記新バージョンと前記旧バージョンとの間でコードの相違を比較するステップと、
相違した前記コードを抽出して差分コード集合を生成するステップと、
変更された前記ソースコードの特定機能ユニットに関連する全コードを実行させるため変更に対応して前記旧バージョン以降に追加されたテストケースを取得して前記テストケースを実行させるステップと、
前記テストケースの実行により実行されたコードを検出し、実行済コード集合に登録するステップと、
前記差分コード集合と前記実行済コード集合の積集合を計算して前記特定機能ユニットに関連して変更されたコードを要素ノードとする特定差分コード集合を生成するステップと
を実行する、情報処理実行可能なプログラム。
An information processing executable program for executing a programming support method in which an information processing device detects a source code change in association with a specific function unit, and the program includes:
Obtaining a new version and an old version of the source code;
Comparing code differences between the new version and the old version;
Extracting the different codes to generate a differential code set;
Obtaining a test case added after the previous version in response to a change in order to execute all the code related to the specific functional unit of the changed source code, and executing the test case;
Detecting code executed by execution of the test case and registering it in an executed code set;
Calculating a product set of the differential code set and the executed code set, and generating a specific differential code set having a code changed in association with the specific functional unit as an element node. Possible program.
前記プログラムは、さらに前記テストケースを取得するステップを含み、前記テストケースを取得するステップは、前記新バージョンが登録される以前に追加され、前記特定機能ユニットの前記変更に関連するコードを実行させるテストケースを検索して取得するステップを含む、請求項16に記載のプログラム。   The program further includes the step of obtaining the test case, wherein the step of obtaining the test case is added before the new version is registered, and executes code related to the change of the specific functional unit. The program according to claim 16, comprising a step of searching for and acquiring a test case. 前記テストケースを実行させるステップは、前記実行済コード集合の前記要素ノードを実行順に登録する実行トレースを生成するステップを含み、さらに、前記プログラムは、
前記実行済コード集合の前記要素ノードに、実行されたコードのコード識別値および実行結果を追加するステップと、
前記特定差分コード集合により、前記特定機能ユニットの変更に対応するデバッグ結果を提供するステップと
を含む、請求項17に記載のプログラム。
The step of executing the test case includes a step of generating an execution trace for registering the element nodes of the executed code set in an execution order, and the program further includes:
Adding a code identification value and an execution result of the executed code to the element node of the executed code set;
The program according to claim 17, further comprising: providing a debug result corresponding to the change of the specific functional unit by the specific differential code set.
前記ソースコードの変更は、エクストリーム・プログラミング環境で実行され、前記プログラミング支援方法は、前記特定機能ユニットの変更に対する機能検証試験またはサイト検証試験を実行するステップを含み、さらに前記特定差分コード集合を、前記ソースコードの変更に対応付けられた前記テストケースごとに作成するステップを含む、請求項18に記載のプログラム。   The source code change is performed in an extreme programming environment, and the programming support method includes a step of performing a function verification test or a site verification test on the change of the specific functional unit, and The program according to claim 18, comprising a step of creating each test case associated with the change of the source code. 情報処理装置がソースコードの変更を特定機能ユニットに関連付けて検出するプログラミング支援方法であって、前記プログラミング支援方法は、前記情報処理装置が、
前記ソースコードの新バージョンと旧バージョンとを取得するステップと、
前記新バージョンと前記旧バージョンとの間でコードの相違を比較するステップと、
相違した前記コードを抽出して差分コード集合を生成するステップと、
変更された前記ソースコードの特定機能ユニットに関連する全コードを実行させるため変更に対応して前記旧バージョン以降に追加されたテストケースを、前記新バージョンが登録される以前に追加され、前記特定機能ユニットの前記変更に関連するコードを実行させるテストケースを検索して取得し、前記テストケースを実行させるステップと、
前記テストケースの実行により実行されたコードを検出し、実行済コード集合に登録するステップと、
前記差分コード集合と前記実行済コード集合の積集合を計算して前記特定機能ユニットに関連して変更されたコードを要素ノードとする特定差分コード集合を生成するステップと
前記実行済コード集合の前記要素ノードに、実行されたコードのコード識別値および実行結果を追加するステップと、
前記特定差分コード集合により、前記特定機能ユニットの変更に対応するデバッグ結果を提供するステップとを含み、前記デバッグ結果を提供するステップは、
前記実行済コード集合の前記要素ノードを実行順に登録する実行トレースを生成するステップと、
前記実行済コード集合の前記要素ノードに、実行されたコードのコード識別値および実行結果を追加するステップと、
前記特定差分コード集合により、前記特定機能ユニットの変更に対応するデバッグ結果を提供するステップとを含み、
前記ソースコードの変更は、エクストリーム・プログラミング環境で実行され、前記プログラミング支援方法は、前記特定機能ユニットの変更に対する機能検証試験またはサイト検証試験を実行し、さらに前記特定差分コード集合を、前記ソースコードの変更に対応付けられた前記テストケースごとに作成する、プログラミング支援方法。
A programming support method in which an information processing device detects a change in source code in association with a specific function unit, the programming support method comprising:
Obtaining a new version and an old version of the source code;
Comparing code differences between the new version and the old version;
Extracting the different codes to generate a differential code set;
A test case added after the old version in response to the change in order to execute all the code related to the specific functional unit of the changed source code is added before the new version is registered, and the specified Searching and obtaining a test case for executing code related to the change of the functional unit, and executing the test case;
Detecting code executed by execution of the test case and registering it in an executed code set;
Calculating a product set of the differential code set and the executed code set to generate a specific differential code set having an element node as a code changed in relation to the specific functional unit; and Adding the code identification value of the executed code and the execution result to the element node;
Providing a debug result corresponding to the change of the specific functional unit by the specific differential code set, and providing the debug result,
Generating an execution trace that registers the element nodes of the executed code set in execution order;
Adding a code identification value and an execution result of the executed code to the element node of the executed code set;
Providing a debug result corresponding to the change of the specific functional unit by the specific differential code set,
The source code change is executed in an extreme programming environment, and the programming support method executes a function verification test or a site verification test for the change of the specific functional unit, and further, the specific differential code set is converted to the source code. A programming support method for creating each test case associated with the change of the test case.
ソースコードの変更を検出する情報処理装置であって、前記情報処理装置は、
前記ソースコードの新バージョンと旧バージョンとを取得するソースコード読取部と、
前記新バージョンと前記旧バージョンとの間でコードの相違を比較するソースコード比較部と、
相違した前記コードを抽出して差分コード集合を生成する差分コード登録部と、
変更された前記ソースコードの特定機能ユニットに関連する全コードを実行させるため、変更に対応して前記旧バージョン以降に追加されたテストケースを取得して前記テストケースを実行させるソースコード実行部と、
前記テストケースの実行により実行されたコードを検出し、実行済コード集合に登録するコード実行検査部と、
前記差分コード集合と前記実行済コード集合の積集合を計算して前記特定機能ユニットに関連して変更されたコードを要素ノードとし、前記ソースコードの変更に対応付けられた前記テストケースごとに作成される特定差分コード集合を生成する特定差分コード抽出部と
前記新バージョンが登録される以前に追加され、前記特定機能ユニットの前記変更に関連するコードを実行させるテストケースを検索して取得するテストケース取得部とを含み、
前記コード実行検査部は、前記実行済コード集合の前記要素ノードを実行順に登録する実行トレースを生成し、
前記実行済コード集合の前記要素ノードは、実行されたコードのコード識別値および実行結果を含み、前記特定差分コード集合は、前記特定機能ユニットの変更に対応するデバッグ結果を提供しており、
前記ソースコードは、エクストリーム・プログラミング環境で変更され、前記情報処理装置は、前記特定機能ユニットの変更に対する機能検証試験またはサイト検証試験を実行する、情報処理装置。
An information processing apparatus for detecting a change in source code, wherein the information processing apparatus includes:
A source code reading unit for acquiring a new version and an old version of the source code;
A source code comparison unit for comparing code differences between the new version and the old version;
A differential code registration unit for extracting the different codes and generating a differential code set;
A source code execution unit for acquiring a test case added after the old version corresponding to the change and executing the test case in order to execute all code related to the specific functional unit of the changed source code; ,
A code execution inspection unit for detecting the code executed by the execution of the test case and registering it in the executed code set;
Created for each test case associated with the change of the source code by calculating the intersection of the difference code set and the executed code set and using the changed code related to the specific functional unit as an element node A specific differential code extraction unit that generates a specific differential code set, and a test that is added before the new version is registered and that searches for and acquires a test case that executes a code related to the change of the specific functional unit Including a case acquisition unit,
The code execution inspection unit generates an execution trace for registering the element nodes of the executed code set in an execution order;
The element node of the executed code set includes a code identification value and an execution result of the executed code, and the specific differential code set provides a debug result corresponding to the change of the specific functional unit;
The information processing apparatus, wherein the source code is changed in an extreme programming environment, and the information processing apparatus executes a function verification test or a site verification test for the change of the specific function unit.
JP2008235221A 2008-09-12 2008-09-12 Information processing apparatus, information processing system, programming support method and program for supporting programming Expired - Fee Related JP5208635B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008235221A JP5208635B2 (en) 2008-09-12 2008-09-12 Information processing apparatus, information processing system, programming support method and program for supporting programming

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008235221A JP5208635B2 (en) 2008-09-12 2008-09-12 Information processing apparatus, information processing system, programming support method and program for supporting programming

Publications (2)

Publication Number Publication Date
JP2010067188A true JP2010067188A (en) 2010-03-25
JP5208635B2 JP5208635B2 (en) 2013-06-12

Family

ID=42192693

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008235221A Expired - Fee Related JP5208635B2 (en) 2008-09-12 2008-09-12 Information processing apparatus, information processing system, programming support method and program for supporting programming

Country Status (1)

Country Link
JP (1) JP5208635B2 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012079230A1 (en) * 2010-12-15 2012-06-21 Microsoft Corporation Intelligent code differencing using code clone detection
CN103631711A (en) * 2012-08-23 2014-03-12 Ls产电株式会社 Error detection device for programming language
CN103678111A (en) * 2012-09-18 2014-03-26 株式会社日立制作所 Evaluation method and evaluation device for similarity of source codes
JP2014126900A (en) * 2012-12-25 2014-07-07 Nec Corp Program analysis device, program analysis method, and program analysis program
WO2014184896A1 (en) * 2013-05-15 2014-11-20 三菱電機株式会社 Program analyzer, program analysis method, and program analysis program
GB2517717A (en) * 2013-08-29 2015-03-04 Ibm Testing of combined code changesets in a software product
CN104536881A (en) * 2014-11-28 2015-04-22 南京慕测信息科技有限公司 Public testing error report priority sorting method based on natural language analysis
CN106776348A (en) * 2017-02-06 2017-05-31 腾讯科技(深圳)有限公司 Testing case management and device
US10169210B2 (en) 2016-08-09 2019-01-01 International Business Machines Corporation Association between a test case and source code
CN111435312A (en) * 2019-01-15 2020-07-21 北京嘀嘀无限科技发展有限公司 Application program management method and device and electronic equipment
JP2023167877A (en) * 2022-05-13 2023-11-24 株式会社日立製作所 Development assistance system and development assistance method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10320234A (en) * 1997-05-21 1998-12-04 Hitachi Ltd Automatic test method for software
JP2003091431A (en) * 2001-09-19 2003-03-28 Hitachi Ltd System, method and program for selecting and executing test scenario
JP2004326337A (en) * 2003-04-23 2004-11-18 Mitsubishi Electric Corp Code analysis program, code analysis automation program and automated code analysis system
JP2007004255A (en) * 2005-06-21 2007-01-11 Fujitsu Ltd Program for debug support
JP2008129661A (en) * 2006-11-16 2008-06-05 Internatl Business Mach Corp <Ibm> Information processor, method, and program for determining priority of test case to be executed in regression test

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10320234A (en) * 1997-05-21 1998-12-04 Hitachi Ltd Automatic test method for software
JP2003091431A (en) * 2001-09-19 2003-03-28 Hitachi Ltd System, method and program for selecting and executing test scenario
JP2004326337A (en) * 2003-04-23 2004-11-18 Mitsubishi Electric Corp Code analysis program, code analysis automation program and automated code analysis system
JP2007004255A (en) * 2005-06-21 2007-01-11 Fujitsu Ltd Program for debug support
JP2008129661A (en) * 2006-11-16 2008-06-05 Internatl Business Mach Corp <Ibm> Information processor, method, and program for determining priority of test case to be executed in regression test

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103262047A (en) * 2010-12-15 2013-08-21 微软公司 Intelligent code differencing using code clone detection
WO2012079230A1 (en) * 2010-12-15 2012-06-21 Microsoft Corporation Intelligent code differencing using code clone detection
US9639449B2 (en) 2012-08-23 2017-05-02 Lsis Co., Ltd. Error detection device for programming language
CN103631711A (en) * 2012-08-23 2014-03-12 Ls产电株式会社 Error detection device for programming language
CN103678111A (en) * 2012-09-18 2014-03-26 株式会社日立制作所 Evaluation method and evaluation device for similarity of source codes
JP2014126900A (en) * 2012-12-25 2014-07-07 Nec Corp Program analysis device, program analysis method, and program analysis program
WO2014184896A1 (en) * 2013-05-15 2014-11-20 三菱電機株式会社 Program analyzer, program analysis method, and program analysis program
DE112013007083B4 (en) * 2013-05-15 2020-02-27 Mitsubishi Electric Corporation Program analysis device, program analysis method and program analysis program
US9760470B2 (en) 2013-05-15 2017-09-12 Mitsubishi Electric Corporation Device, method, and program analysis of new source code to be added to execution program to check for bug
CN105210044A (en) * 2013-05-15 2015-12-30 三菱电机株式会社 Program analyzer, program analysis method, and program analysis program
JP5976209B2 (en) * 2013-05-15 2016-08-23 三菱電機株式会社 Program analysis apparatus, program analysis method, and program analysis program
US9582403B2 (en) 2013-08-29 2017-02-28 International Business Machines Corporation Testing of combined code changesets in a software product
US10169214B2 (en) 2013-08-29 2019-01-01 International Business Machines Corporation Testing of combined code changesets in a software product
GB2517717A (en) * 2013-08-29 2015-03-04 Ibm Testing of combined code changesets in a software product
CN104536881A (en) * 2014-11-28 2015-04-22 南京慕测信息科技有限公司 Public testing error report priority sorting method based on natural language analysis
US10169210B2 (en) 2016-08-09 2019-01-01 International Business Machines Corporation Association between a test case and source code
US10452520B2 (en) 2016-08-09 2019-10-22 International Business Machines Corporation Association between a test case and source code
CN106776348A (en) * 2017-02-06 2017-05-31 腾讯科技(深圳)有限公司 Testing case management and device
CN106776348B (en) * 2017-02-06 2022-09-09 腾讯科技(深圳)有限公司 Test case management method and device
CN111435312A (en) * 2019-01-15 2020-07-21 北京嘀嘀无限科技发展有限公司 Application program management method and device and electronic equipment
CN111435312B (en) * 2019-01-15 2023-09-29 北京嘀嘀无限科技发展有限公司 Application program management method and device and electronic equipment
JP2023167877A (en) * 2022-05-13 2023-11-24 株式会社日立製作所 Development assistance system and development assistance method
JP7412477B2 (en) 2022-05-13 2024-01-12 株式会社日立製作所 Development support system and development support method

Also Published As

Publication number Publication date
JP5208635B2 (en) 2013-06-12

Similar Documents

Publication Publication Date Title
JP5208635B2 (en) Information processing apparatus, information processing system, programming support method and program for supporting programming
Tomassi et al. Bugswarm: Mining and continuously growing a dataset of reproducible failures and fixes
Yuan et al. Sherlog: error diagnosis by connecting clues from run-time logs
JP3946057B2 (en) Consistency inspection support method and consistency inspection support system
US9389849B2 (en) Test case pattern matching
US20170132119A1 (en) Method and device for retrieving test case based on code coverage
US20110161938A1 (en) Including defect content in source code and producing quality reports from the same
US9015664B2 (en) Automated tagging and tracking of defect codes based on customer problem management record
US8745595B2 (en) Information processing apparatus and method of acquiring trace log
US9229738B2 (en) Software development tool for providing user context information to improve message quality at development time
US8091066B2 (en) Automated multi-platform build and test environment for software application development
US7900198B2 (en) Method and system for parameter profile compiling
US9880832B2 (en) Software patch evaluator
CN106919612B (en) Processing method and device for online structured query language script
US8789020B2 (en) Interactive debugging environments and methods of providing the same
US20170177311A1 (en) Service extraction and application composition
US20040054991A1 (en) Debugging tool and method for tracking code execution paths
US8533683B2 (en) Stack walking enhancements using sensorpoints
Licker et al. Detecting incorrect build rules
JP2015011372A (en) Debug support system, method, program, and recording medium
US7409677B1 (en) Method and system for creation and use of embedded trace description
JP2010140408A (en) Source code converting device
US8359579B2 (en) Monitoring dynamic aspect oriented applications at execution time
US10599424B2 (en) Committed program-code management
JP2008052688A (en) Patch data generation device for program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110816

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

RD14 Notification of resignation of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7434

Effective date: 20130205

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130220

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160301

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees