JPH081609B2 - Method of determining test cases for preventing regression - Google Patents
Method of determining test cases for preventing regressionInfo
- Publication number
- JPH081609B2 JPH081609B2 JP61052111A JP5211186A JPH081609B2 JP H081609 B2 JPH081609 B2 JP H081609B2 JP 61052111 A JP61052111 A JP 61052111A JP 5211186 A JP5211186 A JP 5211186A JP H081609 B2 JPH081609 B2 JP H081609B2
- Authority
- JP
- Japan
- Prior art keywords
- test case
- statement
- test
- program
- executed
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、プログラム修正時に行なわれるリグレッシ
ョン防止用テストのテストケース決定方式に関する。The present invention relates to a test case determination method for a regression prevention test performed when a program is modified.
データ処理システムで仕様変更や障害が発生してソー
スプログラムを修正した場合、確かにその仕様変更がな
されたかまた障害が修正されたかの確認テストの他に、
他の機能のレベルダウンが起きていないかテスト(リグ
レッション防止用テスト)する必要がある。このテスト
は、全テストケースを再実行して行なっているのが現状
であるが、これは時間がかゝる。When the source program is modified due to a specification change or failure in the data processing system, in addition to the confirmation test whether the specification change was made or the failure was corrected,
It is necessary to test whether the level of other functions has dropped (test for preventing regression). This test is currently done by re-running all test cases, which is time consuming.
ところであるプログラムが走ったとき、そのプログラ
ムの各文(命令)がどの程度実行されたかを集計するテ
ストカバレージ測定ツールなるものがある。第4図にそ
の概要を示す。By the way, when a program runs, there is a test coverage measurement tool that counts how much each statement (instruction) of the program has been executed. Fig. 4 shows the outline.
これを処理順に説明すると、あるプログラムBのテ
ストケースT2を実行し、実行したプログラム部分に関
する情報(SYSCOUNT情報又はルート情報)を得る。この
情報は該プログラムの各命令のうち、どれを、何回通っ
た(実行した)かというもの、又は各命令単位ではなく
その複数個からなるルート(ブランチしている場合、ど
ちらの経路かということ)単位でどのルートを何回通っ
たかというものである。この文またはルート(こゝで単
に文ともいう)はテストケースが変れば変るものであ
る。即ち実行されるプログラムは同じでもテストケース
が異なる(これで使用するデータが異なることになる)
と、if文などでルートが分れ、実行される命令文が異な
ることになる。どの文を通ったかの情報は、コンパイラ
の機能などを利用して取出すことができる。This will be described in the order of processing. The test case T2 of a certain program B is executed, and information (SYSCOUNT information or route information) regarding the executed program portion is obtained. This information indicates which of the respective instructions of the program has been passed (executed) or how many times, or a route consisting of a plurality of instructions (in the case of branching, which route is it?). It means how many times each route has been taken. This sentence or root (also referred to as a sentence here) will change if the test case changes. That is, even if the program to be executed is the same, the test case is different (the data used by this will be different)
, The route is known by the if statement, etc., and the executed statement will be different. Information about which statement has passed can be obtained by using the function of the compiler.
この情報は各テストケース毎に纏め、また各文単位で
も纏め(累計し)、この編集結果をカウントログファイ
ルに記録する(、)。図示の例(F1)ではプログラ
ムBがテストケースT1,T2につき実行され、文番号100,2
00,300,400の各命令文がテストケースT1では18,18,4,4
回実行され、テストケースT2では2,2,0,0回実行され、
従って累計は20,20,4,4であるとしている。この累計結
果は、当該テストによる各命令文の実行状況(実行網羅
率;カバレージ)を示す。またこのログファイルは、プ
ログラムAもテストケースT1,T2,T3について実行され、
各命令文の実行回路は図示(F2)の如くであるとしてい
る。カウントログファイルの内容はディスプレイに表示
され又はプリンタにより用紙に打出され、目視に供され
る。This information is collected for each test case and also for each sentence (totalized), and the edited result is recorded in the count log file (,). In the illustrated example (F 1 ), program B is executed for test cases T1 and T2, and statement numbers 100 and 2
Each statement of 00,300,400 is 18,18,4,4 in test case T1.
Executed twice, in test case T2 2,2,0,0 times,
Therefore, the total is 20, 20, 4, 4. The cumulative result indicates the execution status (execution coverage ratio; coverage) of each statement by the test. This log file also executes program A for test cases T1, T2, T3,
The execution circuit for each statement is as shown in (F 2 ). The contents of the count log file are displayed on a display or printed on a sheet by a printer for visual inspection.
なおプログラムの命令文数は数百〜数千など多数ある
のが普通で、ログデータはその各々についてとるのが普
通であるから、カンウントログファイルの文番号数は図
示の4つではなく数百〜数千と多数ある。図ではこれを
簡略化して示している。テストケースについても同様で
ある。Note that the number of command statements in a program is usually large, such as hundreds to thousands, and log data is usually obtained for each of them. Therefore, the number of statement numbers in the count log file is not four, as shown in the figure. There are hundreds to thousands. In the figure, this is simplified and shown. The same applies to test cases.
このようなテストカバレージ測定ツールを利用すれ
ば、リグレッション防止用テストケースを絞り込み、必
要なだけのテストにして所要時間の短縮などを図ること
ができる。即ちカウントログファイルのF1を見るとテス
トケースT2では文番号300と400の命令文は実行していな
い。従って命令文300,400を修正したときのリグレッシ
ョン防止用テストでは、テストケースT2は実行する必要
がない。By using such a test coverage measurement tool, it is possible to narrow down the regression prevention test cases and make only necessary tests to shorten the required time. That is, looking at F 1 of the count log file, the command statements of statement numbers 300 and 400 are not executed in test case T2. Therefore, the test case T2 does not need to be executed in the regression prevention test when the statements 300 and 400 are modified.
本発明はかゝる点に着目するもので、迅速、効率的な
テストを可能にしようとするものである。The present invention focuses on these points, and aims to enable a quick and efficient test.
本発明は、プログラム修正時に行われるリグレッショ
ン防止用テストのテストケース決定方式において、 予めプログラムを各テストケースにつき実行して、テ
ストケース別かつ文番号別に当該文の実行回数を記録し
ておき、 プログラムを修正したとき、当該文番号について前記
記録をチェックして、該修正の影響を受けるテストケー
スを検出し、 その際、プログラム修正で命令文を更新又は削除した
ときは、該更新又は削除した文番号の実行回数が1以上
のテストケースを影響ありテストケースとし、 またプログラム修正で命令文を新たに挿入したとき
は、該挿入文番号の前、後の文番号をチェックし、いず
れか一方又は両方の文番号が1以上であれば影響ありテ
ストケースとすることを特徴とするものである。The present invention relates to a test case determination method for a regression prevention test performed when a program is modified, in which the program is executed in advance for each test case and the number of times the statement is executed is recorded for each test case and for each sentence number. When the statement is modified, the record is checked for the statement number, and the test case affected by the modification is detected. At that time, when the statement is updated or deleted by the program modification, the statement updated or deleted is detected. When a test case in which the number of times a number is executed is 1 or more is regarded as an affected test case, and when a command statement is newly inserted by program modification, the statement number before and after the inserted statement number is checked, and either one or If both sentence numbers are 1 or more, the test case is affected.
第1図に示すように本発明ではテストケース実行時に
どの文を通ったかという情報を採取し、これを蓄積して
おく。そしてソース修正が発生したとき、修正された文
が通過したルート上にあるテストケースを洗い出す。洗
い出されたテストケースが、実行ルートが変る可能性の
あるテストケースである。第1図では、文番号200を修
正した時、該当するのはテストケース1であり、従って
これをリグレッション防止のためのテストケースとす
る。テストケース2は該当せず、従って実行不要とす
る。こうして実行を要するテストケースを絞り込むこと
ができる。As shown in FIG. 1, according to the present invention, information about which sentence has passed during test case execution is collected and stored. Then, when a source correction occurs, the test case on the route through which the corrected sentence has passed is identified. The identified test cases are the test cases whose execution route may change. In FIG. 1, when the sentence number 200 is corrected, it corresponds to the test case 1, and therefore, this is the test case for preventing the regression. Test case 2 does not apply, and thus is not required to be executed. In this way, the test cases that need to be executed can be narrowed down.
第4図でこれを行なうには、影響を調査したい場所
(文、ブランチ、又はモジュール)を指定し、指定さ
れた場所が実行されているテストケースをカウントログ
ファイルより求め、これを影響テストケース(修正の影
響を受けるテストケース、従ってリグレッション防止用
テストケースとして採用すべきテストケース)として表
示させる。必要部分のみ取出すと第3図のようにな
る。T1,T2,T3は各テストケースであり、これを実行する
と1F文などで各々の実行ルートが変り、必ずしも各ケー
スとも同一ではない。そこで各々の実行ルートを取出
し、実行ルートに名前(テストケース名)をつけて蓄積
する。この蓄積(ファイル)に対して場所(文、ブラン
チなど)を指定し、指定された場所を通っているテスト
ケースを探す。場所をとすると、これを通っているテ
ストケースは図示例ではT1とT2であり、そこでこれらを
影響テストケースとして表示する。To do this in Fig. 4, specify the place (statement, branch, or module) where you want to investigate the impact, find the test case in which the specified place is executed from the count log file, and specify this as the impact test case. (Test case affected by modification, and therefore test case to be adopted as regression prevention test case). Figure 3 shows the necessary parts. T1, T2, and T3 are test cases, and when they are executed, each execution route changes with 1F statements, etc., and they are not necessarily the same in each case. Therefore, each execution route is extracted, and a name (test case name) is given to the execution route and accumulated. Specify a location (statement, branch, etc.) for this accumulation (file) and search for test cases passing through the specified location. Given the location, the test cases passing through it are T1 and T2 in the illustrated example, and these are displayed there as impact test cases.
命令文の修正には更新の他に、新たな挿入、削除もあ
る。新たな挿入の場合には、当然、当該文番号はログデ
ータになく、このまゝでは全テストケースが影響なしテ
ストケースになってしまうが、無論これは不都合であ
る。この場合は挿入された文の番号の前後いずれか一方
又は両方の文番号の実行回数が1以上か否かをチェック
し、イエスであれば当該テストケースは影響テストケー
スとする。また、挿入文番号の前、後の文番号に対応す
る文が段落名、ラベルなどの非実行文(この場合には、
実行文と区別するために実行回数にはマイナス値を設定
する。)のときは、更に1つ前又は後の文番号で判定す
る。上記の1つ前又は後の文番号も非実行文のことがあ
るが、この場合は更に1つ進める。判定対象の文番号の
実行回数が0のときは影響なしテストケースとする。In addition to updating, there are new insertions and deletions to correct the statement. In the case of a new insertion, of course, the sentence number does not exist in the log data, and all test cases will be unaffected test cases up to this point, which is of course inconvenient. In this case, it is checked whether or not the number of executions of one or both of the statement numbers before and after the inserted statement number is 1 or more, and if the result is yes, the test case is regarded as an impact test case. In addition, the sentences corresponding to the sentence numbers before and after the inserted sentence number are non-executed sentences such as paragraph names and labels (in this case,
Set a negative value for the number of executions to distinguish it from execution statements. In the case of), the sentence number immediately before or after is determined. The sentence number before or after the preceding sentence may be a non-execution sentence, but in this case, it is advanced by one. When the number of executions of the sentence number to be judged is 0, the test case has no effect.
削除は、更新と同じで、削除された文番号の実行回数
が1以上のテストケースは影響ありテストケース、0な
ら影響なしテストケースとする。当該文番号が非実行文
のときは、上記挿入と同様な判定処理を行なう。Deletion is the same as updating, and a test case in which the number of executions of the deleted sentence number is 1 or more is an affected test case, and 0 is an unaffected test case. When the statement number is a non-execution statement, the same determination processing as the above insertion is performed.
第2図の例について説明すると、(a)は文番号2110
を挿入した例、(b)は文番号3000などを削除した例で
ある。(a)は文番号2110の前、後の文番号2100,2200
をチェックし、これらの文番号の実行回数値は−1(非
実行文)であるからその次をチェックし、文番号2000の
実行回数10、文番号2300の実行回数0を得る。一方でも
0でなければ影響ありと考えられるので、このテストケ
ースは影響ありテストケースとみなす。To explain the example of FIG. 2, (a) shows sentence number 2110.
Is an example in which the sentence number 3000 and the like are deleted. (A) is the sentence numbers 2100 and 2200 before and after the sentence number 2110.
Is checked and the execution count value of these statement numbers is -1 (non-execution statement), the next check is made to obtain the execution count 10 of the statement number 2000 and the execution count 0 of the statement number 2300. If either one is not 0, it is considered that there is an influence, so this test case is regarded as an influence test case.
(b)では、文番号3000を削除した場合は、この実行
回数は0であるからこのテストケースは影響なしテスト
ケースになる。文番号3100を削除すると、この実行回数
は−1であるからこの前後をチェックし、これらは共に
0であるから、この場合も影響なしテストケースにな
る。文番号3200を削除した場合も同様であるが、文番号
3300を削除すると、この実行回数は−1、従って前後を
チェックして0,10を得、共に0ではないからこの場合は
影響ありテストケースとなる。文番号3400を削除した場
合も影響ありテストケースとなる。In (b), when the statement number 3000 is deleted, the number of executions is 0, so this test case is a test case with no effect. When the statement number 3100 is deleted, the number of executions is −1, so before and after this is checked. Since both are 0, the test case has no effect in this case as well. The same applies when sentence number 3200 is deleted, but the sentence number
If 3300 is deleted, the number of executions is -1, so 0 and 10 are checked by checking the front and back, and both are not 0. In this case, there is an influence and it becomes a test case. There is also an effect when the sentence number 3400 is deleted, and it becomes a test case.
第5図はカウントログファイルの論理構造例の一部を
示す。(a)は文番号レコード、(b)は合計レコー
ド、(c)はテストケースレコードである。FIG. 5 shows a part of an example of the logical structure of the count log file. (A) is a sentence number record, (b) is a total record, (c) is a test case record.
以上説明したように本発明によれば効率よく従って迅
速にリグレッション防止用テストを行なうことができ、
プログラム修正時に適用して甚だ有効である。As described above, according to the present invention, it is possible to efficiently and quickly perform the regression prevention test,
It is very effective when applied when modifying the program.
第1図は本発明の説明図、第2図は挿入、削除の場合の
判定要領の説明図、第3図はやゝ詳細な本発明の説明
図、第4図は測定ツールの説明図、第5図はその論理構
造の説明図である。 図面ではT1,T2,……はテストケース、F1〜F2はログファ
イル内の各記録である。FIG. 1 is an explanatory diagram of the present invention, FIG. 2 is an explanatory diagram of a judgment procedure in the case of insertion and deletion, FIG. 3 is a more detailed explanatory diagram of the present invention, FIG. 4 is an explanatory diagram of a measurement tool, FIG. 5 is an explanatory diagram of the logical structure. In the drawing, T1, T2, ... Are test cases, and F 1 to F 2 are records in the log file.
───────────────────────────────────────────────────── フロントページの続き (72)発明者 八田 信 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (56)参考文献 特開 昭58−52759(JP,A) 特開 昭55−163697(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Nobu Hata 1015 Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa Fujitsu Limited (56) References JP-A-58-52759 (JP, A) JP-A-55-163697 (JP, A)
Claims (1)
ン防止用テストのテストケース決定方式において、 予めプログラムを各テストケースにつき実行して、テス
トケース別かつ文番号別に当該文の実行回数を記録して
おき、 プログラムを修正したとき、当該文番号について前記記
録をチェックして、該修正の影響を受けるテストケース
を検出し、 その際、プログラム修正で命令文を更新又は削除したと
きは、該更新又は削除した文番号の実行回数が1以上の
テストケースを影響ありテストケースとし、 またプログラム修正で命令文を新たに挿入したときは、
該挿入文番号の前、後の文番号をチェックし、いずれか
一方又は両方の文番号が1以上であれば影響ありテスト
ケースとすることを特徴とするリグレッション防止用テ
ストケースの決定方式。1. In a test case determination method for a regression prevention test performed when a program is modified, the program is executed for each test case in advance, and the number of times the statement is executed is recorded for each test case and for each sentence number. When the program is modified, the record is checked for the relevant sentence number, and the test case affected by the modification is detected. At that time, when the command statement is updated or deleted by the program modification, the update or deletion is performed. When a test case where the statement number is executed 1 or more is considered as an affected test case, and when a new statement is inserted by modifying the program,
A method of determining a test case for regression prevention, characterized in that the statement numbers before and after the inserted statement number are checked, and if either or both of the statement numbers is 1 or more, the test case is affected.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61052111A JPH081609B2 (en) | 1986-03-10 | 1986-03-10 | Method of determining test cases for preventing regression |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61052111A JPH081609B2 (en) | 1986-03-10 | 1986-03-10 | Method of determining test cases for preventing regression |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS62216047A JPS62216047A (en) | 1987-09-22 |
| JPH081609B2 true JPH081609B2 (en) | 1996-01-10 |
Family
ID=12905751
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP61052111A Expired - Fee Related JPH081609B2 (en) | 1986-03-10 | 1986-03-10 | Method of determining test cases for preventing regression |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH081609B2 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008204405A (en) * | 2007-02-22 | 2008-09-04 | Fujitsu Ltd | Software regression test system, regression test program, and regression test method |
| KR20150030664A (en) * | 2012-06-15 | 2015-03-20 | 니혼 하츠쵸 가부시키가이샤 | Stabilizer link and manufacturing method therefor |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0635754A (en) * | 1992-07-13 | 1994-02-10 | Hitachi Ltd | Retesting method and device therefor |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS55163697A (en) * | 1979-06-05 | 1980-12-19 | Mitsubishi Electric Corp | Memory device |
| JPS5852759A (en) * | 1981-09-24 | 1983-03-29 | Fujitsu Ltd | Extraction system for pass information |
-
1986
- 1986-03-10 JP JP61052111A patent/JPH081609B2/en not_active Expired - Fee Related
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008204405A (en) * | 2007-02-22 | 2008-09-04 | Fujitsu Ltd | Software regression test system, regression test program, and regression test method |
| KR20150030664A (en) * | 2012-06-15 | 2015-03-20 | 니혼 하츠쵸 가부시키가이샤 | Stabilizer link and manufacturing method therefor |
Also Published As
| Publication number | Publication date |
|---|---|
| JPS62216047A (en) | 1987-09-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111352651B (en) | Code branch management method and device | |
| US9921948B2 (en) | Software commit risk level | |
| Biagiola et al. | Web test dependency detection | |
| US20160321586A1 (en) | Selecting tests for execution on a software product | |
| JP3182111B2 (en) | Program test support device | |
| JPH081609B2 (en) | Method of determining test cases for preventing regression | |
| JP5741265B2 (en) | Program improvement support system | |
| JPH1091475A (en) | Fault restoration device, fault restoration method and program medium for fault restoration | |
| JP3464159B2 (en) | Test specification creation device and storage medium storing the program | |
| CN115563008A (en) | Code coverage rate detection system, method, device and storage medium | |
| JP2006309576A (en) | Logic system verification apparatus and method, storage medium, and computer program | |
| JP6072547B2 (en) | Application test system | |
| JP2525393B2 (en) | Logic simulation test coverage method | |
| JPH0228169B2 (en) | ||
| JP3309792B2 (en) | Stack pointer trace device, stack pointer trace method, and recording medium | |
| JP2751539B2 (en) | Interface verification processing method | |
| JPS59221753A (en) | Subroutine tracer | |
| JPS6220579B2 (en) | ||
| CN118642717A (en) | Front-end engineering code cleaning method, equipment and storage medium | |
| JPH08314758A (en) | Program test progress management method | |
| JPS63101934A (en) | Forming system for maintenance information of assembler language program | |
| CN115525524A (en) | Method, device and computer equipment for evaluating performance of test cases | |
| Zhang et al. | Atomic commitment in database systems over active networks | |
| Mück et al. | Experiences with coupled computers to control an HPD | |
| JP2011028666A (en) | Software matching maintenance system and software matching maintenance method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |