JP5213671B2 - Test case selection method and selection system - Google Patents

Test case selection method and selection system Download PDF

Info

Publication number
JP5213671B2
JP5213671B2 JP2008308946A JP2008308946A JP5213671B2 JP 5213671 B2 JP5213671 B2 JP 5213671B2 JP 2008308946 A JP2008308946 A JP 2008308946A JP 2008308946 A JP2008308946 A JP 2008308946A JP 5213671 B2 JP5213671 B2 JP 5213671B2
Authority
JP
Japan
Prior art keywords
test case
test
execution
importance
passed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008308946A
Other languages
Japanese (ja)
Other versions
JP2010134643A (en
Inventor
悟史 小林
聡一郎 大原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Solutions Ltd
Original Assignee
Hitachi Solutions Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Solutions Ltd filed Critical Hitachi Solutions Ltd
Priority to JP2008308946A priority Critical patent/JP5213671B2/en
Publication of JP2010134643A publication Critical patent/JP2010134643A/en
Application granted granted Critical
Publication of JP5213671B2 publication Critical patent/JP5213671B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、プログラムのテスト時のテストケースの選択方法及び選択システムに係り、特に、プログラムの開発に継続的インテグレーションを用いた場合におけるプログラムのテストの際に、効率的なテストの実施を可能とするテストケースの選択方法及び選択システムに関する。   The present invention relates to a test case selection method and a selection system for testing a program, and in particular, it is possible to perform an efficient test when testing a program when continuous integration is used for program development. The present invention relates to a test case selection method and a selection system.

プログラムの開発手法の1つとして、継続的インテグレーションと呼ばれる手法が知られている。この継続的インテグレーションと呼ばれる開発手法は、所謂アジャイル手法に代表される反復型開発の特徴の1つである「常に動くものを作る」という考え方をプログラムの製造に応用したものである。そして、この手法は、マスタソースの管理を一箇所に集めた上で、1日に何度もコンパイル、ビルド、配置を行い、自動テストを行うというサイクルを繰り返すことにより、常にプログラムを動作する状態に置くというものである。   As one of program development techniques, a technique called continuous integration is known. This development method called continuous integration is an application of the idea of “creating something that always moves”, which is one of the features of iterative development typified by the so-called agile method, to program production. In this method, the master source management is gathered in one place, the program is always run by repeating the cycle of compiling, building, and arranging many times a day, and performing automatic tests. Is to put in.

継続的インテグレーションと呼ばれる手法は、前述により、統合のコストを下げることが可能となり、また、不良の混入や修正による機能のデグレード等に早く気づかせることが可能となり、結果として、プログラム開発途上の修正のコストを大幅に下げることが可能となる。   As described above, the method called continuous integration makes it possible to reduce the cost of integration, and to quickly notice function degradation due to mixing of defects or correction, resulting in corrections during program development. It is possible to drastically reduce the cost.

通常、継続的インテグレーションの手法を用いたプログラムの開発は、マスタソースの管理にソース構成管理ツールを利用した上で、継続的インテグレーションツールを用いて行われている。一方で、プログラムの自動テストは、様々な言語やシステムに対応したテストフレームワークを使用して行うのが一般的である。   In general, a program using a continuous integration method is developed using a source configuration management tool for managing a master source and then using a continuous integration tool. On the other hand, automatic test of a program is generally performed using a test framework corresponding to various languages and systems.

なお、継続的インテグレーションの手法は、あくまでもプログラムの開発手法であり、品質保証の観点から行うテスト手法ではない。すなわち、継続的インテグレーションの手法は、大きな手戻りを防ぐためのものであり、開発の明らかな後退を防ぐものであるため、ここで必要となる自動テストは、アプリケーションを厳密に網羅するものである必要のないものである。   The continuous integration method is merely a program development method, not a test method from the viewpoint of quality assurance. In other words, the continuous integration method is intended to prevent major rework and prevent obvious development regressions, so the automated testing required here is strictly covering the application. It is not necessary.

継続的インテグレーションを行う大きな目的には、不良の作り込みの排除と、デグレードの防止とがある。この目的を最大限達成するためには、ソースに変更がある度にインテグレーションを行うことが望ましい。実際、継続的インテグレーションツールには、ソース構成管理ツールが管理しているソースの構成変更を検知して動作する仕組みが装備されているのが普通である。   The main purpose of continuous integration is to eliminate defects and prevent degradation. To achieve this goal to the fullest extent, it is desirable to integrate whenever there is a change in the source. In fact, a continuous integration tool is usually equipped with a mechanism that operates by detecting a source configuration change managed by the source configuration management tool.

しかし、前述の継続的インテグレーションツールを実際に利用すると、コンパイル、ビルド、配備にもいえることではあるが、自動テストに非常に多くの時間が費やされてしまうという問題を生じる。この理由は、1つの機能に対するテストが、通常数個、機能によっては数十個以上にもなる場合があるためであり、また、外部リソース(データベース等)を用いてテストを行わなければならない場合、基本的に時間がかかるためである。   However, when the above-mentioned continuous integration tool is actually used, there is a problem that a great deal of time is spent on automatic testing, which can be said for compiling, building and deploying. This is because there are usually several tests for one function, and there may be several tens or more depending on the function, and when the test must be performed using an external resource (such as a database). This is basically because it takes time.

前述したようなテストに多くの時間を要するということを意識せずに、プログラムの開発を進めると、前のテストが終わらないうちにソースに新たな変更が入る状態が頻発し、テストの結果が不調に終わった場合に、どこが悪かったのかが判りずらくなり、開発の停滞を招くこととなるという問題を生じさせる。   If you proceed with the development of the program without being conscious of the fact that it takes a lot of time for the tests described above, new changes will frequently occur in the source before the previous tests are completed, and the test results When things go wrong, it's difficult to know what went wrong, causing problems with development stagnation.

前述したような問題を回避するために、変更の入った部分を発見し、それに関係したテストケースのみ実施することによりテストケースの数を絞るという手法が種々提案されている。例えば、特許文献1には、プログラム開発途上に修正が行われた場合におけるテストケースに独自の重み付けを行うことにより、テストケースの数を絞る技術が、また、非特許文献1には、コールツリーを作成して影響調査を行うことにより、テストケースの数を絞る技術が提案されている。
特開2008−129661号公報 「仮想マシンの中間言語に基づく回帰テスト選択手法」、情報処理学会論文誌 Vol.45, No.8(20040815) pp. 2043-2054、社団法人情報処理学会 ISSN:03875806
In order to avoid the problems as described above, various techniques have been proposed in which the number of test cases is reduced by finding a changed part and executing only the test cases related thereto. For example, Patent Document 1 discloses a technique for reducing the number of test cases by uniquely weighting test cases when modifications are made during program development, and Non-Patent Document 1 discloses a call tree. A technique for reducing the number of test cases has been proposed by investigating the impact and conducting an impact investigation.
JP 2008-129661 A "Regression test selection method based on virtual machine intermediate language", Transactions of Information Processing Society of Japan Vol.45, No.8 (20040815) pp. 2043-2054, Information Processing Society of Japan ISSN: 03875806

しかし、前述した特許文献1、非特許文献1に記載された技術は、変更が入らなかった部分に関するテストケースをスキップするためには有効であるが、テストケース自体の重要度や実行時間について考慮していないものであり、テストを効率的に実施することができないという問題点を有している。   However, the techniques described in Patent Document 1 and Non-Patent Document 1 described above are effective for skipping a test case related to a part that has not been changed, but consider the importance and execution time of the test case itself. However, the test cannot be performed efficiently.

本発明の目的は、前述した従来技術の問題点を解決し、テストケース自体に付与した重要度や実行実績時間を用い、継続的インテグレーション手法を用いてプログラムの開発を行う際に実施するテストを効率的に実施することができるようにテストケースを選択することを可能としたテストケースの選択方法及び選択システムを提供することにある。   The object of the present invention is to solve the above-mentioned problems of the prior art, and use the importance level and the execution performance time given to the test case itself, and perform a test to be performed when the program is developed using the continuous integration method. It is an object of the present invention to provide a test case selection method and a selection system that make it possible to select test cases so that they can be efficiently implemented.

本発明によれば前記目的は、継続的インテグレーション手法を用いてプログラムの開発を行う際に実施するテストを効率的に実施することができるようにテストケースを選択するテストケースの選択方法において、情報処理装置内のリポジトリにテストケースの属性として重要度及び実行実績時間を保持させると共に、前記情報処理装置内に継続的インテグレーションツールとテストケース選択手段とを備え、前記テストケース選択手段は、開発者からソース登録を受けたソース構成管理ツールから継続的インテグレーションツールにソース変更の通知があったときに、継続的インテグレーションツールから渡された変更ファイルの解析を行い、解析結果を前記リポジトリに格納し、その後に継続的インテグレーションツールから渡された実施重要度及び実施時間閾値と、前記リポジトリに格納されたテストケースの属性として重要度及び実行実績時間とから実行すべきテストケースを選択することにより達成される。   According to the present invention, the object is to provide a test case selection method for selecting a test case so that a test performed when a program is developed using a continuous integration technique can be efficiently performed. The repository in the processing apparatus holds the importance and execution time as attributes of the test case, and the information processing apparatus includes a continuous integration tool and a test case selection unit, and the test case selection unit is a developer When a source change notification is received from the source configuration management tool that received the source registration from the continuous integration tool, the change file passed from the continuous integration tool is analyzed, and the analysis result is stored in the repository. The actual passed from the continuous integration tool And severity and implementation time threshold, is achieved by selecting a test case to be executed from the importance and perform actual times as an attribute of the stored test cases to the repository.

本発明によれば、テストケース自体に付与した重要度や実行実績時間と、テスト実行時に設定する重要度、実行時間閾値とを用いて、継続的インテグレーションにおけるテストを効率的に実施することを可能とするようにテストケースの選択を行うことができる。   According to the present invention, it is possible to efficiently perform a test in continuous integration by using the importance level and execution result time assigned to the test case itself, the importance level set at the time of test execution, and the execution time threshold value. The test case can be selected as follows.

以下、本発明によるプログラムテスト時のテストケース選択方法及び選択システムの実施形態を図面により詳細に説明する。   Embodiments of a test case selection method and selection system during a program test according to the present invention will be described below in detail with reference to the drawings.

図1は本発明の一実施形態によるプログラムのテスト時にテストケースの選択を行うテストケースの選択システムの構成を示すブロック図である。   FIG. 1 is a block diagram showing a configuration of a test case selection system for selecting a test case when testing a program according to an embodiment of the present invention.

図1に示すシステムは、ソース管理マシンとテストマシンとにより構成される。ソース管理マシンとテストマシンとは、それぞれ、少なくとも、CPU、メインメモリ、HDD等の記憶装置を備えて構成される情報処理装置であり、本発明の実施形態で必要とする各種の機能がプログラムとして記憶装置に格納されていて、それらのプログラムがメインメモリにロードされ、CPUにより実行されることにより、本発明における各種の機能が構築される。   The system shown in FIG. 1 includes a source management machine and a test machine. Each of the source management machine and the test machine is an information processing apparatus configured to include at least a storage device such as a CPU, a main memory, and an HDD, and various functions required in the embodiment of the present invention are used as programs. Various functions in the present invention are constructed by being stored in the storage device, and loading these programs into the main memory and executing them by the CPU.

前述において、ソースマシン内に備えられるソース構成管理ツール101は、対象アプリケーションのソースと、テストケースのソースとの構成管理を行う機能を有する。また、テストマシン内の継続的インテグレーションツール102は、継続的インテグレーションを行うためにソース構成管理ツール101との接続を持ち、テスト対象アプリケーションコンパイルし、あるいは、図示しないコンパイラにコンパイルを行わせたりし、また、テストケース選択部103を起動したりする。   As described above, the source configuration management tool 101 provided in the source machine has a function of performing configuration management between the source of the target application and the source of the test case. In addition, the continuous integration tool 102 in the test machine has a connection with the source configuration management tool 101 in order to perform continuous integration, and compiles a test target application, or causes a compiler (not shown) to compile, In addition, the test case selection unit 103 is activated.

なお、前述において、テストケースとは、ある引き数を与えてメソッドをコール(実行)したときに、ユーザが望んだ結果と実際に返った結果とを照合する単位となるものであり、例えば、複数のプログラムステップの集合である。   In the above description, the test case is a unit for collating the result desired by the user with the actually returned result when a method is called (executed) by giving a certain argument. A set of multiple program steps.

テストケース選択部103とリポジトリ104とについては、図2を参照して後述するが、テストケース選択部103とリポジトリ104とが本発明の中心をなす構成である。   The test case selection unit 103 and the repository 104 will be described later with reference to FIG. 2, but the test case selection unit 103 and the repository 104 are the main components of the present invention.

テストマシン内の自動テストフレームワーク105は、自動テストを記述したり実行したりするのを支援するライブラリである。また、テスト対象アプリケーション106は、継続的インテグレーションツール102によってビルドされるものである。   The automatic test framework 105 in the test machine is a library that supports writing and executing automatic tests. The test target application 106 is built by the continuous integration tool 102.

端末107は、開発者が使用している開発用マシンであり、作成したソースをチェックインするものである。端末108は、テスト実行時のパラメータ(実施重要度と実施時間閾値)の設定を行うものである。この端末108から延びる矢印は、継続的インテグレーションツール102を通ってテストケース選択部103に達しているが、このことは、パラメータ自体は継続的インテグレーションツール102に登録するが、テスト実行時にはテストケース選択部103にわたされるということを意味している。また、端末109は、テストの実行実績時間一覧を表示するものである。   The terminal 107 is a development machine used by a developer, and checks in the created source. The terminal 108 sets parameters (execution importance and execution time threshold) at the time of test execution. The arrow extending from the terminal 108 reaches the test case selection unit 103 through the continuous integration tool 102. This means that the parameter itself is registered in the continuous integration tool 102, but when the test is executed, the test case selection is performed. It means that it is passed to the part 103. The terminal 109 displays a list of test execution results.

前述した端末107〜109は、PCに代表される情報処理装置であり、端末108、109は、1つの端末であってもよい。   The terminals 107 to 109 described above are information processing apparatuses represented by a PC, and the terminals 108 and 109 may be one terminal.

図2はテストケース選択部103の内部構造を示すブロック図である。テストケース選択部103は、解析部201、更新部202、テスト部103から構成されている。   FIG. 2 is a block diagram showing the internal structure of the test case selection unit 103. The test case selection unit 103 includes an analysis unit 201, an update unit 202, and a test unit 103.

解析部201は、対象ソースやテストケースのコードを解析し、使用しているクラスやメソッドの情報を取得する機能を有する。   The analysis unit 201 has a function of analyzing the code of the target source or test case and acquiring information on the class or method being used.

更新部202は、解析結果や、実行結果の時間等をリポジトリ104に書き込む機能を有する。   The update unit 202 has a function of writing analysis results, execution result times, and the like in the repository 104.

テスト部203は、継続的インテグレーションツール102から渡された実施重要度・実施時間閾値と、リポジトリ104から読み込んだ重要度・実行実績時間を比較し、実行するテストケースを決定する。   The test unit 203 compares the execution importance / execution time threshold passed from the continuous integration tool 102 with the importance / execution performance time read from the repository 104 to determine a test case to be executed.

次に、図3〜図5を参照して、リポジトリ104に格納する情報のレコードについて説明するが、ここで示す例は、理解しやすいように、言語としてJava(登録商標)、テストフレームワークとしてJUnit を使用する例である。もちろん、他の言語、他のツールでも、相応の読み替えをすればよい。   Next, a record of information stored in the repository 104 will be described with reference to FIGS. 3 to 5. In the example shown here, Java (registered trademark) is used as a language and a test framework is provided for easy understanding. This is an example using JUnit. Of course, other languages and other tools can be replaced accordingly.

図3はテスト対象アプリケーションクラス使用情報が格納されるリポジトリ内のレコードについて説明する図である。このレコードには、対象クラス名301と、使用クラス名302とが格納される。   FIG. 3 is a diagram for explaining a record in the repository in which test target application class usage information is stored. In this record, a target class name 301 and a used class name 302 are stored.

対象クラス名301には、テストされるアプリケーションのクラス名が、FQCN(Fully Qualified Class Name、完全修飾クラス名)で格納される。図示例では、具体的なアプリケーションのクラス名として、「org.example.TestedClass 」を例示している。   In the target class name 301, the class name of the application to be tested is stored in FQDN (Fully Qualified Class Name). In the illustrated example, “org.example.TestedClass” is illustrated as a specific application class name.

使用クラス名302には、前述の対象クラスの内部で直接使用しているクラスのクラス名が、FQCNで格納される。この項目には、複数個のデータが格納されてよい。図示例では、具体的なクラス名として、「net.example.utils.Util.checkMyTest」、「org.example.testing.Dollers 」を例示している。   In the used class name 302, the class name of the class directly used in the above-described target class is stored in FQDN. A plurality of data may be stored in this item. In the illustrated example, “net.example.utils.Util.checkMyTest” and “org.example.testing.Dollers” are illustrated as specific class names.

図4はテストケース実行情報が格納されるリポジトリ内のレコードについて説明する図である。このレコードには、テストケースクラス名401と、テストケースメソッド名402と、使用対象クラス名403と、重要度404と、実行実績時間405とが格納される。そして、テストケースクラス名401とテストケースメソッド名402との2つで、テストケースに付与されたテストケース名となる。   FIG. 4 is a diagram for explaining the records in the repository in which the test case execution information is stored. In this record, a test case class name 401, a test case method name 402, a use target class name 403, an importance 404, and an execution result time 405 are stored. The test case class name 401 and the test case method name 402 are the test case names assigned to the test cases.

テストケースクラス名401には、テストケースのメソッドが格納されているクラス名が、FQCNで格納される。図示例では、具体的なテストケースクラス名401として、「org.example.ci.TestSample」を例示している。   In the test case class name 401, the class name in which the test case method is stored is stored in FQDN. In the illustrated example, “org.example.ci.TestSample” is illustrated as a specific test case class name 401.

テストケースメソッド名402には、テストケースのメソッド名が格納される。図示例では、具体的なテストケースメソッド名402として、「TestSample.Test 」を例示している。   The test case method name 402 stores the method name of the test case. In the illustrated example, “TestSample.Test” is illustrated as a specific test case method name 402.

使用対象クラス名403には、テストケースメソッド内部で使用される対象アプリケーション内部のクラス名が、FQCNで格納される。この使用対象クラス名403の項目には、複数個のデータが格納されてよい。図示例では、具体的な使用対象クラス名403として、「org.example.TestedClass 」及び「net.example.utils.Util」を例示している。   In the use target class name 403, the class name inside the target application used inside the test case method is stored in FQDN. A plurality of pieces of data may be stored in the item of the usage target class name 403. In the illustrated example, “org.example.TestedClass” and “net.example.utils.Util” are illustrated as specific class names 403 to be used.

重要度404には、当該テストケースを実行するか否かを判断するための整数値が格納される。この値は、1〜5程度とされるのが普通であるが、より詳細に重要度を設定したい場合、重要度の値の範囲をより広くとることも可能である。そして、この重要度は、小さい値程重要であり、テストの実行が行われるべきものであるとする。図示例では、具体的な重要度404として、「15」を例示している。   An importance value 404 stores an integer value for determining whether or not to execute the test case. Normally, this value is set to about 1 to 5. However, when it is desired to set the importance level in more detail, the range of the importance level can be made wider. It is assumed that this importance is as important as a smaller value and the test should be executed. In the illustrated example, “15” is illustrated as the specific importance 404.

実行実績時間405には、当該テストケースが実際に実行された際の時間が、単位ミリ秒で格納される。この実行実績時間405の項目には、複数個のデータが格納されてよい。図示例では、具体的な実行実績時間405として、1回目〜3回目の実行実績時間「10ミリ秒」、「15ミリ秒」、「12ミリ秒」を例示している。   In the execution result time 405, the time when the test case is actually executed is stored in unit milliseconds. A plurality of pieces of data may be stored in the execution performance time 405 item. In the illustrated example, the first to third execution result times “10 milliseconds”, “15 milliseconds”, and “12 milliseconds” are illustrated as specific execution result times 405.

図5はテストケース更新情報が格納されるリポジトリ内のレコードについて説明する図である。このレコードには、テストケースクラス名501と、テストケースメソッド502と、メソッドのチェックサム503とが格納されている。   FIG. 5 is a diagram for explaining the records in the repository in which the test case update information is stored. In this record, a test case class name 501, a test case method 502, and a method checksum 503 are stored.

テストケースクラス名501及びテストケースメソッド502は、図4により説明したレコードのものと同一のものである。メソッドのチェックサム503は、テストケースメソッドの内容から導き出されるチェックサムである。ここでは、MD5によるメッセージダイジェストを使用している。そして、このチェックサム503の情報は、テストケースの変更が行われたかどうかを示しており、テストのときに比較される情報である。   The test case class name 501 and the test case method 502 are the same as those of the record described with reference to FIG. The method checksum 503 is a checksum derived from the contents of the test case method. Here, a message digest by MD5 is used. The information of the checksum 503 indicates whether or not the test case has been changed, and is information that is compared during the test.

図6は本発明の実施形態での全体の処理動作を説明するシーケンスチャートであり、次に、これについて説明する。なお、図6において、SCMはソース構成管理ツール101を、CIは継続的インテグレーションツール102を、テストFWはテストフレームワーク105をそれぞれ示している。また、図6に太い黒枠で囲んだ部分が、本発明の実施形態での独自の動作である。   FIG. 6 is a sequence chart for explaining the entire processing operation in the embodiment of the present invention. Next, this will be explained. In FIG. 6, SCM indicates the source configuration management tool 101, CI indicates the continuous integration tool 102, and test FW indicates the test framework 105. Moreover, the part enclosed by the thick black frame in FIG. 6 is an original operation | movement in embodiment of this invention.

(1)開発者からソース登録を受けたソース構成管理ツール101から継続的インテグレーションツール102に変更通知があったことをトリガーとして、テストケース選択部103は、継続的インテグレーションツール102より実行される。このとき、継続的インテグレーションツール102から選択部103に変更となったファイルの名称が渡される(ステップ601〜603)。 (1) The test case selection unit 103 is executed by the continuous integration tool 102, triggered by a change notification from the source configuration management tool 101 that has received source registration from the developer to the continuous integration tool 102. At this time, the name of the changed file is passed from the continuous integration tool 102 to the selection unit 103 (steps 601 to 603).

(2)選択部103は、渡されたファイルの名称に基づいて、ソース構成管理ツール101からそのファイルを取得し、取得したファイルを解析する。このファイルの解析の詳細については、図7を参照して後述する(ステップ604、605)。 (2) The selection unit 103 acquires the file from the source configuration management tool 101 based on the passed file name, and analyzes the acquired file. Details of this file analysis will be described later with reference to FIG. 7 (steps 604 and 605).

(3)解析した結果は、図3により説明したリポジトリのテスト対象アプリケーションクラス使用情報に格納される(ステップ606)。 (3) The analysis result is stored in the test target application class usage information of the repository described with reference to FIG. 3 (step 606).

(4)テストケース選択部103で全てのファイルの解析が終了した後、テストの実行を開始する。このため、まず、継続的インテグレーションツール102は、ソース構成管理ツールからファイルを取得して、対象アプリケーションを、テスト対象アプリケーション106としてビルドする(ステップ611、612)。 (4) After the analysis of all files is completed by the test case selection unit 103, the test execution is started. Therefore, first, the continuous integration tool 102 obtains a file from the source configuration management tool, and builds the target application as the test target application 106 (steps 611 and 612).

(5)その後、テストケース選択部103は、継続的インテグレーションツール102より実行される。このとき、実施重要度と実施時間閾値とが継続的インテグレーションツール102からテストケース選択部103に渡される。渡される実施重要度は、テストケースの重要度がこれよりも低いもののみを実施候補とするというものである。また、実施時間閾値は、テストケースの実行実績時間の平均がこれを超えるものは実施しないというものである(ステップ621)。 (5) Thereafter, the test case selection unit 103 is executed by the continuous integration tool 102. At this time, the implementation importance level and the implementation time threshold are passed from the continuous integration tool 102 to the test case selection unit 103. The execution importance level that is passed is that only test cases having a lower importance level are used as execution candidates. Further, the execution time threshold value is that the test case execution average time exceeding this is not executed (step 621).

(6)テストケース選択部103は、先程渡されたファイル名と、テストケース実行情報の使用対象クラス名とが一致するレコードをリポジトリから取得し、取得したテストケースの中から、実行するテストケースを選択する。この実行するテストケースを選択する処理の詳細については、図8を参照して後述する(ステップ622、623)。 (6) The test case selection unit 103 acquires a record in which the file name passed earlier matches the class name to be used in the test case execution information from the repository, and executes the test case from the acquired test cases Select. Details of the process for selecting a test case to be executed will be described later with reference to FIG. 8 (steps 622 and 623).

(7)テストケース選択部103は、選択したテストケースメソッド名をテストフレームワーク105に渡してテスト実行を指示し、テストフレームワーク105は、実際のテストケースメソッドをテスト対象アプリケーション106から呼び出してテストを実行する(ステップ624〜626)。 (7) The test case selection unit 103 passes the selected test case method name to the test framework 105 to instruct test execution, and the test framework 105 calls the actual test case method from the test target application 106 to perform the test. Are executed (steps 624 to 626).

(8)テストの結果とテストに要した時間との情報は、テストフレームワーク105からテストケース選択部103に渡され、テストケース選択部103は、成功したテストケースの実行実績時間を、リポジトリのテストケース実行情報に追記する(ステップ627、628)。 (8) Information on the result of the test and the time required for the test is passed from the test framework 105 to the test case selection unit 103, and the test case selection unit 103 determines the execution time of the successful test case in the repository. The test case execution information is additionally written (steps 627 and 628).

図7は図6に示して説明したシーケンスにおけるステップ605での選択部103が行うファイル解析の処理動作を説明するフローチャートであり、次に、これについて説明する。   FIG. 7 is a flowchart for explaining the file analysis processing operation performed by the selection unit 103 at step 605 in the sequence shown in FIG. 6, which will be described next.

(1)一般に、ソース構成管理ツール101には、対象アプリケーションのファイルと共に、テストコードが格納されているので、テストケース選択部103は、ソース構成管理ツール101から取得したファイルの解析を行うに際して、まず、取得したファイルが対象アプリケーションであるか、テストコードであるかを判定する(ステップ701)。 (1) Generally, since the source configuration management tool 101 stores a test code together with the target application file, the test case selection unit 103 performs analysis of the file acquired from the source configuration management tool 101. First, it is determined whether the acquired file is a target application or a test code (step 701).

(2)ステップ701の判定で、取得した解析対象のファイルが対象アプリケーションであった場合、選択部は、ソースを解析し、そのファイルが直接使用しているクラスの名前を取得する。このとき、対象アプリケーション内のクラスのみ取得する(ステップ702)。 (2) If it is determined in step 701 that the acquired analysis target file is the target application, the selection unit analyzes the source and acquires the name of the class directly used by the file. At this time, only the classes in the target application are acquired (step 702).

(3)そして、そのファイルの情報が図3に示して説明したテスト対象アプリケーションクラス使用情報にすでに格納されているか否かをチェックし、格納されていた場合に、一旦その情報を全て消去する。次に、テスト対象アプリケーションクラス使用情報に今回取得した情報を格納して、ここでの処理を終了する(ステップ703)。 (3) Then, it is checked whether or not the information of the file is already stored in the test target application class use information described with reference to FIG. 3, and if it is stored, the information is once erased. Next, the information acquired this time is stored in the test target application class usage information, and the processing here is terminated (step 703).

(4)ステップ701の判定で、取得した解析対象のファイルがテストケースであった場合、ファイル全体と各メソッドのチェックサムとを取得し、次に、図5に示して説明したテストケース更新情報からテストケースクラスの情報を取得して比較を行う(ステップ704)。 (4) If it is determined in step 701 that the acquired analysis target file is a test case, the entire file and the checksum of each method are acquired, and then the test case update information described with reference to FIG. The test case class information is obtained from the data and compared (step 704).

(5)ステップ704でのチェックサムの比較からメソッドに変更があったか否かを判定し、メソッドに変更があった場合は、テストケース更新情報の当該情報を消去し、新しい情報を設定して、ここでの処理を終了する。また、メソッドに変更がなかった場合、何もせずにここでの処理を終了する(ステップ705、706)。 (5) It is determined from the checksum comparison in step 704 whether or not the method has been changed. If the method has been changed, the information in the test case update information is deleted, new information is set, The process here ends. If there is no change in the method, the processing here is terminated without doing anything (steps 705 and 706).

図8は図6に示して説明したシーケンスにおけるステップ623での選択部103が行うテストケース選択の処理動作を説明するフローチャートであり、次に、これについて説明する。   FIG. 8 is a flowchart for explaining the test case selection processing operation performed by the selection unit 103 at step 623 in the sequence shown in FIG. 6. Next, this will be described.

(1)テストケース選択部103は、テストケース選択の処理を開始すると、まず、リポジトリの図4に示して説明したテストケース実行情報から、対象となるテストケースの情報を取得し、起動時に渡された実施重要度と取得したテストケースの重要度とを比較する(ステップ801、802)。 (1) When the test case selection unit 103 starts the test case selection process, first, the test case selection unit 103 acquires information on the target test case from the test case execution information described with reference to FIG. The execution importance thus obtained is compared with the importance of the acquired test case (steps 801 and 802).

(2)ステップ802での比較の処理で、テストケースの重要度が、起動時に渡された実施重要度より小さかった場合、起動時に渡された実施時間閾値と取得したテストケースの実績時間の平均とを比較する(ステップ803)。 (2) In the comparison process in step 802, if the importance of the test case is smaller than the implementation importance passed at the time of startup, the average of the execution time threshold passed at startup and the actual time of the acquired test case Are compared (step 803).

(3)ステップ802での比較の処理で、テストケースの重要度が、起動時に渡された実施重要度と等しいか、大きかった場合、あるいは、ステップ803の比較で、テストケースの実績時間の平均が、起動時に渡された実施時間閾値と等しいか、大きかった場合、そのテストケースをテスト実行対象とはしないとして、ここでの処理を終了する(ステップ804)。 (3) In the comparison process in step 802, when the importance of the test case is equal to or greater than the execution importance passed at the time of starting, or in the comparison in step 803, the average of the actual time of the test case However, if it is equal to or larger than the execution time threshold value passed at the time of activation, the test case is determined not to be a test execution target, and the process is terminated (step 804).

(4)ステップ803での比較の処理で、テストケースの実績時間の平均が、起動時に渡された実施時間閾値より小さかった場合、すなわち、テストケースの重要度が、起動時に渡された実施重要度より小さく、かつ、テストケースの実績時間の平均が、起動時に渡された実施時間閾値より小さかった場合、そのテストケースをテスト実行対象とするとして、ここでの処理を終了する(ステップ805)。 (4) In the comparison process in step 803, when the average of the actual time of the test case is smaller than the execution time threshold value passed at startup, that is, the importance of the test case passed at startup If the average of the actual time of the test case is smaller than the execution time threshold value passed at the time of activation, the test case is regarded as a test execution target and the process is terminated (step 805). .

前述した本発明の実施形態での各処理は、プログラムにより構成し、情報処理装置に実行させることができ、また、それらのプログラムは、FD、CDROM、DVD等の記録媒体に格納して提供することができ、また、ネットワークを介してディジタル情報により提供することができる。   Each process in the above-described embodiment of the present invention is configured by a program and can be executed by an information processing apparatus, and these programs are provided by being stored in a recording medium such as an FD, CDROM, or DVD. And can be provided by digital information over a network.

本発明の一実施形態によるプログラムのテスト時にテストケースの選択を行うテストケースの選択システムの構成を示すブロック図である。It is a block diagram which shows the structure of the test case selection system which selects a test case at the time of the test of the program by one Embodiment of this invention. テストケース選択部の内部構造を示すブロック図である。It is a block diagram which shows the internal structure of a test case selection part. テスト対象アプリクラス使用情報が格納されるリポジトリ内のレコードについて説明する図である。It is a figure explaining the record in the repository in which test object application class use information is stored. テストケース実行情報が格納されるリポジトリ内のレコードについて説明する図である。It is a figure explaining the record in the repository in which test case execution information is stored. テストケース更新情報が格納されるリポジトリ内のレコードについて説明する図である。It is a figure explaining the record in the repository in which test case update information is stored. 本発明の実施形態での全体の処理動作を説明するシーケンスチャートである。It is a sequence chart explaining the whole processing operation in the embodiment of the present invention. 図6に示して説明したシーケンスにおけるステップ605での選択部が行うファイル解析の処理動作を説明するフローチャートである。7 is a flowchart for explaining a file analysis processing operation performed by a selection unit in step 605 in the sequence illustrated in FIG. 6. 図6に示して説明したシーケンスにおけるステップ623での選択部が行うテストケース選択の処理動作を説明するフローチャートである。7 is a flowchart for explaining a test case selection processing operation performed by a selection unit in step 623 in the sequence illustrated in FIG. 6.

符号の説明Explanation of symbols

101 ソース構成管理ツール
102 継続的インテグレーションツール
103 テストケース選択部
104 リポジトリ
105 自動テストフレームワーク
106 テスト対象アプリケーション
107〜109 端末
201 解析部
202 更新部
203 テスト部
DESCRIPTION OF SYMBOLS 101 Source configuration management tool 102 Continuous integration tool 103 Test case selection part 104 Repository 105 Automatic test framework 106 Test object application 107-109 Terminal 201 Analysis part 202 Update part 203 Test part

Claims (2)

継続的インテグレーション手法を用いてプログラムの開発を行う際に実施するテストを効率的に実施することができるようにテストケースを選択するテストケースの選択方法において、
情報処理装置内のリポジトリにテストケースの属性として重要度及び実行実績時間を保持させると共に、前記情報処理装置内に継続的インテグレーションツールとテストケース選択手段とを備え、
前記テストケース選択手段は、開発者からソース登録を受けたソース構成管理ツールから継続的インテグレーションツールにソース変更の通知があったときに、継続的インテグレーションツールから渡された変更ファイルの解析を行い、解析結果を前記リポジトリに格納し、その後に継続的インテグレーションツールから渡された実施重要度及び実施時間閾値と、前記リポジトリに格納されたテストケースの属性として重要度及び実行実績時間とから実行すべきテストケースを選択し、その選択に際し、渡された実施重要度と取得したテストケースの重要度とを比較し、渡された実施時間閾値と取得したテストケースの実行実績時間の平均とを比較し、テストケースの重要度が、起動時に渡された実施重要度より小さく、かつ、テストケースの実行実績時間の平均が、起動時に渡された実施時間閾値より小さかった場合、そのテストケースをテスト実行対象とするとしてテストケースを選択することを特徴とするテストケースの選択方法。
In the test case selection method that selects the test case so that the test performed when developing the program using the continuous integration method can be performed efficiently,
The repository in the information processing apparatus holds the importance and execution performance time as the attribute of the test case, and includes a continuous integration tool and a test case selection means in the information processing apparatus,
The test case selection means analyzes the change file passed from the continuous integration tool when the source configuration management tool that received the source registration from the developer is notified of the source change to the continuous integration tool. Analysis results should be stored in the repository, and then executed based on the execution importance and execution time thresholds passed from the continuous integration tool, and the importance and execution actual time as attributes of the test cases stored in the repository Select a test case, and compare the execution importance passed with the importance of the acquired test case, and compare the passed execution time threshold with the average of the actual execution time of the acquired test case. , The importance of the test case is less than the implementation importance passed at startup, and the test case Average execution actual time, if smaller than passed execution time threshold during startup, the selection method of test cases and selects the test case as to the test case the test executed.
継続的インテグレーション手法を用いてプログラムの開発を行う際に実施するテストを効率的に実施することができるようにテストケースを選択するテストケースの選択システムにおいて、In the test case selection system that selects test cases so that the tests performed when developing programs using the continuous integration method can be performed efficiently,
情報処理装置内のリポジトリにテストケースの属性として重要度及び実行実績時間を保持させると共に、前記情報処理装置内に継続的インテグレーションツールとテストケース選択手段とを備え、The repository in the information processing apparatus holds the importance and execution performance time as the attribute of the test case, and includes a continuous integration tool and a test case selection means in the information processing apparatus,
前記テストケース選択手段は、開発者からソース登録を受けたソース構成管理ツールから継続的インテグレーションツールにソース変更の通知があったときに、継続的インテグレーションツールから渡された変更ファイルの解析を行う解析部、解析の結果を前記リポジトリに格納する更新部、及び、その後に継続的インテグレーションツールから渡された実施重要度及び実施時間閾値と前記リポジトリに格納されたテストケースの属性として重要度及び実行実績時間とから実行すべきテストケースを選択するテスト部を備えて構成され、前記テスト部は、渡された実施重要度と取得したテストケースの重要度とを比較し、渡された実施時間閾値と取得したテストケースの実行実績時間の平均とを比較し、テストケースの重要度が、起動時に渡された実施重要度より小さく、かつ、テストケースの実行実績時間の平均が、起動時に渡された実施時間閾値より小さかった場合、そのテストケースをテスト実行対象とするとしてテストケースを選択することを特徴とするテストケースの選択システム。The test case selection means performs analysis of the change file passed from the continuous integration tool when the source configuration management tool that received the source registration from the developer is notified of the source change to the continuous integration tool. Section, an update section for storing the analysis result in the repository, and an implementation importance level and an execution time threshold value passed from the continuous integration tool and an attribute of the test case stored in the repository. A test unit that selects a test case to be executed based on time, the test unit compares the passed execution importance with the importance of the acquired test case, Compare the average execution time of the acquired test cases, and the importance of the test case is passed at startup. If the average execution time of the test case is smaller than the execution time threshold passed at startup, the test case is selected as the test execution target. Characteristic test case selection system.
JP2008308946A 2008-12-03 2008-12-03 Test case selection method and selection system Expired - Fee Related JP5213671B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008308946A JP5213671B2 (en) 2008-12-03 2008-12-03 Test case selection method and selection system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008308946A JP5213671B2 (en) 2008-12-03 2008-12-03 Test case selection method and selection system

Publications (2)

Publication Number Publication Date
JP2010134643A JP2010134643A (en) 2010-06-17
JP5213671B2 true JP5213671B2 (en) 2013-06-19

Family

ID=42345893

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008308946A Expired - Fee Related JP5213671B2 (en) 2008-12-03 2008-12-03 Test case selection method and selection system

Country Status (1)

Country Link
JP (1) JP5213671B2 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6217212B2 (en) 2013-07-25 2017-10-25 富士通株式会社 Test program, test method and test apparatus
WO2016016975A1 (en) 2014-07-30 2016-02-04 株式会社日立製作所 Development assistance system
US10489282B2 (en) 2015-04-30 2019-11-26 Micro Focus Llc Application testing
CN105827732B (en) * 2016-05-09 2019-09-20 青岛海信电器股份有限公司 A kind of version file management method and system of TV
CN106776290B (en) * 2016-11-28 2020-05-22 北京一铭铭鑫软件有限公司 Intelligent continuous integration test method for incremental learning
JP6692454B2 (en) * 2016-12-22 2020-05-13 株式会社日立製作所 Continuous integration system and resource control method
JP7016583B2 (en) * 2018-04-19 2022-02-07 東芝情報システム株式会社 Software testing methods, systems and programs
KR102439456B1 (en) * 2018-10-24 2022-09-02 삼성에스디에스 주식회사 Apparatus and method for compiling partial source code
JP7246301B2 (en) 2019-12-26 2023-03-27 株式会社日立製作所 Program development support system and program development support method
CN112162927A (en) * 2020-10-13 2021-01-01 网易(杭州)网络有限公司 Test method, medium and device of cloud computing platform and computing equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08179966A (en) * 1994-12-27 1996-07-12 Matsushita Electric Works Ltd Program test device
JP2003091431A (en) * 2001-09-19 2003-03-28 Hitachi Ltd System, method and program for selecting and executing test scenario
JP2004005399A (en) * 2002-04-05 2004-01-08 Sharp Corp Method and device for testing software
JP2007102475A (en) * 2005-10-04 2007-04-19 Dainippon Screen Mfg Co Ltd Test case extraction device, test case extraction program, and test case extraction method for software system
JP2007226526A (en) * 2006-02-23 2007-09-06 Ns Solutions Corp Information processor, information processing method, program and storage medium
JP4873408B2 (en) * 2006-06-15 2012-02-08 大日本スクリーン製造株式会社 Software system test case selection device and test case selection program

Also Published As

Publication number Publication date
JP2010134643A (en) 2010-06-17

Similar Documents

Publication Publication Date Title
JP5213671B2 (en) Test case selection method and selection system
US11366747B2 (en) Unified test automation system
US11281570B2 (en) Software testing method, system, apparatus, device medium, and computer program product
US9703677B2 (en) Code coverage plugin
US8091066B2 (en) Automated multi-platform build and test environment for software application development
Manner et al. Troubleshooting serverless functions: a combined monitoring and debugging approach
CN105468529A (en) Accurate traversal method and apparatus for UI controls of android application
US10514898B2 (en) Method and system to develop, deploy, test, and manage platform-independent software
US8448147B2 (en) Heterogenic Coverage Analysis
US9256509B1 (en) Computing environment analyzer
CN112241360A (en) Test case generation method, device, equipment and storage medium
CN103186463B (en) Determine the method and system of the test specification of software
US11481245B1 (en) Program inference and execution for automated compilation, testing, and packaging of applications
Thakkar et al. A framework for measurement based performance modeling
US10095511B1 (en) System, method, and computer program for converting a current Java project to a Maven project
CN107038117B (en) Web automatic testing method based on definition-reference between event processing functions
US11422917B2 (en) Deriving software application dependency trees for white-box testing
CN113742211A (en) Test method, Appium client and computer storage medium
CN111400171A (en) Interface testing method, system, device and readable storage medium
JP7380851B2 (en) Test script generation device, test script generation method and program
CN114356783A (en) Method and device for automatically generating unit test code, storage medium and equipment
CN113326193A (en) Applet testing method and device
CN115168175A (en) Program error solving method, device, electronic equipment and storage medium
CN116932414B (en) Method and equipment for generating interface test case and computer readable storage medium
CN116774988B (en) Method and device for releasing frame package mode symbol dependence

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110802

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121128

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121204

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130130

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130226

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20160308

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees