JP6891779B2 - Test script modifiers and programs - Google Patents

Test script modifiers and programs Download PDF

Info

Publication number
JP6891779B2
JP6891779B2 JP2017228934A JP2017228934A JP6891779B2 JP 6891779 B2 JP6891779 B2 JP 6891779B2 JP 2017228934 A JP2017228934 A JP 2017228934A JP 2017228934 A JP2017228934 A JP 2017228934A JP 6891779 B2 JP6891779 B2 JP 6891779B2
Authority
JP
Japan
Prior art keywords
screen
screen element
instruction
test script
similarity
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
JP2017228934A
Other languages
Japanese (ja)
Other versions
JP2019101538A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2017228934A priority Critical patent/JP6891779B2/en
Publication of JP2019101538A publication Critical patent/JP2019101538A/en
Application granted granted Critical
Publication of JP6891779B2 publication Critical patent/JP6891779B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Description

本発明は、テストスクリプト修正装置及びプログラムに関する。 The present invention relates to a test script modification device and a program.

画面の操作を伴うテストを自動化するため手法として、キャプチャ&リプレイやプログラミングを用いた手法が広く用いられている。 As a method for automating tests involving screen operations, methods using capture & replay and programming are widely used.

キャプチャ&リプレイでは、ユーザが画面に対して操作を行うと、ユーザが行った操作がテストスクリプトとして記録される。次回以降のテストでは、当該テストスクリプトを実行することで、自動的にテストを行うことができる。キャプチャ&リプレイの利点として、プログラミングスキルが無くても、画面操作で簡単にテストスクリプトを実装することができる点が挙げられる。欠点としては、テストスクリプトが操作の羅列として出力されるため、テストスクリプトの可読性が低い点や、テストスクリプトをモジュール化しにくい点が挙げられる。キャプチャ&リプレイを行うためによく用いられるツールとしては、Selenium IDEや、Selenium Builder等が有る。 In capture & replay, when the user performs an operation on the screen, the operation performed by the user is recorded as a test script. In the next and subsequent tests, the test can be performed automatically by executing the test script. The advantage of capture & replay is that you can easily implement a test script by operating the screen without programming skills. The disadvantages are that the test script is output as a list of operations, so the readability of the test script is low and it is difficult to modularize the test script. Selenium IDE, Selenium Builder, etc. are commonly used tools for capture and replay.

一方、プログラミングによる手法では、RubyやJava(登録商標)といったプログラミング言語を用いてテストスクリプトの実装が行われる。画面を操作するためのAPIを用いて、テストで行いたい操作を示すプログラムがテストスクリプトとして記述され、当該テストスクリプトを実行することで自動的にテストが行われる。プログラミングによる手法の利点として、柔軟性が高く、実装者のスキルによっては高い保守性が期待できる点が挙げられる。欠点としては、利用するためにプログラミング言語の理解が必要であり、テストスクリプトの質が実装者のスキルに依存してしまう点が挙げられる。Web画面を操作するためのAPIとして、Selenium WebDriverが有名である。 On the other hand, in the programming method, the test script is implemented using a programming language such as Ruby or Java (registered trademark). A program indicating the operation to be performed in the test is described as a test script using the API for operating the screen, and the test is automatically performed by executing the test script. The advantages of the programming method are that it is highly flexible and can be expected to be highly maintainable depending on the skill of the implementer. The disadvantage is that you need to understand the programming language to use it, and the quality of the test script depends on the skill of the implementer. Selenium Web Driver is famous as an API for operating Web screens.

Maurizio Leotta, Andrea Stocco, Filippo Ricca, Paolo Tonella, Using Multi-Locators to Increase the Robustness of Web Test Cases Internaional Conference on Software Testing, Verification and Validation(ICST) 2015Maurizio Leotta, Andrea Stocco, Filippo Ricca, Paolo Tonella, Using Multi-Locators to Increase the Robustness of Web Test Cases Internaional Conference on Software Testing, Verification and Validation (ICST) 2015 Shauvik Roy Choudhary, Dan Zhao, Husayn Versee, Alessandro Orso、Water: Web Application TEst Repair、 Proceedings of the First International Workshop on End-to-End Test Script Engineering(ESTE) 2011Shauvik Roy Choudhary, Dan Zhao, Husayn Versee, Alessandro Orso, Water: Web Application TEst Repair, Proceedings of the First International Workshop on End-to-End Test Script Engineering (ESTE) 2011 Why do Record/Replay Tests of Web Applications Break?, Mouna Hammoudi, Gregg Rothermel,Paolo Tonella, Software Testing, Verification and Validation (ICST) 2016Why do Record / Replay Tests of Web Applications Break ?, Mouna Hammoudi, Gregg Rothermel, Paolo Tonella, Software Testing, Verification and Validation (ICST) 2016

テストスクリプトは、回帰テストを効率化するために用いられる。回帰テストは、ソフトウェアに修正を施した際に、既存機能に悪影響が出ていないかを確認するためのテストである。回帰テスト実行を自動化することで、手動でテストを実行した際と比較して、工数の削減が期待できる。 Test scripts are used to streamline regression testing. Regression testing is a test to check whether existing functions are adversely affected when software is modified. By automating the regression test execution, man-hours can be expected to be reduced compared to when the test is executed manually.

しかし、ソフトウェアに修正を施した際に、当該修正に合わせてテストスクリプトにも修正が必要になる場合がある。テストスクリプトの修正作業に工数がかかると、期待した工数削減効果が得られない恐れがある。 However, when the software is modified, it may be necessary to modify the test script in accordance with the modification. If it takes a lot of man-hours to modify the test script, the expected man-hour reduction effect may not be obtained.

上記で説明したキャプチャ&リプレイやプログラミングを用いた手法のいずれを用いても、テストスクリプトの保守の問題は避けることができない。プログラミングによる手法を用いた場合、適切にモジュール化を行うことで、修正が必要になった場合の修正箇所を減らすことは可能である。 With any of the capture and replay and programming techniques described above, test script maintenance issues are unavoidable. When the programming method is used, it is possible to reduce the number of corrections when corrections are necessary by appropriately modularizing them.

しかし、適切にモジュール化しても保守作業は必ず必要になる上、テスト担当者が必ずしもそのようなスキルを持っているとは限らない。したがって、誰でも簡単にテストスクリプトを保守できることが開発現場において強く求められている。 However, even with proper modularization, maintenance work is always required, and testers do not always have such skills. Therefore, there is a strong demand in the development field that anyone can easily maintain the test script.

ところで、テストスクリプト修正全体の70%以上をロケータの修正が占めていることが知られている(非特許文献3)。ロケータは、テストスクリプトにおいて操作対象の画面要素(ボタン、フォームなどの画面中の一要素とする)を一意に特定するための識別子であり、id、name、XPath等を用いることができる。アプリケーションの修正により、画面要素のid、name、XPath等が変更された場合は、テストスクリプト中の該当ロケータを修正する必要がある。人がロケータを直接編集する場合、以下のような問題点がある。
・ロケータを見ても、どの画面要素を操作しているかが分からない場合があり、ドキュメントやテスト手順書を参照する必要がある。
・ロケータをスクリプト中に記述するために、HTMLを参照したり、特定のツールを使う必要がある。
・ロケータを記述する際に、ミスをする恐れがある。
By the way, it is known that locator modifications account for 70% or more of all test script modifications (Non-Patent Document 3). The locator is an identifier for uniquely identifying the screen element to be operated (one element in the screen such as a button or a form) in the test script, and id, name, XPath, or the like can be used. If the id, name, XPath, etc. of the screen element are changed by modifying the application, it is necessary to modify the corresponding locator in the test script. When a person edits a locator directly, there are the following problems.
-Even if you look at the locator, you may not know which screen element you are operating, so you need to refer to the document or test procedure manual.
-In order to describe the locator in the script, it is necessary to refer to HTML or use a specific tool.
-There is a risk of making mistakes when writing a locator.

このロケータ修正の負担を軽減するため、非特許文献1、2のようにロケータの自動修正に関する研究が行われている。 In order to reduce the burden of locator modification, research on automatic locator modification is being conducted as in Non-Patent Documents 1 and 2.

しかし、ロケータ自動修正には次のような課題がある。すなわち、ロケータ以外の誤りが出現した場合、それ以降テストスクリプトが実行できず、それ以降に出現するロケータの誤りも修正できない。また、自動修正では修正の正確性が低い可能性が有るため、結局人間によるレビューが必要であり、間違っていた場合には手作業での修正が必要とされる。 However, automatic locator correction has the following problems. That is, if an error other than the locator appears, the test script cannot be executed after that, and the error of the locator that appears after that cannot be corrected. In addition, since the accuracy of correction may be low in automatic correction, human review is required after all, and if it is incorrect, manual correction is required.

本発明は、上記の点に鑑みてなされたものであって、テストスクリプトにおける画面要素の識別情報の修正について正確性と効率性とを向上させることを目的とする。 The present invention has been made in view of the above points, and an object of the present invention is to improve the accuracy and efficiency of correction of identification information of screen elements in a test script.

そこで上記課題を解決するため、テストスクリプト修正装置は、第1の画面の画面要素の識別情報が操作対象を示す情報として含まれるテストスクリプトの命令ごとに、操作対象の画面要素について、画面要素間の類似度の算出に利用される複数の指標の値を前記第1の画面に関して取得して、取得した各値を記憶部に記憶する取得部と、前記テストスクリプトに含まれる命令のうち、第2の画面に関して存在しない識別情報に係る第1の画面要素が操作対象である第1の命令について、前記第1の画面要素に関して前記記憶部に記憶されている各値と、前記第2の画面の各画面要素に関して取得される前記複数の指標の値とに基づいて、前記第1の画面要素と、前記第2の画面の各画面要素との類似度を算出し、算出された類似度に基づいて、前記第2の画面において前記第1の命令の操作対象である画面要素の候補を探索する探索部と、探索された候補に係る画面要素を、前記類似度の順番がユーザに分かるように前記第2の画面において強調表示する強調部と、強調表示された画面要素の中からユーザによって選択された画面要素の識別情報によって、前記第1の命令に対する識別情報を修正する修正部と、
を有する。
Therefore, in order to solve the above problem, the test script correction device performs the operation target screen element between the screen elements for each test script instruction in which the identification information of the screen element of the first screen is included as the information indicating the operation target. Of the acquisition unit that acquires the values of a plurality of indexes used for calculating the similarity of the above first screen and stores each acquired value in the storage unit, and the instruction included in the test script, the first Regarding the first command in which the first screen element related to the identification information that does not exist with respect to the second screen is the operation target, each value stored in the storage unit with respect to the first screen element and the second screen. based on the value of the plurality of indices are obtained for each screen element, the said first screen element, calculates the similarity between each screen element of the second screen, on the calculated degree of similarity Based on this, on the second screen, the search unit that searches for candidates for the screen element that is the operation target of the first command and the screen elements related to the searched candidates are displayed so that the user can know the order of the similarity. and enhancement unit for highlighting in the second screen, by the identification information of the screen element that is selected by the user from the highlighted screen element, and a correcting section for correcting the identification information for the first instruction ,
Have.

テストスクリプトにおける画面要素の識別情報の修正について正確性と効率性とを向上させることができる。 It is possible to improve the accuracy and efficiency of modifying the identification information of screen elements in the test script.

本発明の実施の形態におけるシステム構成例を説明するための図である。It is a figure for demonstrating the system configuration example in embodiment of this invention. 本発明の実施の形態におけるテスト実行装置10のハードウェア構成例を示す図である。It is a figure which shows the hardware configuration example of the test execution apparatus 10 in embodiment of this invention. 本発明の実施の形態におけるテスト実行装置10の機能構成例を示す図である。It is a figure which shows the functional structure example of the test execution apparatus 10 in embodiment of this invention. テスト実行装置10が実行する処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the processing procedure executed by the test execution apparatus 10. 旧画面の画面要素情報の取得処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of a process procedure of acquisition process of screen element information of an old screen. テストスクリプトの一例を説明するための図である。It is a figure for demonstrating an example of a test script. 画面要素情報記憶部122の構成例を示す図である。It is a figure which shows the structural example of the screen element information storage unit 122. 新アプリケーションのテスト処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the processing procedure of the test process of a new application.

以下、図面に基づいて本発明の実施の形態を説明する。図1は、本発明の実施の形態におけるシステム構成例を説明するための図である。図1において、サーバ装置20及びテスト実行装置10は、例えば、LAN(Local Area Network)又はインターネット等のネットワークを介して接続される。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a diagram for explaining a system configuration example according to an embodiment of the present invention. In FIG. 1, the server device 20 and the test execution device 10 are connected via a network such as a LAN (Local Area Network) or the Internet.

サーバ装置20は、画面を生成するアプリケーションを有するコンピュータである。サーバ装置20には、当該アプリケーションの旧リビジョン及新リビジョンが実装されている。例えば、Webサーバが、サーバ装置20として利用されてもよい。なお、リビジョン間において、画面の構成(すなわち、画面に含まれる画面要素の構成)は、必ずしも一致しない。また、画面に含まれる画面要素が定義されたデータ(例えば、HTML(HyperText Markup Language)又はXML(eXtensible Markup Language)等。以下、「画面定義データ」という)内において、リビジョンを跨いで同じ画面要素(対応する画面要素)に対して付与されているロケータの同一性は保証されていない。同じ画面要素(対応する画面要素)とは、例えば、機能及び用途(すなわち、意味)が同一であり、人から見たら同じであることが認識される画面要素の組をいう。 The server device 20 is a computer having an application that generates a screen. The old revision and the new revision of the application are implemented in the server device 20. For example, the Web server may be used as the server device 20. Note that the screen configurations (that is, the configurations of screen elements included in the screen) do not always match between revisions. Further, in the data in which the screen elements included in the screen are defined (for example, HTML (HyperText Markup Language) or XML (eXtensible Markup Language), hereinafter referred to as "screen definition data"), the same screen elements are used across revisions. The identity of the locators assigned to (corresponding screen elements) is not guaranteed. The same screen element (corresponding screen element) means, for example, a set of screen elements that have the same function and use (that is, meaning) and are recognized to be the same from the viewpoint of a person.

なお、画面要素とは、画面(Web画面等)を構成するボタン、入力フォーム、リンクといった要素をいう。一つの画面要素は、例えば、1つのHTMLタグ又はXMLタグで定義され、入れ子構造をとりうる。ロケータとは、画面定義データ内において、各画面要素に対して識別子として付与されている情報をいう。例えば、id、name、XPath等がロケータとして用いられる。 The screen element refers to an element such as a button, an input form, or a link that constitutes a screen (Web screen or the like). One screen element can be defined by, for example, one HTML tag or XML tag and can have a nested structure. The locator refers to the information given as an identifier to each screen element in the screen definition data. For example, id, name, XPath, etc. are used as locators.

テスト実行装置10は、サーバ装置20のアプリケーションについて、回帰テストを実行するコンピュータである。回帰テストは、旧リビジョンのアプリケーション(以下、「旧アプリケーション」という。)によって生成される画面に対して作成されたテストスクリプトを、新リビジョンのアプリケーション(以下、「新アプリケーション」という。)によって生成される画面に対して適用することで効率的に実行される。テストスクリプトとは、画面に対する操作手順が定義されたデータであり、操作命令ごとに、操作対象の画面要素のロケータ及び操作内容を示す情報等を含むデータである。なお、PC(Personal Computer)、スマートフォン、又はタブレット端末等がテスト実行装置10として利用されてもよい。 The test execution device 10 is a computer that executes a regression test for the application of the server device 20. In a regression test, a test script created for a screen generated by an application of an old revision (hereinafter referred to as "old application") is generated by an application of a new revision (hereinafter referred to as "new application"). It is executed efficiently by applying it to the screen. The test script is data in which an operation procedure for a screen is defined, and is data including information indicating a locator of a screen element to be operated and an operation content for each operation command. A PC (Personal Computer), a smartphone, a tablet terminal, or the like may be used as the test execution device 10.

図2は、本発明の実施の形態におけるテスト実行装置10のハードウェア構成例を示す図である。図2のテスト実行装置10は、それぞれバスBで相互に接続されているドライブ装置100、補助記憶装置102、メモリ装置103、CPU104、インタフェース装置105、表示装置106、及び入力装置107等を有する。 FIG. 2 is a diagram showing a hardware configuration example of the test execution device 10 according to the embodiment of the present invention. The test execution device 10 of FIG. 2 has a drive device 100, an auxiliary storage device 102, a memory device 103, a CPU 104, an interface device 105, a display device 106, an input device 107, and the like, which are connected to each other by a bus B, respectively.

テスト実行装置10での処理を実現するプログラムは、CD−ROM等の記録媒体101によって提供される。プログラムを記憶した記録媒体101がドライブ装置100にセットされると、プログラムが記録媒体101からドライブ装置100を介して補助記憶装置102にインストールされる。但し、プログラムのインストールは必ずしも記録媒体101より行う必要はなく、ネットワークを介して他のコンピュータよりダウンロードするようにしてもよい。補助記憶装置102は、インストールされたプログラムを格納すると共に、必要なファイルやデータ等を格納する。 The program that realizes the processing in the test execution device 10 is provided by a recording medium 101 such as a CD-ROM. When the recording medium 101 storing the program is set in the drive device 100, the program is installed in the auxiliary storage device 102 from the recording medium 101 via the drive device 100. However, the program does not necessarily have to be installed from the recording medium 101, and may be downloaded from another computer via the network. The auxiliary storage device 102 stores the installed program and also stores necessary files, data, and the like.

メモリ装置103は、プログラムの起動指示があった場合に、補助記憶装置102からプログラムを読み出して格納する。CPU104は、メモリ装置103に格納されたプログラムに従ってテスト実行装置10に係る機能を実現する。インタフェース装置105は、ネットワークに接続するためのインタフェースとして用いられる。表示装置106はプログラムによるGUI(Graphical User Interface)等を表示する。入力装置107はキーボード及びマウス等で構成され、様々な操作指示を入力させるために用いられる。 The memory device 103 reads and stores the program from the auxiliary storage device 102 when the program is instructed to start. The CPU 104 realizes the function related to the test execution device 10 according to the program stored in the memory device 103. The interface device 105 is used as an interface for connecting to a network. The display device 106 displays a programmatic GUI (Graphical User Interface) or the like. The input device 107 is composed of a keyboard, a mouse, and the like, and is used for inputting various operation instructions.

図3は、本発明の実施の形態におけるテスト実行装置10の機能構成例を示す図である。図3において、テスト実行装置10は、テストスクリプト取得部11、テスト実行部12、画面表示制御部13、要素情報取得部14、対象要素候補探索部15、ハイライト部16、選択部17、テストスクリプト修正部18及び重み計算部19等を有する。これら各部は、テスト実行装置10にインストールされた1以上のプログラムが、CPU104に実行させる処理により実現される。 FIG. 3 is a diagram showing a functional configuration example of the test execution device 10 according to the embodiment of the present invention. In FIG. 3, the test execution device 10 includes a test script acquisition unit 11, a test execution unit 12, a screen display control unit 13, an element information acquisition unit 14, a target element candidate search unit 15, a highlight unit 16, a selection unit 17, and a test. It has a script correction unit 18, a weight calculation unit 19, and the like. Each of these parts is realized by a process of causing the CPU 104 to execute one or more programs installed in the test execution device 10.

テスト実行装置10は、また、テストスクリプト記憶部121、画面要素情報記憶部122、画面履歴記憶部123及び重み記憶部124等を利用する。これら各記憶部は、例えば、補助記憶装置102、又はテスト実行装置10にネットワークを介して接続可能な記憶装置等を用いて実現可能である。 The test execution device 10 also uses the test script storage unit 121, the screen element information storage unit 122, the screen history storage unit 123, the weight storage unit 124, and the like. Each of these storage units can be realized by using, for example, a storage device that can be connected to the auxiliary storage device 102 or the test execution device 10 via a network.

テストスクリプト取得部11は、旧アプリケーションに対応するテストスクリプトをテストスクリプト記憶部121から取得する。 The test script acquisition unit 11 acquires the test script corresponding to the old application from the test script storage unit 121.

画面表示制御部13は、旧アプリケーションの画面(以下、「旧画面」という。)及び新アプリケーションの画面(以下、「新画面」という。)のそれぞれを表示する。例えば、Webブラウザに基づいて画面表示制御部13が実現されてもよい。 The screen display control unit 13 displays each of the screen of the old application (hereinafter referred to as "old screen") and the screen of the new application (hereinafter referred to as "new screen"). For example, the screen display control unit 13 may be realized based on the Web browser.

テスト実行部12は、テストスクリプト取得部11によって取得されたテストスクリプトを使用して、旧画面及び新画面のそれぞれについてテストを実行する。 The test execution unit 12 executes a test for each of the old screen and the new screen by using the test script acquired by the test script acquisition unit 11.

要素情報取得部14は、旧画面の各画面要素について、画面要素間の類似度を評価するための複数の指標の値(指標値)や、当該画面要素の表示範囲の画像データ等を取得する。取得された指標値群及び画像データは、画面要素情報記憶部122に記憶される。なお、広義において、画像データも指標値の一例であるといえる。 The element information acquisition unit 14 acquires the values (index values) of a plurality of indexes for evaluating the similarity between the screen elements, the image data of the display range of the screen elements, and the like for each screen element of the old screen. .. The acquired index value group and image data are stored in the screen element information storage unit 122. In a broad sense, image data can be said to be an example of index values.

対象要素候補探索部15は、新アプリケーション(新画面)に対するテストの実行中において、テストスクリプトの命令群のうち、操作対象の画面要素を示すために指定されているロケータが新画面に関して使用されていない命令について、操作対象であることが推定される画面要素の候補を新画面の画面要素の中から探索する。より詳しくは、対象要素候補探索部15は、旧画面において当該ロケータに対応する画面要素と、新画面における各画面要素との間で、画像要素間の類似度の算出に利用される複数の指標の値を比較することで、当該候補を探索する。 In the target element candidate search unit 15, during the execution of the test for the new application (new screen), the locator specified to indicate the screen element to be operated is used for the new screen among the instruction group of the test script. For commands that do not exist, search for screen element candidates that are presumed to be the operation target from the screen elements of the new screen. More specifically, the target element candidate search unit 15 is a plurality of indexes used for calculating the similarity between image elements between the screen element corresponding to the locator on the old screen and each screen element on the new screen. The candidate is searched for by comparing the values of.

ハイライト部16は、対象要素候補探索部15によって探索された複数の候補を、新画面においてハイライト表示(強調表示)する。 The highlight unit 16 highlights (highlights) a plurality of candidates searched by the target element candidate search unit 15 on a new screen.

選択部17は、ハイライト表示された画面要素の中から、いずれかの画面要素の選択をユーザから受け付ける。 The selection unit 17 accepts the user to select one of the highlighted screen elements.

テストスクリプト修正部18は、ユーザによる選択結果に基づいて、テストスクリプトを、新アプリケーション(新画面)に対応した状態へ修正する。 The test script modification unit 18 modifies the test script to a state corresponding to the new application (new screen) based on the selection result by the user.

重み計算部19は、対象要素候補探索部15が、旧画面の各画面要素と新画面の各画面要素との類似度を算出する際に利用する、各指標に対する重みを画面履歴記憶部123に記憶されている情報に基づいて統計的に計算する。計算結果(各指標の重み)は、重み記憶部124に記憶される。なお、本実施の形態において、重みの計算方法は所定のものに限定されない。 The weight calculation unit 19 stores the weights for each index used by the target element candidate search unit 15 in the screen history storage unit 123 when calculating the similarity between each screen element of the old screen and each screen element of the new screen. Calculate statistically based on the stored information. The calculation result (weight of each index) is stored in the weight storage unit 124. In the present embodiment, the weight calculation method is not limited to a predetermined method.

画面履歴記憶部123には、アプリケーションの各リビジョンの画面の画面要素ごとに、画像データ及び指標値群が記憶されている。 The screen history storage unit 123 stores image data and index value groups for each screen element of the screen of each revision of the application.

なお、テスト実行装置10が、サーバ装置20の機能を有していてもよい。この場合、サーバ装置20は配置されなくてもよい。 The test execution device 10 may have the function of the server device 20. In this case, the server device 20 does not have to be arranged.

以下、テスト実行装置10が実行する処理手順について説明する。図4は、テスト実行装置10が実行する処理手順の一例を説明するためのフローチャートである。 Hereinafter, the processing procedure executed by the test execution device 10 will be described. FIG. 4 is a flowchart for explaining an example of a processing procedure executed by the test execution device 10.

ステップS101において、画面表示制御部13は、サーバ装置20の旧アプリケーションの画面(旧画面)を表示装置106に表示する。具体的には、画面表示制御部13は、サーバ装置20の旧アプリケーションにアクセスして、画面定義データをダウンロードし、当該画面定義データに基づいて、旧画面を表示する。 In step S101, the screen display control unit 13 displays the screen (old screen) of the old application of the server device 20 on the display device 106. Specifically, the screen display control unit 13 accesses the old application of the server device 20, downloads the screen definition data, and displays the old screen based on the screen definition data.

続いて、テストスクリプト取得部11は、旧アプリケーションに対応するテストスクリプトを、テストスクリプト記憶部121から取得し、メモリ装置103に記憶する(S102)。以下において、「テストスクリプト」は、メモリ装置103に記憶されたテストスクリプトをいう。 Subsequently, the test script acquisition unit 11 acquires the test script corresponding to the old application from the test script storage unit 121 and stores it in the memory device 103 (S102). In the following, the “test script” refers to a test script stored in the memory device 103.

続いて、テスト実行装置10は、旧画面の画面要素情報の取得処理を実行する(S103)。ステップS103では、旧画面に対してテストスクリプトを実行しつつ、旧画面の画面要素群のうちテストスクリプトにおいて実行対象とされた各画面要素について、他の画面要素との類似度を評価するための複数の指標のそれぞれの値(指標値)や、当該画面要素の表示範囲の画像データ等が取得される。取得された指標値群及び画像データは、画面要素情報記憶部122に記憶される。 Subsequently, the test execution device 10 executes the acquisition process of the screen element information of the old screen (S103). In step S103, while executing the test script on the old screen, each screen element targeted for execution in the test script among the screen elements of the old screen is evaluated for similarity with other screen elements. Each value (index value) of the plurality of indexes, image data of the display range of the screen element, and the like are acquired. The acquired index value group and image data are stored in the screen element information storage unit 122.

続いて、テスト実行装置10は、新アプリケーションのテスト処理を実行する(S104)。当該テスト処理では、旧画面に対応するテストスクリプトが新画面に適用されて、新アプリケーションについて回帰テストが実行される。回帰テストの過程において、テストスクリプト内の操作命令の操作対象とされているロケータ(以下、「対象ロケータ」という。)に対応する画面要素が新画面に存在しない場合、対象ロケータに対応する画面要素の候補の探索が行われる。当該候補の探索には、画面要素情報記憶部122に記憶された情報等が利用される。当該候補が探索された場合には、当該候補が新画面においてハイライト表示される。ハイライト表示された候補の中からいずれかの候補がユーザによって選択されると、選択された候補のロケータによって対象ロケータが書き換えられて、回帰テストが継続される。 Subsequently, the test execution device 10 executes the test process of the new application (S104). In the test process, the test script corresponding to the old screen is applied to the new screen, and the regression test is executed for the new application. In the process of regression testing, if the screen element corresponding to the locator (hereinafter referred to as "target locator") that is the operation target of the operation instruction in the test script does not exist on the new screen, the screen element corresponding to the target locator Candidates are searched for. Information or the like stored in the screen element information storage unit 122 is used to search for the candidate. When the candidate is searched, the candidate is highlighted on the new screen. When one of the highlighted candidates is selected by the user, the target locator is rewritten by the selected candidate locator, and the regression test is continued.

続いて、ステップS103の詳細について説明する。図5は、旧画面の画面要素情報の取得処理の処理手順の一例を説明するためのフローチャートである。 Subsequently, the details of step S103 will be described. FIG. 5 is a flowchart for explaining an example of the processing procedure of the acquisition process of the screen element information of the old screen.

ステップS201において、テスト実行部12は、テストスクリプト内に次の命令cが有るか否かを判定する。次の命令cとは、未実行の命令の中で実行順が先頭の命令をいう。 In step S201, the test execution unit 12 determines whether or not the next instruction c is present in the test script. The next instruction c means an instruction whose execution order is the first among the unexecuted instructions.

図6は、テストスクリプトの一例を説明するための図である。図6において、画面g1は、表示される画面の一例である。画面定義データh1は、画面g1の一部(画面要素e1)についての画面定義データである。テーブルT1は、画面g1に関するテストスクリプトを表形式で表現したものである。 FIG. 6 is a diagram for explaining an example of a test script. In FIG. 6, the screen g1 is an example of the displayed screen. The screen definition data h1 is screen definition data for a part of the screen g1 (screen element e1). Table T1 is a tabular representation of the test script for screen g1.

テーブルT1において、各行が、1つの操作に対応する。すなわち、テストスクリプトは、操作ごとに、命令、ロケータ、及び値等を含む。命令は、操作の種別を示す情報である。図6では、「type」、「click」等が例示されている。「type」は、操作対象の画面要素への値の入力を意味する。「click」は、操作対象の画面要素のクリックを意味する。ロケータは、操作対象の画面要素のロケータである。値は、操作対象の画面要素に適用される値である。このように、テストスクリプトには、操作内容(命令及び値)と操作対象(ロケータ)とが操作ごとに含まれている。また、テストスクリプトには、各操作の順番も定義されている。例えば、テーブルT1では、上の行から先に実行される。 In table T1, each row corresponds to one operation. That is, the test script includes instructions, locators, values, etc. for each operation. The instruction is information indicating the type of operation. In FIG. 6, "type", "click" and the like are exemplified. “Type” means inputting a value to the screen element to be operated. "Click" means a click of a screen element to be operated. The locator is the locator of the screen element to be operated. The value is a value applied to the screen element to be operated. In this way, the test script includes the operation content (instruction and value) and the operation target (locator) for each operation. The test script also defines the order of each operation. For example, in table T1, the top row is executed first.

テストスクリプトに次の命令cが有る場合(S201でYes)、テスト実行部12は、旧画面において、命令cに対応する画面要素に対して命令cを実行する(S202)。 When the test script has the following instruction c (Yes in S201), the test execution unit 12 executes the instruction c for the screen element corresponding to the instruction c on the old screen (S202).

続いて、要素情報取得部14は、命令cによって操作された画面要素(以下、「対象要素」とい。)を特定する(S203)。対象要素は、例えば、命令cに対応するロケータによって特定されてもよい。続いて、要素情報取得部14は、対象要素に関する各指標値を、旧画面の画面定義データから取得する(S204)。ここでは、複数の指標の指標値が取得される。 Subsequently, the element information acquisition unit 14 identifies the screen element (hereinafter, referred to as “target element”) operated by the command c (S203). The target element may be specified by, for example, the locator corresponding to the instruction c. Subsequently, the element information acquisition unit 14 acquires each index value related to the target element from the screen definition data of the old screen (S204). Here, index values of a plurality of indexes are acquired.

指標は、例えば、画面要素の属性(id、type、class、name、タグ名等)、画面要素の位置情報(XPath、x座標、y座標、横幅、縦幅)、画面要素に関連するテキスト(リンクテキスト、近傍のテキスト、URL等)である。なお、リンクテキストは、画面要素がリンクである場合の指標であり、当該リンクが付与された文字列を示す。近傍のテキストとは、画面要素の表示範囲の周囲(例えば、上、下、左、右等の所定の画素数の範囲内)に表示されるテキストである。画面要素の表示範囲とは、例えば、当該画面要素の最小外接矩形でもよい。なお、20種類程度の指標のそれぞれについて、指標値が取得されてもよい。 The indicators are, for example, the attributes of the screen element (id, type, class, name, tag name, etc.), the position information of the screen element (XPath, x coordinate, y coordinate, width, height), and the text related to the screen element (XPath, x coordinate, y coordinate, width, height). Link text, nearby text, URL, etc.). The link text is an index when the screen element is a link, and indicates a character string to which the link is attached. The text in the vicinity is text displayed around the display range of the screen element (for example, within a range of a predetermined number of pixels such as top, bottom, left, right, etc.). The display range of the screen element may be, for example, the minimum circumscribing rectangle of the screen element. In addition, the index value may be acquired for each of about 20 kinds of indexes.

続いて、要素情報取得部14は、取得された指標値群を、対象要素に関連付けて画面要素情報記憶部122に記憶する(S205)。 Subsequently, the element information acquisition unit 14 stores the acquired index value group in the screen element information storage unit 122 in association with the target element (S205).

続いて、要素情報取得部14は、旧画面のスクリーンショット(画像データ)を取得する(S206)。続いて、要素情報取得部14は、当該スクリーンショットから、対象要素の表示範囲の画像データを取得する(切り出す)(S207)。なお、対象要素の表示範囲は、例えば、旧画面の画面定義データに含まれている、対象要素の位置情報等に基づいて特定可能である。続いて、要素情報取得部14は、取得した画像データを、対象要素に関連付けて画面要素情報記憶部122に記憶する(S208)。 Subsequently, the element information acquisition unit 14 acquires a screenshot (image data) of the old screen (S206). Subsequently, the element information acquisition unit 14 acquires (cuts out) image data of the display range of the target element from the screenshot (S207). The display range of the target element can be specified based on, for example, the position information of the target element included in the screen definition data of the old screen. Subsequently, the element information acquisition unit 14 stores the acquired image data in the screen element information storage unit 122 in association with the target element (S208).

ステップS202以降が、テストスクリプトの全ての命令について実行されると(S201でNo)、図5の処理手順は終了する。その結果、画面要素情報記憶部122には、旧画面の画面要素のうち、テストスクリプトによって操作された各画面要素の指標値群及び画像データが記憶される。 When step S202 and subsequent steps are executed for all the instructions of the test script (No in S201), the processing procedure of FIG. 5 ends. As a result, the screen element information storage unit 122 stores the index value group and the image data of each screen element operated by the test script among the screen elements of the old screen.

図7は、画面要素情報記憶部122の構成例を示す図である。図7に示されるように、画面要素情報記憶部122には、テストスクリプトにおいて実行された命令の順番で、操作対象とされた画面要素ごとに、指標値群及び画像データが記憶される。なお、図7において「画面要素」の列は、例えば、画面要素のロケータであってもよい。 FIG. 7 is a diagram showing a configuration example of the screen element information storage unit 122. As shown in FIG. 7, the screen element information storage unit 122 stores the index value group and the image data for each screen element to be operated in the order of the instructions executed in the test script. In FIG. 7, the column of "screen elements" may be, for example, a locator of screen elements.

続いて、図4のステップS104の詳細について説明する。図8は、新アプリケーションのテスト処理の処理手順の一例を説明するためのフローチャートである。 Subsequently, the details of step S104 of FIG. 4 will be described. FIG. 8 is a flowchart for explaining an example of the processing procedure of the test processing of the new application.

ステップS301において、画面表示制御部13は、サーバ装置20の新アプリケーションの画面(新画面)を表示装置106に表示する。具体的には、画面表示制御部13は、サーバ装置20の新アプリケーションにアクセスして、画面定義データをダウンロードし、当該画面定義データに基づいて、新画面を表示する。 In step S301, the screen display control unit 13 displays the screen (new screen) of the new application of the server device 20 on the display device 106. Specifically, the screen display control unit 13 accesses the new application of the server device 20, downloads the screen definition data, and displays the new screen based on the screen definition data.

続いて、テストスクリプトの最初の命令から順に、ステップS302以降が実行される。当該テストスクリプトは、ステップS102においてメモリ装置103に記憶されたテストスクリプトである。すなわち、当該テストスクリプトは、旧アプリケーションに対応するテストスクリプトである。 Subsequently, steps S302 and subsequent steps are executed in order from the first instruction of the test script. The test script is a test script stored in the memory device 103 in step S102. That is, the test script is a test script corresponding to the old application.

ステップS302において、テスト実行部12は、テストスクリプト内に次の命令cが有るか否かを判定する。テストスクリプトに次の命令cが有る場合(S302でYes)、テスト実行部12は、新画面において、命令cに対応する画面要素に対して命令cを実行する(S303)。 In step S302, the test execution unit 12 determines whether or not the next instruction c is present in the test script. When the test script has the following instruction c (Yes in S302), the test execution unit 12 executes the instruction c for the screen element corresponding to the instruction c on the new screen (S303).

続いて、テスト実行部12は、命令cのロケータが誤っているか否かを判定する(S304)。すなわち、新画面の画面定義データにおける当該ロケータの有無が判定される。当該判定は、新画面の画面定義データを参照することで可能である。命令cのロケータが誤っていない場合(S304でNo)、ステップS302以降が繰り返される。 Subsequently, the test execution unit 12 determines whether or not the locator of the instruction c is incorrect (S304). That is, the presence or absence of the locator in the screen definition data of the new screen is determined. The determination can be made by referring to the screen definition data of the new screen. If the locator of the instruction c is correct (No in S304), steps S302 and subsequent steps are repeated.

命令cのロケータが誤っている場合(すなわち、当該ロケータに係る画面要素が新画面に含まれていない場合)(S304でYes)、対象要素候補探索部15は、当該ロケータ(以下、「元ロケータ」という。)について、対象要素候補探索処理を実行する(S305)。対象要素候補探索処理は、新画面の画面要素の中で、命令cのロケータに対応する画面要素(以下、「対象要素」という。)の候補(以下、「対象要素候補」という。)が探索される。探索において、新画面の各画面要素について、旧画面において当該ロケータを有する画面要素(以下、「元要素」という。)との間で類似度が算出される。類似度の詳細については後述される。 When the locator of the instruction c is incorrect (that is, when the screen element related to the locator is not included in the new screen) (Yes in S304), the target element candidate search unit 15 uses the locator (hereinafter, "former locator"). ”), The target element candidate search process is executed (S305). In the target element candidate search process, candidates for screen elements (hereinafter referred to as “target elements”) corresponding to the locator of the instruction c (hereinafter referred to as “target element candidates”) are searched among the screen elements of the new screen. Will be done. In the search, the similarity between each screen element of the new screen and the screen element having the locator on the old screen (hereinafter referred to as "original element") is calculated. Details of the similarity will be described later.

なお、命令cのロケータを有する画面要素が新画面に含まれていない場合、ステップS303において、命令cの実行に失敗する。したがって、ステップS304以降は、命令cの実行に失敗した場合に実行されてもよい。 If the screen element having the locator of the instruction c is not included in the new screen, the execution of the instruction c fails in step S303. Therefore, the steps S304 and subsequent steps may be executed when the execution of the instruction c fails.

続いて、ハイライト部16は、対象要素候補探索処理において探索された1以上の対象要素候補を、新画面においてハイライト表示する(S306)。この際、類似度の順番がユーザに分かるように、ハイライトの色が類似度に応じて変えられてもよい。なお、ハイライト(強調表示)の形態は、所定のものに限定されない。例えば、対象要素候補の周囲に枠が付与されてもよいし、対象要素候補の背景に色が付与されてもよい。また、対象要素候補が文字列である場合には、当該文字列の書体が変更されてもよい。その他の方法によって、ハイライト表示が行われてもよい。 Subsequently, the highlight unit 16 highlights and displays one or more target element candidates searched in the target element candidate search process on a new screen (S306). At this time, the color of the highlight may be changed according to the similarity so that the user can understand the order of the similarity. The form of highlighting is not limited to a predetermined one. For example, a frame may be added around the target element candidate, or a color may be added to the background of the target element candidate. Further, when the target element candidate is a character string, the typeface of the character string may be changed. Highlighting may be performed by other methods.

続いて、選択部17は、ハイライト表示された対象要素候補の中からいずれかの対象要素候補の選択(例えば、クリック)をユーザから受け付ける(S307)。なお、ステップS306では、対象要素候補のリストが表示されるようにしてもよい。ステップS307では、当該リストの中からいずれかの対象要素候補がユーザによって選択されてもよい。すなわち、ユーザにから対象要素候補を受け付けるためのGUI(Graphical User Interface)は、所定のものに限定されなくてもよい。 Subsequently, the selection unit 17 accepts the selection (for example, click) of any target element candidate from the highlighted target element candidates from the user (S307). In step S306, a list of target element candidates may be displayed. In step S307, any target element candidate may be selected by the user from the list. That is, the GUI (Graphical User Interface) for accepting the target element candidate from the user does not have to be limited to a predetermined one.

続いて、テストスクリプト修正部18は、テストスクリプトにおいて、選択された対象要素候補のロケータによって、テストスクリプト内の命令cのロケータを修正する(S308)。すなわち、命令cのロケータが、選択された対象要素候補のロケータによって置換される。 Subsequently, the test script modification unit 18 modifies the locator of the instruction c in the test script by the locator of the selected target element candidate in the test script (S308). That is, the locator of the instruction c is replaced by the locator of the selected target element candidate.

続いて、ステップS302以降が繰り返される。すなわち、回帰テストが継続される。このように、本実施の形態では、ロケータに対応する画面要素が見つからない命令が実行された場合、その時点でロケータの修正が行われて、テストが継続される。 Subsequently, steps S302 and subsequent steps are repeated. That is, the regression test is continued. As described above, in the present embodiment, when the instruction in which the screen element corresponding to the locator is not found is executed, the locator is modified at that time and the test is continued.

続いて、対象要素候補探索処理の詳細について説明する。ここで、命令cの操作対象の画面要素e(すなわち、元要素)のロケータをleと定義する。また、新アプリケーションの画面(新画面)に存在する画面要素の集合をEとする。 Subsequently, the details of the target element candidate search process will be described. Here, the locator of the screen element e (that is, the original element) to be operated by the instruction c is defined as le. Also, let E be a set of screen elements existing on the screen (new screen) of the new application.

本実施の形態において、対象要素候補探索部15は、修正前後の画面要素について、画面要素が持つ複数の指標を用いて類似度を定量的に算出することで、eと意味的に等しい画面要素e'∈Eを推定する。類似度が高いもの程、修正後のロケータとして確からしいとみなす。用いる指標は以下の4つに分類される。
・属性(id,class,name等)
・位置(XPath,座標)
・テキスト(リンクテキスト・近傍のテキスト)
・画像(レンダリングされた画面要素の画像)
すなわち、画面要素情報記憶部122に記憶されている指標が用いられる。
In the present embodiment, the target element candidate search unit 15 quantitatively calculates the similarity of the screen elements before and after the modification using a plurality of indexes of the screen elements, so that the screen elements are semantically equal to e. Estimate e'∈ E. The higher the similarity, the more likely it is to be a modified locator. The indicators used are classified into the following four categories.
・ Attributes (id, class, name, etc.)
・ Position (XPath, coordinates)
・ Text (link text, nearby text)
-Image (rendered screen element image)
That is, the index stored in the screen element information storage unit 122 is used.

対象要素候補探索部15は、eとe'について、まず、各指標における類似度を算出し、次にそれらを統合して1つの類似度を算出する。なお、eに関する各指標の値は、画面要素情報記憶部122に記憶されている(例えば、leに関連付けられて画面要素情報記憶部122に記憶されている。)。一方、e' に関する各指標の値は、例えば、ステップS305のタイミングで、eについて算出した方法と同様の方法で算出されればよい。 The target element candidate search unit 15 first calculates the similarity in each index for e and e', and then integrates them to calculate one similarity. The value of each index related to e is stored in the screen element information storage unit 122 (for example, it is stored in the screen element information storage unit 122 in association with le). On the other hand, the value of each index related to e'may be calculated by the same method as that calculated for e, for example, at the timing of step S305.

eとe'が共通して持つ指標の集合をI、eにおけるi∈Iの値をeiとする。ここで、Max(i)は、|ei−e'i|がとりうる最大値、Lev(ei,e'i)は、eiとe'iとのレーベンシュタイン距離、MaxLength(ei,e'i)は、eiとe'iとの文字列長のうち長い方の文字列長とすると、対象要素候補探索部15は、eiとe'iとの類似度s(ei,e'i)(0≦s(ei,e'i)≦1)を、以下のように算出する。 Let I be the set of indexes that e and e'have in common, and let ei be the value of i ∈ I in e. Here, Max (i) is the maximum value that | ei-e'i | can take, Lev (ei, e'i) is the Levenshtein distance between ei and e'i, and MaxLength (ei, e'i). ) Is the longer character string length of the character string lengths of ei and e'i, and the target element candidate search unit 15 has a similarity s (ei, e'i) between ei and e'i. 0 ≦ s (ei, e'i) ≦ 1) is calculated as follows.

eiが数値の場合: If ei is a number:

Figure 0006891779
eiが画像または特定の文字列(タグ名など)の場合:
Figure 0006891779
If ei is an image or a specific string (such as a tag name):

Figure 0006891779
eiが任意の文字列の場合:
Figure 0006891779
If ei is an arbitrary character string:

Figure 0006891779
各指標について算出された類似度s(ei,e'i)を統合するにあたって、それぞれ画面要素の類似度に寄与する度合いが異なると考えられる。例えば、異なる画面要素が同じidを持つことはないが、異なる画面要素が同じclassを持つことは起こりうるため、classの一致はidの一致に比べて類似度に寄与する度合いが小さいと考えられる。これを考慮し、対象要素候補探索部15は、各指標について、s(ei,e'i)を算出した後、重み記憶部124に記憶された重みwiで加重平均を計算することで、eとe'との類似度S(e、e')(0≦S(e、e')≦1)を算出する。
Figure 0006891779
In integrating the similarity s (ei, e'i) calculated for each index, it is considered that the degree of contribution to the similarity of the screen elements is different. For example, different screen elements do not have the same id, but different screen elements can have the same class, so class matching is considered to contribute less to similarity than id matching. .. In consideration of this, the target element candidate search unit 15 calculates s (ei, e'i) for each index, and then calculates the weighted average with the weight wi stored in the weight storage unit 124. And e'similarity S (e, e') (0 ≦ S (e, e') ≦ 1) is calculated.

Figure 0006891779
対象要素候補探索部15は、類似度SがN番目までの画面要素e'を対象要素候補の探索結果とする。又は、類似度Sが閾値以上である全ての画面要素e'が対象要素候補とされてもよい。
Figure 0006891779
The target element candidate search unit 15 sets the screen element e'with the similarity S up to the Nth as the search result of the target element candidate. Alternatively, all screen elements e'in which the similarity S is equal to or greater than the threshold value may be selected as target element candidates.

例えば、N=4であれば、対象要素候補探索部15は、類似度Sの順に4つの対象要素候補e'1、e'2、e'3、e'4を探索結果として出力する。 For example, if N = 4, the target element candidate search unit 15 outputs four target element candidates e'1, e'2, e'3, and e'4 as search results in the order of similarity S.

ハイライト部16は、e'1〜e'4を、それぞれ異なる色でハイライトすることで区別する。ユーザは、ハイライトされた中から、操作すべきであると思われる画面要素を選択し、クリックする。テストスクリプト修正部18は、ユーザがクリックした画面要素のロケータによって、命令cのロケータを置換する。例えば、e'2が選択されたとすると、命令cのロケータleが、ロケータle'2に書き換わる。命令cについてロケータの修正が完了すると、テストが再開される。テストが完了するまで、この操作を繰り返すことで、修正作業が完了する。 The highlight section 16 distinguishes e'1 to e'4 by highlighting them with different colors. The user selects and clicks on a screen element that he or she thinks should be manipulated from among the highlighted ones. The test script modification unit 18 replaces the locator of the instruction c with the locator of the screen element clicked by the user. For example, if e'2 is selected, the locator of instruction c is rewritten to locator le'2. When the locator modification for instruction c is complete, the test resumes. By repeating this operation until the test is completed, the correction work is completed.

上述したように、本実施の形態によれば、修正後のアプリケーション(新アプリケーション)におけるテストで操作すべき画面要素の候補をブラウザ上で視覚的に分かりやすく推薦し、1以上の候補の中からユーザによって選択された候補に基づいて、テストスクリプトが修正される。したがって、テストスクリプトにおける画面要素の識別情報の修正について正確性と効率性とを向上させることができる。 As described above, according to the present embodiment, candidates for screen elements to be operated in the test in the modified application (new application) are recommended visually on the browser in an easy-to-understand manner, and from one or more candidates. The test script is modified based on the candidates selected by the user. Therefore, it is possible to improve the accuracy and efficiency of the correction of the identification information of the screen element in the test script.

例えば、テストスクリプトの各命令がどの画面要素を操作しようとしていたのかを事前に理解する必要が無くなるため、テスト担当者がドキュメント等を参照する必要性を低減することができる。 For example, since it is not necessary to understand in advance which screen element each instruction of the test script was trying to operate, it is possible to reduce the need for the person in charge of testing to refer to a document or the like.

また、ブラウザ上で画面要素をクリックするだけで修正できるので、テスト担当者が、ロケータを記述するために、HTMLを参照したり、特定のツールを使う必要性を低減することができる。この際、人間が常に確認するため、正しく修正できる。 In addition, since it can be modified by simply clicking a screen element on the browser, it is possible to reduce the need for the tester to refer to HTML or use a specific tool to describe the locator. At this time, humans always check it, so it can be corrected correctly.

また、ロケータの修正の際のミスが減り、何度もテスト実行を行い動作確認する必要が無くなる。 In addition, mistakes when modifying the locator are reduced, and there is no need to repeatedly execute tests to check the operation.

また、ロケータ以外の誤りが出現した場合でも、その部分のみ人間が修正し、ロケータについてはインタラクティブに修正できる。 In addition, even if an error other than the locator appears, only that part can be corrected by a human, and the locator can be corrected interactively.

なお、本実施の形態において、テスト実行装置10は、テストスクリプト修正装置の一例である。ロケータは、識別情報の一例である。旧画面は、第1の画面の一例である。新画面は、第2の画面の一例である。要素情報取得部14は、取得部の一例である。対象要素候補探索部15は、探索部の一例である。テストスクリプト修正部18は、修正部の一例である。ハイライト部16は、強調部の一例である。画面要素情報記憶部122は、記憶部の一例である。元要素は、第1の画面要素の一例である。 In the present embodiment, the test execution device 10 is an example of a test script correction device. The locator is an example of identification information. The old screen is an example of the first screen. The new screen is an example of the second screen. The element information acquisition unit 14 is an example of an acquisition unit. The target element candidate search unit 15 is an example of the search unit. The test script correction unit 18 is an example of the correction unit. The highlight section 16 is an example of a highlight section. The screen element information storage unit 122 is an example of a storage unit. The original element is an example of the first screen element.

以上、本発明の実施の形態について詳述したが、本発明は斯かる特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。 Although the embodiments of the present invention have been described in detail above, the present invention is not limited to such specific embodiments, and various aspects are within the scope of the gist of the present invention described in the claims. It can be transformed and changed.

10 テスト実行装置
11 テストスクリプト取得部
12 テスト実行部
13 画面表示制御部
14 要素情報取得部
15 対象要素候補探索部
16 ハイライト部
17 選択部
18 テストスクリプト修正部
19 重み計算部
20 サーバ装置
100 ドライブ装置
101 記録媒体
102 補助記憶装置
103 メモリ装置
104 CPU
105 インタフェース装置
106 表示装置
107 入力装置
121 テストスクリプト記憶部
122 画面要素情報記憶部
123 画面履歴記憶部
124 重み記憶部
B バス
10 Test execution device 11 Test script acquisition unit 12 Test execution unit 13 Screen display control unit 14 Element information acquisition unit 15 Target element candidate search unit 16 Highlight unit 17 Selection unit 18 Test script correction unit 19 Weight calculation unit 20 Server device 100 drive Device 101 Recording medium 102 Auxiliary storage device 103 Memory device 104 CPU
105 Interface device 106 Display device 107 Input device 121 Test script storage unit 122 Screen element information storage unit 123 Screen history storage unit 124 Weight storage unit B bus

Claims (4)

第1の画面の画面要素の識別情報が操作対象を示す情報として含まれるテストスクリプトの命令ごとに、操作対象の画面要素について、画面要素間の類似度の算出に利用される複数の指標の値を前記第1の画面に関して取得して、取得した各値を記憶部に記憶する取得部と、
前記テストスクリプトに含まれる命令のうち、第2の画面に関して存在しない識別情報に係る第1の画面要素が操作対象である第1の命令について、前記第1の画面要素に関して前記記憶部に記憶されている各値と、前記第2の画面の各画面要素に関して取得される前記複数の指標の値とに基づいて、前記第1の画面要素と、前記第2の画面の各画面要素との類似度を算出し、算出された類似度に基づいて、前記第2の画面において前記第1の命令の操作対象である画面要素の候補を探索する探索部と、
探索された候補に係る画面要素を、前記類似度の順番がユーザに分かるように前記第2の画面において強調表示する強調部と、
強調表示された画面要素の中からユーザによって選択された画面要素の識別情報によって、前記第1の命令に対する識別情報を修正する修正部と、
を有することを特徴とするテストスクリプト修正装置。
For each instruction of the test script in which the identification information of the screen element of the first screen is included as the information indicating the operation target, the value of a plurality of indexes used for calculating the similarity between the screen elements of the operation target. Is acquired with respect to the first screen, and each acquired value is stored in the storage unit.
Among the instructions included in the test script, the first instruction in which the first screen element related to the identification information that does not exist with respect to the second screen is the operation target is stored in the storage unit with respect to the first screen element. Similarity between the first screen element and each screen element of the second screen , based on the respective values and the values of the plurality of indicators acquired for each screen element of the second screen. A search unit that calculates the degree and searches for a candidate for a screen element that is an operation target of the first instruction on the second screen based on the calculated similarity.
A highlighting section that highlights the screen elements related to the searched candidates on the second screen so that the user can understand the order of the similarity.
The identification information of the screen element that is selected by the user from the highlighted screen element, and a correcting section for correcting the identification information for said first instruction,
A test script modification device characterized by having.
前記探索部は、前記指標ごとに、前記第1の画面要素に関する値と前記第2の画面の各画面要素に関する値との類似度を算出し、前記指標ごとの類似度について、前記指標ごとの重みに基づく加重平均を計算することで、前記第1の画面要素と前記第2の画面の各画面要素との類似度を算出する、
ことを特徴とする請求項記載のテストスクリプト修正装置。
The search unit calculates the similarity between the value related to the first screen element and the value related to each screen element of the second screen for each index, and the similarity for each index is calculated for each index. By calculating the weighted average based on the weight, the similarity between the first screen element and each screen element of the second screen is calculated.
The test script correction device according to claim 1 , wherein the test script is modified.
前記テストスクリプトに含まれる複数の命令を、前記第2の画面に対して順番に実行するテスト実行部を有し、 It has a test execution unit that executes a plurality of instructions included in the test script in order on the second screen.
前記テスト実行部が、実行する第1の命令において、前記第2の画面に存在しない識別情報に係る前記第1の画面要素が操作対象と判断した場合、 When the test execution unit determines in the first instruction to be executed that the first screen element related to the identification information that does not exist on the second screen is the operation target.
前記探索部は、前記第2の画面における前記第1の命令の操作対象の候補を探索し、 The search unit searches for candidates for the operation target of the first instruction on the second screen, and searches for candidates.
前記強調部は、探索された候補に係る画面要素を強調表示し、 The highlighting section highlights the screen element related to the searched candidate.
前記修正部は、ユーザに選択された候補に係る画面要素の識別情報によって前記第1の命令を修正し、 The correction unit corrects the first instruction based on the identification information of the screen element related to the candidate selected by the user.
前記テスト実行部は、修正された前記第1の命令を実行し、続いて前記第1の命令の次の命令を実行する、 The test execution unit executes the modified first instruction, and then executes the instruction following the first instruction.
ことを特徴とする請求項1又は2記載のテストスクリプト修正装置。The test script correction device according to claim 1 or 2, wherein the test script is modified.
第1の画面の画面要素の識別情報が操作対象を示す情報として含まれるテストスクリプトの命令ごとに、操作対象の画面要素について、画面要素間の類似度の算出に利用される複数の指標の値を前記第1の画面に関して取得して、取得した各値を記憶部に記憶する取得手順と、
前記テストスクリプトに含まれる命令のうち、第2の画面に関して存在しない識別情報に係る第1の画面要素が操作対象である第1の命令について、前記第1の画面要素に関して前記記憶部に記憶されている各値と、前記第2の画面の各画面要素に関して取得される前記複数の指標の値とに基づいて、前記第1の画面要素と、前記第2の画面の各画面要素との類似度を算出し、算出された類似度に基づいて、前記第2の画面において前記第1の命令の操作対象である画面要素の候補を探索する探索手順と、
探索された候補に係る画面要素を、前記類似度の順番がユーザに分かるように前記第2の画面において強調表示する強調手順と、
強調表示された画面要素の中からユーザによって選択された画面要素の識別情報によって、前記第1の命令に対する識別情報を修正する修正手順と、
をコンピュータに実行させることを特徴とするプログラム。
For each instruction of the test script in which the identification information of the screen element of the first screen is included as the information indicating the operation target, the value of a plurality of indexes used for calculating the similarity between the screen elements of the operation target. With respect to the first screen, and the acquisition procedure of storing each acquired value in the storage unit,
Among the instructions included in the test script, the first instruction in which the first screen element related to the identification information that does not exist with respect to the second screen is the operation target is stored in the storage unit with respect to the first screen element. Similarity between the first screen element and each screen element of the second screen , based on the respective values and the values of the plurality of indicators acquired for each screen element of the second screen. A search procedure for calculating the degree and searching for a candidate for a screen element to be operated by the first instruction on the second screen based on the calculated similarity.
A highlighting procedure for highlighting the screen elements related to the searched candidates on the second screen so that the user can see the order of the similarity.
The identification information of the screen element that is selected by the user from the highlighted screen element, the modification procedure to modify the identification information for said first instruction,
A program characterized by having a computer execute.
JP2017228934A 2017-11-29 2017-11-29 Test script modifiers and programs Active JP6891779B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017228934A JP6891779B2 (en) 2017-11-29 2017-11-29 Test script modifiers and programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017228934A JP6891779B2 (en) 2017-11-29 2017-11-29 Test script modifiers and programs

Publications (2)

Publication Number Publication Date
JP2019101538A JP2019101538A (en) 2019-06-24
JP6891779B2 true JP6891779B2 (en) 2021-06-18

Family

ID=66976959

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017228934A Active JP6891779B2 (en) 2017-11-29 2017-11-29 Test script modifiers and programs

Country Status (1)

Country Link
JP (1) JP6891779B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6739599B1 (en) * 2019-07-12 2020-08-12 富士通株式会社 Information processing program, information processing method, and information processing apparatus
WO2022070353A1 (en) * 2020-09-30 2022-04-07 オーティファイ株式会社 Information processing system, information processing method, and program
JP7450187B2 (en) * 2021-11-19 2024-03-15 バルテス・ホールディングス株式会社 Program, information processing method, and information processing device
WO2024052991A1 (en) * 2022-09-06 2024-03-14 日本電信電話株式会社 Test script modification device, test script modification method, and program
WO2024052992A1 (en) * 2022-09-06 2024-03-14 日本電信電話株式会社 Test script correction device, test script correction method, and program
KR102614650B1 (en) * 2022-11-28 2023-12-19 쿠팡 주식회사 Electronic apparatus and managing api method thereof
WO2024176362A1 (en) * 2023-02-21 2024-08-29 オーティファイ株式会社 Testing assistance system, testing assistance method, and program
WO2024176364A1 (en) * 2023-02-21 2024-08-29 オーティファイ株式会社 Test assistance system, test assistance method, and program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007102654A (en) * 2005-10-07 2007-04-19 Hitachi Software Eng Co Ltd Test script processing program

Also Published As

Publication number Publication date
JP2019101538A (en) 2019-06-24

Similar Documents

Publication Publication Date Title
JP6891779B2 (en) Test script modifiers and programs
US10949225B2 (en) Automatic detection of user interface elements
JP7398068B2 (en) software testing
AU2017258963B2 (en) Simultaneous multi-platform testing
US9852049B2 (en) Screenshot validation testing
US20200401431A1 (en) Adaptive web-based robotic process automation
US9389849B2 (en) Test case pattern matching
US9983984B2 (en) Automated modularization of graphical user interface test cases
US9424167B2 (en) Automated testing of an application system
US9767009B2 (en) Adaptation of automated test scripts
CN107220172B (en) Method and system for automated User Interface (UI) testing via model-driven techniques
US20090249250A1 (en) Method and system for log file processing and generating a graphical user interface based thereon
US11615018B2 (en) Automation testing tool framework
US20190129832A1 (en) System and method for test data generation for use in model based testing using source code test annotations and constraint solving
JP6645955B2 (en) Test script correction device and test script correction program
JP2016194777A (en) Software test apparatus, software test method, and software test program
JP6689734B2 (en) Test script correction device and test script correction program
US9678856B2 (en) Annotated test interfaces
US20170161181A1 (en) Testing support system, and testing support method
US20230195825A1 (en) Browser extension with automation testing support
JP6451417B2 (en) Debug support device, debug support system, debug support method, and debug support program
JP6840656B2 (en) Test script modifiers and programs
JP2017111500A (en) Character recognizing apparatus, and program
US9405514B1 (en) Process fragment management
JP2018147106A (en) Program analyzer, program analysis method and program analysis program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200205

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210126

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210216

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210329

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210510

R150 Certificate of patent or registration of utility model

Ref document number: 6891779

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150