JP7391766B2 - Test script generation system, test script generation method, electronic control device - Google Patents

Test script generation system, test script generation method, electronic control device Download PDF

Info

Publication number
JP7391766B2
JP7391766B2 JP2020095023A JP2020095023A JP7391766B2 JP 7391766 B2 JP7391766 B2 JP 7391766B2 JP 2020095023 A JP2020095023 A JP 2020095023A JP 2020095023 A JP2020095023 A JP 2020095023A JP 7391766 B2 JP7391766 B2 JP 7391766B2
Authority
JP
Japan
Prior art keywords
test script
script
test
recommendation
extraction unit
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
Application number
JP2020095023A
Other languages
Japanese (ja)
Other versions
JP2021189798A (en
Inventor
建志 伊藤
敦介 新原
正裕 松原
拓郎 森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Astemo Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Astemo Ltd filed Critical Hitachi Astemo Ltd
Priority to JP2020095023A priority Critical patent/JP7391766B2/en
Priority to DE112021001800.0T priority patent/DE112021001800T5/en
Priority to PCT/JP2021/003608 priority patent/WO2021240886A1/en
Publication of JP2021189798A publication Critical patent/JP2021189798A/en
Application granted granted Critical
Publication of JP7391766B2 publication Critical patent/JP7391766B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

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)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明は、テストスクリプト生成システム、テストスクリプト生成方法、および電子制御装置に関する。 The present invention relates to a test script generation system, a test script generation method, and an electronic control device.

ソフトウエアの大規模化や高度化に伴い、ソフトウエアのテスト項目が増加している。テストの全てを手作業で行うことは困難なので、テストを実行するためのプログラムであるテストスクリプトを自動生成するニーズがある。特許文献1にはプログラム部品を組み合わせて所望のプログラムを合成するプログラム合成装置において、予め分類されたプログラム部品を記憶する部品記憶手段と、前記プログラム部品の分類に基づき所望のプログラムの概略処理手順を指定する処理手順指定手段と、前記部品記憶手段に記憶されたプログラム部品から前記概略処理手順に対応するプログラム部品を選択する部品選択手段と、前記部品選択手段で選択されたプログラム部品を結合してプログラムを合成する合成手段と、前記合成手段で合成されたプログラムの性能を評価する評価手段と、を具備することを特徴とするプログラム合成装置が開示されている。 As software becomes larger and more sophisticated, the number of software test items is increasing. Since it is difficult to perform all tests manually, there is a need to automatically generate test scripts, which are programs for executing tests. Patent Document 1 discloses a program synthesis device for synthesizing a desired program by combining program parts, which includes a part storage means for storing program parts classified in advance, and a general processing procedure of the desired program based on the classification of the program parts. combining a processing procedure specifying means to specify, a parts selection means for selecting a program part corresponding to the general processing procedure from program parts stored in the parts storage means, and a program part selected by the parts selection means; A program synthesis apparatus is disclosed, which is characterized by comprising a synthesis means for synthesizing a program, and an evaluation means for evaluating the performance of the program synthesized by the synthesis means.

特開平10-149280号公報Japanese Patent Application Publication No. 10-149280

特許文献1に記載されている発明では、概略処理手順が指定されていることが前提であり、テスト条件の漏れに対処できない。 The invention described in Patent Document 1 assumes that a general processing procedure is specified, and cannot deal with omissions in test conditions.

本発明の第1の態様によるテストスクリプト生成システムは、テストを実行するためのプログラムであるテストスクリプトを複数取得する入力部と、前記テストスクリプトを複数のパートに分割する分割部と、前記複数のパートに対応するキーワードを抽出して属性として関連付けるキーワード抽出部と、前記テストスクリプト、前記複数のパート、および前記属性を記憶する記憶部と、予め定義された2以上の属性カテゴリに基づいて作成された整理表の各セルに対して前記テストスクリプトを割り当てるテストスクリプト整理部と、前記整理表において前記テストスクリプトが割り当てられていない少なくとも1つのセルをターゲットエリアとし、前記ターゲットエリアとはいずれか第1の属性カテゴリの属性値が異なるベーススクリプトを選択し、前記ターゲットエリアおよび前記ベーススクリプトと比較して前記第1の属性カテゴリとは異なる第2の属性カテゴリの属性値が異なる1組の参考スクリプトを選択するレコメンド抽出部と、前記レコメンド抽出部が選択する前記ベーススクリプトおよび前記1組の参考スクリプトに基づき前記ターゲットエリアに対応する新たなテストスクリプトを作成するレコメンド合成部と、を備える。
本発明の第2の態様によるテストスクリプト生成方法は、テストを実行するためのプログラムであるテストスクリプトを複数取得する入力部を有する電子制御装置が実行するテストスクリプト生成方法であって、テストスクリプトを複数のパートに分割することと、複数のパートに対応するキーワードを抽出して属性として関連付けることと、予め定義された2以上の属性カテゴリに基づいて作成された整理表の各セルに対して前記テストスクリプトを割り当てることと、整理表においてテストスクリプトが割り当てられていない少なくとも1つのセルをターゲットエリアとし、ターゲットエリアとはいずれか第1の属性カテゴリの属性値が異なるベーススクリプトを選択し、ターゲットエリアおよびベーススクリプトと比較して第1の属性カテゴリとは異なる第2の属性カテゴリの属性値が異なる1組の参考スクリプトの選択を行うことと、選択により選択されるベーススクリプトおよび1組の参考スクリプトに基づきターゲットエリアに対応する新たなテストスクリプトを作成することとを含む。
本発明の第3の態様による電子制御装置は、テストを実行するためのプログラムであるテストスクリプトを複数取得する入力部と、テストスクリプトを複数のパートに分割する分割部と、複数のパートに対応するキーワードを抽出して属性として関連付けるキーワード抽出部と、テストスクリプト、複数のパート、および属性を記憶する記憶部と、予め定義された2以上の属性カテゴリに基づいて作成された整理表の各セルに対してテストスクリプトを割り当てるテストスクリプト整理部と、整理表においてテストスクリプトが割り当てられていない少なくとも1つのセルをターゲットエリアとし、ターゲットエリアとはいずれか第1の属性カテゴリの属性値が異なるベーススクリプトを選択し、ターゲットエリアおよびベーススクリプトと比較して第1の属性カテゴリとは異なる第2の属性カテゴリの属性値が異なる1組の参考スクリプトを選択するレコメンド抽出部と、レコメンド抽出部が選択するベーススクリプトおよび1組の参考スクリプトに基づきターゲットエリアに対応する新たなテストスクリプトを作成するレコメンド合成部と、を備える。
A test script generation system according to a first aspect of the present invention includes: an input unit that acquires a plurality of test scripts that are programs for executing a test; a dividing unit that divides the test script into a plurality of parts; a keyword extraction unit that extracts keywords corresponding to parts and associates them as attributes; a storage unit that stores the test script, the plurality of parts, and the attributes; a test script organizer that allocates the test script to each cell in the organized table; and at least one cell to which the test script is not assigned in the organized table is set as a target area, and the target area is any one of the first a set of reference scripts having different attribute values in a second attribute category different from the first attribute category compared to the target area and the base script; The present invention includes a recommendation extraction unit that selects a recommendation extraction unit, and a recommendation synthesis unit that creates a new test script corresponding to the target area based on the base script and the set of reference scripts selected by the recommendation extraction unit.
A test script generation method according to a second aspect of the present invention is a test script generation method executed by an electronic control device having an input unit for acquiring a plurality of test scripts, which are programs for executing a test. dividing into multiple parts, extracting keywords corresponding to multiple parts and associating them as attributes, and performing the above for each cell of a sorting table created based on two or more predefined attribute categories. Assign a test script, set at least one cell to which no test script is assigned in the organizing table as a target area, select a base script that has a different attribute value in the first attribute category from the target area, and and selecting a set of reference scripts having different attribute values in a second attribute category different from the first attribute category compared to the base script, and the base script and the set of reference scripts selected by the selection. This includes creating new test scripts that correspond to the target area based on the
An electronic control device according to a third aspect of the present invention includes an input unit that acquires a plurality of test scripts that are programs for executing a test, a division unit that divides the test script into a plurality of parts, and is compatible with the plurality of parts. a keyword extraction unit that extracts keywords to be used and associate them as attributes; a storage unit that stores test scripts, multiple parts, and attributes; and each cell of a sorting table created based on two or more predefined attribute categories. A test script organizer that assigns test scripts to a test script, and a base script that has at least one cell to which no test script is assigned in the organizer table as a target area, and that has a different attribute value in the first attribute category than the target area. and a recommendation extraction unit that selects a set of reference scripts that have different attribute values in a second attribute category that is different from the first attribute category when compared with the target area and base script; The present invention includes a recommendation synthesis unit that creates a new test script corresponding to a target area based on a base script and a set of reference scripts.

本発明によれば、漏れているテスト条件に対応するテストスクリプトを生成できる。 According to the present invention, a test script corresponding to missing test conditions can be generated.

電子制御装置のハードウエア構成図Hardware configuration diagram of electronic control unit 電子制御装置の機能構成図Functional configuration diagram of electronic control unit テストスクリプト記憶部の概念図Conceptual diagram of test script storage スニペット記憶部の概念図Conceptual diagram of snippet storage unit 属性カテゴリ記憶部の概念図Conceptual diagram of attribute category storage unit 電子制御装置によるテストスクリプト作成処理の概要を示す図Diagram showing an overview of test script creation processing by the electronic control unit 分割部の処理を示すフローチャートFlowchart showing the processing of the dividing section 分割部およびキーワード抽出部の処理を示す具体例を示す図A diagram illustrating a specific example of the processing of the division unit and keyword extraction unit キーワード抽出部の処理を示すフローチャートFlowchart showing the processing of the keyword extraction section テストスクリプト整理部の処理を示すフローチャートFlowchart showing the processing of the test script organizer テストスクリプト整理部の処理を示す具体例を示す図Diagram showing a specific example of the processing of the test script organizer レコメンド抽出部の処理を示すフローチャートFlowchart showing the processing of the recommendation extraction unit 図12のステップS161の詳細を示すフローチャートFlowchart showing details of step S161 in FIG. 12 図12のステップS163の詳細を示すフローチャートFlowchart showing details of step S163 in FIG. 12 図12のステップS165の詳細を示すフローチャートFlowchart showing details of step S165 in FIG. 12 テストスクリプトの具体例を示す図Diagram showing a specific example of a test script レコメンド合成部の処理を示すフローチャートFlowchart showing the processing of the recommendation synthesis section レコメンド合成部の処理の具体例を示す図Diagram showing a specific example of processing by the recommendation synthesis unit 変形例3においてベーススクリプト選択情報の一例を示す図Diagram showing an example of base script selection information in modification 3 変形例4における電子制御装置の動作を説明する図Diagram explaining the operation of the electronic control device in modification 4 変形例4において参考スクリプト選択情報の一例を示す図Diagram showing an example of reference script selection information in modification 4 変形例5における電子制御装置の動作を説明する図Diagram explaining the operation of the electronic control device in modification 5 第2の実施の形態における電子制御装置の機能構成図Functional configuration diagram of the electronic control device in the second embodiment スニペット関係情報記憶部の概念図Conceptual diagram of snippet related information storage unit 電子制御装置によるテストスクリプト作成処理の概要を示す図Diagram showing an overview of test script creation processing by the electronic control unit スニペット類似分析部の処理を示すフローチャートFlowchart showing the processing of the snippet similarity analysis unit 第2の実施の形態におけるレコメンド抽出部の処理を示すフローチャートFlowchart showing the processing of the recommendation extraction unit in the second embodiment 図27におけるステップS163A-4の詳細を示すフローチャートFlowchart showing details of step S163A-4 in FIG. 27 第2の実施の形態における効果の一例を説明する図Diagram illustrating an example of effects in the second embodiment

―第1の実施の形態―
以下、図1~図18を参照して、電子制御装置の第1の実施の形態を説明する。
-First embodiment-
A first embodiment of the electronic control device will be described below with reference to FIGS. 1 to 18.

(ハードウエア構成)
図1は、電子制御装置1のハードウエア構成図である。電子制御装置1は、中央演算装置であるCPU2と、読み出し専用の記憶装置であるROM3と、読み書き可能な記憶装置であるRAM4と、不揮発性の記憶装置である記憶部5と、を備える。CPU2がROM3に格納されるプログラムをRAM4に展開して実行することで後述する複数の機能を実現する。
(Hardware configuration)
FIG. 1 is a hardware configuration diagram of the electronic control device 1. As shown in FIG. The electronic control device 1 includes a CPU 2 that is a central processing unit, a ROM 3 that is a read-only storage device, a RAM 4 that is a readable/writable storage device, and a storage section 5 that is a nonvolatile storage device. The CPU 2 develops a program stored in the ROM 3 into the RAM 4 and executes it, thereby realizing a plurality of functions to be described later.

ただしCPU2、ROM3、およびRAM4の組み合わせの代わりに書き換え可能な論理回路であるFPGA(Field Programmable Gate Array)や特定用途向け集積回路であるASIC(Application Specific Integrated Circuit)により実現されてもよい。またCPU2、ROM3、およびRAM4の組み合わせの代わりに、異なる構成の組み合わせ、たとえばCPU2、ROM3、RAM4とFPGAの組み合わせにより実現されてもよい。 However, instead of the combination of the CPU 2, ROM 3, and RAM 4, it may be realized by an FPGA (Field Programmable Gate Array), which is a rewritable logic circuit, or an ASIC (Application Specific Integrated Circuit), which is an integrated circuit for a specific purpose. Moreover, instead of the combination of CPU2, ROM3, and RAM4, it may be realized by a combination of different configurations, for example, a combination of CPU2, ROM3, RAM4, and FPGA.

(機能構成)
図2は、電子制御装置1の機能構成図である。電子制御装置1はその機能として、入力部11と、分割部12と、キーワード抽出部13と、テストスクリプト整理部15と、レコメンド抽出部16と、レコメンド合成部17と、レコメンド出力部18と、を備える。記憶部5には、テストスクリプト記憶部51と、スニペット記憶部52と、属性カテゴリ記憶部54とが含まれる。
(Functional configuration)
FIG. 2 is a functional configuration diagram of the electronic control device 1. As shown in FIG. The electronic control device 1 has the following functions: an input section 11, a division section 12, a keyword extraction section 13, a test script arrangement section 15, a recommendation extraction section 16, a recommendation synthesis section 17, a recommendation output section 18, Equipped with The storage unit 5 includes a test script storage unit 51, a snippet storage unit 52, and an attribute category storage unit 54.

入力部11は電子制御装置1の外部からテストスクリプトを取得する。入力部11はたとえば、通信インタフェース、記憶媒体読み取り装置、およびキーボードのいずれかである。入力部11が取得したテストスクリプトは、テストスクリプト記憶部51に格納される。ただし取得したテストスクリプトを一時的にRAM6に保存してもよい。 The input unit 11 acquires a test script from outside the electronic control device 1 . The input unit 11 is, for example, a communication interface, a storage medium reader, or a keyboard. The test script acquired by the input unit 11 is stored in the test script storage unit 51. However, the acquired test script may be temporarily stored in the RAM 6.

テストスクリプトとは、プログラムのテストの手順を記載した文章である。本実施の形態では、テストスクリプトにはスニペットの区切りを示す情報やスニペットの処理内容を示すキーワードの情報が含まれている。また本実施の形態では、テストスクリプトはテキストファイルであり、先頭から末尾に順番に処理が実行されることを前提とする。ただしテストスクリプトはコンピュータが処理可能であればよく、人間には理解が困難な記載がされていてもよいし、あらかじめ処理規則が定められていれば、記載の順番と処理の順番は一致しなくてもよい。 A test script is a document that describes the procedure for testing a program. In this embodiment, the test script includes information indicating the delimitation of snippets and keyword information indicating the processing content of the snippets. Further, in this embodiment, it is assumed that the test script is a text file, and that processing is executed in order from the beginning to the end. However, test scripts only need to be processable by a computer; they may contain descriptions that are difficult for humans to understand, and if processing rules are determined in advance, the order of description and processing order may not match. It's okay.

分割部12は、テストスクリプト記憶部51に格納されたテストスクリプトを処理対象とし、それぞれのテストスクリプトを1以上のスニペットに分割してその情報をスニペット記憶部52に格納する。スニペットとは、テストスクリプトを何らかの基準に沿って切り分けたものである。キーワード抽出部13は、それぞれのスニペットからキーワードを抽出し、抽出したキーワードの情報をスニペット記憶部52に格納する。テストスクリプト整理部15は、テストスクリプト記憶部51に格納されたテストスクリプトを属性情報に基づき整理する。 The dividing unit 12 processes test scripts stored in the test script storage unit 51, divides each test script into one or more snippets, and stores the information in the snippet storage unit 52. A snippet is a test script that is divided according to some criteria. The keyword extraction unit 13 extracts keywords from each snippet, and stores information on the extracted keywords in the snippet storage unit 52. The test script organizing unit 15 organizes the test scripts stored in the test script storage unit 51 based on attribute information.

レコメンド抽出部16は、作成対象であるターゲットエリアに対応するテストスクリプトを作成するために必要なテストスクリプトへの処理操作を特定する。レコメンド合成部17は、レコメンド抽出部16が特定した処理操作を既存のテストスクリプトに適用してレコメンド候補テストスクリプトを作成する。レコメンド出力部18は、レコメンド合成部17が作成したレコメンド候補テストスクリプトを、新たに提案するテストスクリプトとして出力する。なおレコメンド出力部18の出力は、そのまま新たなテストスクリプトとして使用されてもよいし、オペレータが取捨選択してもよい。 The recommendation extraction unit 16 specifies processing operations for the test script necessary to create a test script corresponding to the target area to be created. The recommendation synthesis unit 17 applies the processing operation specified by the recommendation extraction unit 16 to an existing test script to create a recommendation candidate test script. The recommendation output unit 18 outputs the recommendation candidate test script created by the recommendation synthesis unit 17 as a newly proposed test script. Note that the output of the recommendation output unit 18 may be used as is as a new test script, or may be selected by the operator.

図3は、テストスクリプト記憶部51の概念図である。テストスクリプト記憶部51には、それぞれのテストスクリプトが識別子であるテストスクリプトIDと関連付けられて格納される。なお図3はテストスクリプト記憶部51に格納される情報を概念的に示しているにすぎず、複数の表を組み合わせることで図3に示す情報が得られてもよいし、情報の格納形式は表形式に限定されない。以下では特に説明しないが、図4以降も同様である。 FIG. 3 is a conceptual diagram of the test script storage unit 51. The test script storage unit 51 stores each test script in association with a test script ID, which is an identifier. Note that FIG. 3 only conceptually shows the information stored in the test script storage unit 51, and the information shown in FIG. 3 may be obtained by combining multiple tables, and the information storage format may be different. Not limited to tabular format. Although not particularly described below, the same applies to FIG. 4 and subsequent figures.

図4は、スニペット記憶部52の概念図である。スニペット記憶部52には、それぞれのスニペットの情報が格納される。スニペット記憶部52はたとえば複数のレコードを有するテーブルとして概念的に説明でき、スニペットを特定する情報と、スニペットの属性情報とを含んで構成される。スニペットを特定する情報とは、スニペットの識別子であるスニペットID、テストスクリプト記憶部51にも含まれるテストスクリプトID、開始行番号、および終了行番号である。 FIG. 4 is a conceptual diagram of the snippet storage unit 52. The snippet storage unit 52 stores information about each snippet. The snippet storage unit 52 can be conceptually explained as, for example, a table having a plurality of records, and is configured to include information that specifies a snippet and attribute information of the snippet. The information for identifying a snippet is a snippet ID which is an identifier of the snippet, a test script ID also included in the test script storage unit 51, a start line number, and an end line number.

図4に示す例では、スニペットIDが「1」のスニペットは、テストスクリプトIDが「1」のスクリプトの「1」行目から「25」行目に記載されていることがわかる。さらにそのスニペットは、「データ設定」、「正常系機能テスト」、「機能A」の属性値を持つことがわかる。 In the example shown in FIG. 4, it can be seen that the snippet with the snippet ID "1" is written from the "1" line to the "25" line of the script with the test script ID "1". Furthermore, it can be seen that the snippet has attribute values of "data setting", "normal system function test", and "function A".

図5は、属性カテゴリ記憶部54の概念図である。属性カテゴリ記憶部54には、属性カテゴリの一覧、および属性カテゴリごとの属性値の一覧が格納される。図5は一例にすぎず、属性カテゴリは少なくとも2つあればよく、上限はない。属性カテゴリごとの属性値は少なくとも2つあればよく、属性カテゴリごとに属性値の数が異なってもよい。属性カテゴリはさらに、テストレベルやテストベースが挙げられる。テストレベルの属性値はたとえば、単体テスト、結合テスト、およびシステムテストが挙げられる。またベストベースの属性値は、仕様ベースや経験ベースなどが挙げられる。図4の各スニペットの属性値は、図5の属性値一覧から選択される。 FIG. 5 is a conceptual diagram of the attribute category storage unit 54. The attribute category storage unit 54 stores a list of attribute categories and a list of attribute values for each attribute category. FIG. 5 is just an example; at least two attribute categories are sufficient, and there is no upper limit. There may be at least two attribute values for each attribute category, and the number of attribute values may be different for each attribute category. Further attribute categories include test level and test base. Examples of test level attribute values include unit test, integration test, and system test. Further, best-based attribute values include specification-based and experience-based. The attribute value of each snippet in FIG. 4 is selected from the attribute value list in FIG. 5.

(処理概要)
図6は電子制御装置1によるテストスクリプト作成処理の概要を示す図である。テストスクリプト作成処理は以下に説明する2つの繰り返し処理、すなわちL1およびL2を含む。
(Outline of processing)
FIG. 6 is a diagram showing an overview of the test script creation process by the electronic control device 1. The test script creation process includes two iterative processes, namely L1 and L2, which will be explained below.

電子制御装置1はまず、電子制御装置1の外部で作成されたそれぞれのテストスクリプトに対して繰り返し処理L1を実行する。繰り返し処理L1は、入力部11、分割部12、およびキーワード抽出部13が動作する。繰り返し処理L1では、最初に入力部11が1つのテストスクリプトを取得する。分割部12は、入力部11が取得したテストスクリプトを1以上のスニペットに分割する。キーワード抽出部13は、分割部12により分割されたスニペットのそれぞれに対して、キーワードの抽出を行う。詳しくは後述するが、抽出されたキーワードに基づきスニペットの属性値も決定される。キーワード抽出部13の処理が完了すると、次のテストスクリプトを処理対象として再び入力部11が動作する。 The electronic control device 1 first executes a repeating process L1 on each test script created outside the electronic control device 1. In the iterative process L1, the input section 11, the division section 12, and the keyword extraction section 13 operate. In the iterative process L1, the input unit 11 first obtains one test script. The dividing unit 12 divides the test script acquired by the input unit 11 into one or more snippets. The keyword extraction unit 13 extracts keywords from each of the snippets divided by the division unit 12. As will be described in detail later, the attribute value of the snippet is also determined based on the extracted keyword. When the processing of the keyword extraction section 13 is completed, the input section 11 operates again with the next test script as the processing target.

繰り返し処理L1が完了すると、入力部11が取得したテストスクリプトがテストスクリプト記憶部51に格納され、分割部12およびキーワード抽出部13の処理結果がスニペット記憶部52に格納される。テストスクリプト記憶部51に格納された情報は繰り返し処理L2において参照される。スニペット記憶部52に格納された情報はテストスクリプト整理部15により参照される。属性カテゴリ記憶部54に格納されている情報は、テストスクリプト整理部15および繰り返し処理L2において参照される。 When the iterative process L1 is completed, the test script acquired by the input unit 11 is stored in the test script storage unit 51, and the processing results of the division unit 12 and keyword extraction unit 13 are stored in the snippet storage unit 52. The information stored in the test script storage unit 51 is referred to in the repetitive process L2. The information stored in the snippet storage section 52 is referred to by the test script organizing section 15. The information stored in the attribute category storage section 54 is referred to in the test script organizing section 15 and the repeating process L2.

テストスクリプト整理部15は、スニペット記憶部52および属性カテゴリ記憶部54を参照して、入力部11に入力されたテストスクリプトの相関関係をスニペットの属性の観点から整理する。具体的にはテストスクリプト整理部15は、属性カテゴリ記憶部54に記載された属性カテゴリから2以上の属性カテゴリを選択し、選択した属性カテゴリにおける属性値の組合せとテストスクリプトの対応とを整理する。テストスクリプト整理部15が選択する属性カテゴリは、あらかじめオペレータが指定してもよいし、自動処理により決定してもよい。 The test script organizing unit 15 refers to the snippet storage unit 52 and the attribute category storage unit 54 and organizes the correlation of the test scripts input to the input unit 11 from the viewpoint of the attributes of the snippets. Specifically, the test script organizing unit 15 selects two or more attribute categories from the attribute categories listed in the attribute category storage unit 54, and organizes the correspondence between the combinations of attribute values in the selected attribute categories and the test scripts. . The attribute categories selected by the test script organizer 15 may be designated in advance by an operator, or may be determined by automatic processing.

次の繰り返し処理L2では、テストスクリプト整理部15が選択した属性カテゴリの属性値の全ての組合せを対象として処理が行われる。具体的にはテストスクリプトを作成する対象となるターゲットを順番に変更して、レコメンド抽出部16およびレコメンド合成部17が動作する。たとえばテストスクリプト整理部15が選択した属性カテゴリが「テスト種別」と「機能」であり、「テスト種別」の属性値が4つ、「機能」の属性値が5つ存在する場合には、その組み合わせは20通りなので、繰り返し処理L2は20回実行される。 In the next iterative process L2, processing is performed for all combinations of attribute values of the attribute categories selected by the test script organizer 15. Specifically, the recommendation extraction unit 16 and the recommendation synthesis unit 17 operate by sequentially changing the targets for which test scripts are to be created. For example, if the attribute categories selected by the test script organizer 15 are "test type" and "function," and there are four attribute values for "test type" and five attribute values for "function," Since there are 20 combinations, the iterative process L2 is executed 20 times.

レコメンド抽出部16は、作成対象であるターゲットエリアに対応するテストスクリプトを作成するために必要な、既存のテストスクリプトへの処理操作を特定する。レコメンド合成部17は、レコメンド抽出部16が特定した処理操作を既存のテストスクリプトに適用してレコメンド候補テストスクリプトを作成する。繰り返し処理L2が完了すると、レコメンド出力部18はレコメンド合成部17が作成したレコメンド候補テストスクリプトを出力する。 The recommendation extraction unit 16 identifies processing operations on existing test scripts that are necessary to create a test script corresponding to the target area to be created. The recommendation synthesis unit 17 applies the processing operation specified by the recommendation extraction unit 16 to an existing test script to create a recommendation candidate test script. When the iterative process L2 is completed, the recommendation output unit 18 outputs the recommendation candidate test script created by the recommendation synthesis unit 17.

(分割部)
図7は分割部12の処理を示すフローチャートであり、図8は分割部12およびキーワード抽出部13の処理を示す具体例である。分割部12はまずステップS121において、入力部11が読み込んだテストスクリプトをスニペットに分割する。本実施の形態におけるスニペットの分割は、テストスクリプトに記載される特定の文字列、たとえば「//SNIPPET」を区切り文字として用いることで実現できる。たとえば図8に示す例では、図示左側のテストスクリプトには文字列「//SNIPPET」が2つ含まれているので、「//SNIPPET」を区切りとして3つのスニペットに分割される。
(divided part)
FIG. 7 is a flowchart showing the processing of the dividing section 12, and FIG. 8 is a specific example showing the processing of the dividing section 12 and the keyword extracting section 13. First, in step S121, the dividing unit 12 divides the test script read by the input unit 11 into snippets. Division of snippets in this embodiment can be achieved by using a specific character string written in the test script, for example "//SNIPPET", as a delimiter. For example, in the example shown in FIG. 8, the test script on the left side of the figure includes two character strings "//SNIPPET", so it is divided into three snippets using "//SNIPPET" as a delimiter.

続くステップS122において分割部12は、ステップS121において分割したそれぞれのスニペットにスニペットIDを付与する。スニペットIDはそれぞれのスニペットを識別可能であれば文字の種類および文字数は任意である。図8に示す例では連番の数字「1」~「3」をそれぞれのスニペットに付与している。以上が分割部12の処理である。 In subsequent step S122, the dividing unit 12 assigns a snippet ID to each snippet divided in step S121. The snippet ID can have any type of characters and any number of characters as long as each snippet can be identified. In the example shown in FIG. 8, consecutive numbers "1" to "3" are assigned to each snippet. The above is the processing of the dividing section 12.

(キーワード抽出部)
図9はキーワード抽出部13の処理を示すフローチャートである。キーワード抽出部13は、入力部11が読み込んだ1つのテストスクリプトを処理対象として図9に示す処理を実行する。キーワード抽出部13はまずステップS131において、テストスクリプトに含まれるスニペットを1つ選択する。ただし本ステップにおいて選択するスニペットは、過去に本ステップにおいて選択していないスニペットである。続くステップS132ではキーワード抽出部13は、テキストデータを読み進める。たとえばキーワード抽出部13は、ステップS131において選択したスニペットの現在の読み込み位置から1行だけ読み込む。
(Keyword extraction part)
FIG. 9 is a flowchart showing the processing of the keyword extraction unit 13. The keyword extraction unit 13 executes the process shown in FIG. 9 on one test script read by the input unit 11. First, in step S131, the keyword extraction unit 13 selects one snippet included in the test script. However, the snippet selected in this step is a snippet that has not been selected in this step in the past. In the following step S132, the keyword extraction unit 13 reads the text data. For example, the keyword extraction unit 13 reads only one line from the current reading position of the snippet selected in step S131.

続くステップS133ではキーワード抽出部13は、キーワードを発見したか否かを判断する。キーワードはたとえば、図8の例に示すように「//TestscriptKeyword:」や「//keyword:」に続いて記載される場合には、ステップS133ではステップS132において読み込んだ情報に「//TestscriptKeyword:」や「//keyword:」が含まれるか否かを判断する。キーワード抽出部13はステップS133において、キーワードを発見したと判断する場合にはステップS134に進み、キーワードを発見しないと判断する場合はステップS137に進む。 In the following step S133, the keyword extraction unit 13 determines whether a keyword has been discovered. For example, when a keyword is written following "//TestscriptKeyword:" or "//keyword:" as shown in the example of FIG. 8, in step S133, "//TestscriptKeyword:" is added to the information read in step S132. ” or “//keyword:” is included. In step S133, if the keyword extracting unit 13 determines that the keyword has been found, the process proceeds to step S134, and if it determines that the keyword has not been found, the process proceeds to step S137.

ステップS134ではキーワード抽出部13は、キーワードの対象がテストスクリプト全体であるのか、それともスニペットのみであるのかを判断する。たとえばキーワード抽出部13は、ステップS132において読み込んだ情報に「//TestscriptKeyword:」が含まれる場合にはキーワードの対象がテストスクリプト全体であると判断する。また、たとえばキーワード抽出部13は、ステップS132において読み込んだ情報に「//keyword:」が含まれる場合にはキーワードの対象がスニペットのみであると判断する。キーワード抽出部13は、キーワードの対象がテストスクリプト全体であると判断する場合はステップS135に進み、キーワードの対象がスニペットであると判断する場合はステップS136に進む。 In step S134, the keyword extracting unit 13 determines whether the keyword applies to the entire test script or only to the snippet. For example, if the information read in step S132 includes "//TestscriptKeyword:", the keyword extraction unit 13 determines that the target of the keyword is the entire test script. Further, for example, if the information read in step S132 includes "//keyword:", the keyword extracting unit 13 determines that the keyword is only a snippet. If the keyword extraction unit 13 determines that the keyword target is the entire test script, the process proceeds to step S135, and if it determines that the keyword target is a snippet, the process proceeds to step S136.

ステップS135ではキーワード抽出部13は、当該テストスクリプトから生じた全スニペットに当該キーワードを属性値として付与してステップS137に進む。ステップS136ではキーワード抽出部13は、対象スニペットに当該キーワードを属性値として付与してステップS137に進む。 In step S135, the keyword extraction unit 13 assigns the keyword as an attribute value to all snippets generated from the test script, and proceeds to step S137. In step S136, the keyword extraction unit 13 assigns the keyword to the target snippet as an attribute value, and proceeds to step S137.

ステップS137ではキーワード抽出部13は、ステップS131において選択したスニペット内に未確認のテキストが存在するか否かを判断する。キーワード抽出部13は未確認のテキストが存在すると判断する場合はステップS132に戻り、未確認のテキストが存在しないと判断する場合はステップS138に進む。ステップS138ではキーワード抽出部13は、入力部11が読み込んだ処理対象のテストスクリプトに未確認のスニペットが存在するか否かを判断する。キーワード抽出部13は、未確認のスニペットが存在すると判断する場合はステップS131に戻り、未確認のスニペットが存在しないと判断する場合は図9に示す処理を終了する。 In step S137, the keyword extraction unit 13 determines whether or not unconfirmed text exists in the snippet selected in step S131. If the keyword extraction unit 13 determines that there is unconfirmed text, the process returns to step S132, and if it determines that there is no unconfirmed text, the process proceeds to step S138. In step S138, the keyword extraction unit 13 determines whether or not there is an unconfirmed snippet in the test script to be processed read by the input unit 11. When the keyword extraction unit 13 determines that there is an unconfirmed snippet, the process returns to step S131, and when it determines that there is no unconfirmed snippet, it ends the process shown in FIG. 9.

(テストスクリプト整理部)
図10はテストスクリプト整理部15の処理を示すフローチャートである。以下では図11に示す具体例を参照して図10の処理を説明する。テストスクリプト整理部15は、まずステップS151において採用する属性カテゴリを決定する。テストスクリプト整理部15で扱う属性カテゴリは、テストスクリプト全体を対象とする属性値を含む属性カテゴリである。採用する属性カテゴリは、あらかじめ定められていてもよいし、キーワード抽出部13が「//TestscriptKeyword:」から抽出した全ての属性値の属性カテゴリでもよい。さらにステップS151においてテストスクリプト整理部15は、決定した属性カテゴリの数に応じた次元数の整理表を作成する。図11では、2つの属性カテゴリが決定された2次元の整理表を示している。なお図11では説明の便宜のために各セルにC11~C54の名称を付している。
(Test Script Organizing Department)
FIG. 10 is a flowchart showing the processing of the test script organizer 15. The process in FIG. 10 will be described below with reference to the specific example shown in FIG. The test script organizer 15 first determines the attribute category to be adopted in step S151. The attribute categories handled by the test script organizer 15 are attribute categories that include attribute values for the entire test script. The attribute category to be adopted may be determined in advance, or may be the attribute category of all the attribute values extracted by the keyword extraction unit 13 from "//TestscriptKeyword:". Further, in step S151, the test script organizer 15 creates a organizer table with the number of dimensions corresponding to the determined number of attribute categories. FIG. 11 shows a two-dimensional organizing table in which two attribute categories have been determined. Note that in FIG. 11, each cell is labeled C11 to C54 for convenience of explanation.

続くステップS152ではテストスクリプト整理部15は、ステップS151において作成した整理表の各次元に各属性のカテゴリを関連付ける。図11に示す例では、第1の次元、たとえば行に機能を関連付け、第2の次元、たとえば列にテスト種別を割り当てている。 In the following step S152, the test script organizer 15 associates each attribute category with each dimension of the organizer table created in step S151. In the example shown in FIG. 11, functions are associated with the first dimension, eg, rows, and test types are assigned to the second dimension, eg, columns.

続くステップS153ではテストスクリプト整理部15は、ステップS151において作成した整理表のカラムにそれぞれの属性カテゴリの属性値を設定してステップS154に進む。図11に示す例では、それぞれの行に機能A~機能Eの5つの属性値を設定し、それぞれの列に正常系機能テスト、異常系機能テスト、時間精度性能テスト、および処理速度性能テストの4つの属性値を設定する。そのため図11に示す例では、5と4の積である総計20のセルが存在する。繰り返し処理L2では、それぞれのセルをターゲットとして処理が行われる。 In the following step S153, the test script organizer 15 sets the attribute value of each attribute category in the column of the organizer table created in step S151, and proceeds to step S154. In the example shown in FIG. 11, five attribute values for functions A to E are set in each row, and values for normal function test, abnormal function test, time accuracy performance test, and processing speed performance test are set in each column. Set four attribute values. Therefore, in the example shown in FIG. 11, there are a total of 20 cells, which is the product of 5 and 4. In the iterative process L2, processing is performed with each cell as a target.

ステップS154ではテストスクリプト整理部15は、未整理のテストスクリプトが存在するか否かを判断する。ステップS154を初回に実行する場合には必ず肯定判断がされる。テストスクリプト整理部15は、未整理のテストスクリプトが存在すると判断する場合はステップS155に進み、未整理のテストスクリプトが存在しないと判断する場合は図10に示す処理を終了する。ステップS155ではテストスクリプト整理部15は、未整理のテストスクリプトを1つ選択する。続くステップS156ではテストスクリプト整理部15は、ステップS155において選択したテストスクリプトに付与されているスニペット属性の属性値を確認する。 In step S154, the test script organizer 15 determines whether there are any unorganized test scripts. When step S154 is executed for the first time, an affirmative determination is always made. When the test script organizer 15 determines that there are unorganized test scripts, the process proceeds to step S155, and when it determines that there are no unorganized test scripts, it ends the process shown in FIG. 10. In step S155, the test script organizer 15 selects one unorganized test script. In the following step S156, the test script organizer 15 checks the attribute value of the snippet attribute assigned to the test script selected in step S155.

続くステップS157ではテストスクリプト整理部15は、整理表内の属性値の組合せに対応する箇所にテストスクリプトを関連付ける。たとえば図11に示す例では、機能Aおよび正常系機能テストのスニペット属性を有する「テストスクリプト1」が左上のセルに関連付けられる様子を示している。その後テストスクリプト整理部15はステップS154に戻る。 In the following step S157, the test script organizer 15 associates the test script with the location corresponding to the combination of attribute values in the organizer table. For example, the example shown in FIG. 11 shows that "test script 1" having snippet attributes of function A and normal function test is associated with the upper left cell. Thereafter, the test script organizer 15 returns to step S154.

(レコメンド抽出部)
図12は、レコメンド抽出部16の処理を示すフローチャートである。レコメンド抽出部16は、テストスクリプト整理部15が決定する2以上の属性カテゴリの組合せ(以下では「ターゲットエリア」と呼ぶ)のそれぞれを順番にターゲットとして図12に示す処理を実行する。すなわち図12に示す処理を開始する時点で、ターゲットエリアは特定されている。以下では図11に示す例において左上のC11のセルがターゲットエリアとして特定されている場合を例に説明する。まずレコメンド抽出部16は、ステップS161においてベーススクリプトを抽出する。ステップS161の詳細は後述する。なおステップS161において抽出されるベーススクリプトは1または複数である。
(Recommendation extraction part)
FIG. 12 is a flowchart showing the processing of the recommendation extraction unit 16. The recommendation extractor 16 sequentially targets each of the combinations of two or more attribute categories (hereinafter referred to as "target areas") determined by the test script organizer 15 and executes the process shown in FIG. 12. That is, the target area has been specified at the time the process shown in FIG. 12 is started. In the following, a case will be described in which the cell C11 at the upper left in the example shown in FIG. 11 is specified as the target area. First, the recommendation extraction unit 16 extracts a base script in step S161. Details of step S161 will be described later. Note that one or more base scripts are extracted in step S161.

続くステップS162ではレコメンド抽出部16は、ベーススクリプトを1つ選択する。続くステップS163ではレコメンド抽出部16は、ステップS162において選択したベーススクリプト(以下、「選択ベーススクリプト」)に対する参考スクリプトのペアを抽出する。ステップS163の詳細は後述する。なおステップS163において抽出される参考スクリプトのペアは1または複数である。続くステップS164ではレコメンド抽出部16は、参考するスクリプトのペアを1つ選択する。続くステップS165ではレコメンド抽出部16は、ステップS164において選択した参考スクリプトとターゲットエリアとの差分からレコメンド候補スニペットを抽出する。ステップS165の詳細は後述する。 In the following step S162, the recommendation extraction unit 16 selects one base script. In the following step S163, the recommendation extraction unit 16 extracts a pair of reference scripts for the base script selected in step S162 (hereinafter referred to as "selected base script"). Details of step S163 will be described later. Note that one or more pairs of reference scripts are extracted in step S163. In the following step S164, the recommendation extraction unit 16 selects one script pair to be referenced. In the following step S165, the recommendation extraction unit 16 extracts a recommendation candidate snippet from the difference between the reference script selected in step S164 and the target area. Details of step S165 will be described later.

続くステップS166ではレコメンド抽出部16は、未確認の参考スクリプトが他に存在するか否かを判断する。レコメンド抽出部16は、未確認の参考スクリプトが他に存在すると判断する場合はステップS164に戻り、未確認の参考スクリプトが他に存在しないと判断する場合はステップS167に進む。ステップS167ではレコメンド抽出部16は、未確認のベーススクリプトが他に存在するか否かを判断する。レコメンド抽出部16は、未確認のベーススクリプトが他に存在すると判断する場合はステップS162に戻り、未確認のベーススクリプトが他に存在しないと判断する場合は図12に示す処理を終了する。 In the following step S166, the recommendation extraction unit 16 determines whether there are any other unconfirmed reference scripts. If the recommendation extraction unit 16 determines that there are other unconfirmed reference scripts, the process returns to step S164, and if it determines that there are no other unconfirmed reference scripts, the process proceeds to step S167. In step S167, the recommendation extraction unit 16 determines whether there are any other unconfirmed base scripts. If the recommendation extraction unit 16 determines that there are other unconfirmed base scripts, the process returns to step S162, and if it determines that there are no other unconfirmed base scripts, it ends the process shown in FIG. 12.

図13は、図12のステップS161の詳細を示すフローチャートである。ステップS161-1ではレコメンド抽出部16は、属性カテゴリを1つ選択する。たとえば図11に示す例において「機能」の属性カテゴリを選択する。続くステップS161-2ではレコメンド抽出部16は、選択した属性カテゴリの属性値を、ターゲットエリアとは異なる値に変更する。たとえば図11に示す例においてターゲットエリアがC11のセルの場合には、ステップS161-1において選択した属性カテゴリ「機能」の属性値をターゲットエリアの「機能A」とは異なる値、たとえば「機能B」を選択する。 FIG. 13 is a flowchart showing details of step S161 in FIG. 12. In step S161-1, the recommendation extraction unit 16 selects one attribute category. For example, in the example shown in FIG. 11, the attribute category of "function" is selected. In the subsequent step S161-2, the recommendation extraction unit 16 changes the attribute value of the selected attribute category to a value different from that of the target area. For example, if the target area is cell C11 in the example shown in FIG. ”.

続くステップS161-3ではレコメンド抽出部16は、ステップS161-2において選択した属性値と、ターゲットエリアのステップS161-1において選択していない属性カテゴリの属性値との組合せに対応するテストスクリプトが存在するか否かを判断する。図11に示す例において、ステップS161-2において選択した属性値は「機能B」であり、ターゲットエリアのステップS161-1において選択していない属性カテゴリの属性値は「正常系機能テスト」である。図11に示す例では、「機能B」と「正常系機能テスト」の組合せに対応する「テストスクリプト5」が存在するので本ステップは肯定判断される。ステップS161-3においてレコメンド抽出部16は肯定判断する場合はステップS161-4に進み、否定判断する場合はステップS161-1に戻る。 In the following step S161-3, the recommendation extraction unit 16 determines whether there is a test script corresponding to the combination of the attribute value selected in step S161-2 and the attribute value of the attribute category not selected in step S161-1 in the target area. Decide whether or not to do so. In the example shown in FIG. 11, the attribute value selected in step S161-2 is "Function B", and the attribute value of the attribute category not selected in step S161-1 in the target area is "normal function test". . In the example shown in FIG. 11, since "test script 5" corresponding to the combination of "function B" and "normal system function test" exists, this step is determined to be affirmative. If the recommendation extraction unit 16 makes a positive determination in step S161-3, the process proceeds to step S161-4, and if the recommendation extraction unit 16 makes a negative determination, the process returns to step S161-1.

ステップS161-4ではレコメンド抽出部16は、ステップS161-3において存在を確認したテストスクリプトをベーススクリプトの1つとして抽出する。念のために記載すると、このベーススクリプトは普遍的なものではなく、処理対象とするターゲットエリアごとに定められるものである。 In step S161-4, the recommendation extraction unit 16 extracts the test script whose existence was confirmed in step S161-3 as one of the base scripts. Just to be clear, this base script is not universal, but is defined for each target area to be processed.

続くステップS161-5ではレコメンド抽出部16は、当該ベーススクリプトに含まれるスニペットの属性値を記録する。続くステップS161-6ではレコメンド抽出部16は、他に未確認のテストスクリプト属性の属性カテゴリや属性値が存在するか否かを判断する。レコメンド抽出部16はステップS161-6において肯定判断する場合にはステップS161-1に戻り、否定判断する場合には図13に示す処理を終了する。 In the following step S161-5, the recommendation extraction unit 16 records the attribute value of the snippet included in the base script. In the following step S161-6, the recommendation extraction unit 16 determines whether there are any other unconfirmed attribute categories or attribute values of the test script attributes. If the recommendation extraction unit 16 makes an affirmative determination in step S161-6, the process returns to step S161-1, and if it makes a negative determination, it ends the process shown in FIG. 13.

すなわちレコメンド抽出部16は、ターゲットエリアからいずれか1つの属性カテゴリの属性値のみが異なるテストスクリプトをベーススクリプトとして抽出する。図11に示す例では、上述した「テストスクリプト5」だけでなく、「テストスクリプト13」、「テストスクリプト2」、および「テストスクリプト3」、がベーススクリプトとして抽出される。以上が図13の説明である。 That is, the recommendation extraction unit 16 extracts a test script that differs only in the attribute value of any one attribute category from the target area as a base script. In the example shown in FIG. 11, not only the above-mentioned "test script 5" but also "test script 13," "test script 2," and "test script 3" are extracted as base scripts. The above is the explanation of FIG. 13.

図14は、図12のステップS163の詳細を示すフローチャートである。前述のようにステップS163の処理が開始される前にステップS162においていずれかのベーススクリプトが「選択ベーススクリプト」として選択されている。以下の図14の具体例では図11において左上に存在するC11のセルがターゲットエリアに設定され、その下のC21のセルが選択ベーススクリプトとして選択されていることを前提として説明する。 FIG. 14 is a flowchart showing details of step S163 in FIG. 12. As described above, before the process of step S163 is started, one of the base scripts is selected as the "selected base script" in step S162. The specific example shown in FIG. 14 below will be explained on the assumption that the cell C11 located at the upper left in FIG. 11 is set as the target area, and the cell C21 below it is selected as the selection base script.

図14においてレコメンド抽出部16はまずステップS163-1において、ターゲットエリアと選択ベーススクリプトとで属性値が一致する属性カテゴリを1つ選択する。以下ではここで選択する属性カテゴリを「選択属性カテゴリ」と呼ぶ。たとえば図11の例では、ターゲットエリアと選択ベーススクリプトとで属性値が一致する属性カテゴリは「テスト種別」の1つだけなので、この「テスト種別」が選択属性カテゴリとして選択される。 In FIG. 14, the recommendation extraction unit 16 first selects one attribute category whose attribute value matches the target area and the selected base script in step S163-1. In the following, the attribute category selected here will be referred to as a "selected attribute category." For example, in the example shown in FIG. 11, there is only one attribute category, "test type", whose attribute values match in the target area and the selected base script, so this "test type" is selected as the selected attribute category.

続くステップS163-2ではレコメンド抽出部16は、ターゲットエリアと選択ベーススクリプトに対して選択属性カテゴリの属性値を同一の別の値に変更したセルを選択する。たとえば図11の例において、選択属性カテゴリである「テスト種別」の属性値を「異常系機能テスト」に変更したセルC12およびセルC22を選択する。 In the subsequent step S163-2, the recommendation extraction unit 16 selects a cell in which the attribute value of the selected attribute category has been changed to the same different value for the target area and the selected base script. For example, in the example of FIG. 11, cells C12 and C22 in which the attribute value of the selected attribute category "test type" is changed to "abnormal function test" are selected.

続くステップS163-3ではレコメンド抽出部16は、ステップS163-2において選択したセルに対応するテストスクリプトが両方存在するか否かを判断する。たとえば図11に示す例では、セルC12に対応する「テストスクリプト2」が存在し、セルC22に対応する「テストスクリプト6」が存在するので肯定判断される。レコメンド抽出部16は、ステップS163-3において肯定判断する場合はステップS163-4に進み、否定判断する場合はステップS163-7に進む。 In the following step S163-3, the recommendation extraction unit 16 determines whether both test scripts corresponding to the cell selected in step S163-2 exist. For example, in the example shown in FIG. 11, "Test Script 2" corresponding to cell C12 exists, and "Test Script 6" corresponding to cell C22 exists, so an affirmative determination is made. If the recommendation extraction unit 16 makes an affirmative determination in step S163-3, the process proceeds to step S163-4, and if a negative judgment is made, the process proceeds to step S163-7.

ステップS163-4ではレコメンド抽出部16は、ステップS163-3において存在を確認した2つのテストスクリプトの類似度を算出する。この類似度は、キーワード抽出部13が「//keyword:」から抽出した属性値に基づいて行われる。類似度の算出はたとえばレーベンシュタイン等のアルゴリズムを用いることができる。たとえば、各属性値に何らかの1文字を割り当てておき、各テストスクリプトに含まれるスニペットの属性値を対応する文字に置き換えることで文字列が得られる。この文字列に対してレーベンシュタイン等のアルゴリズムを用いることができる。続くステップS163-5ではレコメンド抽出部16は、算出した類似度が所定の閾値以上であるか否かを判断する。レコメンド抽出部16は、閾値以上と判断する場合にはステップS163-6に進み、閾値未満と判断する場合はステップS163-7に進む。 In step S163-4, the recommendation extraction unit 16 calculates the degree of similarity between the two test scripts whose existence was confirmed in step S163-3. This degree of similarity is determined based on the attribute value extracted from "//keyword:" by the keyword extraction unit 13. For example, Levenshtein's algorithm can be used to calculate the similarity. For example, a character string can be obtained by assigning a certain character to each attribute value and replacing the attribute value of the snippet included in each test script with the corresponding character. The Levenshtein algorithm can be used for this character string. In the following step S163-5, the recommendation extraction unit 16 determines whether the calculated degree of similarity is greater than or equal to a predetermined threshold. If the recommendation extraction unit 16 determines that the value is equal to or greater than the threshold value, the process proceeds to step S163-6, and if it determines that the value is less than the threshold value, the process proceeds to step S163-7.

ステップS163-6ではレコメンド抽出部16は、ステップS163-3において存在を確認した2つのテストスクリプトを参考スクリプトのペアとしてステップS163-7に進む。ステップS163-7ではレコメンド抽出部16は、他に未確認の属性カテゴリや属性値が存在するか否かを判断する。レコメンド抽出部16は、未確認の属性カテゴリまたは未確認の属性値が存在すると判断する場合はステップS163-1に戻り、未確認の属性カテゴリおよび属性値が存在しないと判断する場合は図14に示す処理を終了する。すなわちレコメンド抽出部16は、ステップS163-1およびステップS163-2において全ての組合せを網羅するように属性カテゴリおよび属性値を変更する。以上が図14に示す処理の説明である。 In step S163-6, the recommendation extraction unit 16 sets the two test scripts whose existence was confirmed in step S163-3 as a pair of reference scripts, and proceeds to step S163-7. In step S163-7, the recommendation extraction unit 16 determines whether there are any other unconfirmed attribute categories or attribute values. If the recommendation extraction unit 16 determines that there are unconfirmed attribute categories or unconfirmed attribute values, the process returns to step S163-1, and if it determines that there are no unconfirmed attribute categories or attribute values, it performs the process shown in FIG. finish. That is, the recommendation extraction unit 16 changes the attribute category and attribute value in steps S163-1 and S163-2 so as to cover all combinations. The above is the explanation of the process shown in FIG. 14.

図15は、図12のステップS165の詳細を示すフローチャートである。図15の処理は、図11だけでなく図16に示すテストスクリプトの具体例も参照して説明する。ステップS165-1ではレコメンド抽出部16は、各参考スクリプトに含まれるスニペットの属性値を取得する。 FIG. 15 is a flowchart showing details of step S165 in FIG. 12. The process in FIG. 15 will be described with reference not only to FIG. 11 but also to a specific example of the test script shown in FIG. 16. In step S165-1, the recommendation extraction unit 16 acquires the attribute value of the snippet included in each reference script.

続くステップS165-2ではレコメンド抽出部16は、各参考スクリプトの属性値をスニペットの記載順に並べる。続くステップS165-3ではレコメンド抽出部16は、ステップS165-2において並べた2つの参考スクリプトの属性値が完全に一致するか否かを判断する。レコメンド抽出部16は完全に一致すると判断する場合はステップS165-5に進み、何らかの相違点があると判断する場合はステップS165-4に進む。 In the subsequent step S165-2, the recommendation extraction unit 16 arranges the attribute values of each reference script in the order of the snippets. In the following step S165-3, the recommendation extraction unit 16 determines whether the attribute values of the two reference scripts arranged in step S165-2 completely match. If the recommendation extraction unit 16 determines that there is a complete match, the process proceeds to step S165-5, and if it determines that there is some difference, the process proceeds to step S165-4.

ステップS165-4ではレコメンド抽出部16は、参考スクリプトの相違情報、すなわち2つの参考スクリプトの相違が、追加、削除、および変更のいずれに該当するか、およびその相違内容を記録してステップS165-5に進む。本ステップの処理内容を図16を参照して具体的に説明する。 In step S165-4, the recommendation extraction unit 16 records difference information of the reference scripts, that is, whether the difference between the two reference scripts corresponds to addition, deletion, or modification, and the content of the difference, and records the difference information in step S165-4. Proceed to step 5. The processing contents of this step will be specifically explained with reference to FIG. 16.

図16では(a)~(c)の3つの例を示しており、いずれの例も図示左側がターゲットエリアと属性値の重複が比較的少ない参考スクリプトのスニペットの属性値を示しており、図示右側がターゲットエリアと属性値の重複が比較的多い参考スクリプトのスニペットの属性値を示している。ターゲットエリアがセルC11、参考スクリプトのペアが「テストスクリプト2」と「テストスクリプト6」の場合には、図示左側が「テストスクリプト6」、図示右側が「テストスクリプト2」のスニペットの属性値に該当する。 Figure 16 shows three examples (a) to (c), and in each example, the left side of the illustration shows the attribute value of the snippet of the reference script with relatively little overlap between the target area and the attribute value. The right side shows the attribute values of the reference script snippet, which has a relatively large number of overlapping attribute values with the target area. If the target area is cell C11 and the reference script pair is "Test Script 2" and "Test Script 6", the attribute value of the snippet will be "Test Script 6" on the left side of the illustration and "Test Script 2" on the right side of the illustration. Applicable.

図16(a)に示す例では、「テストスクリプト6」はスニペットの属性値が先頭から順番に、「A、B、C」であり、「テストスクリプト2」スニペットの属性値が先頭から順番に、「A、C」である。そのためレコメンド抽出部16は、種別を「削除」、内容を「AとCの間を削除」と記録する。 In the example shown in FIG. 16(a), the attribute values of the snippets of "Test Script 6" are "A, B, C" in order from the beginning, and the attribute values of the "Test Script 2" snippet are "A, B, C" in order from the beginning. , "A, C". Therefore, the recommendation extraction unit 16 records the type as "delete" and the content as "delete between A and C."

図16(b)に示す例では、「テストスクリプト6」はスニペットの属性値が先頭から順番に、「A、C」であり、「テストスクリプト2」スニペットの属性値が先頭から順番に、「A、B、C」である。そのためレコメンド抽出部16は、種別を「追加」、内容を「AとCの間にBを追加」と記録する。 In the example shown in FIG. 16(b), the attribute values of the snippets of "Test Script 6" are "A, C" in order from the beginning, and the attribute values of the "Test Script 2" snippet are "A, C" in order from the beginning. A, B, C''. Therefore, the recommendation extraction unit 16 records the type as "addition" and the content as "add B between A and C."

図16(c)に示す例では、「テストスクリプト6」はスニペットの属性値が先頭から順番に、「A、B、C」であり、「テストスクリプト2」スニペットの属性値が先頭から順番に、「A、D、C」である。そのためレコメンド抽出部16は、種別を「変更」、内容を「AとCの間をDに変更」と記録する。以上がステップS165-4の具体例である。 In the example shown in FIG. 16(c), the attribute values of the snippets of "Test Script 6" are "A, B, C" in order from the beginning, and the attribute values of the "Test Script 2" snippet are "A, B, C" in order from the beginning. , "A, D, C". Therefore, the recommendation extraction unit 16 records the type as "change" and the content as "change between A and C to D." The above is a specific example of step S165-4.

ステップS165-5ではレコメンド抽出部16は、スニペット属性の列の最後まで確認済であるか否かを判断し、確認済であると判断する場合は図15に示す処理を終了し、全ての確認が完了していないと判断する場合はステップS165-2に戻る。以上が図15に示す処理の説明である。 In step S165-5, the recommendation extraction unit 16 determines whether or not the end of the snippet attribute column has been confirmed. If it is determined that the snippet attribute has been confirmed, it ends the process shown in FIG. If it is determined that the process has not been completed, the process returns to step S165-2. The above is the explanation of the process shown in FIG. 15.

(レコメンド合成部)
図17は、レコメンド合成部17の処理を示すフローチャートである。図17の処理を図18に示す具体例も参照して説明する。図17に示す処理を開始する時点で、ターゲットエリアは特定されている。以下では図11に示す例において左上のC11のセルがターゲットエリアとして特定されている場合を例に説明する。
(Recommendation synthesis department)
FIG. 17 is a flowchart showing the processing of the recommendation synthesis unit 17. The process in FIG. 17 will be explained with reference to a specific example shown in FIG. At the time of starting the process shown in FIG. 17, the target area has been specified. In the following, a case will be described in which the cell C11 at the upper left in the example shown in FIG. 11 is specified as the target area.

まずレコメンド合成部17は、ステップS171においてターゲットエリアに対応するベーススクリプトと参考スクリプトの組合せを1つ選択する。図11に示す例では、ターゲットエリアがセルC11であり、ステップS171ではたとえばベーススクリプトとしてセルC21に関連付けられる「テストスクリプト5」が選択され、参考スクリプトとして「テストスクリプト2」および「テストスクリプト6」が選択される。 First, the recommendation synthesis unit 17 selects one combination of a base script and a reference script corresponding to the target area in step S171. In the example shown in FIG. 11, the target area is cell C11, and in step S171, for example, "test script 5" associated with cell C21 is selected as the base script, and "test script 2" and "test script 6" are selected as reference scripts. is selected.

続くステップS172ではレコメンド合成部17は、ベーススクリプトと参考スクリプトの両方について、コードおよびスニペットの情報を取得する。続くステップS173ではレコメンド合成部17は、参考スクリプトの相違情報、すなわち、追加、削除、および変更のいずれであるかの情報と、相違の内容の情報とを取得する。続くステップS175ではレコメンド合成部17は、ベーススクリプトのスニペットの属性値の並びに対して参考スクリプトの相違情報と同じ属性の並びを検索する。たとえば図11および図16に示す例において、「テストスクリプト6」に対する「テストスクリプト2」の相違点が「AとCの間を削除」の場合は、「テストスクリプト5」から「A、*、C」の並びを検索する。ただしここで「*」は任意の属性値を意味する。ここで、「*」に対応する属性値は1つの属性値であってもよいし、複数の属性値の並びであってもよい。 In the subsequent step S172, the recommendation synthesis unit 17 acquires code and snippet information for both the base script and the reference script. In the subsequent step S173, the recommendation synthesis unit 17 acquires difference information of the reference script, that is, information on whether it is an addition, deletion, or change, and information on the content of the difference. In the following step S175, the recommendation synthesis unit 17 searches the sequence of attribute values of the snippet of the base script for the same sequence of attributes as the difference information of the reference script. For example, in the examples shown in FIGS. 11 and 16, if the difference between "Test Script 2" and "Test Script 6" is "Delete between A and C", then "A, *, Search for the sequence "C". However, "*" here means an arbitrary attribute value. Here, the attribute value corresponding to "*" may be one attribute value, or may be a sequence of multiple attribute values.

続くステップS176ではレコメンド合成部17は、ステップS175における検索により発見されたか否かを判断し、発見されたと判断する場合はステップS177に進み、発見されないと判断する場合はステップS178に進む。ステップS177ではレコメンド合成部17は、参考スクリプトの相違情報を適用してレコメンド候補テストスクリプトを作成する。ここで図18を参照して具体例を説明する。図18には(a)~(c)の3つの例が示してあり、この3つは図16の(a)~(c)にそれぞれ対応する。すなわちそれぞれの例において参考スクリプトの相違情報が異なる。 In the following step S176, the recommendation synthesis unit 17 determines whether or not the item has been found by the search in step S175. If it is determined that the item has been found, the process proceeds to step S177; if it is determined that the item has not been found, the process proceeds to step S178. In step S177, the recommendation synthesis unit 17 creates a recommendation candidate test script by applying the difference information of the reference script. A specific example will now be described with reference to FIG. FIG. 18 shows three examples (a) to (c), which correspond to (a) to (c) in FIG. 16, respectively. In other words, the reference script difference information is different in each example.

図18(a)に示す例は図16(a)に対応しており、ベーススクリプトである「テストスクリプト5」のスニペットの属性値が先頭から順番に、「A、E、C」の場合にステップS176では次の処理が行われる。すなわち参考スクリプトの相違情報が「AとCの間を削除」なので、「A、C」が生成される。 The example shown in FIG. 18(a) corresponds to FIG. 16(a), and the attribute values of the snippet of the base script "Test script 5" are "A, E, C" in order from the beginning. In step S176, the following processing is performed. That is, since the difference information of the reference script is "delete between A and C", "A, C" is generated.

図18(b)に示す例は図16(b)に対応しており、ベーススクリプトである「テストスクリプト5」のスニペットの属性値が先頭から順番に、「A、C」の場合にステップS176では次の処理が行われる。すなわち参考スクリプトの相違情報が「AとCの間にBを追加」なので、「A、B、C」が生成される。 The example shown in FIG. 18(b) corresponds to FIG. 16(b), and if the attribute values of the snippets of the base script "Test Script 5" are "A, C" in order from the beginning, step S176 Then the following processing is performed. That is, since the difference information of the reference script is "Add B between A and C", "A, B, C" is generated.

図18(c)に示す例は図16(c)に対応しており、ベーススクリプトである「テストスクリプト5」のスニペットの属性値が先頭から順番に、「A、E、C」の場合にステップS176では次の処理が行われる。すなわち参考スクリプトの相違情報が「AとCの間をDに変更」なので、「A、D、C」が生成される。以上がステップS176の具体例である。 The example shown in FIG. 18(c) corresponds to FIG. 16(c), and if the attribute values of the snippet of the base script "Test script 5" are "A, E, C" in order from the beginning, In step S176, the following processing is performed. That is, since the difference information of the reference script is "change between A and C to D", "A, D, C" is generated. The above is a specific example of step S176.

続くステップS178ではレコメンド合成部17は、他にチェックすべき組み合わせが存在するか否かを判断する。レコメンド合成部17は、他にチェックすべき組み合わせが存在すると判断する場合はステップS171に戻り、他にチェックすべき組み合わせが存在しないと判断する場合は図17に示す処理を終了する。 In the following step S178, the recommendation synthesis unit 17 determines whether there are any other combinations to be checked. If the recommendation synthesis unit 17 determines that there are other combinations to be checked, the process returns to step S171, and if it is determined that there are no other combinations to be checked, it ends the process shown in FIG. 17.

上述した第1の実施の形態によれば、次の作用効果が得られる。
(1)電子制御装置1は、テストを実行するためのプログラムであるテストスクリプトを複数取得する入力部11と、テストスクリプトを複数のパート、すなわち複数のスニペットに分割する分割部と12、複数のパートに対応するキーワードを抽出して属性として関連付けるキーワード抽出部13と、テストスクリプト、複数のパート、および属性を記憶する記憶部5と、予め定義された2以上の属性カテゴリに基づいて作成された整理表の各セルに対してテストスクリプトを割り当てるテストスクリプト整理部15と、整理表においてテストスクリプトが割り当てられていない少なくとも1つのセルをターゲットエリアとし、ターゲットエリアとはいずれか第1の属性カテゴリの属性値が異なるベーススクリプトを選択し、ターゲットエリアおよびベーススクリプトと比較して第1の属性カテゴリとは異なる第2の属性カテゴリの属性値が異なる1組の参考スクリプトを選択するレコメンド抽出部16と、レコメンド抽出部16が選択するベーススクリプトおよび1組の参考スクリプトに基づきターゲットエリアに対応する新たなテストスクリプトを作成するレコメンド合成部17と、を備える。
According to the first embodiment described above, the following effects can be obtained.
(1) The electronic control device 1 includes an input unit 11 that acquires a plurality of test scripts that are programs for executing tests, a division unit 12 that divides the test script into multiple parts, that is, multiple snippets, and a plurality of A keyword extraction unit 13 extracts keywords corresponding to parts and associates them as attributes; a storage unit 5 stores test scripts, multiple parts, and attributes; and a keyword extraction unit 13 that extracts keywords corresponding to parts and associates them as attributes; The test script organizer 15 assigns a test script to each cell in the organizer table, and at least one cell to which no test script is assigned in the organizer table is set as a target area. a recommendation extraction unit 16 that selects base scripts with different attribute values, and selects a set of reference scripts with different attribute values in a second attribute category different from the first attribute category by comparing with the target area and the base script; , a recommendation synthesis section 17 that creates a new test script corresponding to the target area based on the base script selected by the recommendation extraction section 16 and a set of reference scripts.

レコメンド抽出部16は、少なくともテストスクリプトが割り当てられていないセル、換言すると漏れている属性値の組合せをターゲットエリアとする。そのため、漏れているテスト条件に対応するテストスクリプトを生成できる。 The recommendation extraction unit 16 sets a target area to at least a cell to which no test script is assigned, in other words, a combination of missing attribute values. Therefore, a test script corresponding to the missing test conditions can be generated.

(2)レコメンド抽出部16は、ベーススクリプトと参考スクリプトとが類似する場合に1組の参考スクリプトの相違を相違情報として抽出する。レコメンド合成部17は、ベーススクリプトおよび相違情報に基づきターゲットエリアに対応する新たなテストスクリプトを作成する。 (2) When the base script and the reference script are similar, the recommendation extraction unit 16 extracts the difference between a set of reference scripts as difference information. The recommendation synthesis unit 17 creates a new test script corresponding to the target area based on the base script and the difference information.

(3)分割部12は、テストスクリプトにコメント文として記載された所定の文字列、たとえば「//SNIPPET」に基づいてテストスクリプトを複数のパートに分割する。そのため電子制御装置1は、テストスクリプトの分割を確実に実行できる。 (3) The dividing unit 12 divides the test script into a plurality of parts based on a predetermined character string written as a comment in the test script, for example "//SNIPPET". Therefore, the electronic control device 1 can reliably divide the test script.

(4)キーワード抽出部13は、テストスクリプトに含まれる所定の文字列、たとえば「//TestscriptKeyword:」や「//keyword:」に基づいてキーワードを抽出する。そのため電子制御装置1は、キーワードの抽出を確実に実行できる。 (4) The keyword extraction unit 13 extracts keywords based on a predetermined character string included in the test script, such as "//TestscriptKeyword:" or "//keyword:". Therefore, the electronic control device 1 can reliably extract keywords.

(5)レコメンド抽出部16は、整理表の全てのセルをターゲットエリアとする。そのため、すでに作成されている同一の属性値の組合せを対象とするテストスクリプトに対して、別のテストスクリプトを提案することができる。 (5) The recommendation extraction unit 16 sets all cells of the organizing table as a target area. Therefore, it is possible to propose a different test script to an already created test script that targets the same combination of attribute values.

(変形例1)
上述した第1の実施の形態では、テストスクリプト整理部15が整理して得られる全ての属性カテゴリの組合せをターゲットエリアとした。具体的には、図11に示すC11~C54の全てのセルを処理対象とした。しかし電子制御装置1は、テストスクリプトが存在しないセルのみをターゲットエリアに設定してもよい。たとえば図11に示す例では、セルC14、C33、およびC52のみをターゲットエリアに設定してもよい。
(Modification 1)
In the first embodiment described above, the target area is the combination of all attribute categories obtained by sorting by the test script organizing section 15. Specifically, all cells C11 to C54 shown in FIG. 11 were targeted for processing. However, the electronic control device 1 may set only cells in which no test script exists as target areas. For example, in the example shown in FIG. 11, only cells C14, C33, and C52 may be set as the target area.

この変形例1によれば、テストスクリプトの生成が最も求められるのは存在しないテスト条件なので、少ない処理で大きな成果が得られる。 According to the first modification, the generation of a test script is most required for a test condition that does not exist, so a great result can be obtained with a small amount of processing.

(変形例2)
上述した第1の実施の形態では、テストスクリプト整理部15が整理して得られる全ての属性カテゴリの組合せをターゲットエリアとした。具体的には、図11に示すC11~C54の全てのセルを処理対象とした。しかし電子制御装置1は、特定の属性値だけをターゲットエリアに設定してもよい。たとえば「時間精度性能テスト」の属性値を有する図11におけるC13、C23、C33、C43、およびC53のセルのみをターゲットエリアに設定してもよい。
(Modification 2)
In the first embodiment described above, the target area is the combination of all attribute categories obtained by sorting by the test script organizing section 15. Specifically, all cells C11 to C54 shown in FIG. 11 were targeted for processing. However, the electronic control device 1 may set only specific attribute values to the target area. For example, only cells C13, C23, C33, C43, and C53 in FIG. 11 having an attribute value of "time accuracy performance test" may be set as the target area.

この変形例2によれば、次の作用効果が得られる。
(6)レコメンド抽出部16は、所定の属性値に対応するセルをターゲットエリアとする。そのため電子制御装置1は、注目する特定の条件のみテストを拡充することができる。
According to this modification 2, the following effects can be obtained.
(6) The recommendation extraction unit 16 sets a cell corresponding to a predetermined attribute value as a target area. Therefore, the electronic control device 1 can expand the test only for specific conditions of interest.

(変形例3)
上述した第1の実施の形態では、ベーススクリプトの選択に特に制限を設けなかった。しかしレコメンド抽出部16は、特定の条件を満たすテストスクリプトのみをベーススクリプトとして採用してもよい。たとえばレコメンド抽出部16は、ターゲットエリアごとに特定の属性値を有するテストスクリプトのみをベーススクリプトとして採用してもよい。
(Modification 3)
In the first embodiment described above, no particular restrictions were placed on the selection of base scripts. However, the recommendation extraction unit 16 may adopt only test scripts that meet specific conditions as base scripts. For example, the recommendation extraction unit 16 may adopt only test scripts having specific attribute values for each target area as base scripts.

図19は、本変形例を実現するために記憶部5に追加で格納されるベーススクリプト選択情報T1の一例を示す図である。ベーススクリプト選択情報T1では、ターゲットエリアの属性値とベーススクリプトの属性値との組合せごとに、ベーススクリプトとして採用することの許可および不許可が記載されている。ただし図19は一例にすぎず、不許可を原則としてベーススクリプト選択情報T1に許可とする組合せのみを記載してもよいし、許可を原則としてベーススクリプト選択情報T1に不許可とする組合せのみを記載してもよい。 FIG. 19 is a diagram showing an example of base script selection information T1 that is additionally stored in the storage unit 5 in order to realize this modification. In the base script selection information T1, for each combination of the attribute value of the target area and the attribute value of the base script, permission or disapproval of adoption as the base script is described. However, FIG. 19 is only an example, and it is possible to write only combinations that are allowed in the base script selection information T1 with the principle of not being allowed, or only combinations that are allowed and not allowed in the base script selection information T1 in principle. May be written.

この変形例3によれば、次の作用効果が得られる。
(7)レコメンド抽出部16は、所定の属性値を有するテストスクリプトをベーススクリプトに選択する。そのため電子制御装置1は、特定のテストスクリプトをベースとして新たなテストスクリプトを作成できる。
According to this modification 3, the following effects can be obtained.
(7) The recommendation extraction unit 16 selects a test script having a predetermined attribute value as a base script. Therefore, the electronic control device 1 can create a new test script based on a specific test script.

(変形例4)
上述した第1の実施の形態では、参考スクリプトの選択に特に制限を設けなかった。しかしレコメンド抽出部16は、特定の条件を満たすテストスクリプトのみを参考スクリプトとして採用してもよい。さらにレコメンド抽出部16は、特定の条件を満たすテストスクリプトのみをベーススクリプトとして採用したうえで、別の特定の条件を満たすテストスクリプトのみを参考スクリプトとして採用してもよい。
(Modification 4)
In the first embodiment described above, no particular restrictions were placed on the selection of reference scripts. However, the recommendation extraction unit 16 may employ only test scripts that meet specific conditions as reference scripts. Furthermore, the recommendation extracting unit 16 may employ only test scripts that satisfy a specific condition as a base script, and then employ only test scripts that satisfy another specific condition as a reference script.

図20は、本変形例による電子制御装置1の動作の一例を説明する図である。機能A~Cが類似しており、点線枠で示すセルをターゲットエリアとする場合に、参考スクリプトに関する条件として、機能Bと機能Cに限定してもよい。この場合は、参考スクリプトの範囲は実線枠に限定される。さらに、ベーススクリプトとして「テストスクリプト1」を選択した場合は、その参考スクリプトは「テストスクリプト5」と「テストスクリプト7」のペア、または「テストスクリプト9」と「テストスクリプト11」のペアに限定される。 FIG. 20 is a diagram illustrating an example of the operation of the electronic control device 1 according to this modification. When the functions A to C are similar and the target area is the cell indicated by the dotted line frame, the reference script may be limited to functions B and C as a condition regarding the reference script. In this case, the range of reference scripts is limited to the solid line frame. Furthermore, if you select "Test Script 1" as the base script, the reference scripts are limited to the pair of "Test Script 5" and "Test Script 7" or the pair of "Test Script 9" and "Test Script 11". be done.

図21は、本変形例を実現するために記憶部5に追加で格納される参考スクリプト選択情報T2の一例を示す図である。参考スクリプト選択情報T2では、ターゲットエリアの属性値と参考スクリプトの属性値との組合せごとに、参考スクリプトとして採用することの許可および不許可が記載されている。ただし図21は一例にすぎず、不許可を原則として参考スクリプト選択情報T2に許可とする組合せのみを記載してもよいし、許可を原則として参考スクリプト選択情報T2に不許可とする組合せのみを記載してもよい。 FIG. 21 is a diagram showing an example of reference script selection information T2 that is additionally stored in the storage unit 5 in order to realize this modification. In the reference script selection information T2, for each combination of the attribute value of the target area and the attribute value of the reference script, permission or disapproval of adoption as a reference script is described. However, FIG. 21 is just an example, and only combinations that are allowed in the reference script selection information T2 may be written on the basis of disallowance, or only combinations that are allowed on the basis of permission and not allowed in the reference script selection information T2. May be written.

この変形例4によれば、次の作用効果が得られる。
(8)レコメンド抽出部16は、所定の属性値を有するテストスクリプトを参考スクリプトに選択する。そのため電子制御装置1は、特定のテストスクリプトを参考スクリプトとして新たなテストスクリプトを作成できる。
According to this modification 4, the following effects can be obtained.
(8) The recommendation extraction unit 16 selects a test script having a predetermined attribute value as a reference script. Therefore, the electronic control device 1 can create a new test script using a specific test script as a reference script.

(変形例5)
上述した第1の実施の形態では、テストスクリプト整理部15が決定する2以上の属性カテゴリの組合せのそれぞれを順番にターゲットとして1回ずつ、レコメンド抽出部16およびレコメンド合成部17が処理を行った。換言すると第1の実施の形態では、各ターゲットエリアを対象に1回しか処理を行わなかった。しかしレコメンド抽出部16およびレコメンド合成部17は、同一のターゲットエリアを対象に複数回の処理を行ってもよい。なお以下では、全てのターゲットエリアを対象に1回目の処理を行うことを「1週目」と表現し、同様に2回目を「2週目」と呼ぶ。
(Modification 5)
In the first embodiment described above, the recommendation extraction unit 16 and the recommendation synthesis unit 17 sequentially target each of the combinations of two or more attribute categories determined by the test script organizing unit 15 and perform processing once. . In other words, in the first embodiment, each target area was processed only once. However, the recommendation extraction unit 16 and the recommendation synthesis unit 17 may perform the process multiple times on the same target area. Note that in the following, performing the first processing on all target areas will be referred to as the "first week", and similarly, the second processing will be referred to as the "second week".

図22は、本変形例の電子制御装置1の動作を説明する図である。図22に示す例では、第1の実施の形態において示した図11とは異なり、入力部11に入力されるテストスクリプトの数が少ない。具体的には、テストスクリプトはC11,C12,C14,C21,C33,C34,C41,C42,およびC54のセルにのみ関連付けられている。この例においては、レコメンド抽出部16およびレコメンド合成部17が全ターゲットエリアを対象に1週目の処理を行っても、図22において実線の四角を描画したセルでしかレコメンド候補テストスクリプトを作成できない。 FIG. 22 is a diagram illustrating the operation of the electronic control device 1 of this modification. In the example shown in FIG. 22, unlike FIG. 11 shown in the first embodiment, the number of test scripts input to the input unit 11 is small. Specifically, the test script is associated only with cells C11, C12, C14, C21, C33, C34, C41, C42, and C54. In this example, even if the recommendation extraction unit 16 and the recommendation synthesis unit 17 perform the first week's processing on all target areas, recommendation candidate test scripts can only be created for the cells drawn with solid squares in Figure 22. .

この場合に、C23およびC43では当初からテストスクリプトが存在しないので、該当するテストを実施できない点で特に問題となる。そこで本変形例では、1週目の処理により新たに作成されたレコメンド候補テストスクリプトを入力部11が取得したテストスクリプトと同列に扱って2週目の処理を行う。これにより、たとえばC23をターゲットエリアとする場合には、1週目に作成されたC13に対応するレコメンド候補テストスクリプトをベーススクリプト、C11およびC21に対応するテストスクリプトを参考スクリプトとして作成できる。 In this case, a particular problem arises in that the C23 and C43 do not have test scripts from the beginning, so the corresponding tests cannot be performed. Therefore, in this modified example, the second week's process is performed by treating the recommendation candidate test script newly created by the first week's process in the same manner as the test script acquired by the input unit 11. Thus, for example, when C23 is the target area, the recommendation candidate test script corresponding to C13 created in the first week can be created as a base script, and the test scripts corresponding to C11 and C21 can be created as reference scripts.

この変形例5によれば、少ないテストスクリプトを用いて多数のテストスクリプトを生成できる。 According to this fifth modification, a large number of test scripts can be generated using a small number of test scripts.

(変形例6)
上述した第1の実施の形態では、分割部12はテストスクリプトに記載された所定の文字列に基づいてテストスクリプトを複数のスニペットに分割した。しかし分割部12は、機械学習およびコードクローン解析技術の少なくとも一方を用いることで、テストスクリプトを複数のスニペットに分割してもよい。
(Modification 6)
In the first embodiment described above, the dividing unit 12 divided the test script into a plurality of snippets based on a predetermined character string written in the test script. However, the dividing unit 12 may divide the test script into a plurality of snippets by using at least one of machine learning and code clone analysis technology.

この変形例6によれば、次の作用効果が得られる。
(9)分割部12は、機械学習およびコードクローン解析技術の少なくとも一方を用いてテストスクリプトを複数のパートに分割する。そのため、テストスクリプトにあらかじめ特別な処理を施す必要がなく、テストスクリプトの事前準備が容易である。
According to this modification 6, the following effects can be obtained.
(9) The dividing unit 12 divides the test script into multiple parts using at least one of machine learning and code clone analysis technology. Therefore, there is no need to perform any special processing on the test script in advance, making it easy to prepare the test script in advance.

(変形例7)
上述した第1の実施の形態では、キーワード抽出部13はテストスクリプトに記載された所定の文字列に基づいてテストスクリプトからキーワードを抽出した。しかしキーワード抽出部13は、機械学習およびコードクローン解析技術の少なくとも一方を用いることで、テストスクリプトからキーワードを抽出してもよい。
(Modification 7)
In the first embodiment described above, the keyword extraction unit 13 extracted keywords from the test script based on a predetermined character string written in the test script. However, the keyword extraction unit 13 may extract keywords from the test script by using at least one of machine learning and code clone analysis technology.

この変形例7によれば、次の作用効果が得られる。
(10)キーワード抽出部13は、機械学習およびコードクローン解析技術の少なくとも一方を用いてキーワード抽出を行う。そのため、テストスクリプトにあらかじめ特別な処理を施す必要がなく、テストスクリプトの事前準備が容易である。
According to this modification 7, the following effects can be obtained.
(10) The keyword extraction unit 13 extracts keywords using at least one of machine learning and code clone analysis technology. Therefore, there is no need to perform any special processing on the test script in advance, making it easy to prepare the test script in advance.

―第2の実施の形態―
図23~図29を参照して、電子制御装置の第2の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、スニペット類似分析部をさらに備え、記憶部にスニペット関係情報記憶部が含まれる点で、第1の実施の形態と異なる。
-Second embodiment-
A second embodiment of the electronic control device will be described with reference to FIGS. 23 to 29. In the following description, the same components as in the first embodiment are given the same reference numerals, and differences will be mainly explained. Points not particularly described are the same as the first embodiment. The present embodiment differs from the first embodiment mainly in that a snippet similarity analysis section is further provided, and the storage section includes a snippet related information storage section.

図23は、第2の実施の形態における電子制御装置1Aの機能構成図である。第1の実施の形態との相違点は、スニペット類似分析部14を有する点、および記憶部5にスニペット関係情報記憶部53を有する点である。スニペット類似分析部14はスニペット同士の類似性を類似スコアとして算出する。スニペット関係情報記憶部53にはスニペット類似分析部14が算出した結果が格納される。 FIG. 23 is a functional configuration diagram of the electronic control device 1A in the second embodiment. The difference from the first embodiment is that the snippet similarity analysis section 14 is provided, and the storage section 5 includes a snippet related information storage section 53. The snippet similarity analysis unit 14 calculates the similarity between snippets as a similarity score. The snippet related information storage unit 53 stores the results calculated by the snippet similarity analysis unit 14.

図24は、スニペット関係情報記憶部53の概念図である。スニペット関係情報記憶部53にはスニペットIDのペアと、そのペアの類似スコアとの組合せが格納される。スニペット関係情報記憶部53は、スニペット類似分析部14により情報が書き込まれる。 FIG. 24 is a conceptual diagram of the snippet related information storage unit 53. The snippet related information storage unit 53 stores combinations of pairs of snippet IDs and similarity scores of the pairs. Information is written into the snippet related information storage section 53 by the snippet similarity analysis section 14.

図25は、電子制御装置1Aによるテストスクリプト作成処理の概要を示す図である。第1の実施の形態との相違点は、図示右側にスニペット類似分析部14およびスニペット関係情報記憶部53が追加されている点である。スニペット関係情報記憶部53に格納される情報はレコメンド抽出部16において利用される。 FIG. 25 is a diagram showing an overview of the test script creation process by the electronic control device 1A. The difference from the first embodiment is that a snippet similarity analysis section 14 and a snippet related information storage section 53 are added on the right side of the figure. The information stored in the snippet related information storage section 53 is used by the recommendation extraction section 16.

(スニペット類似分析部)
図26は、スニペット類似分析部14の処理を示すフローチャートである。ステップS141ではスニペット類似分析部14は、異なるテストスクリプトからスニペットを1個ずつ選択する。続くステップS142ではスニペット類似分析部14は、ステップS141において選択した2つのスニペット間の類似スコアを算出する。この類似スコアの算出には、たとえばコードクローン解析技術を用いることができる。続くステップS143ではスニペット類似分析部14は、他に未確認のスニペットの組合せが存在するか否かを判断する。スニペット類似分析部14は未確認のスニペットの組合せが存在すると判断する場合はステップS141に戻り、未確認のスニペットの組合せが存在しないと判断する場合は図26に示す処理を終了する。
(Snippet Similarity Analysis Department)
FIG. 26 is a flowchart showing the processing of the snippet similarity analysis unit 14. In step S141, the snippet similarity analysis unit 14 selects snippets one by one from different test scripts. In the following step S142, the snippet similarity analysis unit 14 calculates a similarity score between the two snippets selected in step S141. For example, code clone analysis technology can be used to calculate this similarity score. In the following step S143, the snippet similarity analysis unit 14 determines whether there are any other unconfirmed combinations of snippets. If the snippet similarity analysis unit 14 determines that an unconfirmed snippet combination exists, the process returns to step S141, and if it determines that an unconfirmed snippet combination does not exist, it ends the process shown in FIG. 26.

すなわちスニペット類似分析部14は、分割部12が分割したスニペットのおおよそ全ての組合せについて類似スコアを算出する。例外としてスニペット類似分析部14は、同一のテストスクリプトに存在するスニペット同士の類似スコアは算出しない。ただしここでは不要な計算を抑制することを目的として、同一のテストスクリプトに存在するスニペット同士の類似スコアを計算しないだけであり、同一のテストスクリプトに存在するスニペット同士の類似スコアを計算してもよい。 That is, the snippet similarity analysis unit 14 calculates similarity scores for approximately all combinations of snippets divided by the division unit 12. As an exception, the snippet similarity analysis unit 14 does not calculate similarity scores between snippets that exist in the same test script. However, in order to suppress unnecessary calculations, we do not calculate similarity scores between snippets that exist in the same test script, and even if we calculate similarity scores between snippets that exist in the same test script. good.

(レコメンド抽出部)
図27は、第2の実施の形態におけるレコメンド抽出部16の処理を示すフローチャートであり、第1の実施の形態における図14に相当する。第1の実施の形態との違いは、ステップS163-4がステップS163A-4に置き換わっている点であり、その他のステップの処理は第1の実施の形態と同様である。ステップS163A-4では、スニペット類似分析部14が算出する類似スコアを用いて参考スクリプトのペアとベーススクリプトの類似度を計算する。本ステップの処理を図28を参照して詳述する。
(Recommendation extraction part)
FIG. 27 is a flowchart showing the processing of the recommendation extraction unit 16 in the second embodiment, and corresponds to FIG. 14 in the first embodiment. The difference from the first embodiment is that step S163-4 is replaced with step S163A-4, and the processing of other steps is the same as in the first embodiment. In step S163A-4, the similarity score between the reference script pair and the base script is calculated using the similarity score calculated by the snippet similarity analysis unit 14. The processing of this step will be described in detail with reference to FIG.

図28は、図27におけるステップS163A-4の詳細を示すフローチャートである。まずステップS163A-4-1ではレコメンド抽出部16は、2つのテストスクリプト内の各スニペットに含まれるスニペット属性の列から類似度を計算する。この計算にはたとえばレーベンシュタイン等のアルゴリズムが利用できる。続くステップS163A-4-2ではレコメンド抽出部16は、参考スクリプトとベーススクリプトにおいて、共通する属性を持つスニペットを抽出する。 FIG. 28 is a flowchart showing details of step S163A-4 in FIG. 27. First, in step S163A-4-1, the recommendation extraction unit 16 calculates the degree of similarity from the string of snippet attributes included in each snippet in the two test scripts. For example, Levenshtein's algorithm can be used for this calculation. In the following step S163A-4-2, the recommendation extraction unit 16 extracts snippets that have common attributes in the reference script and the base script.

続くステップS163A-4-3ではレコメンド抽出部16は、共通する属性を持つスニペット間の類似スコアを取得する。続くステップS163A-4-4ではレコメンド抽出部16は、類似スコアが高い場合はスニペット属性の列から計算した類似度を上げる。以上が図28に示す処理の説明である。 In the following step S163A-4-3, the recommendation extraction unit 16 obtains similarity scores between snippets having common attributes. In the following step S163A-4-4, the recommendation extraction unit 16 increases the degree of similarity calculated from the snippet attribute string if the similarity score is high. The above is the explanation of the process shown in FIG. 28.

図29は、本実施の形態の効果の一例を説明する図である。図29に示す例では、属性値Bを含むベーススクリプトに対して実装が異なる2つの参考スクリプトのペアが存在する。第1参考スクリプトは属性値B’を含み、第2参考スクリプトは属性値B’’を含む。属性値B、B’、B’’のスクリプトを比較するとBに対するB’の類似度の方が、Bに対するB’’の類似度の方が高い。本実施の形態では図28に示す処理により、ベーススクリプトと類似する参考スクリプトは類似度が上がるので、第2参考スクリプトが選択される。そのため本変形例では、レコメンド候補はベーススクリプトとの相違を小さくできる。 FIG. 29 is a diagram illustrating an example of the effects of this embodiment. In the example shown in FIG. 29, there are two pairs of reference scripts with different implementations for the base script including attribute value B. The first reference script includes an attribute value B', and the second reference script includes an attribute value B''. When comparing the scripts of attribute values B, B', and B'', the degree of similarity of B' to B is higher than that of B'' to B. In this embodiment, through the process shown in FIG. 28, the degree of similarity of reference scripts similar to the base script increases, so the second reference script is selected. Therefore, in this modification, the difference between the recommendation candidate and the base script can be reduced.

上述した第2の実施の形態によれば、次の作用効果が得られる。
(11)電子制御装置1Aは、複数のパート間のコードの類似の度合いを示す類似スコアを算出するスニペット類似分析部14を備える。レコメンド抽出部16は、類似スコアに基づき参考スクリプトを選択する。そのため電子制御装置1Aは、新たに作成するテストスクリプトのベーススクリプトとの相違を小さくできる。
According to the second embodiment described above, the following effects can be obtained.
(11) The electronic control device 1A includes a snippet similarity analysis unit 14 that calculates a similarity score indicating the degree of code similarity between multiple parts. The recommendation extraction unit 16 selects a reference script based on the similarity score. Therefore, the electronic control device 1A can reduce the difference between the newly created test script and the base script.

上述した各実施の形態および変形例において、電子制御装置が有する構成および機能は、複数のハードウエア装置、すなわちシステムによって実現されてもよい。たとえば2台以上のコンピュータにより図2に示した機能が実現されてもよい。 In each of the embodiments and modifications described above, the configuration and functions of the electronic control device may be realized by a plurality of hardware devices, that is, systems. For example, the functions shown in FIG. 2 may be realized by two or more computers.

上述した各実施の形態および変形例において、機能ブロックの構成は一例に過ぎない。別々の機能ブロックとして示したいくつかの機能構成を一体に構成してもよいし、1つの機能ブロック図で表した構成を2以上の機能に分割してもよい。また各機能ブロックが有する機能の一部を他の機能ブロックが備える構成としてもよい。 In each of the embodiments and modifications described above, the configuration of the functional blocks is merely an example. Several functional configurations shown as separate functional blocks may be integrated, or a configuration shown in one functional block diagram may be divided into two or more functions. Further, a configuration may be adopted in which some of the functions of each functional block are provided in other functional blocks.

上述した各実施の形態および変形例において、電子制御装置1が実行するプログラムはROM2に格納されるとしたが、プログラムは記憶部5に格納されていてもよい。また、電子制御装置1が不図示の入出力インタフェースを備え、必要なときに入出力インタフェースと電子制御装置1が利用可能な媒体を介して、他の装置からプログラムが読み込まれてもよい。ここで媒体とは、例えば入出力インタフェースに着脱可能な記憶媒体、または通信媒体、すなわち有線、無線、光などのネットワーク、または当該ネットワークを伝搬する搬送波やディジタル信号、を指す。また、プログラムにより実現される機能の一部または全部がハードウエア回路やFPGAにより実現されてもよい。 In each of the embodiments and modifications described above, the program executed by the electronic control device 1 is stored in the ROM 2, but the program may be stored in the storage unit 5. Further, the electronic control device 1 may be provided with an input/output interface (not shown), and a program may be read from another device when necessary via the input/output interface and a medium that can be used by the electronic control device 1. Here, the medium refers to, for example, a storage medium that is removably attached to an input/output interface, or a communication medium, that is, a wired, wireless, or optical network, or a carrier wave or digital signal that propagates through the network. Further, part or all of the functions realized by the program may be realized by a hardware circuit or an FPGA.

上述した各実施の形態および変形例は、それぞれ組み合わせてもよい。上記では、種々の実施の形態および変形例を説明したが、本発明はこれらの内容に限定されるものではない。本発明の技術的思想の範囲内で考えられるその他の態様も本発明の範囲内に含まれる。 Each of the embodiments and modifications described above may be combined. Although various embodiments and modifications have been described above, the present invention is not limited to these. Other embodiments considered within the technical spirit of the present invention are also included within the scope of the present invention.

1、1A…電子制御装置
5…記憶部
11…入力部
12…分割部
13…キーワード抽出部
14…スニペット類似分析部
15…テストスクリプト整理部
16…レコメンド抽出部
17…レコメンド合成部
18…レコメンド出力部
1, 1A...Electronic control unit 5...Storage unit 11...Input unit 12...Dividing unit 13...Keyword extraction unit 14...Snippet similarity analysis unit 15...Test script organizing unit 16...Recommendation extraction unit 17...Recommendation synthesis unit 18...Recommendation output Department

Claims (13)

テストを実行するためのプログラムであるテストスクリプトを複数取得する入力部と、
前記テストスクリプトを複数のパートに分割する分割部と、
前記複数のパートに対応するキーワードを抽出して属性として関連付けるキーワード抽出部と、
前記テストスクリプト、前記複数のパート、および前記属性を記憶する記憶部と、
予め定義された2以上の属性カテゴリに基づいて作成された整理表の各セルに対して前記テストスクリプトを割り当てるテストスクリプト整理部と、
前記整理表において前記テストスクリプトが割り当てられていない少なくとも1つのセルをターゲットエリアとし、前記ターゲットエリアとはいずれか第1の属性カテゴリの属性値が異なるベーススクリプトを選択し、前記ターゲットエリアおよび前記ベーススクリプトと比較して前記第1の属性カテゴリとは異なる第2の属性カテゴリの属性値が異なる1組の参考スクリプトを選択するレコメンド抽出部と、
前記レコメンド抽出部が選択する前記ベーススクリプトおよび前記1組の参考スクリプトに基づき前記ターゲットエリアに対応する新たなテストスクリプトを作成するレコメンド合成部と、を備えるテストスクリプト生成システム。
an input section that obtains multiple test scripts that are programs for executing tests;
a dividing unit that divides the test script into multiple parts;
a keyword extraction unit that extracts keywords corresponding to the plurality of parts and associates them as attributes;
a storage unit that stores the test script, the plurality of parts, and the attributes;
a test script organizer that assigns the test script to each cell of a organizer table created based on two or more predefined attribute categories;
Select at least one cell to which the test script is not assigned in the sorting table as a target area, select a base script that has a different attribute value in the first attribute category from the target area, and select the target area and the base script. a recommendation extraction unit that selects a set of reference scripts that have different attribute values in a second attribute category that is different from the first attribute category when compared with the script;
A test script generation system comprising: a recommendation synthesis unit that creates a new test script corresponding to the target area based on the base script selected by the recommendation extraction unit and the set of reference scripts.
請求項1に記載のテストスクリプト生成システムにおいて、
前記レコメンド抽出部は、前記ベーススクリプトと前記参考スクリプトとが類似する場合に前記1組の参考スクリプトの相違を相違情報として抽出し、
前記レコメンド合成部は、前記ベーススクリプトおよび前記相違情報に基づき前記ターゲットエリアに対応する前記新たなテストスクリプトを作成するテストスクリプト生成システム。
The test script generation system according to claim 1,
The recommendation extraction unit extracts a difference between the set of reference scripts as difference information when the base script and the reference script are similar;
The recommendation synthesis unit is a test script generation system that creates the new test script corresponding to the target area based on the base script and the difference information.
請求項2に記載のテストスクリプト生成システムにおいて、
前記複数のパート間のコードの類似の度合いを示す類似スコアを算出するスニペット類似分析部をさらに備え、
前記レコメンド抽出部は、前記類似スコアに基づき前記参考スクリプトを選択するテストスクリプト生成システム。
The test script generation system according to claim 2,
further comprising a snippet similarity analysis unit that calculates a similarity score indicating the degree of code similarity between the plurality of parts,
The recommendation extraction unit is a test script generation system that selects the reference script based on the similarity score.
請求項1に記載のテストスクリプト生成システムにおいて、
前記分割部は、前記テストスクリプトにコメント文として記載された所定の文字列に基づいて前記テストスクリプトを前記複数のパートに分割するテストスクリプト生成システム。
The test script generation system according to claim 1,
The dividing unit is a test script generation system that divides the test script into the plurality of parts based on a predetermined character string written as a comment sentence in the test script.
請求項1に記載のテストスクリプト生成システムにおいて、
前記キーワード抽出部は、前記テストスクリプトに含まれる所定の文字列に基づいてキーワードを抽出するテストスクリプト生成システム。
The test script generation system according to claim 1,
The keyword extraction unit is a test script generation system that extracts keywords based on a predetermined character string included in the test script.
請求項1に記載のテストスクリプト生成システムにおいて、
前記レコメンド抽出部は、所定の属性値に対応する前記セルを前記ターゲットエリアとするテストスクリプト生成システム。
The test script generation system according to claim 1,
The recommendation extraction unit is a test script generation system in which the target area is the cell corresponding to a predetermined attribute value.
請求項1に記載のテストスクリプト生成システムにおいて、
前記レコメンド抽出部は、所定の属性値を有するテストスクリプトを前記ベーススクリプトに選択するテストスクリプト生成システム。
The test script generation system according to claim 1,
The recommendation extraction unit is a test script generation system that selects a test script having a predetermined attribute value as the base script.
請求項1に記載のテストスクリプト生成システムにおいて、
前記レコメンド抽出部は、所定の属性値を有するテストスクリプトを前記参考スクリプトに選択するテストスクリプト生成システム。
The test script generation system according to claim 1,
The recommendation extraction unit is a test script generation system that selects a test script having a predetermined attribute value as the reference script.
請求項1に記載のテストスクリプト生成システムにおいて、
前記分割部は、機械学習およびコードクローン解析技術の少なくとも一方を用いて前記テストスクリプトを前記複数のパートに分割するテストスクリプト生成システム。
The test script generation system according to claim 1,
The dividing unit is a test script generation system that divides the test script into the plurality of parts using at least one of machine learning and code clone analysis technology.
請求項1に記載のテストスクリプト生成システムにおいて、
前記キーワード抽出部は、機械学習およびコードクローン解析技術の少なくとも一方を用いてキーワード抽出を行うテストスクリプト生成システム。
The test script generation system according to claim 1,
The keyword extraction unit is a test script generation system that extracts keywords using at least one of machine learning and code clone analysis technology.
請求項1に記載のテストスクリプト生成システムにおいて、
前記レコメンド抽出部は、前記整理表の全てのセルを前記ターゲットエリアとするテストスクリプト生成システム。
The test script generation system according to claim 1,
The recommendation extraction unit is a test script generation system that uses all cells of the organizing table as the target area.
テストを実行するためのプログラムであるテストスクリプトを複数取得する入力部を有する電子制御装置が実行するテストスクリプト生成方法であって、
前記テストスクリプトを複数のパートに分割することと、
前記複数のパートに対応するキーワードを抽出して属性として関連付けることと、
予め定義された2以上の属性カテゴリに基づいて作成された整理表の各セルに対して前記テストスクリプトを割り当てることと、
前記整理表において前記テストスクリプトが割り当てられていない少なくとも1つのセルをターゲットエリアとし、前記ターゲットエリアとはいずれか第1の属性カテゴリの属性値が異なるベーススクリプトを選択し、前記ターゲットエリアおよび前記ベーススクリプトと比較して前記第1の属性カテゴリとは異なる第2の属性カテゴリの属性値が異なる1組の参考スクリプトの選択を行うことと、
前記選択により選択される前記ベーススクリプトおよび前記1組の参考スクリプトに基づき前記ターゲットエリアに対応する新たなテストスクリプトを作成することとを含む、テストスクリプト生成方法。
A test script generation method executed by an electronic control device having an input unit for acquiring a plurality of test scripts that are programs for executing tests, the method comprising:
dividing the test script into multiple parts;
Extracting keywords corresponding to the plurality of parts and associating them as attributes;
Assigning the test script to each cell of a organizing table created based on two or more predefined attribute categories;
Select at least one cell to which the test script is not assigned in the sorting table as a target area, select a base script that has a different attribute value in the first attribute category from the target area, and select the target area and the base script. Selecting a set of reference scripts having different attribute values in a second attribute category different from the first attribute category compared to the script;
A test script generation method comprising: creating a new test script corresponding to the target area based on the base script selected by the selection and the set of reference scripts.
テストを実行するためのプログラムであるテストスクリプトを複数取得する入力部と、
前記テストスクリプトを複数のパートに分割する分割部と、
前記複数のパートに対応するキーワードを抽出して属性として関連付けるキーワード抽出部と、
前記テストスクリプト、前記複数のパート、および前記属性を記憶する記憶部と、
予め定義された2以上の属性カテゴリに基づいて作成された整理表の各セルに対して前記テストスクリプトを割り当てるテストスクリプト整理部と、
前記整理表において前記テストスクリプトが割り当てられていない少なくとも1つのセルをターゲットエリアとし、前記ターゲットエリアとはいずれか第1の属性カテゴリの属性値が異なるベーススクリプトを選択し、前記ターゲットエリアおよび前記ベーススクリプトと比較して前記第1の属性カテゴリとは異なる第2の属性カテゴリの属性値が異なる1組の参考スクリプトを選択するレコメンド抽出部と、
前記レコメンド抽出部が選択する前記ベーススクリプトおよび前記1組の参考スクリプトに基づき前記ターゲットエリアに対応する新たなテストスクリプトを作成するレコメンド合成部と、を備える電子制御装置。
an input section that obtains multiple test scripts that are programs for executing tests;
a dividing unit that divides the test script into multiple parts;
a keyword extraction unit that extracts keywords corresponding to the plurality of parts and associates them as attributes;
a storage unit that stores the test script, the plurality of parts, and the attributes;
a test script organizer that assigns the test script to each cell of a organizer table created based on two or more predefined attribute categories;
Select at least one cell to which the test script is not assigned in the sorting table as a target area, select a base script that has a different attribute value in the first attribute category from the target area, and select the target area and the base script. a recommendation extraction unit that selects a set of reference scripts that have different attribute values in a second attribute category that is different from the first attribute category when compared with the script;
An electronic control device comprising: a recommendation synthesis section that creates a new test script corresponding to the target area based on the base script selected by the recommendation extraction section and the set of reference scripts.
JP2020095023A 2020-05-29 2020-05-29 Test script generation system, test script generation method, electronic control device Active JP7391766B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2020095023A JP7391766B2 (en) 2020-05-29 2020-05-29 Test script generation system, test script generation method, electronic control device
DE112021001800.0T DE112021001800T5 (en) 2020-05-29 2021-02-01 CHECKSCRIPT GENERATION SYSTEM, CHECKSCRIPT GENERATION METHOD AND ELECTRONIC CONTROL DEVICE
PCT/JP2021/003608 WO2021240886A1 (en) 2020-05-29 2021-02-01 Test script generation system, test script generation method, and electronic control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020095023A JP7391766B2 (en) 2020-05-29 2020-05-29 Test script generation system, test script generation method, electronic control device

Publications (2)

Publication Number Publication Date
JP2021189798A JP2021189798A (en) 2021-12-13
JP7391766B2 true JP7391766B2 (en) 2023-12-05

Family

ID=78744190

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020095023A Active JP7391766B2 (en) 2020-05-29 2020-05-29 Test script generation system, test script generation method, electronic control device

Country Status (3)

Country Link
JP (1) JP7391766B2 (en)
DE (1) DE112021001800T5 (en)
WO (1) WO2021240886A1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002342117A (en) 2001-05-17 2002-11-29 Fujitsu Ltd Device, method and program for supporting test specification generation and recording medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3601949B2 (en) 1996-09-17 2004-12-15 株式会社東芝 Program synthesizing apparatus and program synthesizing method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002342117A (en) 2001-05-17 2002-11-29 Fujitsu Ltd Device, method and program for supporting test specification generation and recording medium

Also Published As

Publication number Publication date
DE112021001800T5 (en) 2023-02-16
JP2021189798A (en) 2021-12-13
WO2021240886A1 (en) 2021-12-02

Similar Documents

Publication Publication Date Title
US8176050B2 (en) Method and apparatus of supporting creation of classification rules
JP2017004123A (en) Determination apparatus, determination method, and determination program
US20220101643A1 (en) Information processing device, discerning method, and discerning program
JP6977724B2 (en) Signature creation device, signature creation method, signature creation program, and software judgment system
US10438097B2 (en) Recognition device, recognition method, and computer program product
JP2016009344A (en) Test case generation program, test case generation method, and test case generation device
JP2010061176A (en) Text mining device, text mining method, and text mining program
JP7391766B2 (en) Test script generation system, test script generation method, electronic control device
US11262994B2 (en) Method and device for identifying type of variable in binary
CN106776348B (en) Test case management method and device
JP7256935B2 (en) Dictionary creation device and dictionary creation method
CN111488400B (en) Data classification method, device and computer readable storage medium
JP5439235B2 (en) Document classification method, document classification device, and program
CN110990834A (en) Static detection method, system and medium for android malicious software
WO2018096686A1 (en) Verification program, verification device, verification method, index generation program, index generation device, and index generation method
CN110837494B (en) Method and device for identifying unspecified diagnosis coding errors of medical record home page
JP6677624B2 (en) Analysis apparatus, analysis method, and analysis program
CN110221971B (en) Search engine testing method and device, electronic equipment and storage medium
JP2022029885A (en) Confirmation item generation device, confirmation item generation method, and program
JP6859831B2 (en) Generation program, generation device and generation method
JP2006268545A (en) File-coupling device, file-coupling method, and program
JP2018049492A (en) Analysis device, analysis program and analysis method
US10489428B2 (en) Existing system processing specification extractor
JP6305356B2 (en) Specification extraction device, specification extraction method and program
KR20220097844A (en) Apparatus for processing unstructured document capable of extracting units and unit value and method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230127

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231122

R150 Certificate of patent or registration of utility model

Ref document number: 7391766

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150