JP7522697B2 - Test case verification device and test case verification method - Google Patents
Test case verification device and test case verification method Download PDFInfo
- Publication number
- JP7522697B2 JP7522697B2 JP2021071953A JP2021071953A JP7522697B2 JP 7522697 B2 JP7522697 B2 JP 7522697B2 JP 2021071953 A JP2021071953 A JP 2021071953A JP 2021071953 A JP2021071953 A JP 2021071953A JP 7522697 B2 JP7522697 B2 JP 7522697B2
- Authority
- JP
- Japan
- Prior art keywords
- test case
- test
- graph
- expected value
- value graph
- 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.)
- Active
Links
Landscapes
- Debugging And Monitoring (AREA)
Description
本発明は、シミュレータにおけるテスト内容を定義したテストケースの良否を検証する、テストケース検証装置及びテストケース検証方法に関する。 The present invention relates to a test case verification device and a test case verification method that verify the validity of test cases that define test content in a simulator.
近年、自動車などの開発効率を向上させるために、特開2011-118841号公報(特許文献1)に記載されるように、車両のエンジン機能や挙動などを数値化して、実機を模したシミュレーションを可能にするHILS(Hardware In the Loop Simulation)などのシミュレータが利用されている。シミュレータでは、テスト内容を定義する入力パラメータの値、その変化及び出力パラメータの期待値などが関数形式で記述されたテストケースに従ってテストが行われている。テストケースは、テスト要件をまとめたテスト要件定義書を参照し、設計者などが人手でこれを関数形式に変換して作成されている。 In recent years, to improve the efficiency of development of automobiles and the like, simulators such as Hardware In the Loop Simulation (HILS) are being used, which quantifies the engine functions and behavior of vehicles to enable simulations that mimic the actual equipment, as described in JP 2011-118841 A (Patent Document 1). In simulators, tests are performed according to test cases in which the values of input parameters that define the test contents, their changes, and the expected values of output parameters are written in functional form. Test cases are created by referring to a test requirements definition document that summarizes the test requirements, and by designers manually converting this into functional form.
しかしながら、設計者などがテスト要件定義書を参照してテストケースを作成するため、テストケースの作成過程において人的ミスなどが入り込む余地があり、テスト要件が必ずしもテストケースに反映されないおそれがあった。また、テストケースでは、時間情報を含むテスト手順、及び時間情報を含まない判断基準が関数形式で記述されているため、判断基準について出力パラメータの経時的な変化が把握し難く、テストケースの良否を判断することも困難であった。 However, because designers and others create test cases by referring to the test requirements definition document, there is room for human error in the test case creation process, and there is a risk that the test requirements will not necessarily be reflected in the test cases. In addition, because test cases describe test procedures, which include time information, and judgment criteria, which do not include time information, in functional form, it is difficult to grasp the changes over time in the output parameters for the judgment criteria, and it is also difficult to judge whether the test case is good or bad.
そこで、本発明は、シミュレータを使用したテストにおいて、テスト要件定義書から作成されたテストケースの良否を容易に検証可能な、テストケース検証装置及びテストケース検証方法を提供することを目的とする。 The present invention aims to provide a test case verification device and a test case verification method that can easily verify the pass/fail of test cases created from a test requirements definition document in testing using a simulator.
テストケース検証装置は、シミュレータから出力される出力パラメータの経時的な変化を表したグラフが定義されたテスト要件定義書と、シミュレータに入力する入力パラメータの値及びその保持時間が関数形式で記述されたテスト手順、並びにシミュレータから出力される出力パラメータの値が関数形式で記述された判断基準を含むテストケースと、を読み込む。そして、テストケース検証装置は、テストケースのテスト手順から入力パラメータの値が変化する時間情報を抽出して判断基準に適用し、出力パラメータの経時的な変化を表した期待値グラフを作成する処理と、テスト要件定義書のグラフを画像認識して期待値グラフと比較可能な想定値グラフを作成する処理と、期待値グラフと想定値グラフとを比較してテストケースの良否を検証する処理と、を実行する。 The test case verification device reads a test requirements definition document that defines a graph showing the change over time of an output parameter output from a simulator, a test procedure in which the values of input parameters to be input to the simulator and their retention times are described in functional form, and a test case including a judgment criterion in which the values of output parameters output from the simulator are described in functional form. The test case verification device then executes the following processes: extracting time information at which the values of the input parameters change from the test procedure of the test case and applying it to the judgment criterion to create an expected value graph showing the change over time of the output parameters; performing image recognition on the graph in the test requirements definition document to create an assumed value graph that can be compared with the expected value graph; and comparing the expected value graph with the assumed value graph to verify the pass/fail of the test case.
テストケース検証方法では、コンピュータが、シミュレータから出力される出力パラメータの経時的な変化を表したグラフが定義されたテスト要件定義書と、シミュレータに入力する入力パラメータの値及びその保持時間が関数形式で記述されたテスト手順、並びにシミュレータから出力される出力パラメータの値が関数形式で記述された判断基準を含むテストケースと、を読み込む。そして、コンピュータが、テストケースのテスト手順から入力パラメータの値が変化する時間情報を抽出して判断基準に適用し、出力パラメータの経時的な変化を表した期待値グラフを作成するステップと、テスト要件定義書のグラフを画像認識して期待値グラフと比較可能な想定値グラフを作成するステップと、期待値グラフと想定値グラフとを比較してテストケースの良否を検証するステップと、を実行する。 In the test case verification method, a computer reads a test requirements definition document that defines a graph showing the change over time of an output parameter output from a simulator, a test procedure in which the values of input parameters to be input to the simulator and their retention times are described in functional form, and a test case including a judgment criterion in which the values of output parameters output from the simulator are described in functional form. The computer then executes the steps of: extracting time information at which the values of the input parameters change from the test procedure of the test case and applying it to the judgment criterion to create an expected value graph showing the change over time of the output parameters; performing image recognition on the graph in the test requirements definition document to create an assumed value graph that can be compared with the expected value graph; and verifying the pass/fail of the test case by comparing the expected value graph with the assumed value graph.
本発明によれば、シミュレータを使用したテストにおいて、テスト要件定義書から作成されたテストケースの良否を容易に検証することができる。 According to the present invention, in testing using a simulator, it is possible to easily verify the validity of test cases created from a test requirements specification document.
以下、添付された図面を参照し、本発明を実施するための実施形態について詳述する。
図1は、車両などに搭載される電子制御装置100の機能をテストするシステムの一例を示している。なお、図1に示すシステムは、車両などに搭載される電子制御装置100に限らず、例えば、産業機器などに搭載される電子制御装置100の機能もテストすることができる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 shows an example of a system for testing the functions of an electronic control unit 100 mounted on a vehicle, etc. The system shown in Fig. 1 is not limited to the electronic control unit 100 mounted on a vehicle, etc., but can also test the functions of the electronic control unit 100 mounted on, for example, industrial equipment, etc.
電子制御装置100の機能をテストするシステムは、パーソナルコンピュータなどのコンピュータシステム(図示せず)によって実装されたHILS200を備えている。コンピュータシステムは、ハードディスクドライブやSSD(Solid State Drive)などのストレージに格納されたアプリケーションプログラムを実行することで、電子制御装置100の制御対象の一例である車両のエンジン機能や挙動などを数値化して、実機を模したシミュレーションを可能にするシミュレータの一例であるHILS200を実装する。 The system for testing the functions of the electronic control unit 100 includes a HILS 200 implemented by a computer system (not shown) such as a personal computer. The computer system implements HILS 200, which is an example of a simulator that quantifies the engine functions and behavior of a vehicle, which is an example of an object controlled by the electronic control unit 100, and enables a simulation that mimics the actual machine, by executing an application program stored in a storage device such as a hard disk drive or SSD (Solid State Drive).
HILS200は、電子制御装置100のテスト要件が定義されたテスト要件定義書300から設計者などによって作成された、電子制御装置100のテスト内容が関数形式で記述されたテストケース400に従って、電子制御装置100の機能をテストする。具体的には、HILS200は、電子制御装置100から制御信号を入力し、その制御信号に対応したシミュレーションを実行してその結果たるシステム状態を電子制御装置100に出力する。そして、HILS200は、電子制御装置100と制御信号及びシステム状態を逐次遣り取りし、電子制御装置100が所要の機能を発揮可能であるか否かをテストする。なお、HILS200は、当業者にとって周知技術であるため、その詳細な説明は省略する。 HILS200 tests the functions of the electronic control unit 100 according to test cases 400 in which the test contents of the electronic control unit 100 are described in functional form, which are created by a designer or the like from a test requirements definition document 300 in which the test requirements of the electronic control unit 100 are defined. Specifically, HILS200 inputs a control signal from the electronic control unit 100, executes a simulation corresponding to the control signal, and outputs the resulting system state to the electronic control unit 100. Then, HILS200 sequentially exchanges control signals and system states with the electronic control unit 100, and tests whether the electronic control unit 100 can perform the required functions. Note that HILS200 is a well-known technology to those skilled in the art, so a detailed description thereof will be omitted.
テスト要件定義書300は、図2に示すように、HILS200に入力する入力パラメータの値及びその変化、並びにHILS200から出力される出力パラメータの経時的な変化を表したグラフを定義している。 As shown in FIG. 2, the test requirements definition document 300 defines the values and changes of the input parameters input to the HILS 200, as well as a graph showing the changes over time of the output parameters output from the HILS 200.
図示のテスト要件定義書300では、入力パラメータとして、“HVDC Voltage”が800[V]、“LV switch Voltage”が12[V]、及び“Wakeup request”が“high”に設定されることが定義されているとともに、“Mode command”が“Idol mode”、“Torque control mode”及び“Three phase short mode”にステップ応答で変化することが定義されている。 In the illustrated test requirements definition document 300, the input parameters are defined as "HVDC Voltage" set to 800 [V], "LV switch Voltage" set to 12 [V], and "Wakeup request" set to "high", and the "Mode command" is defined to change in a step response to "Idol mode", "Torque control mode", and "Three phase short mode".
また、図示のテスト要件定義書300では、出力パラメータとして、“System state”が“Mode command”の変化から所定時間遅れて“Idle mode”、“Torque control mode”及び“Three phase short mode”にステップ応答で変化することが定義されているとともに、“State number”が“System state”の変化から所定の応答時間をもって“Idol mode number”、“Torque control mode number”及び“Three phase short mode number”にステップ応答で変化することが定義されている。なお、図示のテスト要件定義書300は、あくまで説明のための一例を示し、必ずこのようになると理解すべきではない。 In addition, in the illustrated test requirements definition document 300, it is defined that, as output parameters, the "System state" changes in a step response to "Idle mode", "Torque control mode" and "Three phase short mode" with a predetermined delay from the change in the "Mode command", and the "State number" changes in a step response to "Idol mode number", "Torque control mode number" and "Three phase short mode number" with a predetermined response time from the change in the "System state". Note that the illustrated test requirements definition document 300 is merely an example for the purpose of explanation, and should not be understood as necessarily being like this.
テストケース400は、図3に示すように、HILS200に入力する入力パラメータの値及びその保持時間が関数形式で記述されたテスト手順(Test Procedure)420、並びにHILS200から出力される出力パラメータの値が関数形式で記述された判断基準(Expected Results)440を含んでいる。 As shown in FIG. 3, the test case 400 includes a test procedure 420 in which the values of input parameters to be input to the HILS 200 and their retention times are described in functional form, and Expected Results 440 in which the values of output parameters output from the HILS 200 are described in functional form.
テスト手順420は、1つの入力パラメータに関するアクションごとに、処理の順序を示すシーケンス番号、何をするのかを指定する関数(Function)、並びに関数の引数としての変数名(Variable_Name)、その値(Value)及び単位(Unit)などが関連付けられた、少なくとも1つのレコードから構成されている。テスト手順420の関数としては、変数に値を設定する“Set”、変数を値によってランプ応答で変化させる“Ramp”、及び現在の状態を値[単位]の間だけ保持する“Wait”などがある。 Test procedure 420 is composed of at least one record that associates, for each action related to one input parameter, a sequence number indicating the order of processing, a function (Function) specifying what to do, and a variable name (Variable_Name), its value (Value), and unit (Unit) as arguments to the function. Functions in test procedure 420 include "Set", which sets a value to a variable, "Ramp", which changes the variable in a ramp response depending on the value, and "Wait", which holds the current state for the value [units].
判断基準440は、1つの入力パラメータに関するアクションごとに、処理の順序を示すシーケンス番号、何をするのかを指定する関数(Function)、並びに関数の引数としての変数名(Variable_Name)、その値(Value)及び単位(Unit)などが関連付けられた、少なくとも1つのレコードから構成されている。判断基準440の関数としては、変数を監視する“Monitor”、変数が一定値となることを確認する“Check_Values”、ステップ応答する変数の精度を確認する“Check_Accuracy”、及びステップ応答する変数の応答時間を確認する“Check_Response_Time”などがある。 The judgment criteria 440 consists of at least one record that is associated with each action related to one input parameter, a sequence number indicating the order of processing, a function (Function) specifying what to do, and a variable name (Variable_Name), its value (Value) and unit (Unit) as arguments to the function. Functions of the judgment criteria 440 include "Monitor" which monitors variables, "Check_Values" which checks that variables are constant, "Check_Accuracy" which checks the accuracy of a variable that responds in steps, and "Check_Response_Time" which checks the response time of a variable that responds in steps.
図示のテストケース400では、テスト手順420として、変数“INV_Mode”に“0”を設定し、その状態を“3[秒]”保持することが記述されている。また、判断基準440として、変数“vBat_Voltage_Limit”を監視し、次に変数“flginition_Switch”を監視し、その後変数“flgninition_Switch”が“1”となるかを確認することが記述されている。なお、図3に示すテストケース400は、あくまで説明のための一例を示し、必ずこのようになると理解すべきではない。 In the illustrated test case 400, the test procedure 420 describes setting the variable "INV_Mode" to "0" and maintaining that state for "3 seconds." The judgment criterion 440 describes monitoring the variable "vBat_Voltage_Limit," then monitoring the variable "flgninition_Switch," and then checking whether the variable "flgninition_Switch" becomes "1." Note that the test case 400 shown in FIG. 3 is merely an example for the purpose of explanation, and should not be understood as necessarily being like this.
ここで、テストケース400の理解を容易ならしめることを目的として、具体的な例を挙げて説明する。 Here, we will explain the test case 400 using a specific example to make it easier to understand.
テストケース400のテスト手順420において、図4に示すように、変数“Mot_Tmp”を“-60[℃]”に設定してその状態を“5[秒]”保持する“アクション3”と、変数“Mot_Tmp”を“-50[℃]”に設定してその状態を“5[秒]”保持する“アクション4”と、が記述されたものを考える。 In test procedure 420 of test case 400, as shown in FIG. 4, consider the following: "Action 3" sets the variable "Mot_Tmp" to "-60°C" and holds that state for "5 seconds," and "Action 4" sets the variable "Mot_Tmp" to "-50°C" and holds that state for "5 seconds."
横軸を経過時間、縦軸を変数の値としたグラフを作成すると、“アクション3”については、時間“0[秒]”において変数“Mot_Tmp”が“-60[℃]”に設定されてその状態が“5[秒]”保持されることを示すグラフ、“アクション4”については、時間“0[秒]”において変数“Mot_Tmp”が“-50[℃]”に設定されてその状態が“5[秒]”保持されることを示すグラフとなる。そして、“アクション3”及び“アクション4”は連続して実行されるため、“アクション3”のグラフに対して“アクション4”のグラフを連結すると、時間“0[秒]”において変数“Mot_Tmp”が“-60[℃]”に設定されてその状態が“5[秒]”保持された後、時間“5[秒]”において変数“Mot_Tmp”が“-60[℃]”から“―50[℃]”に変化してその状態が“5[秒]”保持されることを示すグラフとなる。このようなグラフを参照すると、変数“Mot_Tmp”を設定する時間、変化させる時間、及び保持を終了させる時間などの時間情報を含んでいることを理解できるであろう。 If a graph is created with the horizontal axis representing elapsed time and the vertical axis representing the variable value, for "action 3", the graph will show that the variable "Mot_Tmp" is set to "-60 [°C]" at time "0 [seconds]" and maintained in that state for "5 [seconds]", and for "action 4", the graph will show that the variable "Mot_Tmp" is set to "-50 [°C]" at time "0 [seconds]" and maintained in that state for "5 [seconds]". And because "action 3" and "action 4" are executed consecutively, if the graph for "action 4" is linked to the graph for "action 3", the graph will show that the variable "Mot_Tmp" is set to "-60 [°C]" at time "0 [seconds]" and maintained in that state for "5 [seconds]", and then at time "5 [seconds]", the variable "Mot_Tmp" changes from "-60 [°C]" to "-50 [°C]" and maintained in that state for "5 [seconds]". By looking at this graph, you can see that it contains time information such as the time to set the variable "Mot_Tmp", the time to change it, and the time to end the hold.
テストケース400の判断基準440では、関数“Check_Values”、“Check_Accuracy”及び“Check_Response_Time”に応じて判断に関する処理内容が異なっている。以下、各関数について説明する。 In the judgment criteria 440 of the test case 400, the processing content related to the judgment differs depending on the functions "Check_Values", "Check_Accuracy", and "Check_Response_Time". Each function is explained below.
<<関数“Check_Values”>>
テストケース400のテスト手順420において、図5に示すように、変数“Mot_Tmp”に“50[℃]”を設定してその状態を“5[秒]”保持することが記述されていると、これから作成されるグラフでは、時間“0[秒]”において変数“Mot_Tmp”が“50[℃]”に設定されてその状態が“5[秒]”保持、即ち、その状態が時間“10[秒]”まで持続することを示すものとなる。このように、入力パラメータが経時的に変化しない一定値をとると、HILS200から出力される出力パラメータも一定値をとると想定することができる。この場合、テストケース400の判断基準440において、何をするのかを指定する関数について、変数の値が一定値となることを確認する“Check_Values”を採択することができる。関数“Check_Values”では、その引数として、少なくとも、変数名、その値、単位を必要とする。
<<Function “Check_Values”>>
In the test procedure 420 of the test case 400, as shown in FIG. 5, if it is described that the variable "Mot_Tmp" is set to "50[°C]" and the state is maintained for "5[seconds]", the graph created from this will show that the variable "Mot_Tmp" is set to "50[°C]" at time "0[seconds]" and the state is maintained for "5[seconds]", that is, the state continues until time "10[seconds]". In this way, if the input parameters take constant values that do not change over time, it can be assumed that the output parameters output from the HILS 200 also take constant values. In this case, in the judgment criteria 440 of the test case 400, for the function that specifies what to do, it is possible to adopt "Check_Values" that checks that the value of the variable is a constant value. The function "Check_Values" requires at least the variable name, its value, and unit as its arguments.
図5に示す判断基準440の一例では、関数に“Check_Values”が採択され、変数“vMotor_Temperature”が“50[℃]”となることを確認することが記述されている。しかしながら、関数“Check_Values”では、出力パラメータである変数“vMotor_Temperature”がとり得る値“50[℃]”が定義されているものの、これがいつ成立するかについての時間情報がなく、変数“vMotor_Temperature”の経時的な変化状態を把握し難いという問題点がある。 In one example of the judgment criteria 440 shown in FIG. 5, it is described that "Check_Values" is adopted as the function, and it is confirmed that the variable "vMotor_Temperature" is "50 [°C]". However, although the function "Check_Values" defines the value "50 [°C]" that the variable "vMotor_Temperature", which is an output parameter, can take, there is no time information about when this value will be established, and there is a problem in that it is difficult to grasp the change in the variable "vMotor_Temperature" over time.
そこで、テストケース400のテスト手順420から作成されたグラフから時間情報として、変数“Mot_Tmp”が“50[℃]”に設定される時間“0[秒]”、及びその状態が保持される時間“5[秒]”が抽出される。そして、このように抽出された時間が判断基準440に適用されて、出力パラメータである変数“vMotor_Temperature”が時間“0[秒]”において“50[℃]”になってその状態が“5[秒]”保持されることを示す期待値グラフが作成される。ここで、期待値グラフとは、テストケース400のテスト手順420に従ってHILS200がシミュレーションを実行すると、HILS200が出力するであろうと期待される出力パラメータの経時的な変化を表したグラフである(以下同様)。 Then, from the graph created from the test procedure 420 of the test case 400, the time "0 seconds" when the variable "Mot_Tmp" is set to "50°C" and the time "5 seconds" when this state is maintained are extracted as time information. The times thus extracted are then applied to the judgment criterion 440 to create an expected value graph showing that the variable "vMotor_Temperature", which is an output parameter, becomes "50°C" at time "0 seconds" and maintains this state for "5 seconds". Here, the expected value graph is a graph that represents the change over time in the output parameter that is expected to be output by the HILS 200 when the HILS 200 executes a simulation according to the test procedure 420 of the test case 400 (same below).
<<関数“Check_Accuracy”>>
テストケース400のテスト手順420において、図6に示すように、変数“Mot_Tmp”に“50[℃]”を設定してその状態を“2[秒]”保持した後、変数“Mot_Tmp”に“60[℃]”を設定してその状態を“3[秒]”保持することが記述されていると、これから作成されるグラフでは、時間“0[秒]”において変数“Mot_Tmp”が“50[℃]”に設定されてその状態が“2[秒]”保持された後、時間“2[秒]”において変数“Mot_Tmp”が“50[℃]”から“60[℃]”に変化してその状態が“3[秒]”保持、即ち、その状態が時間“5[秒]”まで持続することを示すものとなる。このように、入力パラメータがステップ応答で変化すると、HILS200から出力される出力パラメータもステップ応答で変化すると想定することができる。この場合、テストケース400の判断基準440において、何をするのかを指定する関数について、ステップ応答する変数の精度を確認する“Check_Accuracy”を採択することができる。関数“Check_Accuracy”では、その引数として、少なくとも、変数名、変化前後の2つの値、単位、各値の許容範囲、変化後の値の条件を必要とする。
<<Function “Check_Accuracy”>>
6, if it is described that the variable "Mot_Tmp" is set to "50[° C.]" and the state is held for "2 [seconds]", then the variable "Mot_Tmp" is set to "60[° C.]" and the state is held for "3 [seconds]", the graph created from this shows that the variable "Mot_Tmp" is set to "50[° C.]" at time "0 [seconds]" and the state is held for "2 [seconds]", then the variable "Mot_Tmp" changes from "50[° C.]" to "60[° C.]" at time "2 [seconds]" and the state is held for "3 [seconds]", that is, the state is sustained for a time "5 [seconds]". In this way, when the input parameters change in a step response, it can be assumed that the output parameters output from the HILS 200 also change in a step response. In this case, "Check_Accuracy" that checks the accuracy of the step-response variable can be adopted as a function that specifies what to do in the judgment criteria 440 of the test case 400. The function "Check_Accuracy" requires, as its arguments, at least the variable name, two values before and after the change, the unit, the allowable range of each value, and the condition of the value after the change.
図6に示す判断基準440の一例では、関数に“Check_Accuracy”が採択され、入力パラメータである変数“Mot_Tmp”の変化に応じて、変数“vMotor_Temperature”が“50±2[℃]”から“60±5[℃]に変化すること、及び変数“vMotor_Temperature”が変化して“100[ミリ秒]”経過後に変数“vMotor_Temperature”が“60±5[℃]”となる状態が少なくとも“2000[ミリ秒]”持続することを確認することが記述されている。しかしながら、関数“Check_Accuracy”では、出力パラメータである変数“vMotor_Temperature”の変化前後の2つの値、各値の許容範囲、変化後の値の条件が定義されているものの、これがいつ成立するかについての時間情報がなく、変数“vMotor_Temperature”の経時的な変化状態を把握し難いという問題点がある。 In an example of the judgment criteria 440 shown in FIG. 6, the function "Check_Accuracy" is adopted, and it is described that it is confirmed that the variable "vMotor_Temperature" changes from "50±2°C" to "60±5°C" in response to a change in the variable "Mot_Tmp" which is an input parameter, and that the state in which the variable "vMotor_Temperature" becomes "60±5°C" after "100 milliseconds" have elapsed since the change in the variable "vMotor_Temperature" continues for at least "2000 milliseconds." However, although the function "Check_Accuracy" defines two values before and after the change in the variable "vMotor_Temperature" which is an output parameter, the allowable range of each value, and the condition of the value after the change, there is no time information about when this is established, and it is difficult to grasp the change state of the variable "vMotor_Temperature" over time.
そこで、テストケース400のテスト手順420から作成されたグラフから時間情報として、変数“Mot_Tmp”が“50[℃]”に設定される時間“0[秒]”、変数“Mot_Tmp”が“50[℃]”から“60[℃]”に変化する時間“2[秒]”、及び変数“Mot_Tmp”が“60[℃]”になった状態が保持される時間“3[秒]”が抽出される。そして、このように抽出された時間が判断基準440に適用されて、変数“vMotor_Temperature”が時間“0[秒]”において“50±2[℃]”になってその状態が“2[秒]”保持された後、変数“vMotor_Temperature”が“50±2[℃]”から“60±5[℃]”に変化し、そこから“0.1[秒]”経過後にその状態が少なくとも“2[秒]”保持されることを示す期待値グラフが作成される。 Then, from the graph created from the test procedure 420 of the test case 400, the time "0 [seconds]" when the variable "Mot_Tmp" is set to "50 [°C]", the time "2 [seconds]" when the variable "Mot_Tmp" changes from "50 [°C]" to "60 [°C]", and the time "3 [seconds]" when the variable "Mot_Tmp" is maintained at "60 [°C]" are extracted as time information. Then, the times extracted in this way are applied to the judgment criterion 440, and an expected value graph is created which shows that after the variable "vMotor_Temperature" becomes "50±2 [°C]" at time "0 [seconds]" and is maintained in this state for "2 [seconds]", the variable "vMotor_Temperature" changes from "50±2 [°C]" to "60±5 [°C]", and after "0.1 [seconds]" has elapsed from that point, this state is maintained for at least "2 [seconds]".
<<関数“Check_Response_Time”>>
テストケース400のテスト手順420において、図7に示すように、変数“Mot_Tmp”に“20[℃]”を設定してその状態を“1[秒]”保持した後、変数“Mot_Tmp”に“100[℃]”を設定してその状態を“4[秒]”保持することが記述されていると、これから作成されるグラフでは、時間“0[秒]”において変数“Mot_Tmp”が“20[℃]”に設定されてその状態が“1[秒]”保持された後、時間“1[秒]”において変数“Mot_Tmp”が“20[℃]”から“100[℃]”に変化してその状態が“4[秒]”保持、即ち、その状態が時間“5[秒]”まで持続することを示すものとなる。このように、入力パラメータがステップ応答で変化すると、HILS200から出力される出力パラメータもステップ応答で変化すると想定することができる。この場合、テストケース400の判断基準440において、何をするのかを指定する関数について、ステップ応答する変数の応答時間を確認する“Check_Response_Time”を採択することができる。関数“Check_Response_Time”では、その引数として、少なくとも、変数名、変化前後の2つの値、単位、変化に要する時間(Timing)を必要とする。
<<Function “Check_Response_Time”>>
7, if it is described that the variable "Mot_Tmp" is set to "20[° C.]" and the state is held for "1 [second]", then the variable "Mot_Tmp" is set to "100[° C.]" and the state is held for "4 [seconds]", the graph created from this shows that the variable "Mot_Tmp" is set to "20[° C.]" at time "0 [seconds]" and the state is held for "1 [second]", then the variable "Mot_Tmp" changes from "20[° C.]" to "100[° C.]" at time "1 [second]" and the state is held for "4 [seconds]", that is, the state continues until time "5 [seconds]". In this way, when the input parameters change in a step response, it can be assumed that the output parameters output from the HILS 200 also change in a step response. In this case, "Check_Response_Time" that checks the response time of a variable that responds in steps can be adopted as a function that specifies what to do in the judgment criteria 440 of the test case 400. The function "Check_Response_Time" requires at least the variable name, two values before and after the change, a unit, and the time required for the change (Timing) as its arguments.
図7に示す判断基準440の一例では、関数に“Check_Response_Time”が採択され、入力パラメータである変数“Mot_Tmp”の変化に応じて、変数“vMotor_Temperature”が“20[℃]”から“100[℃]”に変化すること、及びその変化に要する時間が“120[ミリ秒]”であることを確認することが記述されている。しかしながら、関数“Check_Response_Time”では、出力パラメータである変数“vMotor_Temperature”の変化前後の2つの値、及びその変化に要する時間が定義されているが、これがいつ成立するかについての時間情報がなく、変数“vMotor_Temperature”の経時的な変化状態を把握し難いという問題点がある。 In one example of the judgment criteria 440 shown in FIG. 7, "Check_Response_Time" is adopted as a function, and it is described that it is confirmed that the variable "vMotor_Temperature" changes from "20°C" to "100°C" in response to a change in the variable "Mot_Tmp", which is an input parameter, and that the time required for this change is "120 milliseconds". However, although the function "Check_Response_Time" defines two values before and after the change in the variable "vMotor_Temperature", which is an output parameter, and the time required for this change, there is no time information about when this is established, making it difficult to grasp the change state of the variable "vMotor_Temperature" over time.
そこで、テストケース400のテスト手順420から作成されたグラフから時間情報として、変数“Mot_Tmp”が“20[℃]”に設定される時間“0[秒]”、変数“Mot_Tmp”が“20[℃]”から“100[℃]”に変化する時間“1[秒]”、及び変数“Mot_Tmp”が“100[℃]”になった状態が保持される時間“4[秒]”が抽出される。そして、このように抽出された時間が判断基準440に適用されて、変数“vMotor_Temperature”が時間“0[秒]”において“20[℃]”になってその状態が“1[秒]”保持された後、変数“vMotor_Temperature”が時間“0.12[秒]”をかけて“20[℃]”から“100[℃]”に変化し、その状態が少なくとも“3.88[秒]”保持されることを示す期待値グラフが作成される。 Then, from the graph created from the test procedure 420 of the test case 400, the time "0 [seconds]" when the variable "Mot_Tmp" is set to "20 [°C]", the time "1 [second]" when the variable "Mot_Tmp" changes from "20 [°C]" to "100 [°C]", and the time "4 [seconds]" when the variable "Mot_Tmp" is maintained at "100 [°C]" are extracted as time information. The times thus extracted are then applied to the judgment criterion 440, and an expected value graph is created which shows that after the variable "vMotor_Temperature" becomes "20 [°C]" at time "0 [seconds]" and maintains this state for "1 [second]", the variable "vMotor_Temperature" changes from "20 [°C]" to "100 [°C]" over time "0.12 [seconds]", and the state is maintained for at least "3.88 [seconds]".
テストケース400の判断基準440には、上述した3つの関数、“Check_Values”、“Check_Accuracy”及び“Check_Response_Time”の少なくとも1つを設定することができる。この場合、その優先順位は、“Check_Response_Time”>”Check_Accuracy”>”Check_Values”とすればよい。 At least one of the three functions mentioned above, "Check_Values", "Check_Accuracy" and "Check_Response_Time", can be set as the judgment criteria 440 of the test case 400. In this case, the priority order should be "Check_Response_Time" > "Check_Accuracy" > "Check_Values".
テストケース400に複数のアクションが定義されている場合、上記のように作成された期待値グラフを順次連結し、図8に示すように、一連のテストの結果として得られる出力パラメータの期待値を示す期待値グラフを作成すればよい。図示の期待値グラフでは、「アクション0」~「アクション3」について連続した1つの期待値グラフが得られ、その応答時間及び精度が設定されている様子が示されている。 When multiple actions are defined in test case 400, the expected value graphs created as described above can be linked in sequence to create an expected value graph that shows the expected values of the output parameters obtained as a result of a series of tests, as shown in Figure 8. The expected value graph shown in the figure shows one continuous expected value graph obtained for "action 0" to "action 3," with the response time and accuracy set.
ところで、テストケース400は、テスト要件定義書300から設計者などが人手で作成するものであるため、テストケース400の作成過程において人的ミスなどが入り込む余地があり、テスト要件が必ずしもテストケース400に反映されないおそれがある。テスト要件がテストケース400に反映されていないと、HILS200は電子制御装置100をテスト要件通りにテストすることができず、例えば、ある機能についてのテストが不適切になってしまうおそれがある。 However, since the test cases 400 are manually created by designers or the like based on the test requirements definition document 300, there is a possibility that human error may occur in the process of creating the test cases 400, and the test requirements may not necessarily be reflected in the test cases 400. If the test requirements are not reflected in the test cases 400, the HILS 200 cannot test the electronic control device 100 according to the test requirements, and there is a risk that, for example, testing of a certain function may be inappropriate.
そこで、図9に示すように、テスト要件定義書300及びテストケース400を読み込み可能なテストケース検証装置500を使用して、テスト要件定義書300から作成したテストケース400の良否を検証する。なお、テストケース検証装置500は、コンピュータシステムがアプリケーションプログラムを実行することで実装され、HILS200に組み込まれていても、HILS200とは別体であってもよい。 As shown in FIG. 9, a test case verification device 500 capable of reading the test requirements definition document 300 and the test cases 400 is used to verify the pass/fail of the test cases 400 created from the test requirements definition document 300. The test case verification device 500 is implemented by a computer system executing an application program, and may be incorporated in the HILS 200 or may be separate from the HILS 200.
図10及び図11は、テストケース検証装置500により実行される検証処理の一例を示している。ここで、検証処理を実行する前提として、テスト要件定義書300、及びこれから作成された複数のテストケース400がストレージに格納されているものとする。 Figures 10 and 11 show an example of a verification process executed by the test case verification device 500. Here, as a prerequisite for executing the verification process, it is assumed that a test requirements definition document 300 and multiple test cases 400 created from it are stored in storage.
ステップ10(図10では「S10」と略記する。以下同様。)では、テストケース検証装置500が、コンピュータシステムの表示装置に、ストレージに格納された複数のテストケース400の中から、検証対象のテストケース400を選択するための選択画面を表示する。選択画面としては、例えば、ポインティングデバイスなどを使用してインタラクティブにテストケース400を選択する画面、検証対象のテストケース400の識別子を直接的に入力する画面など、任意の画面とすることができる。 In step 10 (abbreviated as "S10" in FIG. 10, and the same applies below), the test case verification device 500 displays a selection screen on the display device of the computer system for selecting a test case 400 to be verified from among the multiple test cases 400 stored in the storage. The selection screen can be any screen, such as a screen for interactively selecting a test case 400 using a pointing device or the like, or a screen for directly inputting the identifier of the test case 400 to be verified.
ステップ11では、テストケース検証装置500が、複数のテストケース400の中から、検証対象のテストケース400が選択されたか否かを判定する。そして、テストケース検証装置500は、検証対象のテストケース400が選択されたと判定すれば(Yes)、処理をステップ12へと進める。一方、検証対象のテストケース400が選択されていないと判定すれば(No)、検証対象のテストケース400が選択されるまで待機する。 In step 11, the test case verification device 500 determines whether or not a test case 400 to be verified has been selected from among the multiple test cases 400. If the test case verification device 500 determines that a test case 400 to be verified has been selected (Yes), the process proceeds to step 12. On the other hand, if the test case verification device 500 determines that a test case 400 to be verified has not been selected (No), the device waits until a test case 400 to be verified is selected.
ステップ12では、テストケース検証装置500が、検証対象のテストケース400のテスト手順420及び判断基準440から期待値グラフを作成する。具体的には、テストケース検証装置500は、テストケース400のテスト手順420から、経時的に変化する入力パラメータを示すグラフを作成し、そのグラフから時間情報を抽出する。そして、テストケース検証装置500は、このように抽出した時間情報をテストケース400の判断基準440に適用することで、経時的に変化する出力パラメータを示す少なくとも1つの期待値グラフを作成する。 In step 12, the test case verification device 500 creates an expected value graph from the test procedure 420 and the judgment criteria 440 of the test case 400 to be verified. Specifically, the test case verification device 500 creates a graph showing input parameters that change over time from the test procedure 420 of the test case 400, and extracts time information from the graph. Then, the test case verification device 500 applies the extracted time information to the judgment criteria 440 of the test case 400 to create at least one expected value graph showing output parameters that change over time.
ステップ13では、テストケース検証装置500が、ステップ12において作成した期待値グラフが複数あるか否かを判定する。そして、テストケース検証装置500は、期待値グラフが複数あると判定すれば(Yes)、処理をステップ14へと進める。一方、テストケース検証装置500は、期待値グラフが1つであると判定すれば(No)、処理をステップ16へと進める。 In step 13, the test case verification device 500 determines whether or not there are multiple expected value graphs created in step 12. If the test case verification device 500 determines that there are multiple expected value graphs (Yes), it proceeds to step 14. On the other hand, if the test case verification device 500 determines that there is only one expected value graph (No), it proceeds to step 16.
ステップ14では、テストケース検証装置500が、コンピュータシステムの表示装置に、ステップ12において作成された複数の期待値グラフの中から、検証対象の期待値グラフを選択するための選択画面を表示する。選択画面としては、例えば、ポインティングデバイスなどを使用してインタラクティブに期待値グラフを選択する画面、検証対象の期待値グラフの識別子を直接的に入力する画面など、任意の画面とすることができる。 In step 14, the test case verification device 500 displays a selection screen on the display device of the computer system for selecting an expectation graph to be verified from the multiple expectation graphs created in step 12. The selection screen can be any screen, such as a screen for interactively selecting an expectation graph using a pointing device or a screen for directly inputting the identifier of the expectation graph to be verified.
ステップ15では、テストケース検証装置500が、複数の期待値グラフの中から、検証対象の期待値グラフが選択されたか否かを判定する。そして、テストケース検証装置500は、検証対象の期待値グラフが選択されたと判定すれば(Yes)、処理をステップ16へと進める。一方、テストケース検証装置500は、検証対象の期待値グラフが選択されていないと判定すれば(No)、検証対象の期待値グラフが選択されるまで待機する。 In step 15, the test case verification device 500 determines whether or not an expected value graph to be verified has been selected from among the multiple expected value graphs. If the test case verification device 500 determines that an expected value graph to be verified has been selected (Yes), the process proceeds to step 16. On the other hand, if the test case verification device 500 determines that an expected value graph to be verified has not been selected (No), the test case verification device 500 waits until an expected value graph to be verified is selected.
ステップ16では、テストケース検証装置500が、以下詳細に示すように、ステップ12で作成した期待値グラフ、又はステップ13及び14で選択された期待値グラフを記号化する。 In step 16, the test case verification device 500 symbolizes the expected value graph created in step 12 or the expected value graphs selected in steps 13 and 14, as described in detail below.
<<グラフの記号化>>
時間経過に伴って変化する出力パラメータの変化方向を表す記号として、図12に示すように、上方に変化することを表す“U”、ランプ応答により右上方に斜めに変化することを示す“UR”、右方に変化することを表す“R”、ランプ応答により右下方に斜めに変化することを示す“DR”、及び下方に変化することを表す“D”を用いる。具体的な一例を挙げてこれを説明すると、図13に示すように、時間経過に伴って出力パラメータが右方向、上方、右方、右下方及び右方にこの順番で変化する場合、その変化方向は“R”、“U”、“R”、“DR”及び“R”という文字で夫々表すことができる。また、出力パラメータが、図14に示すように、その値が“0”である状態が“5[秒]”保持された後、その値が“0”から“1”へと変化してその状態が“3[秒]”保持される場合、期待値グラフは“R5U1R3”と記号化することができる。このとき、出力パラメータを表すグラフについて上下方向及び左右方向の基準長さを予め設定しておき、図15に示すように、この基準長さを使用して期待値グラフを記号化することができる。なお、図15に示す一例では、期待値グラフを記号化すると“R6U1R4U1R6”という文字列が得られることが示されている。
<<Symbolization of graphs>>
As symbols representing the direction of change of the output parameter that changes with time, as shown in Fig. 12, "U" representing an upward change, "UR" representing a change diagonally to the upper right due to a ramp response, "R" representing a change to the right, "DR" representing a change diagonally to the lower right due to a ramp response, and "D" representing a downward change are used. To explain this with a specific example, as shown in Fig. 13, when the output parameter changes to the right, upward, right, lower right, and right in this order with time, the direction of change can be represented by the letters "R", "U", "R", "DR", and "R", respectively. Also, when the output parameter is held in a state of "0" for "5 [seconds]" as shown in Fig. 14, and then the value changes from "0" to "1" and is held in that state for "3 [seconds]", the expected value graph can be symbolized as "R5U1R3". At this time, the reference lengths in the vertical and horizontal directions for the graph representing the output parameters are preset, and the expected value graph can be symbolized using these reference lengths, as shown in Fig. 15. Note that the example shown in Fig. 15 shows that when the expected value graph is symbolized, the character string "R6U1R4U1R6" is obtained.
ステップ17では、テストケース検証装置500が、テスト要件定義書300から、検証対象の期待値グラフに関連付けられた想定値グラフを抽出する。ここで、テスト要件定義書300においては、例えば、描画ツールを使用して少なくとも1つの想定値グラフが作成されているものとする。 In step 17, the test case verification device 500 extracts an expected value graph associated with the expected value graph to be verified from the test requirements definition document 300. Here, it is assumed that at least one expected value graph has been created in the test requirements definition document 300 using, for example, a drawing tool.
ステップ18では、テストケース検証装置500が、画像認識により想定値グラフを記号化する。なお、想定値グラフの記号化は、期待値グラフの記号化と同様な処理を経て行われるため、その説明を省略するものとする。必要であれば、期待値グラフの記号化の説明を参照されたい。 In step 18, the test case verification device 500 symbolizes the expected value graph by image recognition. Note that the symbolization of the expected value graph is performed through a process similar to that of the expected value graph, so its explanation is omitted. If necessary, please refer to the explanation of the expected value graph symbolization.
ステップ19では、テストケース検証装置500が、ステップ16において記号化した期待値グラフと、ステップ18において記号化した想定値グラフと、を比較する。具体的には、テストケース検証装置500は、図16に示すように、例えば、期待値グラフを記号化して得られた文字列“R7U5R4”と想定値グラフを記号化して得られた文字列“R6U2R4”とを比較し、出力パラメータの変化方向を示す記号が一致しているか否かを判定する。また、テストケース検証装置500は、出力パラメータの変化方向に加え、出力パラメータの長さについて、予め設定した許容範囲内であるかを判定する。図示の一例において、上下方向の許容範囲が“3”、左右方向の許容範囲が“2”であれば、“R7”と“6”、“U5”と“U2”、及び“R4”と“R4”とが夫々比較され、これらが許容範囲内であるため一致すると判定する。 In step 19, the test case verification device 500 compares the expected value graph symbolized in step 16 with the assumed value graph symbolized in step 18. Specifically, as shown in FIG. 16, the test case verification device 500 compares, for example, the character string "R7U5R4" obtained by symbolizing the expected value graph with the character string "R6U2R4" obtained by symbolizing the assumed value graph, and determines whether the symbols indicating the change direction of the output parameter match. In addition to the change direction of the output parameter, the test case verification device 500 also determines whether the length of the output parameter is within a preset allowable range. In the illustrated example, if the allowable range in the up-down direction is "3" and the allowable range in the left-right direction is "2", "R7" and "6", "U5" and "U2", and "R4" and "R4" are compared, respectively, and it is determined that they match because they are within the allowable range.
ステップ20では、テストケース検証装置500が、ステップ19の比較結果に応じて、期待値グラフと想定値グラフとが一致しているか否かを判定する。そして、テストケース検証装置500は、期待値グラフと想定値グラフとが一致していると判定すれば(Yes)、処理をステップ21へと進める。一方、テストケース検証装置500は、期待値グラフと想定値グラフとが一致していないと判定すれば(No)、処理をステップ22へと進める。 In step 20, the test case verification device 500 determines whether the expected value graph and the assumed value graph match, based on the comparison result in step 19. If the test case verification device 500 determines that the expected value graph and the assumed value graph match (Yes), it proceeds to step 21. On the other hand, if the test case verification device 500 determines that the expected value graph and the assumed value graph do not match (No), it proceeds to step 22.
ステップ21では、テストケース検証装置500が、期待値グラフと想定値グラフとが一致しているので、検証対象のテストケース400は妥当であると判断する。その後、テストケース検証装置500は、処理をステップ23へと進める。 In step 21, the test case verification device 500 determines that the test case 400 to be verified is valid because the expected value graph and the assumed value graph match. The test case verification device 500 then proceeds to step 23.
ステップ22では、テストケース検証装置500が、期待値グラフと想定値グラフとが一致していないので、検証対象のテストケース400は妥当でないと判断する。その後、テストケース検証装置500は、処理をステップ23へと進める。 In step 22, the test case verification device 500 determines that the test case 400 to be verified is invalid because the expected value graph and the assumed value graph do not match. The test case verification device 500 then proceeds to step 23.
ステップ23では、テストケース検証装置500が、図17~図19に示すようなテスト結果を作成する。具体的には、テストケース検証装置500は、テストケース400の各アクションについて、検証結果、及びテストケース400に定義された内容を可視化したデータを作成する。ここで、図17及び図18に示す“アクション0”及び“アクション1”のテスト結果は、出力パラメータ“vSpeedMotor”に関して、判断基準440の“Check_Accuracy”による検証がOKであることを示し、図19に示す“アクション2”のテスト結果は、出力パラメータ“vSpeedMotor”に関して、判断基準440の“Check_Accuracy”による検証がNGであることを示している。なお、テスト結果としては、図17~図19に示すものに限らず、検証対象及びその検証結果が特定できる任意のものとすることができる。 In step 23, the test case verification device 500 creates test results as shown in Figs. 17 to 19. Specifically, the test case verification device 500 creates data that visualizes the verification results and the contents defined in the test case 400 for each action of the test case 400. Here, the test results of "Action 0" and "Action 1" shown in Figs. 17 and 18 indicate that the verification by "Check_Accuracy" of the judgment criterion 440 for the output parameter "vSpeedMotor" is OK, and the test result of "Action 2" shown in Fig. 19 indicates that the verification by "Check_Accuracy" of the judgment criterion 440 for the output parameter "vSpeedMotor" is NG. Note that the test results are not limited to those shown in Figs. 17 to 19, and can be any that can identify the verification target and its verification result.
ステップ24では、テストケース検証装置500が、コンピュータシステムの表示装置に、ステップ23で作成したテスト結果を出力して表示させる。従って、設計者などは、表示装置に表示されたテスト結果を確認することで、テストケース400に問題があるか否か、及び問題がある場合にはその箇所を容易に把握することができる。そして、設計者などは、テストケース400に問題がある場合、その原因となっている箇所を重点的に確認することで、テストケース400の問題を容易に修正することができる。 In step 24, the test case verification device 500 outputs and displays the test results created in step 23 on the display device of the computer system. Therefore, by checking the test results displayed on the display device, the designer or the like can easily determine whether there is a problem with the test case 400 and, if there is a problem, what the problem is. If there is a problem with the test case 400, the designer or the like can easily correct the problem with the test case 400 by focusing on the part that is causing the problem.
ステップ25では、テストケース検証装置500が、例えば、テストケース400の検証を続行するか否かを指定させる画面を表示し、その指定結果に応じて検証処理を終了させるか否かを判定する。そして、テストケース検証装置500は、検証処理を終了させる指定がなされたのであれば(Yes)、検証処理を終了させる。一方、テストケース検証装置500は、検証処理を続行させる指定がなされないのであれば(No)、他のテストケース400について検証を続行すべく、処理をステップ10へと戻す。なお、テストケース検証装置500は、他の期待値グラフについて検証を続行するか否かを指定させる画面を併せて表示するようにしてもよい。 In step 25, the test case verification device 500 displays a screen for prompting the user to specify whether or not to continue the verification of the test case 400, and determines whether or not to end the verification process depending on the result of the specification. If a specification to end the verification process has been made (Yes), the test case verification device 500 ends the verification process. On the other hand, if a specification to continue the verification process has not been made (No), the test case verification device 500 returns the process to step 10 to continue the verification of other test cases 400. The test case verification device 500 may also display a screen for prompting the user to specify whether or not to continue the verification of other expected value graphs.
かかる検証処理によれば、テストケース検証装置500は、テストケース400のテスト手順420から入力パラメータが変化する時間情報を抽出して判断基準440に適用することで、出力パラメータの経時的な変化を表した期待値グラフを作成し、これを記号化した文字列を生成する。また、テストケース検証装置500は、テスト要件定義書300のグラフを画像認識することで、期待値グラフと比較可能な想定値グラフを作成し、これを記号化した文字列を生成する。そして、テストケース検証装置500は、このように生成した2つの文字列を比較し、期待値グラフと想定値グラフとが一致しているか否か、要するに、期待値グラフはテスト要件定義書300の内容を反映しているか否かを判定する。従って、HILS200などのシミュレータを使用したテストにおいて、テスト要件定義書300から作成されたテストケース400の良否を容易に検証することができる。 According to this verification process, the test case verification device 500 extracts time information at which the input parameters change from the test procedure 420 of the test case 400 and applies it to the judgment criterion 440 to create an expected value graph that shows the change in the output parameters over time, and generates a character string that symbolizes this. The test case verification device 500 also performs image recognition on the graph of the test requirements definition document 300 to create an assumed value graph that can be compared with the expected value graph, and generates a character string that symbolizes this. The test case verification device 500 then compares the two character strings thus generated and determines whether the expected value graph and the assumed value graph match, in other words, whether the expected value graph reflects the contents of the test requirements definition document 300. Therefore, in a test using a simulator such as the HILS 200, the pass/fail of the test case 400 created from the test requirements definition document 300 can be easily verified.
このとき、テストケース検証装置500は、出力パラメータの値の変化タイミング及びその保持時間についてそれぞれ設定された許容範囲を考慮して2つの文字列を比較する。このため、例えば、期待値グラフ及び想定値グラフを作成するときの精度、これらを記号化して文字列を生成するときの精度などに起因して、2つの文字列の間に多少の相違があってもこれらが一致すると判定することができる。 At this time, the test case verification device 500 compares the two character strings, taking into account the tolerances set for the timing of change in the value of the output parameter and the retention time. Therefore, even if there are some differences between the two character strings due to, for example, the precision with which the expected value graph and the assumed value graph are created, and the precision with which they are symbolized to generate the character string, it can be determined that the two character strings match.
テストケース検証装置500は、テスト結果を作成して出力する代わりに又はこれと共に、図20に示すように、レポートタイトル、ユースケース/テストケース名、テスト結果サマリ、テスト概要、ID一覧表、期待値グラフ、テストの目的、テスト環境一覧表、テスト全体グラフ、及びテスト結果を含んだテストレポート600を作成して出力するようにしてもよい。なお、図20に示すテストレポート600は、あくまで説明のための一例であって、テストレポートに必要な任意の事項を含んだものとしてもよい。 Instead of or in addition to creating and outputting the test results, the test case verification device 500 may create and output a test report 600 including a report title, use case/test case name, test result summary, test overview, ID list, expected value graph, test purpose, test environment list, overall test graph, and test results, as shown in FIG. 20. Note that the test report 600 shown in FIG. 20 is merely an example for the purpose of explanation, and may include any items necessary for a test report.
なお、当業者であれば、様々な上記実施形態の技術的思想について、その一部を省略したり、その一部を適宜組み合わせたり、その一部を周知技術に置換したりすることで、新たな実施形態を生み出せることを容易に理解できるであろう。 A person skilled in the art will easily understand that new embodiments can be created by omitting parts of the technical ideas of the various embodiments described above, combining parts of them as appropriate, or replacing parts of them with well-known technology.
その一例を挙げると、テスト要件定義書300は、描画ツールを使用して作成されたものに限らず、例えば、紙面に描かれたものであってもよい。この場合、テストケース検証装置500は、例えば、スキャナ、デジタルカメラなどを使用して紙面を読み込み、これに対して周知技術を適用して少なくともグラフを認識し、こらから想定値グラフを作成するようにしてもよい。 As one example, the test requirements definition document 300 is not limited to one created using a drawing tool, but may be drawn on paper, for example. In this case, the test case verification device 500 may read the paper using, for example, a scanner or digital camera, and apply well-known technology to at least recognize the graph, and then create an expected value graph from this.
200 HILS(シミュレータ)
300 テスト要件定義書
400 テストケース
420 テスト手順
440 判断基準
500 テストケース検証装置
600 テストレポート
200 HILS (Simulator)
300 Test requirements definition document 400 Test case 420 Test procedure 440 Judgment criteria 500 Test case verification device 600 Test report
Claims (6)
前記テストケースのテスト手順から前記入力パラメータの値が変化する時間情報を抽出して前記判断基準に適用し、前記出力パラメータの経時的な変化を表した期待値グラフを作成する処理と、
前記テスト要件定義書のグラフを画像認識し、前記期待値グラフと比較可能な想定値グラフを作成する処理と、
前記期待値グラフと前記想定値グラフとを比較して、前記テストケースの良否を検証する処理と、
を実行するテストケース検証装置。 A test case verification device that reads a test requirement definition document in which a graph showing a change over time of an output parameter output from a simulator is defined, a test procedure in which values of input parameters to be input to the simulator and their retention times are described in functional form, and a test case including a judgment criterion in which values of output parameters output from the simulator are described in functional form, and verifies pass/fail of the test case, comprising:
a process of extracting time information on the change in the value of the input parameter from the test procedure of the test case, applying the time information to the judgment criterion, and creating an expected value graph showing the change in the output parameter over time;
A process of performing image recognition on the graph of the test requirements definition document and creating an assumed value graph that can be compared with the expected value graph;
a process of comparing the expected value graph with the assumed value graph to verify whether the test case is correct;
A test case verifier that executes the test case verifier.
請求項1に記載のテストケース検証装置。 The process of verifying the pass/fail of the test case includes creating character strings for the expected value graph and the assumed value graph, the character strings representing the change direction of the value of the output parameter and the retention time thereof using predetermined symbols, and comparing the two character strings to determine whether they match.
2. The test case verification apparatus according to claim 1.
請求項2に記載のテストケース検証装置。 the process of verifying whether the test case is acceptable or not comprises comparing the two character strings to determine whether they match, taking into consideration allowable ranges set for the timing at which the value of the output parameter changes and the duration for which the output parameter is held.
3. The test case verification apparatus according to claim 2.
請求項1~請求項3のいずれか1つに記載のテストケース検証装置。 outputting a verification result of the test case;
4. The test case verification device according to claim 1.
請求項1~請求項4のいずれか1つに記載のテストケース検証装置。 outputting a test report including the contents of the test requirements definition document, the expected value graph, and the results of the test executed by the simulator in accordance with the test cases;
5. The test case verification device according to claim 1.
前記コンピュータが、
前記テストケースのテスト手順から前記入力パラメータの値が変化する時間情報を抽出して前記判断基準に適用し、前記出力パラメータの経時的な変化を表した期待値グラフを作成するステップと、
前記テスト要件定義書のグラフを画像認識し、前記期待値グラフと比較可能な想定値グラフを作成するステップと、
前記期待値グラフと前記想定値グラフとを比較して、前記テストケースの良否を検証するステップと、
を実行するテストケース検証方法。 A test case verification method in which a computer reads a test requirements definition document in which a graph showing a change over time of an output parameter output from a simulator is defined, a test procedure in which values of input parameters to be input to the simulator and their retention times are described in functional form, and a test case including a judgment criterion in which values of output parameters output from the simulator are described in functional form, and verifies pass/fail of the test case, comprising:
The computer,
extracting time information on the change in the value of the input parameter from the test procedure of the test case, and applying the time information to the judgment criterion to generate an expected value graph showing the change in the output parameter over time;
A step of performing image recognition on a graph of the test requirements definition document and creating an assumed value graph that can be compared with the expected value graph;
A step of comparing the expected value graph with the assumed value graph to verify whether the test case is correct or not;
Run test case verification method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021071953A JP7522697B2 (en) | 2021-04-21 | 2021-04-21 | Test case verification device and test case verification method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021071953A JP7522697B2 (en) | 2021-04-21 | 2021-04-21 | Test case verification device and test case verification method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2022166620A JP2022166620A (en) | 2022-11-02 |
| JP7522697B2 true JP7522697B2 (en) | 2024-07-25 |
Family
ID=83851479
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021071953A Active JP7522697B2 (en) | 2021-04-21 | 2021-04-21 | Test case verification device and test case verification method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7522697B2 (en) |
Families Citing this family (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7234760B2 (en) * | 2019-04-11 | 2023-03-08 | 株式会社三洋物産 | game machine |
| JP7234761B2 (en) * | 2019-04-11 | 2023-03-08 | 株式会社三洋物産 | game machine |
| JP2021133198A (en) * | 2020-02-28 | 2021-09-13 | 株式会社三洋物産 | Game machine |
| JP2021133200A (en) * | 2020-02-28 | 2021-09-13 | 株式会社三洋物産 | Pachinko machine |
| JP2021133199A (en) * | 2020-02-28 | 2021-09-13 | 株式会社三洋物産 | Game machine |
| JP2021186294A (en) * | 2020-05-29 | 2021-12-13 | 株式会社三洋物産 | Game machine |
| JP2022012089A (en) * | 2020-06-30 | 2022-01-17 | 株式会社三洋物産 | Game machine |
| JP2022012088A (en) * | 2020-06-30 | 2022-01-17 | 株式会社三洋物産 | Game machine |
| JP2022012090A (en) * | 2020-06-30 | 2022-01-17 | 株式会社三洋物産 | Game machine |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007052634A (en) | 2005-08-18 | 2007-03-01 | Fujitsu Ten Ltd | Software development device and method |
| JP2007257291A (en) | 2006-03-23 | 2007-10-04 | Fujitsu Ltd | Scenario generation method, scenario generation program, and scenario generation device |
| JP2014052358A (en) | 2012-09-10 | 2014-03-20 | Hitachi Automotive Systems Ltd | Verification device of vehicle controller |
-
2021
- 2021-04-21 JP JP2021071953A patent/JP7522697B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007052634A (en) | 2005-08-18 | 2007-03-01 | Fujitsu Ten Ltd | Software development device and method |
| JP2007257291A (en) | 2006-03-23 | 2007-10-04 | Fujitsu Ltd | Scenario generation method, scenario generation program, and scenario generation device |
| JP2014052358A (en) | 2012-09-10 | 2014-03-20 | Hitachi Automotive Systems Ltd | Verification device of vehicle controller |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2022166620A (en) | 2022-11-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7522697B2 (en) | Test case verification device and test case verification method | |
| US8930758B2 (en) | Automated testing of mechatronic systems | |
| US20090064111A1 (en) | Formal Verification of Graphical Programs | |
| EP1236104A4 (en) | Method for computer-assisted testing of software application components | |
| CN111414309B (en) | Automatic test method of application program, computer equipment and storage medium | |
| CN112860587A (en) | UI automatic test method and device | |
| US10521335B2 (en) | Context-based device testing | |
| CN103069386A (en) | Control program generation device, control program generation program, and control program generation method | |
| CN111931335A (en) | Suspension system equivalent parameter correction method and system, medium and electronic equipment | |
| CN111814354A (en) | Simulation test method, system, medium and electronic equipment for instrument performance | |
| CN120276712B (en) | Method and system for realizing self-evolution of intelligent agent through computing power by intelligent computing center cloud platform | |
| CN114237754B (en) | Data loading method and device, electronic equipment and storage medium | |
| CN118313892A (en) | Knowledge guiding method, device, equipment and storage medium for numerical control equipment | |
| CN115629815B (en) | FPGA prototype verification platform capable of verifying EMMC user interface | |
| CN121301170A (en) | Automatic debugging methods, devices, equipment and storage media for batch processing jobs | |
| JP7850338B2 (en) | Cloud-based verification of electrical grid components | |
| CN113742240A (en) | User interface testing method and device, storage medium and electronic equipment | |
| Combéfis et al. | Learning system abstractions for human operators | |
| Zhu et al. | FEEDBOT: Formative Design Feedback on Programming Assignments | |
| Caldas et al. | Towards Mapping Control Theory and Software Engineering Properties using Specification Patterns | |
| JPWO2012049816A1 (en) | Model checking apparatus, method and program | |
| CN117914737A (en) | Mirror image resource testing method and device for network target range | |
| JP2011242888A (en) | System development support device, program and method | |
| CN111400160B (en) | Code verification method and device and vehicle | |
| CN113468042A (en) | Human-computer interaction test system and method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230705 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20240529 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20240618 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240712 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7522697 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |