JP2002278795A - Method and device for supporting test for object oriented development - Google Patents
Method and device for supporting test for object oriented developmentInfo
- Publication number
- JP2002278795A JP2002278795A JP2001080182A JP2001080182A JP2002278795A JP 2002278795 A JP2002278795 A JP 2002278795A JP 2001080182 A JP2001080182 A JP 2001080182A JP 2001080182 A JP2001080182 A JP 2001080182A JP 2002278795 A JP2002278795 A JP 2002278795A
- Authority
- JP
- Japan
- Prior art keywords
- test
- driver
- data
- cases
- class
- 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.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 338
- 238000000034 method Methods 0.000 title claims abstract description 22
- 238000011161 development Methods 0.000 title claims abstract description 9
- 238000011981 development test Methods 0.000 claims description 4
- 238000012545 processing Methods 0.000 abstract description 24
- 238000010586 diagram Methods 0.000 description 13
- 238000007781 pre-processing Methods 0.000 description 11
- 238000004364 calculation method Methods 0.000 description 6
- 230000014509 gene expression Effects 0.000 description 4
- 238000012805 post-processing Methods 0.000 description 4
- 238000010998 test method Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000013523 data management Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000013102 re-test Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Landscapes
- Stored Programmes (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、オブジェクト指向
プログラム開発で作成されたテスト対象オブジェクトの
テストを支援するオブジェクト指向開発用テスト支援方
法および装置に関するものである。[0001] 1. Field of the Invention [0002] The present invention relates to an object-oriented development test support method and apparatus for supporting a test of a test target object created by object-oriented program development.
【0002】[0002]
【従来の技術】従来、オブジェクト指向プログラム開発
作業において作成されたオブジェクトのテストを支援す
る技術として、テスト項目の自動生成、テストドライバ
の自動生成の方法、装置が考えられてきた。例えば特開
平5−342054号公報に記載のものがある。この公
報に記載された技術では、テスト項目の自動生成、評
価、テストプログラムを自動生成することが考えられて
おり、テストで使用するデータの型、値の範囲、長さ等
の基本データ属性を設定し、組み合わせることで、抽出
条件と結論を自動的に生成し、テストドライバを生成す
ることが考えられている。2. Description of the Related Art Conventionally, methods and apparatuses for automatically generating test items and automatically generating test drivers have been considered as techniques for supporting testing of objects created in object-oriented program development work. For example, there is one described in JP-A-5-34205. According to the technology described in this publication, it is considered that test items are automatically generated, evaluated, and a test program is automatically generated. By setting and combining, it is considered that an extraction condition and a conclusion are automatically generated and a test driver is generated.
【0003】また、特開平11−154106号公報に
記載のものがある。この公報に記載の技術は、テスト項
目の組み合わせに主眼が置かれており、プログラムの構
造、文、式、要素から成るテスト条件の組み合わせによ
るテスト項目が自動的に生成され、生成されたテスト項
目に従った、テストドライバも自動的に生成されること
が考えられている。いずれの場合も、テストデータの自
動生成とテストデータからテストドライバを自動生成す
ることが考えられている。[0003] Also, there is one disclosed in JP-A-11-154106. The technique described in this publication focuses on a combination of test items, and automatically generates test items based on a combination of test conditions including a program structure, a statement, an expression, and an element, and generates the generated test items. It is considered that a test driver according to the above is also automatically generated. In any case, it is considered that test data is automatically generated and a test driver is automatically generated from the test data.
【0004】[0004]
【発明が解決しようとする課題】しかしながら、特開平
5−342054号公報に記載の技術は、データの型、
値の範囲、長さ等の基本データ属性を組み合わせること
で、テストで使用するデータとテストデータを埋め込ん
で生成したテストドライバを自動的に生成できるが、テ
ストケース1件毎にテストドライバを自動生成しなけれ
ばならないという問題がる。また、特開平11−154
106号公報に記載の技術は、プログラムの構造、文、
式、要素からテスト条件を組み合わせることでテストで
使用するデータとテストデータを埋め込んで生成したテ
ストドライバを自動的に生成できるが、テストケース1
件毎にテストドライバを自動生成しなければならないと
いう問題がある。すなわち、いずれの従来技術もテスト
ケース1件毎にテストドライバを自動生成しなければな
らず、複数のテストケースを設定してテストするには効
率が悪いという問題がある。However, the technology described in Japanese Patent Application Laid-Open No. Hei 5-342054 discloses a data type,
By combining basic data attributes such as value range and length, test drivers generated by embedding test data and test data can be automatically generated, but test drivers are automatically generated for each test case There is a problem that must be done. Also, JP-A-11-154
The technology described in Japanese Patent Publication No. 106 is disclosed in Japanese Patent Application Publication No.
By combining test conditions from expressions and elements, data to be used in a test and a test driver generated by embedding test data can be automatically generated.
There is a problem that a test driver must be automatically generated for each case. That is, all of the prior arts have to automatically generate a test driver for each test case, and there is a problem that it is inefficient to set and test a plurality of test cases.
【0005】本発明の目的は、複数のテストケースによ
るテストを効率良く実施することができるオブジェクト
指向開発用テスト支援方法および装置を提供することに
ある。An object of the present invention is to provide a test support method and apparatus for object-oriented development that can efficiently execute tests using a plurality of test cases.
【0006】[0006]
【課題を解決するための手段】上記目的を達成するため
に、本発明のオブジェクト指向開発用テスト支援方法
は、テスト対象オブジェクトに対する複数のテストケー
スと該複数のテストケースに共通する処理を行うドライ
バ情報とを含むテストデータを作成するステップと、前
記テストデータ中の複数のテストケース毎の入力値およ
び期待値を取得するステップと、前記テストデータから
テストドライバ情報を取得し、該テストドライバ情報で
指定されたテストドライバに前記入力値および期待値を
入力し、テストケース毎のテストを実行するステップ
と、テスト結果を出力するステップとを備えたことを特
徴とする。In order to achieve the above object, a test support method for object-oriented development according to the present invention provides a plurality of test cases for an object to be tested and a driver for performing processing common to the plurality of test cases. Creating test data including information, acquiring input values and expected values for each of a plurality of test cases in the test data, acquiring test driver information from the test data, The method includes a step of inputting the input value and the expected value to a designated test driver, executing a test for each test case, and outputting a test result.
【0007】本発明のオブジェクト指向開発用テスト支
援装置は、テスト対象オブジェクトに対する複数のテス
トケースと該複数のテストケースに共通する処理を行う
ドライバ情報とを含むテストデータを作成する手段と、
前記テストデータ中の複数のテストケース毎の入力値お
よび期待値を取得する手段と、前記テストデータからテ
ストドライバ情報を取得し、該テストドライバ情報で指
定されたテストドライバに前記入力値および期待値を入
力し、テストケース毎のテストを実行する手段と、テス
ト結果を出力する手段とを備えたことを特徴とする。ま
た、テストデータ中のテストドライバを管理する手段
と、テストデータ中のテストケースを管理する手段とを
さらに備えたことを特徴とする。また、テストケースを
表示する手段と、テスト状況を表示する手段とをさらに
備えたことを特徴とする。本発明においては、共通の処
理の流れを複数のテストケースに共通のドライバで記述
することにより、複数のテストケースで1つのドライバ
を使用し、かつテスト項目毎の入力値および期待値を用
い、効率的にテスト対象のオブジェクト(またはクラ
ス)をテストすることができる。[0007] The test support apparatus for object-oriented development of the present invention comprises: means for creating test data including a plurality of test cases for a test target object and driver information for performing processing common to the plurality of test cases;
Means for obtaining input values and expected values for each of a plurality of test cases in the test data; obtaining test driver information from the test data; and providing the input values and expected values to a test driver specified by the test driver information. And means for executing a test for each test case, and means for outputting a test result. Further, it is characterized by further comprising means for managing a test driver in the test data and means for managing a test case in the test data. Further, it is characterized by further comprising means for displaying a test case and means for displaying a test status. In the present invention, by describing a common processing flow with a common driver for a plurality of test cases, one driver is used for a plurality of test cases, and an input value and an expected value for each test item are used. The object (or class) to be tested can be efficiently tested.
【0008】[0008]
【発明の実施の形態】以下、図面を参照しながら本発明
の実施の形態を説明する。図1は、本発明を適用したオ
ブジェクト指向開発用テスト支援装置の実施形態を示す
ブロック構成図である。ここで示す装置は、テストをコ
ントロールするテスター1300と、テスター1300
が読み込むテストデータ1500、テストシナリオを記
述したテストドライバ1400、テストデータ1500
を管理するテストデータ管理機能1700、テストデー
タを表示するテストデータ表示部1800、テスター1
300によってテストの進捗状況が表示されるテスト状
況表示部1100、テストの結果を表示するテスト結果
部1200から構成されている。テストデータ1500
は、テストデータを使用するテストドライバ名151
0、テストドライバ1400が初期化処理1410で使
用する初期化処理パラメータ1520、テストドライバ
1400がテストシナリオ1420で使用する前処理パ
ラメータ1530、テストシナリオ1420が使用する
複数のテストケース1541、1542、1543、テ
ストシナリオ1420が使用する後処理パラメータ15
50、テストドライバ1400が終了処理1430で使
用する終了処理パラメータ1560から構成されてい
る。テストドライバ1400は、初期化処理1410、
テストシナリオ1420、終了処理1430を含む。ま
た、テストシナリオ1420は前処理1421、後処理
1422を含む。Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of an object-oriented development test support apparatus to which the present invention is applied. The apparatus shown here comprises a tester 1300 for controlling a test and a tester 1300
Test data 1500, a test driver 1400 describing a test scenario, and test data 1500
Data management function 1700 that manages test data, test data display section 1800 that displays test data, tester 1
A test status display unit 1100 displays the progress of the test by 300, and a test result unit 1200 displays the test results. Test data 1500
Is the test driver name 151 that uses the test data.
0, initialization processing parameters 1520 used by the test driver 1400 in the initialization processing 1410, preprocessing parameters 1530 used by the test driver 1400 in the test scenario 1420, a plurality of test cases 1541, 1542, 1543 used by the test scenario 1420, Post-processing parameters 15 used by test scenario 1420
50, an end processing parameter 1560 used by the test driver 1400 in the end processing 1430. The test driver 1400 performs initialization processing 1410,
A test scenario 1420 and an end process 1430 are included. The test scenario 1420 includes a pre-process 1421, and a post-process 1422.
【0009】テスター1300がテストデータ1500
を読み取り、テスト対象のオブジェクト(またはクラ
ス)をテストする方法の概要を説明する。まず、テスタ
ー1300はテストデータ1500を取得する(191
0)。この後、テスタデータ1500中のテストドライ
バ名1520を読み取り、指定されたテストドライバ1
400を使用する(1920)。なお、図1ではテスト
ドライバは1つしか記述していないが、テストドライバ
名で指定し得る数のテストドライバが存在する。この
後、テストドライバ1400は初期化処理パラメータ1
520を読み取り、初期化処理1410を行う(193
0)。また、テストシナリオ1420は前処理パラメー
タ1530を読み込んで、前処理1421を行う(19
40)。さらに、テストシナリオ1420は1つのテス
トケース1541を読み込んで、テストする(195
0)。テストシナリオ1420は後処理パラメータ15
50を読み込んで、後処理1422を行う(196
0)。テスター1300はテスト状況表示部1100に
テストの進捗状況を表示する(1965)。このように
して1つのテストケース1541によるテストが終了し
たならば、共通のテストドライバ1400を用いるテス
トケース1542、1543についても同様に、テスト
シナリオの処理(1940から1960までの処理)を
行う。全てのテストケースによるテストが終了したなら
ば、終了処理パラメータ1560を読み込んで、終了処
理1430を行う(1970)。そして、テスト結果表
示部1200にテスト結果を表示する(1980)。The tester 1300 receives test data 1500
Read and outline how to test the object (or class) under test. First, the tester 1300 acquires the test data 1500 (191).
0). Thereafter, the test driver name 1520 in the tester data 1500 is read, and the specified test driver 1
400 (1920). Although only one test driver is described in FIG. 1, there are as many test drivers as can be specified by the test driver name. Thereafter, the test driver 1400 sets the initialization processing parameter 1
520 is read, and initialization processing 1410 is performed (193).
0). The test scenario 1420 reads the preprocessing parameter 1530 and performs the preprocessing 1421 (19)
40). Further, the test scenario 1420 reads and tests one test case 1541 (195).
0). The test scenario 1420 has the post-processing parameter 15
50, and post-process 1422 is performed (196).
0). The tester 1300 displays the progress of the test on the test status display unit 1100 (1965). When the test using one test case 1541 is completed in this way, the test scenario processing (processing from 1940 to 1960) is similarly performed for the test cases 1542 and 1543 using the common test driver 1400. When the tests for all the test cases are completed, the end processing parameter 1560 is read and the end processing 1430 is performed (1970). Then, the test result is displayed on the test result display section 1200 (1980).
【0010】図2から図7は、複数のテストケースから
なるテストデータを複数含むテストデータリストによっ
てテストする場合の具体例を示す図であり、図2はテス
ト方法のフローチャート、図3はテストデータとテスト
ドライバの関係図、図4はクラス図表現で示した装置構
成図、図5はテストケースのテストのフローチャート、
図6はテスト状況表示画面の具体例、図7はテスト結果
画面の具体例を示す図である。図3においては、減算ク
ラスの実態であるインスタンス3201と除算クラスの
実態であるインスタンス3203をこれらのインスタン
スに共通するインタフェースを持つ「四則演算_計算す
るドライバ」3202を用いてテストする具体例と、平
方根クラスの実態であるインスタンス3205を別の
「演算_計算するドライバ」3204を用いてテストす
る具体例を示している。FIGS. 2 to 7 are diagrams showing a specific example of a case where a test is performed by a test data list including a plurality of test data including a plurality of test cases. FIG. 2 is a flowchart of the test method, and FIG. FIG. 4 is an apparatus configuration diagram shown in a class diagram expression, FIG. 5 is a flowchart of a test case test,
FIG. 6 is a diagram showing a specific example of the test status display screen, and FIG. 7 is a diagram showing a specific example of the test result screen. In FIG. 3, a concrete example of testing an instance 3201 which is the actual state of the subtraction class and an instance 3203 which is the actual state of the division class using a “four arithmetic operation_calculating driver” 3202 having an interface common to these instances, A specific example in which an instance 3205 which is the actual state of the square root class is tested using another “operation_calculation driver” 3204 is shown.
【0011】図3において、減算クラスのインスタンス
3201のテストを行う場合、減算クラスのインスタン
ス3201と当該減算クラスのテストケース3001、
3002、3003からなる減算テストデータ310
1、減算クラスのインスタンス3201のテストドライ
バとして使用する「四則演算_計算する」ドライバ32
02を使用してテストする。また、除算クラスのインス
タンス3203のテストを行う場合、除算クラスのイン
スタンス3203と当該減算クラスのインスタンス32
03のテストケース3004、3005、3006から
なる除算テストデータ3102、除算クラスインスタン
ス3203のテストドライバとして使用する「四則演算
_計算するドライバ」3203を使用してテストする。
これに対し、平方根クラスのインスタンス3205のテ
ストを行う場合、平方根クラスのインスタンス3205
と、当該平方根クラスのインスタンス3205のテスト
ケース3007、3008からなる平方根テストデータ
3103、平方根クラスのインスタンス3205のテス
トドライバとして使用する「演算_計算するドライバ」
3204を使用してテストする。In FIG. 3, when a test is performed on the instance 3201 of the subtraction class, the instance 3201 of the subtraction class and the test case 3001 of the subtraction class are tested.
Subtraction test data 310 consisting of 3002 and 3003
1. “Four arithmetic operations_calculate” driver 32 used as a test driver for instance 3201 of subtraction class
Test using 02. When a test is performed on the instance 3203 of the division class, the instance 3203 of the division class and the instance 32
The test is performed using “division arithmetic operation_calculating driver” 3203 used as a test driver for division test data 3102 composed of test cases 3004, 3005, and 3006 of No. 03 and a division class instance 3203.
On the other hand, when testing the instance 3205 of the square root class, the instance 3205 of the square root class is tested.
And the square root test data 3103 composed of the test cases 3007 and 3008 of the instance 3205 of the square root class, and “operation_calculation driver” used as a test driver of the instance 3205 of the square root class.
Test using 3204.
【0012】図4は図3で示した減算クラスおよび平方
根クラスのインスタンスをテストする際の具体的構成を
クラス図表現で示した図である。ここでは、減算テスト
データリスト4000、「減算_計算するテストデー
タ」4001、加減乗除を処理するクラスと平方根クラ
スのルートクラスである演算クラス4100、加減乗除
をそれぞれ処理するクラスの親クラスである四則演算ク
ラス4101と四則演算クラス4101のサブクラスで
ある乗算クラス4111、除算クラス4112、加算ク
ラス4113、減算クラス4114、平方根クラス41
15、加減乗除をそれぞれ処理するクラス4111、4
112、4113、4114、4115を毎回生成する
のを避け、オブジェクトを再使用する四則演算Pool
クラス4200、四則演算クラスのインタフェースを使
用してテストする「四則演算_計算する_テストドライ
バ」4522、テストデータ4001を読み込み、「四
則演算_計算する_テストドライバ」4522へテスト
データを速やかに扱えるインタフェースを提供し、テス
トケースに従うテストを行うテストドライバ4521、
「減算_計算するテストデータ」4001を読み込み、
テストケースの数だけテストドライバ4522を使用し
てテストし、減算テスト状況4003を表示し、減算テ
スト結果4002を返すテスター4410から構成され
ている。FIG. 4 is a diagram showing, in a class diagram expression, a specific configuration when testing the instances of the subtraction class and the square root class shown in FIG. Here, a subtraction test data list 4000, “subtraction_calculated test data” 4001, an arithmetic class 4100 which is a class for processing addition, subtraction, multiplication and division and a root class of a square root class, and four rules which are parent classes of classes for processing addition, subtraction, multiplication and division, respectively A multiplication class 4111, a division class 4112, an addition class 4113, a subtraction class 4114, and a square root class 41, which are subclasses of the operation class 4101 and the four arithmetic classes 4101
15. Classes 4111 and 4 for processing addition, subtraction, multiplication and division, respectively
Four arithmetic operations Pool that reuses objects, avoiding generating 112, 4113, 4114, 4115 every time
Class 4200, “Four arithmetic operations_calculate_test driver” 4522, which tests using the interface of the four arithmetic operations class, and test data 4001, are read, and the test data can be quickly handled to “four arithmetic operations_calculate_test driver” 4522. A test driver 4521 that provides an interface and performs tests according to test cases;
Read “subtraction_calculated test data” 4001,
The tester 4410 includes a tester 4410 that performs tests by the number of test cases using the test driver 4522, displays a subtraction test status 4003, and returns a subtraction test result 4002.
【0013】図3、図4の具体例について図2のフロー
チャートに従って、減算クラス4114をテストする方
法を以下に説明する。まず、テスター4410は減算テ
ストデータリスト4000から1つの「減算_計算する
テストデータ」4001を取り出す(ステップ200
1)。次に、テスト状況表示部1100に減算テスト状
況4003として、図6に示すように現在テスト中のテ
ストデータ6020を表示する(ステップ2110)。A method of testing the subtraction class 4114 will now be described with reference to the flowchart of FIG. 2 for the specific examples of FIGS. First, the tester 4410 extracts one “subtraction_calculated test data” 4001 from the subtraction test data list 4000 (step 200).
1). Next, the test data 6020 under test is displayed on the test status display unit 1100 as the subtraction test status 4003 as shown in FIG. 6 (step 2110).
【0014】図6は減算テスト状況4003の例を示す
ものである。減算テスト状況4003は、テストデータ
リスト中の何件目のテストデータまで終了したかを示す
テストデータ進捗状況表示バー6010と現在テスト中
のテストデータを表示するテストデータ名6020、テ
ストデータ中の何件目のテストケースまで終了したかを
示すテストケース進捗状況表示バー6030、現在のテ
ストデータのテストケースまでに終了したテストケース
終了件数6070、テスト終了件数6070中、成功し
たテストケース件数6040、失敗したテストケース件
数6050、例外が発生したテスト件数6060から構
成されている。FIG. 6 shows an example of a subtraction test situation 4003. The subtraction test status 4003 includes a test data progress display bar 6010 indicating the number of test data in the test data list that has been completed, a test data name 6020 displaying the test data currently being tested, and a description of the test data. A test case progress bar 6030 indicating whether or not the test case has been completed, the number of test cases completed by the current test data test case 6070, the number of completed test cases 6070, the number of successful test cases 6040, the failure The number of test cases 6050 and the number of test cases 6060 where an exception has occurred.
【0015】次に、テスター4410は「減算_計算す
るテストデータ」4001からテストドライバ名「四則
演算_計算する_テストドライバ」4522を読み取る
(ステップ2002)。次に、テスター4410はテス
トデータ4001から初期化処理タグを読み取り、プー
ル数が「10」との初期化データを読み取る(ステップ
2003)。次に、テスター4410はテストデータ4
001から終了処理タグを読み取る(ステップ200
4)。さらにテスター4410はテストデータ4001
から前処理タグを読み取り、クラス名が減算、プール使
用が「true」との前処理データを読み取る(ステッ
プ2005)。Next, the tester 4410 reads the test driver name “four arithmetic operations_calculate_test driver” 4522 from the “subtraction_calculate test data” 4001 (step 2002). Next, the tester 4410 reads the initialization processing tag from the test data 4001, and reads the initialization data indicating that the number of pools is “10” (Step 2003). Next, tester 4410 sets test data 4
Read the end processing tag from 001 (Step 200)
4). Further, the tester 4410 has the test data 4001
The pre-processing tag is read from, the class name is subtracted, and the pre-processing data indicating that the pool usage is "true" is read (step 2005).
【0016】次に、テスター4410はテストデータ4
001から後処理タグを読み取り、プール返却が「tr
ue」との後処理データを読み取る(ステップ200
6)。次に、テストドライバのサブクラス、「四則演算
_計算するテストドライバ」4522は初期化データで
あるプール数が「10」とのデータを使用して、四則演
算プールクラス4200のインスタンスを、プール数を
10個にして生成する(ステップ2007)。次に、テ
ストデータ4001から最初のテストケース3001
(図3)を取り出す(ステップ2008)。そして、前処
理データであるクラス名が減算、プール使用が「tru
e」とのデータを使用し、四則演算プールクラス420
0のインスタンスから減算クラス4114のインスタン
ス3201を取得する(ステップ2009)。次に、テ
ストケースタグを読み取り、元になる値が「10」、比
べる値が「5」との入力データと計算結果が「5」との
出力データを読み取る(ステップ2010)。次にテス
トケースをテストする(ステップ2011)。Next, the tester 4410 stores the test data 4
001, the post-processing tag is read, and the pool return
ue "(step 200).
6). Next, the subclass of the test driver, “four arithmetic operations_test test driver” 4522, uses the data with the pool number “10”, which is the initialization data, to assign an instance of the four arithmetic operation pool class 4200 to the pool number. It is generated with 10 pieces (step 2007). Next, the first test case 3001 is obtained from the test data 4001.
(FIG. 3) is taken out (step 2008). Then, the class name which is the pre-processing data is subtracted, and the pool usage is "tru
e "and the four arithmetic operation pool class 420
An instance 3201 of the subtraction class 4114 is obtained from the instance of 0 (step 2009). Next, the test case tag is read, and the input data whose base value is "10" and the comparison value is "5" and the output data whose calculation result is "5" are read (step 2010). Next, the test case is tested (step 2011).
【0017】テストケースをテストするフローについ
て、図5にて説明する。まず、前処理で作成した減算ク
ラス4114のインスタンス3201に元になる値「1
0」を設定する(ステップ5020)。次に、前処理で
作成した減算クラス4114のインスタンス3201に
比較する値「5」を設定する(ステップ5030)。次
に、前処理で作成した減算クラス4114のインスタン
ス3201の「計算する」メソッドを呼び出し、比較す
る値「5」から元になる値「10」を減算する(ステッ
プ5040)。次に、前処理で作成した減算クラス41
14のインスタンス3201から計算結果を取得する
(ステップ5050)。そして、テスト結果に図7に示
すようにテストデータ名7010、テストケース番号7
020を出力する(ステップ5055)。The flow for testing a test case will be described with reference to FIG. First, the value “1” based on the instance 3201 of the subtraction class 4114 created in the preprocessing is used.
"0" is set (step 5020). Next, a value “5” to be compared with the instance 3201 of the subtraction class 4114 created in the preprocessing is set (step 5030). Next, the “calculate” method of the instance 3201 of the subtraction class 4114 created in the preprocessing is called, and the original value “10” is subtracted from the value “5” to be compared (step 5040). Next, the subtraction class 41 created in the preprocessing
The calculation result is obtained from the fourteen instances 3201 (step 5050). Then, as shown in FIG. 7, a test data name 7010, a test case number 7
020 is output (step 5055).
【0018】図7はテスト結果の具体例を示すものであ
り、テスト結果7000はテストケース毎にテストの結
果を成功、失敗、例外発生の3種類で表示する。テスト
結果7000はテストケースが含まれているテストデー
タ名7010、テストデータ名の何番目のテストケース
かを表すテストケース番号7020、テストケースのテ
ストが成功したら、“成功”、失敗したら“失敗”、テ
ストケースのテスト中に例外が発生したら、“例外”と
表示する“成功,失敗,例外”7030、テスト失敗時
にテストケースの入力値、期待される結果、テストの実
行結果を表示するテストケース詳細7040から構成さ
れている。FIG. 7 shows a specific example of a test result. The test result 7000 displays the result of the test for each test case in three types: success, failure, and occurrence of an exception. The test result 7000 includes a test data name 7010 including the test case, a test case number 7020 indicating the number of the test case in the test data name, “success” when the test of the test case succeeds, and “failure” when the test of the test case fails. If an exception occurs during the test of the test case, “success, failure, exception” 7030 indicating “exception”, a test case displaying the input value of the test case, the expected result, and the test execution result when the test fails It consists of details 7040.
【0019】次に、テストドライバ4521はテストケ
ースタグから読み取った出力データの計算結果の値
「5」と減算クラス4114のインスタンス3201か
ら取得した計算結果が同じかを比較し(ステップ506
0)、テストデータに記述された結果と異なった場合、
テスト結果の“成功,失敗,例外”列に“失敗”と出力
する(ステップ5070)。次に、テスト結果のテスト
ケース詳細列にテストケースの値とテスト実行結果を出
力する(ステップ5073)。さらにテスト状況表示部
1100の失敗したテストケース件数6050を「1」
増やす(ステップ5075)。Next, the test driver 4521 compares the value "5" of the calculation result of the output data read from the test case tag with the calculation result obtained from the instance 3201 of the subtraction class 4114 (step 506).
0), if different from the result described in the test data,
"Fail" is output in the "success, failure, exception" column of the test result (step 5070). Next, the test case value and the test execution result are output to the test case details column of the test result (step 5073). Further, the number of failed test cases 6050 in the test status display section 1100 is set to “1”.
Increase (step 5075).
【0020】一方、テストデータに記述された結果と同
じ場合、テスト結果の“成功,失敗,例外”列に“成
功”と出力する(ステップ5090)。次に、テスト状
況表示部1100の成功したテストケース件数6040
を「1」増やす(ステップ5095)。また、テストケ
ースのテスト中に例外が発生し、テストできなかった場
合は、テスト結果の“成功,失敗,例外”列に“例外”
と出力する(ステップ5080)。そして、テスト状況
表示部1100の例外が発生したテストケース件数60
60を「1」増やす(ステップ5085)。次に、テス
ト状況表示部1100のテストケース終了件数6070
を「1」増やす(ステップ5100)。On the other hand, if the result is the same as the result described in the test data, "success" is output in the "success, failure, exception" column of the test result (step 5090). Next, the number of successful test cases 6040 in the test status display section 1100 is displayed.
Is increased by “1” (step 5095). If an exception occurs during the test of the test case and the test fails, “Exception” is displayed in the “success, failure, exception” column of the test result.
Is output (step 5080). Then, the number 60 of test cases in which an exception has occurred in the test status display section 1100 is displayed.
60 is increased by "1" (step 5085). Next, the number of completed test cases 6070 in the test status display section 1100
Is increased by “1” (step 5100).
【0021】図2に戻り、プール返却が「true」と
の後処理データを使用して、プール返却が「true」
であるので、四則演算Poolクラス4200のインス
タンスに減算クラス4114のインスタンス3201を
返却する(ステップ2012)。次に、テスト状況表示
部1100のテストケース終了件数6030を再表示す
る(ステップ2130)。テストデータ4001のテス
トケース3002、3003についてもステップ200
9から2012まで同様の処理を行う(ステップ201
3)。最後に、終了処理データを使用して、終了処理を
行い(ステップ2014)、テスト状況表示部1100
のテストデータ終了件数を再表示する(ステップ215
0)。ステップ2003から2014までの処理を減算
テストデータリスト4000のテストデータがなくなる
まで繰り返す(ステップ2015)。Returning to FIG. 2, using the post-process data indicating that the pool return is "true", the pool return is "true".
Therefore, the instance 3201 of the subtraction class 4114 is returned to the instance of the four arithmetic operation Pool class 4200 (step 2012). Next, the number of test case completions 6030 on the test status display unit 1100 is displayed again (step 2130). Step 200 is also performed for the test cases 3002 and 3003 of the test data 4001.
9 to 2012 (step 201).
3). Finally, an end process is performed using the end process data (step 2014), and the test status display unit 1100 is performed.
Redisplays the number of completed test data (step 215)
0). The processing from step 2003 to 2014 is repeated until there is no more test data in the subtraction test data list 4000 (step 2015).
【0022】以上説明したように本実施形態によれば、 (1)同じインタフェースを実装するクラスをテストす
る場合、ドライバを1つ提供し、それぞれのクラスに対
応したテストデータを記述することで、テストすること
ができるようになる。 (2)テストドライバを提供すれば、テストデータを増
加してもドライバを変更しなくてもよく、再テストが容
易になる。 (3)1つの親クラスから継承された複数の子クラスを
作成した場合は、親クラスのメソッドを使う限り、親ク
ラスのメソッドに対応したドライバを1つ作成し、それ
ぞれの子クラス毎にテストデータを用意すれば、テスト
ができる。 (4)作成したサブクラスが親クラスで提供した処理の
流れに沿って動作するかをテストすることができる。 (5)テストドライバが実際に使用する入出力データと
PCLの同期を取ることができるようになる。 (6)複数のテストケースが同じテストドライバを使用
するので、テストドライバのバグを防ぐ効果がある。As described above, according to the present embodiment, (1) When testing classes that implement the same interface, one driver is provided, and test data corresponding to each class is described. Be able to test. (2) If a test driver is provided, it is not necessary to change the driver even if the test data is increased, and it becomes easy to retest. (3) When multiple child classes inherited from one parent class are created, one driver corresponding to the method of the parent class is created and a test is performed for each child class as long as the method of the parent class is used. Once you have the data, you can test it. (4) It is possible to test whether the created subclass operates according to the processing flow provided by the parent class. (5) The input / output data actually used by the test driver and the PCL can be synchronized. (6) Since a plurality of test cases use the same test driver, there is an effect of preventing a bug in the test driver.
【0023】[0023]
【発明の効果】以上の説明から明らかなように、本発明
によれば、オブジェクト指向開発で作成されたテスト対
象について複数のテストケースによるテストを効率良く
実施することができる。As is apparent from the above description, according to the present invention, a test using a plurality of test cases can be efficiently performed on a test object created by object-oriented development.
【図1】本発明を適用したオブジェクト指向テスト支援
装置の実施形態を示す構成図である。FIG. 1 is a configuration diagram showing an embodiment of an object-oriented test support device to which the present invention has been applied.
【図2】テスト方法の具体例を示すフローチャートであ
る。FIG. 2 is a flowchart illustrating a specific example of a test method.
【図3】テストデータとテストドライバの関係図であ
る。FIG. 3 is a relationship diagram between test data and a test driver.
【図4】オブジェクト指向テスト支援装置の具体例を示
す図である。FIG. 4 is a diagram showing a specific example of an object-oriented test support device.
【図5】テストケースのテスト手順を示すフローチャー
トである。FIG. 5 is a flowchart showing a test procedure of a test case.
【図6】テスト状況の表示画面例を示す図である。FIG. 6 is a diagram showing a display screen example of a test status.
【図7】テスト結果の表示画面の具体例を示す図であ
る。FIG. 7 is a diagram showing a specific example of a test result display screen.
1100…テスト状況表示部、1200…テスト結果表
示部、1300…テスター、1400…テストドライ
バ、1500…テストデータ、1510…テストドライ
バ名、1520…初期化処理パラメータ、1530…前
処理パラメータ、1541〜1543…テストケース、
1550…後処理パラメータ、1560…終了処理パラ
メータ、1600…テストデータリスト、1700…テ
ストデータ管理機能、1800…テストデータ表示部。1100: Test status display section, 1200: Test result display section, 1300: Tester, 1400: Test driver, 1500: Test data, 1510: Test driver name, 1520: Initialization processing parameter, 1530: Preprocessing parameter, 1541-1543 …test case,
1550: Post-processing parameters, 1560: End processing parameters, 1600: Test data list, 1700: Test data management function, 1800: Test data display unit.
フロントページの続き (72)発明者 新居 健司 神奈川県横浜市中区尾上町6丁目81番地 日立ソフトウエアエンジニアリング株式会 社内 (72)発明者 田森 崇史 神奈川県横浜市中区尾上町6丁目81番地 日立ソフトウエアエンジニアリング株式会 社内 Fターム(参考) 5B042 GA08 HH12 HH17 MC00 5B076 DD04 EC05 EC10 Continued on the front page (72) Inventor Kenji Arai 6-81 Onoe-cho, Naka-ku, Yokohama-shi, Kanagawa Prefecture Hitachi Software Engineering Co., Ltd. In-house (72) Inventor Takashi Tamori 6-81-Oue-cho, Naka-ku, Yokohama-shi, Hitachi Software Engineering Co., Ltd. In-house F-term (reference) 5B042 GA08 HH12 HH17 MC00 5B076 DD04 EC05 EC10
Claims (4)
されたテスト対象オブジェクトのテストを支援するオブ
ジェクト指向開発用テスト支援方法であって、 テスト対象オブジェクトに対する複数のテストケースと
該複数のテストケースに共通する処理を行うドライバ情
報とを含むテストデータを作成するステップと、 前記テストデータ中の複数のテストケース毎の入力値お
よび期待値を取得するステップと、前記テストデータか
らテストドライバ情報を取得し、該テストドライバ情報
で指定されたテストドライバに前記入力値および期待値
を入力し、テストケース毎のテストを実行するステップ
と、 テスト結果を出力するステップとを備えたことを特徴と
するオブジェクト指向開発用テスト支援方法。An object-oriented development test support method for supporting a test of a test target object created by object-oriented program development, comprising: a plurality of test cases for a test target object; and a process common to the plurality of test cases. Generating test data including driver information for performing a test operation; obtaining input values and expected values for each of a plurality of test cases in the test data; obtaining test driver information from the test data; A test driver for inputting the input value and the expected value to a test driver specified by driver information, executing a test for each test case, and outputting a test result; How to help.
されたテスト対象オブジェクトのテストを支援するオブ
ジェクト指向開発用テスト支援装置であって、 テスト対象オブジェクトに対する複数のテストケースと
該複数のテストケースに共通する処理を行うドライバ情
報とを含むテストデータを作成する手段と、 前記テストデータ中の複数のテストケース毎の入力値お
よび期待値を取得する手段と、前記テストデータからテ
ストドライバ情報を取得し、該テストドライバ情報で指
定されたテストドライバに前記入力値および期待値を入
力し、テストケース毎のテストを実行する手段と、 テスト結果を出力する手段とを備えたことを特徴とする
オブジェクト指向開発用テスト支援装置。2. An object-oriented development test support apparatus for supporting a test of a test target object created by object-oriented program development, comprising: a plurality of test cases for a test target object; and a process common to the plurality of test cases. Means for generating test data including driver information for performing the test, means for obtaining input values and expected values for each of a plurality of test cases in the test data, and obtaining test driver information from the test data, A test for object-oriented development, comprising: means for inputting the input value and expected value to a test driver specified by driver information, executing a test for each test case, and outputting a test result. Support equipment.
する手段と、テストデータ中のテストケースを管理する
手段とをさらに備えたことを特徴とする請求項2に記載
のオブジェクト指向開発用テスト支援装置。3. The test support apparatus for object-oriented development according to claim 2, further comprising: means for managing a test driver in the test data; and means for managing a test case in the test data. .
状況を表示する手段とをさらに備えたことを特徴とする
請求項3に記載のオブジェクト指向開発用テスト支援装
置。4. The test support apparatus for object-oriented development according to claim 3, further comprising: means for displaying a test case; and means for displaying a test status.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001080182A JP2002278795A (en) | 2001-03-21 | 2001-03-21 | Method and device for supporting test for object oriented development |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001080182A JP2002278795A (en) | 2001-03-21 | 2001-03-21 | Method and device for supporting test for object oriented development |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2002278795A true JP2002278795A (en) | 2002-09-27 |
Family
ID=18936505
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001080182A Pending JP2002278795A (en) | 2001-03-21 | 2001-03-21 | Method and device for supporting test for object oriented development |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2002278795A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004318887A (en) * | 2003-04-14 | 2004-11-11 | Microsoft Corp | Method for testing object |
| JP2008176793A (en) * | 2007-01-19 | 2008-07-31 | Suresoft Technologies Inc | Software test system, method, and computer-readable recording medium having program stored for executing this method |
-
2001
- 2001-03-21 JP JP2001080182A patent/JP2002278795A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004318887A (en) * | 2003-04-14 | 2004-11-11 | Microsoft Corp | Method for testing object |
| JP2008176793A (en) * | 2007-01-19 | 2008-07-31 | Suresoft Technologies Inc | Software test system, method, and computer-readable recording medium having program stored for executing this method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Iansiti et al. | Developing products on Internet time | |
| US7222265B1 (en) | Automated software testing | |
| US7076713B1 (en) | Test generator for converting a model of computer component object behavior and stimulus values to test script | |
| US10235477B2 (en) | Prototyping an image processing algorithm and emulating or simulating execution on a hardware accelerator to estimate resource usage or performance | |
| US20080172581A1 (en) | Load test load modeling based on rates of user operations | |
| US7386847B2 (en) | Task roster | |
| CN113296760A (en) | Method for generating model code, computer device and readable storage medium | |
| JP3925857B2 (en) | Schedule creation method, program, and task schedule creation device | |
| JP2002278795A (en) | Method and device for supporting test for object oriented development | |
| US20030126506A1 (en) | Program testing system and method | |
| CN100559423C (en) | device simulator | |
| US20080275756A1 (en) | Apparatus and method for analyzing business continuity, and computer product | |
| US6470491B1 (en) | Method for monitoring computer programs on window-based operating platforms | |
| Kent | Test automation: From record/playback to frameworks | |
| CN116932099A (en) | Time axis processing method and device for display interface | |
| JP2001306358A (en) | GUI program test apparatus, GUI program test method, and recording medium used in the method | |
| CN111488283A (en) | Task generation method and device, electronic equipment and storage medium | |
| US20100293018A1 (en) | Test Model Abstraction For Testability in Product Line Engineering | |
| JP7501092B2 (en) | Auxiliary method, control program and device | |
| JP5224759B2 (en) | Test formula creation support system, test formula creation support method, and test formula creation support program | |
| US20170220450A1 (en) | Analytic method and analyzing apparatus | |
| JP2772999B2 (en) | Experimental system | |
| JPH1049355A (en) | Development support method for business application programs that operate screens | |
| JPH11110351A (en) | State transition control method | |
| JP2006170919A (en) | Earthquake response analyzer, earthquake response analyzing method and earthquake response analyzing program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050624 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050908 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20051228 |