WO2023166791A1 - Automatic test scenario generation device - Google Patents

Automatic test scenario generation device Download PDF

Info

Publication number
WO2023166791A1
WO2023166791A1 PCT/JP2022/041360 JP2022041360W WO2023166791A1 WO 2023166791 A1 WO2023166791 A1 WO 2023166791A1 JP 2022041360 W JP2022041360 W JP 2022041360W WO 2023166791 A1 WO2023166791 A1 WO 2023166791A1
Authority
WO
WIPO (PCT)
Prior art keywords
command
test scenario
scenario
commands
regression test
Prior art date
Application number
PCT/JP2022/041360
Other languages
French (fr)
Japanese (ja)
Inventor
健宏 河合
Original Assignee
三菱電機株式会社
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 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to JP2024504363A priority Critical patent/JPWO2023166791A1/ja
Publication of WO2023166791A1 publication Critical patent/WO2023166791A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The objective of the present disclosure is automatic generation of regression test scenarios which reduces time required in a case of manual work. An automatic test scenario generation device (101) according to the present disclosure comprises: a scenario generation unit (13) that generates a regression test scenario; a command execution unit (11) that outputs, to a test object (16), a first command group formed of a plurality of first commands and the regression test scenario and obtains a response result from the test object (16); and a recording unit (12) that records a command log. The scenario generation unit (13) generates, on the basis of the command log of the first command group, a first regression test scenario in which a plurality of second commands identical to the plurality of first commands are arranged in the same order and with the same wait times as those of the plurality of first commands in the first command group, and reduces the wait time for at least one second command in a second regression test scenario compared to the first regression test scenario to such an extent that the response result is consistent with that of the first regression test scenario.

Description

テストシナリオ自動生成装置Automatic test scenario generator
 本開示は、テストシナリオ自動生成装置に関する。 This disclosure relates to an automatic test scenario generation device.
 ソフトウェアのテストを自動化して効率化する技術に、前回のテストシナリオを記録して回帰試験に再利用する技術、およびユーザにより生成されたテストシナリオと自動生成されたテストシナリオとを順番に実行しテストを自動化する技術がある。 Technology for automating and streamlining software testing, technology for recording the previous test scenario and reusing it for regression testing, and sequential execution of user-generated test scenarios and automatically generated test scenarios. There are techniques for automating tests.
 特許文献1には、GUIアプリを対象に、テスト時の操作ログを記録し、これを再生して回帰テストを自動実行する回帰テスト自動実行システムが開示されている。特許文献1の回帰テスト自動実行システムは、ボタンなどをリソースとして管理し、テスト前に各リソースの座標を更新することで、座標変更が発生した場合にも過去の操作ログを使用してテストできるようにした。 Patent Document 1 discloses a regression test automatic execution system that records an operation log during testing for a GUI application, reproduces it, and automatically executes a regression test. The regression test automatic execution system of Patent Document 1 manages buttons and the like as resources, and by updating the coordinates of each resource before testing, it is possible to perform tests using past operation logs even when coordinates are changed. I made it
 特許文献2には、GUIアプリを対象に、操作ログを記録して回帰テストシナリオを自動生成する回帰試験シナリオ生成装置が開示されている。この回帰試験シナリオ生成装置は、試験対象のウィンドウがアクティブなときだけ操作を記録することにより、不要な操作を記録しないようにしている。 Patent Document 2 discloses a regression test scenario generation device that records operation logs and automatically generates regression test scenarios for GUI applications. This regression test scenario generation device avoids recording unnecessary operations by recording operations only when the window to be tested is active.
特許第5314438号公報Japanese Patent No. 5314438 特許第6312559号公報Japanese Patent No. 6312559
 特許文献1の回帰テスト自動実行システムによれば、仕様変更によりGUIアプリのリソースの配置が変わっても、過去に用いた回帰テストシナリオを再利用することができるが、回帰テストにかかる時間を削減することはできない。 According to the regression test automatic execution system of Patent Document 1, even if the allocation of GUI application resources changes due to specification changes, the regression test scenario used in the past can be reused, but the time required for the regression test is reduced. you can't.
 特許文献2の回帰試験シナリオ生成装置によれば、回帰テストシナリオの記録時に不要な操作を記録しないことにより、回帰テストにかかる時間を削減することができる。しかし、記録が必要な操作において、人手作業により生じる無駄を削減できる余地がある。例えば結果を目視して確認する時間、GUIを操作する際のマウスカーソルなどの移動時間、手順の確認による作業の遅れなどがある。 According to the regression test scenario generation device of Patent Document 2, the time required for the regression test can be reduced by not recording unnecessary operations when recording the regression test scenario. However, in operations that require recording, there is room for reducing waste caused by manual work. For example, it takes time to visually check the results, time to move the mouse cursor when operating the GUI, and work delays due to confirmation of procedures.
 本開示は、上記の問題点を解決するためになされたものであり、人手作業により生じる時間を削減した回帰テストシナリオの自動生成を目的とする。 The present disclosure has been made to solve the above problems, and aims to automatically generate a regression test scenario that reduces the time required for manual work.
 本開示のテストシナリオ自動生成装置は、テスト対象の回帰テストシナリオを生成するテストシナリオ自動生成装置であって、回帰テストシナリオを生成するシナリオ生成部と、テストシナリオ自動生成装置の外部から順次入力される複数の第1コマンドからなる第1コマンド群、および回帰テストシナリオをテスト対象に出力し、テスト対象の応答結果を取得するコマンド実行部と、第1コマンド群および回帰テストシナリオに含まれる各コマンドについて、実行時間およびテスト対象の応答結果を含むコマンドログを記録する記録部と、を備え、回帰テストシナリオは、第1回帰テストシナリオと第2回帰テストシナリオを含み、シナリオ生成部は、第1コマンド群のコマンドログに基づき、複数の第1コマンドと同一の複数の第2コマンドが第1コマンド群における複数の第1コマンドの順番および待機時間と同一の順番および待機時間で配列された第1回帰テストシナリオを生成し、第1回帰テストシナリオおよび第2回帰テストシナリオのコマンドログに基づき、応答結果が第1回帰テストシナリオと一致する範囲で、第2回帰テストシナリオにおける少なくとも1つの第2コマンドの待機時間を第1回帰テストシナリオより削減する。 The test scenario automatic generation device of the present disclosure is a test scenario automatic generation device that generates a regression test scenario to be tested, and includes a scenario generation unit that generates the regression test scenario, and inputs sequentially from the outside of the test scenario automatic generation device. a first command group consisting of a plurality of first commands and a regression test scenario to the test target, and a command execution unit that acquires the response result of the test target, and each command included in the first command group and the regression test scenario and a recording unit that records a command log including the execution time and the response result of the test target, the regression test scenario includes a first regression test scenario and a second regression test scenario, and the scenario generation unit includes the first Based on the command log of the command group, the plurality of second commands identical to the plurality of first commands are arranged in the same order and waiting time as the order and waiting time of the plurality of first commands in the first command group. generating a regression test scenario, and based on the command logs of the first regression test scenario and the second regression test scenario, at least one second command in the second regression test scenario to the extent that the response results match the first regression test scenario; to reduce the latency of the first regression test scenario.
 本開示のテストシナリオ自動生成装置によれば、人手作業により生じる時間を削減した回帰テストシナリオを自動生成することができる。 According to the test scenario automatic generation device of the present disclosure, it is possible to automatically generate a regression test scenario that reduces the time required for manual work.
テストシナリオ自動生成装置の構成を示す図である。It is a figure which shows the structure of a test scenario automatic generation apparatus. コマンドログを例示する図である。FIG. 10 is a diagram illustrating a command log; コマンドの応答結果の一致判定に用いられる閾値を例示する図である。FIG. 11 is a diagram illustrating threshold values used for matching determination of command response results; コマンドの応答結果の一致判定に用いられる閾値候補を例示する図である。FIG. 11 is a diagram illustrating threshold candidates used for matching determination of command response results; テストシナリオ自動生成装置に予め設定されたコマンド、またはコマンドの組み合わせと、待機時間とを例示する図である。FIG. 4 is a diagram illustrating commands or combinations of commands preset in the test scenario automatic generation device and waiting times; テストシナリオ自動生成装置のハードウェア構成を示す図である。2 is a diagram showing the hardware configuration of an automatic test scenario generation device; FIG. テストシナリオ自動生成装置のハードウェア構成を示す図である。2 is a diagram showing the hardware configuration of an automatic test scenario generation device; FIG.
 <A.実施の形態1>
 <A-1.構成>
 図1は、実施の形態1に係るテストシナリオ自動生成装置101の構成図である。テストシナリオ自動生成装置101は、コマンド実行部11、記録部12、シナリオ生成部13および再生部14を備えて構成される。テストシナリオ自動生成装置101の外部には、テスト対象16とそれをテストする操作者15が存在する。
<A. Embodiment 1>
<A-1. Configuration>
FIG. 1 is a configuration diagram of an automatic test scenario generation device 101 according to the first embodiment. The test scenario automatic generation device 101 comprises a command execution section 11, a recording section 12, a scenario generation section 13 and a reproduction section . Outside the test scenario automatic generation device 101, there are a test object 16 and an operator 15 who tests it.
 テストシナリオ自動生成装置101およびテスト対象16は、S/WまたはH/Wのいずれにも限定しない。テストシナリオ自動生成装置101およびテスト対象16は、例えばパソコンに実装されたS/Wであってもよいし、自動車、モータまたはエレベータなどのH/Wであってもよい。また、操作者15も人に限定されず、テスト対象16を自動試験するパソコン上のS/Wであってもよいし、モータを制御するコントローラなどのH/Wであってもよい。 The test scenario automatic generation device 101 and the test target 16 are not limited to either S/W or H/W. The test scenario automatic generation device 101 and the test target 16 may be, for example, S/W implemented in a personal computer, or H/W such as automobiles, motors or elevators. Also, the operator 15 is not limited to a person, and may be S/W on a personal computer for automatically testing the test object 16, or H/W such as a controller for controlling a motor.
 <A-2.動作>
 以下、テストシナリオ自動生成装置101によるテストシナリオの自動生成処理について説明する。
<A-2. Operation>
Automatic test scenario generation processing by the test scenario automatic generation device 101 will be described below.
 まず、コマンド実行部11が操作者15から入力されたコマンドを実行する。具体的には、コマンド実行部11はコマンドをテスト対象16に出力し、テスト対象16からコマンド応答を取得する。 First, the command execution unit 11 executes the command input by the operator 15 . Specifically, the command execution unit 11 outputs a command to the test target 16 and acquires a command response from the test target 16 .
 記録部12は、コマンド実行部11によるコマンドの実行結果であるコマンドログを記録部12に記録する。コマンドログは、コマンドの内容、コマンド実行部11からテスト対象16へのコマンドの送信時間である実行タイムスタンプ、コマンド実行部11がテスト対象16からコマンド応答を受信した時間である応答タイムスタンプ、およびコマンド応答を含む。なお、実行タイムスタンプおよび応答タイムスタンプは、記録部12の記録開始時間を0とした場合の経過時間で表される。 The recording unit 12 records in the recording unit 12 a command log, which is the execution result of the command by the command execution unit 11 . The command log contains the contents of the command, the execution time stamp which is the time when the command is sent from the command execution unit 11 to the test target 16, the response time stamp which is the time when the command execution unit 11 receives the command response from the test target 16, and Contains command responses. Note that the execution time stamp and the response time stamp are represented by the elapsed time when the recording start time of the recording unit 12 is set to 0.
 図2は、コマンドログの一例を示している。図2に示されるコマンドログは、コマンド番号、記録時間(秒)、コマンド内容、応答結果、および前のコマンドとの差分時間(秒)を含んでいる。ここで記録時間は、コマンド実行部11からテスト対象16へのコマンドの送信時間を表している。 Fig. 2 shows an example of a command log. The command log shown in FIG. 2 includes the command number, recording time (seconds), command content, response result, and difference time (seconds) from the previous command. Here, the recording time represents the transmission time of the command from the command executing section 11 to the test target 16 .
 以下、操作者15からコマンド実行部11に入力されるコマンドを第1コマンドと称し、複数の第1コマンドからなるコマンド群を第1コマンド群と称する。 Hereinafter, commands input from the operator 15 to the command execution unit 11 will be referred to as first commands, and a command group consisting of a plurality of first commands will be referred to as a first command group.
 次に、シナリオ生成部13が、第1コマンド群のコマンドログに基づき、第1コマンド群における複数の第1コマンドの順番および実行タイミングを再現した第1回帰テストシナリオを生成する。すなわち、第1回帰テストシナリオは複数の第2コマンドを順番に実行するシナリオであるが、複数の第2コマンドは複数の第1コマンドと同一であり、第1回帰テストシナリオにおける複数の第2コマンドの順番は、第1コマンド群における複数の第1コマンドの順番と同一である。また、第1回帰テストシナリオにおける複数の第2コマンドの待機時間は、第1コマンド群における複数の第1コマンドの待機時間と同一である。ここで、コマンドの待機時間とは、当該コマンドの実行時間と前のコマンドの実行時間との差分時間のことである。また、第2コマンドと同一の第1コマンドを第2コマンドに対応する第1コマンドと称する。 Next, the scenario generation unit 13 generates a first regression test scenario that reproduces the order and execution timing of the multiple first commands in the first command group based on the command log of the first command group. That is, the first regression test scenario is a scenario in which the plurality of second commands are executed in order, the plurality of second commands are the same as the plurality of first commands, and the plurality of second commands in the first regression test scenario is the same as the order of the plurality of first commands in the first command group. Also, the waiting times of the plurality of second commands in the first regression test scenario are the same as the waiting times of the plurality of first commands in the first command group. Here, the waiting time of a command is the difference time between the execution time of the command and the execution time of the previous command. A first command that is the same as the second command is referred to as a first command corresponding to the second command.
 第1回帰テストシナリオはシナリオ生成部13から再生部14に出力される。再生部14は、第1回帰テストシナリオを再生して回帰試験を行う。すなわち、第1回帰テストシナリオで定められた順番および待機時間に従って、複数の第2コマンドが再生部14からコマンド実行部11に入力され、コマンド実行部11で実行される。 The first regression test scenario is output from the scenario generation unit 13 to the reproduction unit 14. The reproduction unit 14 reproduces the first regression test scenario to perform the regression test. That is, a plurality of second commands are input from the reproducing unit 14 to the command executing unit 11 and executed by the command executing unit 11 according to the order and waiting time determined in the first regression test scenario.
 記録部12は、第1回帰テストシナリオの実行結果である第2コマンドのコマンドログを記録部12に記録する。 The recording unit 12 records the command log of the second command, which is the execution result of the first regression test scenario, in the recording unit 12 .
 こうして、記録部12には、第1コマンド群の実行結果である第1コマンドのコマンドログと、第1回帰テストシナリオの実行結果である第2コマンドのコマンドログとが記録される。シナリオ生成部13は、両コマンドログを参照し、第2コマンドの応答結果が対応する第1コマンドの応答結果に一致するかを確認する。 In this way, the command log of the first command, which is the execution result of the first command group, and the command log of the second command, which is the execution result of the first regression test scenario, are recorded in the recording unit 12 . The scenario generator 13 refers to both command logs and checks whether the response result of the second command matches the response result of the corresponding first command.
 少なくとも1つの第2コマンドの応答結果が対応する第1コマンドの応答結果に一致しない場合、シナリオ生成部13は、第1回帰テストシナリオを失敗シナリオとして保存し、処理を終了する。 If the response result of at least one second command does not match the response result of the corresponding first command, the scenario generator 13 saves the first regression test scenario as a failure scenario, and terminates the process.
 一方、全ての第2コマンドの応答結果が対応する第1コマンドの応答結果に一致する場合、シナリオ生成部13は、第1回帰テストシナリオを成功シナリオとして保存する。 On the other hand, if the response results of all the second commands match the corresponding response results of the first command, the scenario generator 13 saves the first regression test scenario as a successful scenario.
 シナリオ生成部13は、成功シナリオをベースとして第2コマンドの待機時間を削減した回帰テストシナリオを第2回帰テストシナリオとして作成する。以下、第2回帰テストシナリオの作成処理について説明する。 The scenario generation unit 13 creates a second regression test scenario based on the success scenario, in which the waiting time for the second command is reduced. The process of creating the second regression test scenario will be described below.
 まず、シナリオ生成部13は、成功シナリオにおける各第2コマンドの実施順番を変えることなく、各第2コマンドの待機時間の初期値を0、すなわち最小限にすることにより、第2回帰テストシナリオを作成する。 First, the scenario generation unit 13 generates the second regression test scenario by minimizing the initial value of the waiting time of each second command to 0 without changing the execution order of each second command in the success scenario. create.
 第2回帰テストシナリオはシナリオ生成部13から再生部14に出力される。再生部14は、第2回帰テストシナリオを再生して回帰試験を行う。すなわち、第2回帰テストシナリオで定められた順番および待機時間に従って、複数の第2コマンドが再生部14からコマンド実行部11に入力され、コマンド実行部11で実行される。 The second regression test scenario is output from the scenario generation unit 13 to the reproduction unit 14. The reproducing unit 14 reproduces the second regression test scenario to perform the regression test. That is, a plurality of second commands are input from the reproduction unit 14 to the command execution unit 11 and executed by the command execution unit 11 according to the order and waiting time determined in the second regression test scenario.
 記録部12は、第2回帰テストシナリオの実行結果である第2コマンドのコマンドログを記録部12に記録する。 The recording unit 12 records the command log of the second command, which is the execution result of the second regression test scenario, in the recording unit 12 .
 こうして、記録部12には、第1コマンド群の実行結果である第1コマンドのコマンドログと、第1回帰テストシナリオの実行結果である第2コマンドのコマンドログと、第2回帰テストシナリオの実行結果である第2コマンドのコマンドログとが記録される。シナリオ生成部13は、第1コマンド群の実行結果である第1コマンドのコマンドログと、第2回帰テストシナリオの実行結果である第2コマンドのコマンドログとを比較し、第2回帰テストシナリオにおける第2コマンドの応答結果が対応する第1コマンドの応答結果に一致するかを確認する。なお、ここでシナリオ生成部13は、第1回帰テストシナリオの実行結果である第2コマンドのコマンドログと、第2回帰テストシナリオの実行結果である第2コマンドのコマンドログとを比較し、第2回帰テストシナリオにおける第2コマンドの応答結果が第1回帰テストシナリオにおける第2コマンドの応答結果に一致するかを確認してもよい。 In this way, the recording unit 12 stores the command log of the first command that is the execution result of the first command group, the command log of the second command that is the execution result of the first regression test scenario, and the execution result of the second regression test scenario. A command log of the resulting second command is recorded. The scenario generation unit 13 compares the command log of the first command, which is the execution result of the first command group, with the command log of the second command, which is the execution result of the second regression test scenario, and generates Confirm whether the response result of the second command matches the corresponding response result of the first command. Here, the scenario generation unit 13 compares the command log of the second command, which is the execution result of the first regression test scenario, with the command log of the second command, which is the execution result of the second regression test scenario. It may be confirmed whether the response result of the second command in the second regression test scenario matches the response result of the second command in the first regression test scenario.
 第2回帰テストシナリオにおける第2コマンドの応答結果が、対応する第1コマンドの応答結果に一致しない場合、シナリオ生成部13は、不一致となった第2コマンドとその1つ前の第2コマンドとの間に、コマンドログに基づき対応する第1コマンドと同様の待機時間を設定する。すなわち、シナリオ生成部13は、対応する第1コマンドとの間で応答結果が一致しない第2回帰テストシナリオの第2コマンドの待機時間を、対応する第1コマンドの待機時間と同一の値に変更する。 If the response result of the second command in the second regression test scenario does not match the response result of the corresponding first command, the scenario generation unit 13 generates the mismatched second command and the second command immediately before it. , a wait time similar to that of the corresponding first command is set based on the command log. That is, the scenario generator 13 changes the waiting time of the second command of the second regression test scenario whose response results do not match the corresponding first command to the same value as the waiting time of the corresponding first command. do.
 そして、シナリオ生成部13はテスト対象16をリセットして第2回帰テストシナリオによる回帰テストをやり直す。第2回帰テストシナリオにおける第2コマンドの応答結果が、対応する第1コマンドの応答結果に再度一致しない場合、シナリオ生成部13は、不一致となった第2コマンドの1つ前の第2コマンドと2つ前の第2コマンドとの間に、コマンドログに基づき対応する第1コマンドと同様の待機時間を設定する。このように、シナリオ生成部13は、第2回帰テストシナリオにおける第2コマンドの応答結果が対応する第1コマンドの応答結果と一致するまで、不一致となった第2コマンド以前の第2コマンドの待機時間を、順に対応する第1コマンドの待機時間と同一の値に設定する。 Then, the scenario generation unit 13 resets the test target 16 and redoes the regression test based on the second regression test scenario. If the response result of the second command in the second regression test scenario again does not match the response result of the corresponding first command, the scenario generator 13 generates the second command immediately before the mismatched second command. A waiting time similar to that of the corresponding first command is set based on the command log between the command and the second command two commands before. In this way, the scenario generator 13 waits for the second commands before the mismatched second command until the response result of the second command in the second regression test scenario matches the response result of the corresponding first command. The time is set to the same value as the waiting time of the corresponding first command in turn.
 第2回帰テストシナリオにおける各第2コマンドの応答結果が、対応する各第1コマンドの応答結果に一致すれば、シナリオ生成部13は第2回帰テストシナリオを改善された成功シナリオとして保存する。この場合、第2回帰テストシナリオは第1回帰テストシナリオに比べて、第2コマンド間の待機時間が削減されている。 If the response result of each second command in the second regression test scenario matches the response result of each corresponding first command, the scenario generator 13 saves the second regression test scenario as an improved success scenario. In this case, the second regression test scenario has a reduced waiting time between second commands compared to the first regression test scenario.
 <A-3.変形例1>
 操作者15からコマンド実行部11に同一のコマンドが連続して入力される場合、すなわち第1コマンド群において複数の同一の第1コマンドが連続する場合がある。この場合、シナリオ生成部13は、連続する複数の同一の第1コマンドに対応する、連続する複数の同一の第2コマンドのうち、最後の1つの第2コマンド以外の第2コマンドを第2回帰テストシナリオから削除してもよい。
<A-3. Modification 1>
The operator 15 may continuously input the same command to the command execution unit 11, that is, a plurality of the same first commands may be consecutive in the first command group. In this case, the scenario generating unit 13 selects the second commands other than the last second command from among the plurality of consecutive identical second commands corresponding to the plurality of consecutive identical first commands. May be deleted from the test scenario.
 これにより、第2回帰テストシナリオにおいて、テスト対象16のステータスをポーリングしながら状態を確認するような、同一のコマンドを複数回発行する無駄を省くことができ、第2回帰テストシナリオの生成時間を短縮することができる。 As a result, in the second regression test scenario, it is possible to eliminate the waste of issuing the same command multiple times, such as checking the state while polling the status of the test target 16, and the generation time of the second regression test scenario can be reduced. can be shortened.
 <A-4.変形例2>
 記録部12には、予めコマンドログの記録が不要なコマンドが設定されていてもよい。すなわち、記録部12は、予め定められたコマンドについてのみコマンドログを記録する。その結果、シナリオ生成部13は第2回帰テストシナリオの生成時間を削減できる。なお、記録部12は、コマンド単体に限らず、複数のコマンドの組み合わせについて、コマンドログの記録を不要と設定してもよい。
<A-4. Modification 2>
Commands that do not require command log recording may be set in advance in the recording unit 12 . That is, the recording unit 12 records command logs only for predetermined commands. As a result, the scenario generation unit 13 can reduce the generation time of the second regression test scenario. Note that the recording unit 12 may set not to need to record a command log not only for a single command but also for a combination of a plurality of commands.
 <A-5.効果>
 以上で述べたように、実施の形態1にかかるテストシナリオ自動生成装置101は、回帰テストシナリオを生成するシナリオ生成部13と、テストシナリオ自動生成装置101の外部から順次入力される複数の第1コマンドからなる第1コマンド群、および回帰テストシナリオをテスト対象に出力し、テスト対象の応答結果を取得するコマンド実行部11と、第1コマンド群および回帰テストシナリオに含まれる各コマンドについて、実行時間およびテスト対象の応答結果を含むコマンドログを記録する記録部12と、を備える。回帰テストシナリオは、第1回帰テストシナリオと第2回帰テストシナリオを含む。シナリオ生成部13は、第1コマンド群のコマンドログに基づき、複数の第1コマンドと同一の複数の第2コマンドが第1コマンド群における複数の第1コマンドの順番および待機時間と同一の順番および待機時間で配列された第1回帰テストシナリオを生成し、第1回帰テストシナリオおよび第2回帰テストシナリオのコマンドログに基づき、応答結果が第1回帰テストシナリオと一致する範囲で、第2回帰テストシナリオにおける少なくとも1つの第2コマンドの待機時間を第1回帰テストシナリオより削減する。
<A-5. Effect>
As described above, the automatic test scenario generation device 101 according to the first embodiment includes the scenario generation unit 13 that generates regression test scenarios, and a plurality of first test scenarios sequentially input from outside the automatic test scenario generation device 101 A command execution unit 11 that outputs a first command group consisting of commands and a regression test scenario to a test target and acquires the response result of the test target; and a recording unit 12 for recording a command log including the response result of the test object. The regression test scenarios include a first regression test scenario and a second regression test scenario. Based on the command log of the first command group, the scenario generation unit 13 determines that the plurality of second commands that are the same as the plurality of first commands are arranged in the same order and waiting time as the plurality of first commands in the first command group. Generate a first regression test scenario arranged by waiting time, and perform a second regression test to the extent that the response results match the first regression test scenario based on the command logs of the first regression test scenario and the second regression test scenario At least one second command wait time in the scenario is reduced relative to the first regression test scenario.
 従って、テストシナリオ自動生成装置101によれば、操作者15の操作を記録したコマンドログから第1回帰テストシナリオを自動生成でき、さらに、人手作業により生じる不要な時間を省いた第2回帰テストシナリオを自動生成できる。 Therefore, according to the test scenario automatic generation device 101, the first regression test scenario can be automatically generated from the command log that records the operations of the operator 15, and the second regression test scenario can be generated without unnecessary manual work. can be automatically generated.
 <B.実施の形態2>
 <B-1.構成>
 実施の形態2に係るテストシナリオ自動生成装置102の構成は図1に示した通りであり、実施の形態1に係るテストシナリオ自動生成装置101と同様である。
<B. Embodiment 2>
<B-1. Configuration>
The configuration of the test scenario automatic generation device 102 according to the second embodiment is as shown in FIG. 1, and is the same as the test scenario automatic generation device 101 according to the first embodiment.
 <B-2.動作>
 実施の形態1のシナリオ生成部13は、第2回帰テストシナリオにおいて、応答結果が一致しない第2コマンドの待機時間を初期値の0から対応する第1コマンドの待機時間と同一の値に変更した。
<B-2. Operation>
In the second regression test scenario, the scenario generator 13 of Embodiment 1 changes the waiting time of the second command whose response results do not match from the initial value of 0 to the same value as the waiting time of the corresponding first command. .
 これに対して、実施の形態2のシナリオ生成部13は、第1コマンドの待機時間より短い単位待機時間を設定し、第2回帰テストシナリオにおいて、応答結果が一致しない第2コマンドの待機時間を単位待機時間ずつ細かく調整する。 On the other hand, the scenario generator 13 of Embodiment 2 sets a unit waiting time shorter than the waiting time of the first command, and sets the waiting time of the second command whose response results do not match in the second regression test scenario. Finely adjust the unit standby time.
 実施の形態2のシナリオ生成部13は、以下のいずれかの方式によって、応答結果が一致しないコマンドの待機時間を調整する。 The scenario generation unit 13 of Embodiment 2 adjusts the waiting time of commands whose response results do not match by one of the following methods.
 (1)シナリオ生成部13は、第2回帰テストシナリオの各第2コマンドの待機時間の初期値を0とする。そして、シナリオ生成部13は、対応する第1コマンドとの間で応答結果が一致するまで、第2コマンドの待機時間を初期値から単位待機時間ずつ加算する。例えば、図2に示されるコマンドNo.4について言えば、単位待機時間を5秒とすると、1回目の不一致の後に待機時間は5秒となる。以下、不一致が繰り返される度に単位待機時間の5秒が加算されて待機時間は10秒、15秒、20秒…と増加する。こうして、シナリオ生成部13は、応答結果が一致する最小の待機時間を見つける。 (1) The scenario generation unit 13 sets the initial value of the waiting time of each second command in the second regression test scenario to 0. Then, the scenario generation unit 13 adds the standby time of the second command by unit standby time from the initial value until the response result of the corresponding first command matches. For example, for command No. 4 shown in FIG. 2, if the unit standby time is 5 seconds, the standby time is 5 seconds after the first mismatch. Thereafter, each time the disagreement is repeated, the unit standby time of 5 seconds is added, and the standby time increases to 10 seconds, 15 seconds, 20 seconds, and so on. In this way, the scenario generator 13 finds the minimum waiting time for which the response results match.
 (2)シナリオ生成部13は、第2回帰テストシナリオの各第2コマンドの待機時間の初期値を、対応する各第1コマンドの待機時間と同一の値に設定する。そして、シナリオ生成部13は、対応する各第1コマンドとの間で応答結果が一致しなくなるまで、各第2コマンドの待機時間を単位待機時間ずつ減算する。例えば、図2に示されるコマンドNo.4について言えば、単位待機時間を5秒とすると、1回目の不一致の後に待機時間は20秒-5秒=15秒となる。以下、不一致が繰り返される度に、単位待機時間の5秒が減算されて待機時間は10秒、5秒、0秒と減少する。こうして、シナリオ生成部13は、応答結果が一致する最小の待機時間を見つける。 (2) The scenario generation unit 13 sets the initial value of the waiting time of each second command in the second regression test scenario to the same value as the waiting time of each corresponding first command. Then, the scenario generation unit 13 subtracts the standby time of each second command by unit standby time until the response results of each corresponding first command do not match. For example, for command No. 4 shown in FIG. 2, if the unit waiting time is 5 seconds, the waiting time after the first mismatch is 20 seconds−5 seconds=15 seconds. Thereafter, each time the disagreement is repeated, the unit standby time of 5 seconds is subtracted, and the standby time decreases to 10 seconds, 5 seconds, and 0 seconds. In this way, the scenario generator 13 finds the minimum waiting time for which the response results match.
 単位待機時間は、例えば、予めユーザである操作者15により定められた待機時間係数を、対応する第1コマンドの待機時間に乗算することで求められる。図2に示されるコマンドNo.4において待機時間係数が25%であるとすると、単位待機時間は(前のコマンドとの差分時間20秒)×(待機時間係数25%)=5秒である。 The unit waiting time is obtained, for example, by multiplying the waiting time of the corresponding first command by a waiting time coefficient predetermined by the operator 15 who is the user. Assuming that the waiting time coefficient is 25% for command No. 4 shown in FIG. 2, the unit waiting time is (difference time from the previous command of 20 seconds)×(waiting time coefficient of 25%)=5 seconds.
 あるいは、単位待機時間は、予め操作者15が設定する。 Alternatively, the unit standby time is set by the operator 15 in advance.
 <B-3.効果>
 実施の形態2のテストシナリオ自動生成装置102によれば、シナリオ生成部13が、第2回帰テストシナリオにおける第2コマンドの待機時間を、対応する第1コマンドの待機時間より短い単位待機時間ずつ調整するため、実施の形態1よりもテスト時間が短い第2回帰テストシナリオを自動生成することが可能である。
<B-3. Effect>
According to the test scenario automatic generation device 102 of Embodiment 2, the scenario generation unit 13 adjusts the waiting time of the second command in the second regression test scenario by unit waiting times shorter than the waiting time of the corresponding first command. Therefore, it is possible to automatically generate a second regression test scenario with a shorter test time than in the first embodiment.
 <C.実施の形態3>
 <C-1.構成>
 実施の形態3に係るテストシナリオ自動生成装置103の構成は図1に示した通りであり、実施の形態1に係るテストシナリオ自動生成装置101と同様である。
<C. Embodiment 3>
<C-1. Configuration>
The configuration of the test scenario automatic generation device 103 according to the third embodiment is as shown in FIG. 1, and is the same as the test scenario automatic generation device 101 according to the first embodiment.
 <C-2.動作>
 実施の形態3では、コマンド単体またはコマンドの組み合わせに対して、必要な待機時間があらかじめ設定されている。すなわち、シナリオ生成部13は、第2回帰テストシナリオにおいて、予め定められた第2コマンド、または予め定められた連続する複数の第2コマンドにおける2つ目以降の第2コマンドに対して、予め定められた待機時間を設定する。シナリオ生成部13は、待機時間が予め設定されていない第2コマンド、または第2コマンドの組み合わせに対しては、実施の形態1,2で説明した手法を用いて第2回帰テストシナリオにおける待機時間を設定する。なお、シナリオ生成部13は、待機時間が予め設定されている第2コマンド、または第2コマンドの組み合わせに対しても、実施の形態1,2で説明した手法により、待機時間を調整し、設定してもよい。操作者が、待機時間の調整対象とするか否かを、予めコマンド、またはコマンドの組み合わせごとに設定できるものとする。
<C-2. Operation>
In the third embodiment, the required waiting time is set in advance for each single command or combination of commands. That is, in the second regression test scenario, the scenario generation unit 13 generates a predetermined second command, or the second and subsequent second commands in a plurality of predetermined consecutive second commands. set the specified wait time. The scenario generating unit 13 uses the method described in the first and second embodiments to calculate the waiting time in the second regression test scenario for the second command for which the waiting time is not set in advance or the combination of the second commands. set. Note that the scenario generation unit 13 also adjusts and sets the waiting time for the second command or the combination of the second commands for which the waiting time is set in advance by the method described in the first and second embodiments. You may It is assumed that the operator can set in advance for each command or combination of commands whether or not the waiting time is to be adjusted.
 第2回帰テストシナリオによる回帰試験により、第1回帰テストシナリオによる回帰試験と同様の結果が得られなかった場合、テストシナリオ自動生成装置103は、予め設定された待機時間に不備があると判断し、これを操作者に通知して第2回帰テストシナリオによる回帰試験を終了する。 If the regression test based on the second regression test scenario does not yield the same results as the regression test based on the first regression test scenario, the test scenario automatic generation device 103 determines that the preset waiting time is inadequate. , to notify the operator of this and terminate the regression test based on the second regression test scenario.
 また、シナリオ生成部13は、第2回帰テストシナリオにおいて予め設定された待機時間が第1回帰テストシナリオにおける待機時間より長い場合、操作者に待機時間の設定を置き換えるか否かを通知し、操作者がどちらの待機時間を使用するかを選択できるようにしてもよい。 Further, if the standby time set in advance in the second regression test scenario is longer than the standby time in the first regression test scenario, the scenario generation unit 13 notifies the operator whether or not to replace the setting of the standby time. The user may be allowed to choose which wait time to use.
 図2の例では、コマンドNo.1の「Set A」コマンドの次のコマンドが、コマンドNo.2の「Get A」コマンドである。ここで、テスト対象16の仕様上、「Set A」コマンドの結果が「Get Aコマンド」の結果に反映されるまで1秒かかるものとする。この場合、シナリオ生成部13は、「Set A」コマンドから「Get A」コマンド間の待機時間を1秒と設定する。そして、シナリオ生成部13は、第1回帰テストシナリオを修正して第2回帰テストシナリオを生成する際、「Set A」コマンドから「Get A」コマンド間の待機時間を1秒にする。  In the example of Fig. 2, the command No. The command following the "Set A" command of No. 1 is Command No. 2 "Get A" command. Here, according to the specifications of the test target 16, it takes one second for the result of the "Set A" command to be reflected in the result of the "Get A command". In this case, the scenario generation unit 13 sets the waiting time between the "Set A" command and the "Get A" command to 1 second. Then, the scenario generation unit 13 sets the waiting time between the "Set A" command and the "Get A" command to 1 second when correcting the first regression test scenario and generating the second regression test scenario.
 <C-3.効果>
 実施の形態3に係るテストシナリオ自動生成装置103において、シナリオ生成部13は、第2回帰テストシナリオにおいて、予め定められた第2コマンド、または予め定められた連続する複数の第2コマンドにおける2つ目以降の第2コマンドに対して、予め定められた待機時間を設定する。従って、実施の形態3に係るテストシナリオ自動生成装置101によれば、第2回帰テストシナリオの自動生成に要する時間を短縮できる。
<C-3. Effect>
In the test scenario automatic generation device 103 according to the third embodiment, the scenario generation unit 13 generates a predetermined second command or two of a plurality of predetermined continuous second commands in the second regression test scenario. A predetermined waiting time is set for the second command after the second command. Therefore, according to the test scenario automatic generation device 101 according to the third embodiment, the time required for automatically generating the second regression test scenario can be shortened.
 <D.実施の形態4>
 <D-1.構成>
 実施の形態4に係るテストシナリオ自動生成装置104の構成は図1に示した通りであり、実施の形態1に係るテストシナリオ自動生成装置101と同様である。実施の形態4に係るテストシナリオ自動生成装置104は、実施の形態1-3のいずれかに係るテストシナリオ自動生成装置101-103において、シナリオ生成部13がコマンドの応答結果の一致性を以下の通り判定するものである。
<D. Embodiment 4>
<D-1. Configuration>
The configuration of the test scenario automatic generation device 104 according to the fourth embodiment is as shown in FIG. 1, and is the same as the test scenario automatic generation device 101 according to the first embodiment. In the automatic test scenario generation device 104 according to the fourth embodiment, in the automatic test scenario generation devices 101 to 103 according to any one of the embodiments 1 to 3, the scenario generation unit 13 determines the consistency of command response results as follows. It is judged by the street.
 <D-2.動作>
 シナリオ生成部13は、第1コマンド群と第1回帰テストシナリオとの間で、および第1コマンド群と第2回帰テストシナリオとの間で、コマンドの応答結果が一致するか否かを判定する際、完全一致の場合のみならず、応答結果の差分が閾値の範囲内に含まれる場合にも、両者が一致すると判定する。
<D-2. Operation>
The scenario generator 13 determines whether the command response results match between the first command group and the first regression test scenario, and between the first command group and the second regression test scenario. In this case, it is determined that the two match not only when there is a perfect match, but also when the difference between the response results is within the range of the threshold.
 一致判定の閾値は、以下の方式(1)―(3)のいずれかにより設定される。 The threshold for match determination is set by one of the following methods (1) to (3).
 (1)操作者15であるユーザが一致判定の閾値を事前に設定する。 (1) A user, who is the operator 15, sets a threshold for match determination in advance.
 (2)自動生成した回帰テストシナリオを用いて回帰テストを複数回実施し、回帰テストの結果から回帰テストシナリオの閾値を自動算出する。 (2) Perform regression tests multiple times using the automatically generated regression test scenario, and automatically calculate the threshold value of the regression test scenario from the results of the regression test.
 (3)(1)と(2)を併用する。 (3) (1) and (2) are used together.
 (1)の方式について図3を例に説明する。図3は操作者15によってシナリオ生成部13に設定された各コマンドの一致判定の閾値を例示している。第1コマンド群または第1回帰テストシナリオのコマンドログを図2とする。第1コマンド群または第1回帰テストシナリオにおける「Get A」コマンドの応答結果は12.3であり、「Get A」コマンドに対する一致判定の閾値は±3である。従って、シナリオ生成部13は、第2回帰テストシナリオにおける「Get A」コマンドの応答結果が12.3±3、すなわち9.3以上15.3以下となった場合に、第1回帰テストシナリオにおける「Get A」コマンドの応答結果と一致したと判定する。 The method (1) will be explained using FIG. 3 as an example. FIG. 3 exemplifies thresholds for determination of matching of each command set in the scenario generation unit 13 by the operator 15 . FIG. 2 shows the command log of the first command group or the first regression test scenario. The response result of the "Get A" command in the first command group or the first regression test scenario is 12.3, and the threshold for match determination for the "Get A" command is ±3. Therefore, when the response result of the "Get A" command in the second regression test scenario is 12.3±3, that is, 9.3 or more and 15.3 or less, the scenario generation unit 13 determines It is determined that it matches the response result of the "Get A" command.
 図3の「Get C」コマンド、または図2の「Set」コマンドのように一致判定の閾値が設定されていないコマンドについては、シナリオ生成部13は第2回帰テストシナリオにおける応答結果が第1回帰テストシナリオにおける応答結果と完全一致する場合に、両者が一致すると判定する。 For commands for which the threshold for match determination is not set, such as the "Get C" command in FIG. 3 or the "Set" command in FIG. If the response result in the test scenario completely matches, it is determined that both match.
 (2)の方式について図4を例に説明する。本方式ではあらかじめ操作者15が設定しておいた回数分だけ第1回帰テストシナリオを実行し、第1回帰テストシナリオの応答結果から一致判定に用いられる閾値候補を算出する。テストシナリオ自動生成装置101は、第1回帰テストシナリオの応答結果から最小値、最大値、平均値、中央値、および最頻値を閾値候補として算出する。操作者15は改善された回帰テストシナリオを求めるフローに進む前に、どの閾値候補を閾値に選択するか事前に設定しておく。なお、閾値の選択には以下A-Dの制約を設ける。 The method (2) will be explained using FIG. 4 as an example. In this method, the first regression test scenario is executed for the number of times set in advance by the operator 15, and threshold candidates used for match determination are calculated from the response results of the first regression test scenario. The test scenario automatic generation device 101 calculates a minimum value, a maximum value, an average value, a median value, and a mode value as threshold candidates from the response results of the first regression test scenario. Before proceeding to the flow for obtaining an improved regression test scenario, the operator 15 sets in advance which threshold candidate is to be selected as the threshold. Note that the following constraints A to D are provided for the selection of threshold values.
 A.少なくとも1つ以上の閾値候補を閾値に選択する。 A. At least one or more threshold candidates are selected as thresholds.
 B.複数の閾値候補を選択した場合、選択された複数の閾値候補のうちの最小値を下限とし、最大値を上限とする範囲を「閾値」とする。例えば図4の結果において、最小値と平均値を選択した場合、閾値は10以上12.25以下となる。 B. When a plurality of threshold candidates are selected, the range having the minimum value of the plurality of selected threshold candidates as the lower limit and the maximum value as the upper limit is defined as the "threshold". For example, in the result of FIG. 4, when the minimum value and the average value are selected, the threshold is 10 or more and 12.25 or less.
 C.最頻値が複数ある場合は、全ての最頻値を閾値とする。  C. If there are multiple modes, all modes are used as thresholds.
 D.各閾値候補には有効桁数を設定する。例えば平均値に「小数点第1位まで」と設定した場合、12.2が閾値となる。 D. The number of significant digits is set for each threshold candidate. For example, if the average value is set to "up to the first decimal place", the threshold is 12.2.
 (3)の方式では前述の(1)、(2)の方式の両方を適用する。例えば図3と図4の結果において、閾値として最小値を選択した場合、10±3、すなわち7以上13以下が閾値となる。 In method (3), both methods (1) and (2) described above are applied. For example, in the results of FIGS. 3 and 4, when the minimum value is selected as the threshold, the threshold is 10±3, that is, 7 or more and 13 or less.
 <D-3.効果>
 実施の形態4に係るテストシナリオ自動生成装置104において、シナリオ生成部13は、第2回帰テストシナリオにおける各第2コマンドの応答結果と、第1回帰テストシナリオにおいて対応する各第2コマンドの応答結果との差分が閾値未満である場合に、両者が一致すると判定する。これにより、テストシナリオ自動生成装置104によれば、アナログ値を返すセンサーなど、応答結果に幅を持たせる必要のある機能を含むテスト対象16に対しても、第2回帰テストシナリオを自動生成することができる。
<D-3. Effect>
In the test scenario automatic generation device 104 according to the fourth embodiment, the scenario generation unit 13 generates the response results of each second command in the second regression test scenario and the response results of each corresponding second command in the first regression test scenario. is less than the threshold, it is determined that both match. As a result, the test scenario automatic generation device 104 can automatically generate the second regression test scenario even for the test target 16 including a function such as a sensor that returns an analog value that requires a range of response results. be able to.
 <E.実施の形態5>
 <E-1.構成>
 実施の形態5に係るテストシナリオ自動生成装置105の構成は図1に示した通りであり、実施の形態1に係るテストシナリオ自動生成装置101と同様である。実施の形態5に係るテストシナリオ自動生成装置105は、実施の形態1-4のいずれかに係るテストシナリオ自動生成装置101-104において、シナリオ生成部13が予め設定されたコマンドまたはコマンドの組み合わせの待機時間を事前に検証する機能を有するものである。
<E. Embodiment 5>
<E-1. Configuration>
The configuration of the test scenario automatic generation device 105 according to the fifth embodiment is as shown in FIG. 1, and is the same as the test scenario automatic generation device 101 according to the first embodiment. The test scenario automatic generation device 105 according to the fifth embodiment is the test scenario automatic generation device 101 to 104 according to any one of the embodiments 1 to 4, wherein the scenario generation unit 13 generates a command or a combination of commands set in advance. It has a function to verify the waiting time in advance.
 <E-2.動作>
 図5は、テストシナリオ自動生成装置105に予め設定されたコマンド、またはコマンドの組み合わせと、待機時間とを例示する図である。シナリオ生成部13は、予め待機時間が設定されているコマンドのうち、応答結果に変化が生じると想定される組み合わせを対象に、以下の手順により待機時間を検証する。応答結果に変化が生じると想定される組み合わせは、例えば図5のNo.1またはNo.2などである。なお、待機時間の検証は、操作者から専用のコマンドを入力することにより開始できるものとする。
<E-2. Operation>
FIG. 5 is a diagram exemplifying commands or combinations of commands preset in the test scenario automatic generation device 105 and waiting times. The scenario generation unit 13 verifies the waiting time according to the following procedure for a combination of commands for which the waiting time is set in advance, which is assumed to cause a change in the response result. Combinations that are assumed to cause changes in response results are, for example, No. 1 in FIG. 1 or No. 2 and so on. It should be noted that verification of the waiting time can be started by inputting a dedicated command from the operator.
 (1)シナリオ生成部13は、テスト対象16をリセットする。 (1) The scenario generation unit 13 resets the test target 16.
 (2)シナリオ生成部13は、待機時間が設定されているコマンドの組み合わせのうち、まだ検証されていないものを1つ選択する。もし、対象となるすべてのコマンドの組み合わせが検証済みであれば待機時間の検証を終了する。 (2) The scenario generation unit 13 selects one unverified combination of commands for which the waiting time is set. If all target command combinations have been verified, the wait time verification ends.
 (3)シナリオ生成部13は、選択したコマンドの組み合わせにおいて、例えば図5のNo.1のGet Aなど、テスト対象16から応答を得るコマンドのみをテスト対象16に対して出力し、応答結果を記録する。 (3) The scenario generation unit 13 selects, for example, No. in FIG. Only commands that get a response from the test target 16, such as Get A of 1, are output to the test target 16, and the response results are recorded.
 (4)シナリオ生成部13は、選択したコマンドの組み合わせと待機時間に従い、コマンドをテスト対象16に出力し、応答結果を記録する。 (4) The scenario generation unit 13 outputs commands to the test object 16 according to the selected combination of commands and the waiting time, and records the response results.
 (5)(3)と(4)の応答結果を比較し、比較結果により以下(a)または(b)のいずれかを実行する。 (5) Compare the response results of (3) and (4), and execute either (a) or (b) below depending on the comparison result.
 (a)応答結果が一致した場合、テストシナリオ自動生成装置105は、登録されたコマンド間の待機時間に不備があることを操作者に通知する。 (a) If the response results match, the test scenario automatic generation device 105 notifies the operator that the waiting time between registered commands is inadequate.
 (b)応答結果が不一致の場合、テストシナリオ自動生成装置105は、登録されたコマンド間の待機時間に問題がないことを操作者に通知する。 (b) If the response results do not match, the test scenario automatic generation device 105 notifies the operator that there is no problem with the waiting time between registered commands.
 <E-3.効果>
 実施の形態5に係るテストシナリオ自動生成装置105において、シナリオ生成部13は、予め定められた第2コマンド、または予め定められた連続する複数の第2コマンドにおける2つ目以降の第2コマンドに対して、予め定められた待機時間を検証し、検証結果をユーザに通知する。従って、実施の形態5に係るテストシナリオ自動生成装置105によれば、何らかの理由により、予め登録されたコマンドの組み合わせにおける待機時間に不備があることを第2回帰テストの前に検出することができ、第2回帰テストシナリオの自動生成にかかる時間を短縮することができる。
<E-3. Effect>
In the test scenario automatic generation device 105 according to the fifth embodiment, the scenario generation unit 13 generates a predetermined second command or second commands after the second in a plurality of predetermined consecutive second commands. In response, the predetermined waiting time is verified, and the verification result is notified to the user. Therefore, according to the test scenario automatic generation device 105 according to the fifth embodiment, it is possible to detect before the second regression test that the waiting time in the combination of commands registered in advance is inadequate for some reason. , the time taken to automatically generate the second regression test scenario can be shortened.
 <F.ハードウェア構成>
 上述したテストシナリオ自動生成装置101-104における、コマンド実行部11、記録部12、シナリオ生成部13および再生部14は、図6に示す処理回路81により実現される。すなわち、処理回路81は、コマンド実行部11、記録部12、シナリオ生成部13および再生部14(以下、「コマンド実行部11等」と称する)を備える。処理回路81には、専用のハードウェアが適用されても良いし、メモリに格納されるプログラムを実行するプロセッサが適用されても良い。プロセッサは、例えば中央処理装置、処理装置、演算装置、マイクロプロセッサ、マイクロコンピュータ、DSP(Digital Signal Processor)等である。
<F. Hardware configuration>
The command execution unit 11, the recording unit 12, the scenario generation unit 13 and the reproduction unit 14 in the test scenario automatic generation devices 101 to 104 described above are realized by the processing circuit 81 shown in FIG. That is, the processing circuit 81 includes a command execution unit 11, a recording unit 12, a scenario generation unit 13, and a reproduction unit 14 (hereinafter referred to as "command execution unit 11, etc."). Dedicated hardware may be applied to the processing circuit 81, or a processor that executes a program stored in a memory may be applied. The processor is, for example, a central processing unit, a processing unit, an arithmetic unit, a microprocessor, a microcomputer, a DSP (Digital Signal Processor), or the like.
 処理回路81が専用のハードウェアである場合、処理回路81は、例えば、単一回路、複合回路、プログラム化したプロセッサ、並列プログラム化したプロセッサ、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)、またはこれらを組み合わせたものが該当する。コマンド実行部11等の各部の機能それぞれは、複数の処理回路81で実現されてもよいし、各部の機能をまとめて一つの処理回路で実現されてもよい。 If the processing circuit 81 is dedicated hardware, the processing circuit 81 may be, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a combination of these. Each function of each unit such as the command execution unit 11 may be realized by a plurality of processing circuits 81, or the functions of each unit may be collectively realized by one processing circuit.
 処理回路81がプロセッサである場合、コマンド実行部11等の機能は、ソフトウェア等(ソフトウェア、ファームウェアまたはソフトウェアとファームウェア)との組み合わせにより実現される。ソフトウェア等はプログラムとして記述され、メモリに格納される。図7に示すように、処理回路81に適用されるプロセッサ82は、メモリ83に記憶されたプログラムを読み出して実行することにより、各部の機能を実現する。換言すれば、このプログラムは、コマンド実行部11等の手順または方法をコンピュータに実行させるものであるともいえる。ここで、メモリ83は、例えば、RAM(Random Access Memory)、ROM(Read Only Memory)、フラッシュメモリ、EPROM(Erasable Programmable Read Only Memory)、EEPROM(Electrically Erasable Programmable Read Only Memory)などの、不揮発性または揮発性の半導体メモリ、HDD(Hard Disk Drive)、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ミニディスク、DVD(Digital Versatile Disk)及びそのドライブ装置等、または、今後使用されるあらゆる記憶媒体であってもよい。 When the processing circuit 81 is a processor, the functions of the command execution unit 11, etc. are realized by a combination of software, etc. (software, firmware, or software and firmware). Software or the like is written as a program and stored in memory. As shown in FIG. 7, a processor 82 applied to a processing circuit 81 reads out and executes a program stored in a memory 83 to realize functions of each section. In other words, it can be said that this program causes the computer to execute the procedure or method of the command execution unit 11 or the like. Here, the memory 83 is, for example, a non-volatile or Volatile semiconductor memory, HDD (Hard Disk Drive), magnetic disk, flexible disk, optical disk, compact disk, mini disk, DVD (Digital Versatile Disk) and their drive devices, etc., or any storage media that will be used in the future. may
 コマンド実行部11とテスト対象16との間の通信として、コマンド出力とコマンド応答とが示されたが、両者の間の通信形式は、特定のパケットフォーマット、信号伝送方法、または規格に限定されるものではない。例えば、UARTまたはEthernet(登録商標)などのデジタルデータ通信の他、High/Lowのデジタル入出力による割り込み信号、またはセンサー素子を想定したアナログ値の入出力が行われてもよい。 Command output and command response are shown as communication between the command execution unit 11 and the test object 16, but the communication format between the two is limited to a specific packet format, signal transmission method, or standard. not a thing For example, in addition to digital data communication such as UART or Ethernet (registered trademark), interrupt signals by High/Low digital input/output or input/output of analog values assuming sensor elements may be performed.
 以上、コマンド実行部11の各機能が、ハードウェア及びソフトウェア等のいずれか一方で実現される構成について説明した。しかしこれに限ったものではなく、コマンド実行部11等の一部を専用のハードウェアで実現し、別の一部をソフトウェア等で実現する構成であってもよい。例えばコマンド実行部11については専用のハードウェアとしての処理回路でその機能を実現し、それ以外についてはプロセッサ82としての処理回路81がメモリ83に格納されたプログラムを読み出して実行することによってその機能を実現することが可能である。 The configuration in which each function of the command execution unit 11 is implemented by either hardware or software has been described above. However, the configuration is not limited to this, and a configuration in which part of the command execution unit 11 and the like is realized by dedicated hardware and another part is realized by software or the like may be employed. For example, the function of the command execution unit 11 is realized by a processing circuit as dedicated hardware, and the processing circuit 81 as a processor 82 reads out and executes a program stored in a memory 83 for the other functions. It is possible to realize
 以上のように、処理回路は、ハードウェア、ソフトウェア等、またはこれらの組み合わせによって、上述の各機能を実現することができる。 As described above, the processing circuit can implement each of the functions described above using hardware, software, etc., or a combination thereof.
 なお、各実施の形態を自由に組み合わせたり、各実施の形態を適宜、変形、省略したりすることが可能である。 It should be noted that it is possible to freely combine each embodiment, and to modify or omit each embodiment as appropriate.
 11 コマンド実行部、12 記録部、13 シナリオ生成部、14 再生部、15 操作者、16 テスト対象、81 処理回路、82 プロセッサ、83 メモリ、101-104 テストシナリオ自動生成装置。 11 command execution unit, 12 recording unit, 13 scenario generation unit, 14 reproduction unit, 15 operator, 16 test target, 81 processing circuit, 82 processor, 83 memory, 101-104 automatic test scenario generation device.

Claims (13)

  1.  テスト対象の回帰テストシナリオを生成するテストシナリオ自動生成装置であって、
     前記回帰テストシナリオを生成するシナリオ生成部と、
     テストシナリオ自動生成装置の外部から順次入力される複数の第1コマンドからなる第1コマンド群、および前記回帰テストシナリオを前記テスト対象に出力し、前記テスト対象の応答結果を取得するコマンド実行部と、
     前記第1コマンド群および前記回帰テストシナリオに含まれる各コマンドについて、実行時間および前記テスト対象の応答結果を含むコマンドログを記録する記録部と、を備え、
     前記回帰テストシナリオは、第1回帰テストシナリオと第2回帰テストシナリオを含み、
     前記シナリオ生成部は、
     前記第1コマンド群の前記コマンドログに基づき、前記複数の第1コマンドと同一の複数の第2コマンドが前記第1コマンド群における前記複数の第1コマンドの順番および待機時間と同一の順番および待機時間で配列された前記第1回帰テストシナリオを生成し、
     前記第1回帰テストシナリオおよび前記第2回帰テストシナリオの前記コマンドログに基づき、前記応答結果が前記第1回帰テストシナリオと一致する範囲で、前記第2回帰テストシナリオにおける少なくとも1つの前記第2コマンドの待機時間を前記第1回帰テストシナリオより削減する、
    テストシナリオ自動生成装置。
    A test scenario automatic generation device for generating a regression test scenario to be tested,
    a scenario generator that generates the regression test scenario;
    a command execution unit that outputs a first command group consisting of a plurality of first commands sequentially input from the outside of the test scenario automatic generation device and the regression test scenario to the test target and acquires a response result of the test target; ,
    a recording unit that records a command log including an execution time and a response result of the test object for each command included in the first command group and the regression test scenario;
    The regression test scenarios include a first regression test scenario and a second regression test scenario,
    The scenario generation unit
    Based on the command log of the first command group, a plurality of second commands that are the same as the plurality of first commands have the same order and waiting time as the plurality of first commands in the first command group. generating the first regression test scenario arranged in time;
    At least one of the second commands in the second regression test scenario to the extent that the response results are consistent with the first regression test scenario, based on the command logs of the first regression test scenario and the second regression test scenario. reducing the waiting time of from the first regression test scenario;
    Automatic test scenario generator.
  2.  前記シナリオ生成部は、
     前記第2回帰テストシナリオの各前記第2コマンドの待機時間の初期値を0とし、
     対応する前記第1コマンドとの間で前記応答結果が一致しない前記第2回帰テストシナリオの前記第2コマンドの待機時間を、前記初期値から対応する前記第1コマンドの待機時間と同一の値に変更する、
    請求項1に記載のテストシナリオ自動生成装置。
    The scenario generation unit
    setting the initial value of the waiting time of each of the second commands in the second regression test scenario to 0;
    The waiting time of the second command in the second regression test scenario for which the response results do not match the corresponding first command is set from the initial value to the same value as the waiting time of the corresponding first command. change,
    The test scenario automatic generation device according to claim 1.
  3.  前記シナリオ生成部は、前記第1コマンド群において複数の同一の前記第1コマンドが連続する場合、連続する複数の同一の前記第1コマンドに対応する、連続する複数の同一の前記第2コマンドのうち、最後の1つの前記第2コマンド以外の前記第2コマンドを前記第2回帰テストシナリオから削除する、
    請求項1または請求項2に記載のテストシナリオ自動生成装置。
    When a plurality of the same first commands are consecutive in the first command group, the scenario generation unit generates a plurality of consecutive same second commands corresponding to the plurality of consecutive same first commands. deleting the second commands other than the last one of the second commands from the second regression test scenario;
    3. The test scenario automatic generation device according to claim 1 or 2.
  4.  前記記録部は、予め定められたコマンドについてのみ前記コマンドログを記録する、
    請求項1から請求項3のいずれか1項に記載のテストシナリオ自動生成装置。
    the recording unit records the command log only for a predetermined command;
    The test scenario automatic generation device according to any one of claims 1 to 3.
  5.  前記シナリオ生成部は、
     前記第2回帰テストシナリオの各前記第2コマンドの待機時間の初期値を0とし、
     対応する前記第1コマンドとの間で前記応答結果が一致するまで、前記第2コマンドの待機時間を前記初期値から対応する前記第1コマンドの待機時間より短い単位待機時間ずつ加算する、
    請求項1に記載のテストシナリオ自動生成装置。
    The scenario generation unit
    setting the initial value of the waiting time of each of the second commands in the second regression test scenario to 0;
    adding the standby time of the second command from the initial value by a unit standby time shorter than the standby time of the corresponding first command until the response result matches the corresponding first command;
    The test scenario automatic generation device according to claim 1.
  6.  前記シナリオ生成部は、
     前記第2回帰テストシナリオの各前記第2コマンドの待機時間の初期値を、対応する各前記第1コマンドの待機時間と同一の値にし、
     対応する各前記第1コマンドとの間で前記応答結果が一致しなくなるまで、各前記第2コマンドの待機時間を前記初期値から対応する各前記第1コマンドの待機時間より短い単位待機時間ずつ減算する、
    請求項1に記載のテストシナリオ自動生成装置。
    The scenario generation unit
    setting the initial value of the waiting time of each of the second commands in the second regression test scenario to the same value as the waiting time of each of the corresponding first commands;
    The waiting time of each of the second commands is subtracted from the initial value by unit waiting times shorter than the waiting time of each of the corresponding first commands until the response results do not match with each of the corresponding first commands. do,
    The test scenario automatic generation device according to claim 1.
  7.  前記単位待機時間は、ユーザにより定められた待機時間係数を対応する前記第1コマンドの待機時間に乗算して算出される、
    請求項5または請求項6に記載のテストシナリオ自動生成装置。
    The unit waiting time is calculated by multiplying the waiting time of the corresponding first command by a waiting time coefficient determined by a user.
    7. The test scenario automatic generation device according to claim 5 or 6.
  8.  前記単位待機時間はユーザにより定められる、
    請求項5または請求項6に記載のテストシナリオ自動生成装置。
    The unit waiting time is defined by the user,
    7. The test scenario automatic generation device according to claim 5 or 6.
  9.  前記シナリオ生成部は、前記第2回帰テストシナリオにおいて、予め定められた前記第2コマンド、または予め定められた連続する複数の前記第2コマンドにおける2つ目以降の前記第2コマンドに対して、予め定められた待機時間を設定する、
    請求項1から請求項8のいずれか1項に記載のテストシナリオ自動生成装置。
    The scenario generating unit, in the second regression test scenario, for the predetermined second command or the second and subsequent second commands among a plurality of predetermined consecutive second commands, setting a predetermined waiting time;
    The test scenario automatic generation device according to any one of claims 1 to 8.
  10.  前記シナリオ生成部は、前記第2回帰テストシナリオにおける各前記第2コマンドの前記応答結果と、前記第1回帰テストシナリオにおいて対応する各前記第2コマンドの前記応答結果との差分が閾値未満である場合に、両者が一致すると判定する、
    請求項1から請求項9のいずれか1項に記載のテストシナリオ自動生成装置。
    The scenario generation unit is configured such that a difference between the response result of each of the second commands in the second regression test scenario and the corresponding response result of each of the second commands in the first regression test scenario is less than a threshold. , it is determined that both match,
    The test scenario automatic generation device according to any one of claims 1 to 9.
  11.  前記閾値はユーザにより予め定められる、
    請求項10に記載のテストシナリオ自動生成装置。
    the threshold is predetermined by a user;
    11. The test scenario automatic generation device according to claim 10.
  12.  前記閾値は、複数回の前記第1回帰テストシナリオの前記応答結果から算出される、
    請求項10に記載のテストシナリオ自動生成装置。
    wherein the threshold is calculated from the response results of the first regression test scenario multiple times;
    11. The test scenario automatic generation device according to claim 10.
  13.  前記シナリオ生成部は、予め定められた前記第2コマンド、または予め定められた連続する複数の前記第2コマンドにおける2つ目以降の前記第2コマンドに対して、予め定められた待機時間を検証し、検証結果をユーザに通知する、
    請求項1から請求項12のいずれか1項に記載のテストシナリオ自動生成装置。
    The scenario generation unit verifies a predetermined waiting time for the predetermined second command or the second and subsequent second commands among a plurality of predetermined consecutive second commands. and notify the user of the verification result,
    The test scenario automatic generation device according to any one of claims 1 to 12.
PCT/JP2022/041360 2022-03-04 2022-11-07 Automatic test scenario generation device WO2023166791A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2024504363A JPWO2023166791A1 (en) 2022-03-04 2022-11-07

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022-033205 2022-03-04
JP2022033205 2022-03-04

Publications (1)

Publication Number Publication Date
WO2023166791A1 true WO2023166791A1 (en) 2023-09-07

Family

ID=87883574

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/041360 WO2023166791A1 (en) 2022-03-04 2022-11-07 Automatic test scenario generation device

Country Status (2)

Country Link
JP (1) JPWO2023166791A1 (en)
WO (1) WO2023166791A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015158897A (en) * 2014-01-21 2015-09-03 三菱電機株式会社 Regression test scenario generator
US20170139819A1 (en) * 2015-11-18 2017-05-18 International Business Machines Corporation Proactive and selective regression testing based on historic test results
JP2018082290A (en) * 2016-11-15 2018-05-24 株式会社東芝 Preview system, preview method, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015158897A (en) * 2014-01-21 2015-09-03 三菱電機株式会社 Regression test scenario generator
US20170139819A1 (en) * 2015-11-18 2017-05-18 International Business Machines Corporation Proactive and selective regression testing based on historic test results
JP2018082290A (en) * 2016-11-15 2018-05-24 株式会社東芝 Preview system, preview method, and program

Also Published As

Publication number Publication date
JPWO2023166791A1 (en) 2023-09-07

Similar Documents

Publication Publication Date Title
JP2003257130A (en) Disk memory device for av application and method for processing in sector error of the device
US8159775B2 (en) Vibration identification and attenuation system and method
WO2023166791A1 (en) Automatic test scenario generation device
JP2009294846A (en) Test case generator, and test case generation program and method
JP3056026B2 (en) Logic simulation method
US7158906B2 (en) Test method, test system, and program therefor
US20040225863A1 (en) Data processor, data processing method, program for data processor, and program recording medium
US6744703B2 (en) Continuous recording apparatus by interpolating the audio signal during seeking operation
KR100462602B1 (en) Method for recording/reproducing audio/video data in a disk drive
JPH08227557A (en) Method for managing defect of optical disk and optical disk device
WO2021234774A1 (en) Cancellation filter coefficient selection method, cancellation filter coefficient selection device, and program
US20110051958A1 (en) Method for removing pop-up noise in mobile device
JP3339336B2 (en) DSV control method and device
JP6204044B2 (en) Nonvolatile storage system, nonvolatile storage device, and memory controller
JPH0567330A (en) Information recording/reproducing device
JP2642709B2 (en) Digital signal processor development support equipment
CN112445761B (en) File checking method and device and storage medium
JP5243915B2 (en) Data slice circuit and optical disk apparatus using the same
JP3072985B2 (en) Logic simulation method
US20070041298A1 (en) Method for playing digital videos, a method for reading data and a method for smoothly playing pictures
JP2005078466A (en) Installation method of more than one computer
KR100232957B1 (en) Method for shortening error correcting time of digital video disc
JP2011170580A (en) Memory control apparatus, program and memory control method
JP2006351143A (en) Recorder
JP2021072465A (en) Circuit device, sound reproduction device and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22929935

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2024504363

Country of ref document: JP