Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7294609B2 - Program, Method, and Device for Supporting Software Operation Scenario Generation - Google Patents
[go: Go Back, main page]

JP7294609B2 - Program, Method, and Device for Supporting Software Operation Scenario Generation - Google Patents

Program, Method, and Device for Supporting Software Operation Scenario Generation Download PDF

Info

Publication number
JP7294609B2
JP7294609B2 JP2019123702A JP2019123702A JP7294609B2 JP 7294609 B2 JP7294609 B2 JP 7294609B2 JP 2019123702 A JP2019123702 A JP 2019123702A JP 2019123702 A JP2019123702 A JP 2019123702A JP 7294609 B2 JP7294609 B2 JP 7294609B2
Authority
JP
Japan
Prior art keywords
control
gui
driver
controls
drivers
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
JP2019123702A
Other languages
Japanese (ja)
Other versions
JP2021009605A (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.)
Codeer
Original Assignee
Codeer
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 Codeer filed Critical Codeer
Priority to JP2019123702A priority Critical patent/JP7294609B2/en
Publication of JP2021009605A publication Critical patent/JP2021009605A/en
Application granted granted Critical
Publication of JP7294609B2 publication Critical patent/JP7294609B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Description

特許法第30条第2項適用 平成30年 7月 3日 Microsoft CorporationのVisual Studio Marketplaceのウェブサイト「https://marketplace.visualstudio.com/items?itemName=Codeer.TestAssistantPro」を通じて公開 平成30年 7月 4日 株式会社Codeerのウェブサイト 「https://www.codeer.co.jp/」および「https://www.codeer.co.jp/Tools/TestAssistantPro」を通じて公開 平成30年 7月 4日 GitHub,Incのウェブサイト 「https://github.com/Codeer-Software/TestAssistantPro」および「https://github.com/Codeer-Software/TestAssistantPro.Samples」を通じて公開 平成30年 7月 5日および6日 ET & IoT Technology West 2018にて公開 平成30年 9月28日 Developers Summit 2018 KANSAIにて公開 平成30年11月10日 わんくま同盟 大阪勉強会 #74にて公開 平成30年12月22日 meetup app osaka@3にて公開 平成31年 1月26日 BuriKaigi2019にて公開 平成31年 2月19日 はてなブログのウェブサイト「http://ishikawa-tatsuya.hatenablog.com/entry/2019/02/19/123109」を通じて公開 平成31年 2月21日 第三回 Friendly勉強会にて公開 平成31年 3月 8日 デスクトップアプリ向け.NET Core 3対応セミナーにて公開 平成31年 3月10日 テスト自動化向けライブラリ”Friendly”勉強会 at 東京 vol1.にて公開 令和 1年 5月29日および30日 de:code 2019にて公開Application of Article 30, Paragraph 2 of the Patent Act July 3, 2018 Microsoft Corporation's Visual Studio Marketplace website "https://marketplace.visualstudio.com/items?itemName=Codeer.TestAssistantP Opened to the public through ro July 2018 Released on Codeer, Inc.'s website "https://www.codeer.co.jp/" and "https://www.codeer.co.jp/Tools/TestAssistantPro" July 4, 2018 Published via GitHub, Inc. website "https://github.com/Codeer-Software/TestAssistantPro" and "https://github.com/Codeer-Software/TestAssistantPro.Samples" July 5 and 6, 2018 Released at ET & IoT Technology West 2018 September 28, 2018 Released at Developers Summit 2018 KANSAI November 10, 2018 Released at Wankuma Alliance Osaka Study Group #74 December 22, 2018 Meetup app Published on osaka@3 January 26, 2019 Published on BuriKaigi 2019 February 19, 2019 Hatena Blog website http://ishikawa-tatsuya.hatenablog.com/entry/2019/02/19/ 123109” February 21, 2019 Released at the 3rd Friendly Study Group March 8, 2019 For desktop applications. NET Core 3 compatible seminar March 10, 2019 Library for test automation "Friendly" Study Meeting at Tokyo vol1. Released on May 29th and 30th, 2019 at de:code 2019

本開示は、ソフトウェアの操作シナリオの生成に関し、より特定的には、グラフィカルユーザーインターフェイスの操作シナリオの生成を支援する技術に関する。 TECHNICAL FIELD The present disclosure relates to generation of operation scenarios for software, and more particularly to technology for supporting generation of operation scenarios for graphical user interfaces.

PC(Personal Computer)、スマートフォンおよびタブレット等の機器には、多くのアプリケーションがインストールされる。これらの機器にインストールされるアプリケーションは、所謂ネイティブアプリケーションと呼ばれる。これらのネイティブアプリケーションは、一般的に、GUI(Graphical User Interface)を含む。GUIは、入力フォームやボタン等を有し、視覚的および直感的に操作することができるユーザーインターフェイスである。 Many applications are installed in devices such as PCs (Personal Computers), smart phones, and tablets. Applications installed on these devices are called native applications. These native applications typically include a GUI (Graphical User Interface). A GUI is a user interface that has an input form, buttons, etc., and can be operated visually and intuitively.

さらに、近年、ネットワークの高速化およびクラウドの発展等により、ウェブアプリケーションが多く使用されている。ウェブアプリケーションにおいて、サーバーは、ウェブアプリケーションの画面をユーザーの持つ機器に配信する。ユーザーは、配信された画面を操作することで、ウェブアプリケーションの機能を使用することができる。このようなウェブアプリケーションの画面は、ブラウザによって視覚的に表示されることが多い。 Furthermore, in recent years, web applications have been widely used due to the speeding up of networks and the development of cloud computing. In a web application, the server distributes the screen of the web application to the user's device. The user can use the functions of the web application by operating the distributed screen. Such web application screens are often visually displayed by a browser.

上記のように、近年、多くのソフトウェアは、GUIを含むことが多い。これ以降の説明では、GUIを含むネイティブアプリケーションおよびウェブアプリケーションを総称して、「GUIアプリケーション」と呼ぶ。プログラマーは、開発したGUIアプリケーションおよびGUIアプリケーションの操作に基づくアプリケーションの内部動作等をテストする必要がある。 As described above, in recent years, many software often include a GUI. In the following description, native applications including GUIs and web applications are collectively referred to as "GUI applications". A programmer needs to test the developed GUI application and the internal operation of the application based on the operation of the GUI application.

GUIアプリケーションの自動テスト手法には、大きく分けて2種類あり、1つ目は、プログラマーが手書きの操作シナリオを用意する方法である。操作シナリオとは、複数のアプリケーションの操作コードを順次実行する一連の処理を指す。以降の説明では、アプリケーションのテストに使用される操作コードおよび操作シナリオをそれぞれ「テストコード」および「テストシナリオ」と呼ぶ。手書きのテストシナリオを作成する方法は、可読性の高いテストシナリオを生成できるという利点があるが、その反面、テストシナリオを作成できるプログラマーが限られるという問題があった。2つ目は、GUI操作のキャプチャーリプレイソフトを使用する方法である。この方法は、手書きのテストコードを用意する方法と比較して、作業難易度は低くなるという利点はあるが、その反面、キャプチャーリプレイソフトが生成したテストコードは可読性が低く、メンテナンス性が低いという問題があった。そのため、より効率的なGUIのテスト手法が求められている。 There are roughly two types of automatic testing methods for GUI applications. An operation scenario refers to a series of processes that sequentially execute operation codes of multiple applications. In the following description, the operational code and operational scenarios used to test the application are referred to as "test code" and "test scenario", respectively. The method of creating a handwritten test scenario has the advantage of being able to create a highly readable test scenario, but on the other hand, it has the problem that the number of programmers who can create the test scenario is limited. The second method is to use GUI-operated capture and replay software. This method has the advantage of being less difficult to work than the method of preparing handwritten test code, but on the other hand, the test code generated by the capture replay software is less readable and less maintainable. I had a problem. Therefore, a more efficient GUI test method is required.

その他にも、近年、IT(Information Technology)業務の効率化が加速している。そのため、従来、職員がGUIアプリケーションを使ってデータの入出力をしていた業務の自動化、所謂RPA(Robotic Process Automation)が進んでいる。RPAにおいても、GUIアプリケーションの操作シナリオを効率よく作成する手段が求められている。 In addition, the efficiency of IT (Information Technology) operations is accelerating in recent years. For this reason, so-called RPA (Robotic Process Automation), which is the automation of tasks in which staff input and output data using GUI applications, is progressing. Also in RPA, there is a demand for means for efficiently creating operation scenarios for GUI applications.

GUIの操作シナリオの作成手法に関し、例えば、特開2011-048714号公報(特許文献1)は、「グラフィカル・ユーザ・インターフェースの指定状態を検出するコマンドを付加した共通様式のシナリオを、グラフィカル・ユーザ・インターフェースに応じた様式のコマンドに変更して、指示するステップと、グラフィカル・ユーザ・インターフェースの状態が指定状態であるか判断するステップと、判断するステップで、グラフィカル・ユーザ・インターフェースが指定状態にあるとコマンドを実行するステップとを含む」テスト支援方法を開示している([要約]参照)。 Regarding a method of creating a GUI operation scenario, for example, Japanese Patent Application Laid-Open No. 2011-048714 (Patent Document 1) discloses that "a common format scenario added with a command for detecting the specified state of a graphical user interface is generated by a graphical user interface. changing to a command in a format corresponding to the interface and instructing; determining whether the state of the graphical user interface is the specified state; (see [Abstract]).

特開2011-048714号公報JP 2011-048714 A

特許文献1に開示された技術によると、効率的に可読性およびメンテナンス性の高い操作シナリオを生成することができない。したがって、効率的に可読性およびメンテナンス性の高い操作シナリオを生成する技術が必要とされている。 According to the technique disclosed in Patent Document 1, it is not possible to efficiently generate an operation scenario with high readability and maintainability. Therefore, there is a need for techniques that efficiently generate highly readable and maintainable operational scenarios.

本開示は、上記のような背景に鑑みてなされたものであって、ある局面における目的は、効率的に可読性およびメンテナンス性の高い操作シナリオを生成する技術を提供することにある。 The present disclosure has been made in view of the background as described above, and an object in one aspect is to provide a technique for efficiently generating an operation scenario with high readability and maintainability.

ある実施の形態に従うと、コンピューターを制御するプログラムが提供される。このプログラムはコンピューターに、1以上のコントロールを含み、コンピューターのモニターに表示されているGUI(Graphical User Interface)の情報を取得するステップと、1以上のコントロールの各々をそれぞれ操作する1以上のコントロールドライバーを含むGUIドライバーを選択するステップと、取得したGUIの情報と、1以上のコントロールドライバーとに基づいて、1以上のコントロールの中から、キャプチャー対象となるコントロールを選択するステップと、選択されたコントロールが受け付けた操作をキャプチャーするステップと、キャプチャーの結果に基づいて、1以上のコントロールドライバーのいずれかに対応する操作コードを生成するステップとを実行させる。 According to one embodiment, a program for controlling a computer is provided. This program includes one or more controls in a computer, and includes a step of acquiring GUI (Graphical User Interface) information displayed on a monitor of the computer, and one or more control drivers that respectively operate each of the one or more controls. selecting a control to be captured from among the one or more controls based on the acquired GUI information and the one or more control drivers; and selecting the selected control captures the received operation; and generates an operation code corresponding to any one of the one or more control drivers based on the result of the capture.

ある局面において、1以上のコントロールドライバーの各々は、1以上のコントロールの各々を外部から操作するクラスである。GUIドライバーは、1以上のコントロールドライバーをプロパティとして含むクラスであり、GUIの情報に含まれる1以上のコントロールの各々を指定する情報と、1以上のコントロールドライバーの各々とを関連付けている。操作コードは、1以上のコントロールドライバーのいずれかのメソッドまたはプロパティを含む。 In one aspect, each of the one or more control drivers is a class that operates each of the one or more controls externally. A GUI driver is a class that includes one or more control drivers as properties, and associates each of the one or more control drivers with information specifying each of the one or more controls included in the GUI information. Operational code includes any method or property of one or more control drivers.

ある局面において、1以上のコントロールドライバーは、ユーザーにより定義されたカスタムコントロールドライバーを含む。 In one aspect, the one or more control drivers includes a user-defined custom control driver.

ある局面において、プログラムはコンピューターに、1以上のコントロールドライバーを含む外部プログラムを読み込むステップをさらに実行させる。 In one aspect, the program further causes the computer to load an external program including one or more control drivers.

ある局面において、プログラムはコンピューターに、1以上のコントロールドライバーの各々に対応する操作コード生成プログラムを呼び出すステップと、操作コード生成プログラムから、GUIのイベント発生時またはコントロールに関連するデータの変化時に、操作コード生成プログラムが生成する操作コードを受信するステップとをさらに実行させる。 In one aspect, the program instructs the computer to call an operation code generation program corresponding to each of the one or more control drivers; and receiving an operation code generated by the code generation program.

ある局面において、プログラムはコンピューターに、操作コードを実行した場合の出力結果を確認するための確認コードを生成するステップをさらに実行させる。確認コードは、1以上のコントロールドライバーのいずれかのメソッドまたはプロパティを含む。 In one aspect, the program further causes the computer to generate a confirmation code for confirming the output result of executing the operation code. The verification code includes any method or property of one or more control drivers.

他の実施の形態に従うと、ソフトウェアの操作コードを生成する方法が提供される。この方法は、1以上のコントロールを含み、コンピューターのモニターに表示されているGUIの情報を取得するステップと、1以上のコントロールの各々をそれぞれ操作する1以上のコントロールドライバーを含むGUIドライバーを選択するステップと、取得したGUIの情報と、1以上のコントロールドライバーとに基づいて、1以上のコントロールの中から、キャプチャー対象となるコントロールを選択するステップと、選択されたコントロールが受け付けた操作をキャプチャーするステップと、キャプチャーの結果に基づいて、1以上のコントロールドライバーのいずれかに対応する操作コードを生成するステップとを含む。 According to another embodiment, a method of generating operation code for software is provided. The method includes the steps of acquiring information of a GUI displayed on a computer monitor, including one or more controls, and selecting a GUI driver including one or more control drivers respectively operating each of the one or more controls. A step of selecting a control to be captured from among one or more controls based on the step, the acquired GUI information, and one or more control drivers, and capturing the operation received by the selected control. and generating opcodes corresponding to any of the one or more control drivers based on the results of the capture.

他の実施の形態に従うと、ソフトウェアの操作コードを生成する装置が提供される。この装置は、ユーザーからの操作を受け付ける入力部と、GUIを表示する表示部と、1以上のGUIドライバーを格納するメモリーと、制御部とを備える。制御部は、表示部に表示されている1以上のコントロールを含むGUIの情報を取得し、メモリーを参照し、1以上のコントロールの各々をそれぞれ操作する1以上のコントロールドライバーを含むGUIドライバーを選択し、取得したGUIの情報と、1以上のコントロールドライバーとに基づいて、1以上のコントロールの中から、キャプチャー対象となるコントロールを選択し、選択されたコントロールが入力部から受け付けた操作をキャプチャーし、キャプチャーの結果に基づいて、1以上のコントロールドライバーのいずれかに対応する操作コードを生成する。 According to another embodiment, an apparatus is provided for generating operation code for software. This device includes an input section that receives operations from a user, a display section that displays a GUI, a memory that stores one or more GUI drivers, and a control section. The control unit acquires GUI information including one or more controls displayed on the display unit, refers to the memory, and selects a GUI driver including one or more control drivers for operating each of the one or more controls. Then, based on the acquired GUI information and one or more control drivers, select a control to be captured from among one or more controls, and capture the operation received by the selected control from the input section. , based on the results of the capture, generate opcodes corresponding to any of the one or more control drivers.

本技術によれば、効率的に可読性およびメンテナンス性の高いソフトウェアの操作シナリオを生成することが可能である。 According to the present technology, it is possible to efficiently generate a software operation scenario with high readability and maintainability.

この発明の上記および他の目的、特徴、局面および利点は、添付の図面と関連して理解されるこの発明に関する次の詳細な説明から明らかとなるであろう。 The above and other objects, features, aspects and advantages of the present invention will become apparent from the following detailed description of the invention taken in conjunction with the accompanying drawings.

ある実施の形態に従う自動化支援プログラムによるテストシナリオ生成の概要の一例を示す図である。FIG. 4 is a diagram showing an example of an overview of test scenario generation by an automation support program according to an embodiment; FIG. 装置100のハードウェア構成の一例を示す図である。2 is a diagram illustrating an example of a hardware configuration of device 100; FIG. ある実施の形態に従う自動化支援プログラムの構成の一例を示す図である。It is a figure which shows an example of a structure of the automation support program according to one embodiment. PCで動作するネイティブアプリケーション400の一例を示す図である。4 is a diagram showing an example of a native application 400 running on a PC; FIG. GUIドライバー301の第1の例を示す図である。3 is a diagram showing a first example of a GUI driver 301; FIG. ウェブアプリケーションのGUI600の一例を示す図である。6 is a diagram showing an example of a GUI 600 of a web application; FIG. GUIドライバー301の第2の例を示す図である。FIG. 10 is a diagram showing a second example of the GUI driver 301; キャプチャージェネレイター303の動作概要の一例を示す図である。FIG. 10 is a diagram showing an example of an outline of the operation of the capture generator 303; FIG. テストシナリオの一例を示す図である。It is a figure which shows an example of a test scenario. 生成されたテストシナリオ1001をエディタ等に貼り付けた例を示す図である。FIG. 10 is a diagram showing an example in which the generated test scenario 1001 is pasted on an editor or the like; 自動化支援プログラム300の通信処理の手順の一例を示す図である。4 is a diagram showing an example of a communication processing procedure of the automation support program 300; FIG. 自動化支援プログラム300のテストシナリオ生成の処理手順の一例を示す図である。4 is a diagram showing an example of a test scenario generation processing procedure of the automation support program 300; FIG.

以下、図面を参照しつつ、本開示に係る技術思想の実施の形態について説明する。以下の説明では、同一の部品には同一の符号を付してある。それらの名称および機能も同じである。したがって、それらについての詳細な説明は繰り返さない。 Hereinafter, embodiments of the technical concept according to the present disclosure will be described with reference to the drawings. In the following description, the same parts are given the same reference numerals. Their names and functions are also the same. Therefore, detailed description thereof will not be repeated.

以降の説明では、本実施の形態に従う自動化支援プログラムによるGUIアプリケーションのテストコードおよびテストシナリオの作成手順について説明する。RPA用(GUIアプリケーションの操作自動化用)の操作コードおよび操作シナリオに関しても、検証用コードが不要な点を除けば、同様の手順で作成可能である。 In the following description, procedures for creating test codes and test scenarios for GUI applications by the automation support program according to this embodiment will be described. Operation codes and operation scenarios for RPA (for automating operations of GUI applications) can also be created in the same procedure, except that verification codes are unnecessary.

図1は、本実施の形態に従う自動化支援プログラムによるテストシナリオ生成の概要の一例を示す図である。本実施の形態に従う自動化支援プログラムは、アプリケーションに含まれるGUIのテストを支援するためのものであり、従来よりも少ない工数で可読性およびメンテナンス性に優れたテストシナリオを生成し得る。 FIG. 1 is a diagram showing an example of an overview of test scenario generation by an automation support program according to this embodiment. The automation support program according to the present embodiment is for supporting testing of GUIs included in applications, and can generate test scenarios with excellent readability and maintainability with less man-hours than before.

自動化支援プログラムは、単体で動作してもよいし、他のソフトウェアと連携して動作してもよい。一例として、他のソフトウェアは、アプリケーション開発用のエディタまたは統合開発環境(以下、IDE(Integrated Development Environment)と呼ぶ)であってもよい。ある局面において、自動化支援プログラムは、ウェブアプリケーションとして提供されてもよい。以降の説明では、自動化支援プログラムがIDEと連携してアプリケーション102のテストシナリオを生成する例を説明する。 The automation support program may operate alone or in cooperation with other software. As an example, the other software may be an editor for application development or an integrated development environment (hereinafter referred to as an IDE (Integrated Development Environment)). In one aspect, the automation support program may be provided as a web application. In the following description, an example in which the automation support program cooperates with the IDE to generate a test scenario for the application 102 will be described.

装置100は、自動化支援プログラムを実行する。ある局面において、装置100は、PC、ワークステーション、タブレットまたはスマートフォン等であってもよい。他の局面において、装置100は、サーバーまたはクラウド上で仮想的に構成された装置等であってもよい。 Device 100 executes an automation support program. In one aspect, device 100 may be a PC, workstation, tablet, smartphone, or the like. In other aspects, device 100 may be a device or the like that is virtually configured on a server or cloud.

IDE101は、エディタ、デバッガおよびコンパイラ等のアプリケーション開発に必要な機能を備えた開発用ソフトウェアである。IDE101は、プラグインまたはエクステンション等と呼ばれるソフトウェアまたはファイルを読み込むことにより、機能を拡張することができる。本実施の形態においては、自動化支援プログラムは、プラグインとしてIDE101と連携するものとして説明するが、自動化支援プログラムの実現方法はこれに限られない。ある局面において、自動化支援プログラムは、IDE101とは別に起動されるソフトウェアであってもよいし、自動化支援プログラムおよびIDE101が1つのアプリケーションとして提供されてもよい。 The IDE 101 is development software having functions necessary for application development, such as an editor, debugger, and compiler. The IDE 101 can extend its functions by reading software or files called plug-ins or extensions. In this embodiment, the automation support program will be described as being linked with the IDE 101 as a plug-in, but the implementation method of the automation support program is not limited to this. In a certain aspect, the automation support program may be software started separately from the IDE 101, or the automation support program and the IDE 101 may be provided as one application.

アプリケーション102は、テスト対象となる事前に開発されたアプリケーションであり、GUIを含む。アプリケーション102は、装置100によりテスト実行される。ある局面において、アプリケーション102は、PC等で動作するスタンドアロンのネイティブアプリケーションであってもよい。他の局面において、アプリケーション102は、装置100上でエミュレートされたスマートフォンまたはタブレット等の機器上で動作するGUIを含むネイティブアプリケーションであってもよい。他の局面において、アプリケーション102は、ブラウザ等のHTML(Hyper Text Markup Language)を表示するソフトウェア上で実行されるウェブアプリケーションのフロント部分であってもよい。 Application 102 is a pre-developed application under test and includes a GUI. Application 102 is test-executed by device 100 . In one aspect, application 102 may be a standalone native application running on a PC or the like. In other aspects, application 102 may be a native application including a GUI running on a device such as a smart phone or tablet emulated on device 100 . In other aspects, application 102 may be a front portion of a web application that runs on software that displays HTML (Hyper Text Markup Language), such as a browser.

アプリケーション102のGUIは、操作可能なテキストボックス、ボタンおよびプルダウン等の各種部品を含む。本実施の形態において、これらの部品をコントロールと呼ぶ。ある局面において、コントロールは、ウェブアプリケーションのHTMLで表現されたテキストボックス、ボタンおよびプルダウン等の各種部品も包含する。 The GUI of the application 102 includes various components such as operable text boxes, buttons and pulldowns. In this embodiment, these parts are called controls. In one aspect, controls also include various components such as text boxes, buttons, and pull-downs rendered in HTML for web applications.

アプリケーション102は、上記のコントロールを貼り付けたパネルとして表現されることが多く、これらのコントロールを貼り付ける枠の役割を果たす部品をウィンドウと呼ぶこともある。これらの枠となる部品は、入れ子型に配置することもできる。アプリケーション102は、これらコントロールと、ウィンドウ等の枠となる部品との組み合わせによって実現され得る。ウェブアプリケーションは、HTMLのタグによって構成されるウィンドウ等の枠に相当する部品を含み得る。 The application 102 is often expressed as a panel on which the above controls are pasted, and a component that serves as a frame to which these controls are pasted is sometimes called a window. These frame components can also be nested. The application 102 can be implemented by combining these controls with frame components such as windows. A web application may include a component corresponding to a frame such as a window configured by HTML tags.

アプリケーション102のテストの手順は、大きく分けて、ドライバーの作成、キャプチャー、テストシナリオの実行の3つを含む。以下に、これらの3つの手順について概要を説明する。 The procedure for testing the application 102 is roughly divided into three steps: driver creation, capture, and test scenario execution. These three procedures are outlined below.

(手順1 ドライバーの作成)
ここではアプリケーション102を操作するソフトウェアをドライバーと呼ぶ。ある局面において、ドライバーは、なんらかのプログラミング言語で定義されたクラスであってもよい。より具体的には、ドライバーは、各コントロールに対応するコントロールドライバーと、各ウィンドウまたは各GUIに対応するGUIドライバー(ウィンドウドライバー)とを含む。以下、一例として、ドライバーは、クラスであるものとして説明する。
(Procedure 1 Create a driver)
Software that operates the application 102 is called a driver here. In one aspect, a driver may be a class defined in some programming language. More specifically, the driver includes a control driver corresponding to each control and a GUI driver (window driver) corresponding to each window or each GUI. Hereinafter, as an example, the driver will be described as being a class.

最初に、ユーザーは、アプリケーション102のGUIに対応するGUIドライバーを用意または定義する必要がある。自動化支援プログラムは、GUIドライバー作成のための半自動生成機能または完全な自動生成機能を提供し得る。 First, the user must provide or define a GUI driver that corresponds to the GUI of application 102 . The automation assistant program may provide semi-automatic generation or full auto-generation functionality for GUI driver creation.

コントロールドライバーは、アプリケーション102のGUIに含まれる個別のコントロールに対応する。より具体的には、コントロールドライバーは、他のアプリケーションのコントロールを外部から操作することができる。コントロールドライバーは、内部に当該コントロールドライバーに対応するコントロールを操作するためのメソッドまたはプロパティを含む。自動化支援プログラムは、コントロールドライバーのメソッドまたはプロパティを呼び出すことで、アプリケーション102の各コントロールを外部から操作することができる。一例として、ボタンのコントロールドライバーであれば、他のアプリケーション内のボタンを操作することができる。ボタン以外にも、テキストボックス、ラベル、チェックボックスおよびラジオボタン等の任意のコントロールに対応する複数のコントロールドライバーが定義され得る。 Control drivers correspond to individual controls included in the GUI of application 102 . More specifically, the control driver can externally manipulate the controls of other applications. A control driver internally includes methods or properties for manipulating controls corresponding to the control driver. The automation support program can externally manipulate each control of the application 102 by calling the methods or properties of the control driver. As an example, a button control driver can manipulate buttons in other applications. Besides buttons, multiple control drivers can be defined that correspond to arbitrary controls such as text boxes, labels, checkboxes and radio buttons.

ある局面において、特定のOS上で動作するアプリケーションに使用され得る全てまたは一部のコントロールの各々に対応する複数のコントロールドライバーがそれぞれ予めクラスとして定義されていてもよい。他の局面において、ウェブアプリケーションに使用され得る全てまたは一部のコントロールの各々に対応する複数のコントロールドライバーのそれぞれが予めクラスとして定義されていてもよい。 In one aspect, a plurality of control drivers corresponding to all or some of the controls that can be used by an application running on a specific OS may be defined as classes in advance. In another aspect, each of a plurality of control drivers corresponding to each of all or some of the controls that may be used in the web application may be pre-defined as a class.

GUIドライバーは、テスト対象となるアプリケーションの個別のGUIに対応し得る。一例として、アプリケーション102が、操作画面としてGUI(1)、GUI(2)およびGUI(3)を含む場合、GUI(1)、GUI(2)およびGUI(3)の各々に対応したGUIドライバーが定義され得る。 A GUI driver may correspond to a separate GUI of the application under test. As an example, when the application 102 includes GUI(1), GUI(2) and GUI(3) as operation screens, GUI drivers corresponding to each of GUI(1), GUI(2) and GUI(3) are can be defined.

GUIドライバーは、当該GUIドライバーに対応するGUIが含む1以上のコントロールに対応する1以上のコントロールドライバーをプロパティもしくはメソッドとして含み得る。GUIドライバーは、コントロールドライバーをクラスのプロパティとして含み得る。一例として、GUIドライバー(A)は、GUI(A)に対応しているとする。GUI(A)が、コントロール(X),(Y),(Z)を含む場合、GUIドライバー(A)は、コントロール(X),(Y),(Z)にそれぞれ対応するコントロールドライバー(X),(Y),(Z)をプロパティとして含み得る。GUIドライバー(A)は、これらのコントロールドライバー(X)~(Z)を含むことにより、GUI(A)に含まれる各種コントロール(X)~(Z)を操作することが可能になる。さらに、GUIドライバーは、他のGUIドライバーをプロパティもしくはメソッドとして含み得る。ある局面において、テスト対象のGUI(M)の画面の一部(N)に対応するGUIドライバー(N)があるとする。この場合、GUI(M)に対応するGUIドライバー(M)は、GUIドライバー(N)を、プロパティもしくはメソッドとして含み得る。すなわち、画面全体に対応するGUIドライバー(M)は、画面の一部に対応するGUIドライバー(N)を含み得る。 A GUI driver can include, as properties or methods, one or more control drivers corresponding to one or more controls included in the GUI corresponding to the GUI driver. A GUI driver may contain a control driver as a property of the class. As an example, it is assumed that GUI driver (A) is compatible with GUI (A). If GUI (A) includes controls (X), (Y), and (Z), GUI driver (A) creates control drivers (X) corresponding to controls (X), (Y), and (Z), respectively. , (Y), (Z) as properties. By including these control drivers (X) to (Z), the GUI driver (A) can operate various controls (X) to (Z) included in the GUI (A). Additionally, a GUI driver may contain other GUI drivers as properties or methods. In one aspect, suppose there is a GUI driver (N) that corresponds to a screen portion (N) of the GUI under test (M). In this case, a GUI driver (M) corresponding to GUI (M) may include GUI driver (N) as a property or method. That is, the GUI driver (M) corresponding to the entire screen can include the GUI driver (N) corresponding to part of the screen.

GUIドライバーは、対応するGUIが含む全てのコントロールの各々に対応するコントロールドライバーを含む必要は無く、GUIが含む一部のコントロールに対応するコントロールドライバーのみを含んでいてもよい。一例として、上記のGUIドライバー(A)は、コントロールドライバー(X)~(Z)をプロパティとして含み得るが、その一部であるコントロールドライバー(X)のみを含んでいてもよい。 The GUI driver does not need to include control drivers corresponding to each of all the controls included in the corresponding GUI, and may include only control drivers corresponding to some controls included in the GUI. As an example, the GUI driver (A) may include the control drivers (X) to (Z) as properties, but may include only the control driver (X) which is a part thereof.

さらに、GUIドライバーは、アプリケーション102の各コントロールをそれぞれ指定するための情報と、各コントロールドライバーとをそれぞれ関連付けている。一例として、Microsoft(商標登録)社のWPF(Windows Presentation Foundation)機能を使ったアプリケーション102であれば、WPFに関する情報が、各コントロールをそれぞれ指定するための情報として使用され得る。ウェブアプリケーションであれば、HTMLタグに指定されるID(Identifier)等が各コントロールをそれぞれ指定するための情報として使用され得る。 Furthermore, the GUI driver associates information for designating each control of the application 102 with each control driver. As an example, if the application 102 uses Microsoft (registered trademark) WPF (Windows Presentation Foundation) function, information about WPF can be used as information for designating each control. In the case of a web application, an ID (Identifier) or the like specified in an HTML tag can be used as information for specifying each control.

ある局面において、各コントロールをそれぞれ指定するための情報は、各コントロールドライバーに引数として渡されてもよいが、関連付け方法はこれに限られない。各コントロールをそれぞれ指定するための情報と、各コントロールドライバーとの関連付けは、任意の方法によって実行され得る。 In a certain aspect, information for specifying each control may be passed as an argument to each control driver, but the method of association is not limited to this. Information for designating each control can be associated with each control driver by any method.

上記のように、GUIドライバーは、各コントロールをそれぞれ指定するための情報と、各コントロールドライバーとをそれぞれ関連付けることで、「各コントロールをそれぞれ指定するための情報」を隠蔽し得る。後述するテストコードは、GUIドライバーに含まれるコントロールドライバーのメソッドまたはプロパティを含む。そのため、GUIの仕様に変更が発生した場合でも、ユーザーはGUIドライバー内部の記載を変更するだけでテストコードを使用することができ、テストコードは極めて高いメンテナンス性を有する。 As described above, the GUI driver can hide the "information for designating each control" by associating the information for designating each control with each control driver. The test code described below includes methods or properties of the control driver included in the GUI driver. Therefore, even if the GUI specifications are changed, the user can use the test code simply by changing the description inside the GUI driver, and the test code has extremely high maintainability.

さらに、コントロールドライバーは、「コントロールを直接操作する処理」をメソッドとして隠蔽し得る。ユーザーは、コントロールドライバーのインスタンス名、メソッド名等を自由に定義できる。そのため、コントロールドライバーのメソッドまたはプロパティを含むテストコードは、極めて高い可読性を有する。 Furthermore, the control driver can hide the "processing that directly manipulates the control" as a method. The user can freely define the instance name, method name, etc. of the control driver. Therefore, the test code containing the control driver's methods or properties is extremely readable.

ある局面において、コントロールドライバーは、ライブラリまたは外部リンクに含めて再利用可能な形式で提供され得る。ユーザーは、これらの提供されるコントロールドライバーを利用して、アプリケーション102のGUIに対応するGUIドライバーを定義し得る。さらに、ユーザーは、独自のコントロールドライバーを定義し得る。ユーザーは、任意のコントロールに対して、自身で定義したメソッドを含むコントロールドライバーを定義することができる。コントロールドライバーは、これらのユーザー定義のカスタムコントロールドライバーを含むことにより、任意のコントロールを操作することができる。 In some aspects, the control driver may be provided in a reusable form, included in a library or externally linked. A user may utilize these provided control drivers to define a GUI driver that corresponds to the GUI of application 102 . Additionally, users can define their own control drivers. You can define a control driver that contains your own defined methods for any control. A control driver can manipulate any control by including these user-defined custom control drivers.

他の局面において、自動化支援プログラムは、各コントロールをそれぞれ指定するための情報と、予め用意されたコントロールドライバーとに基づいて、GUIドライバーを自動で生成してもよい。 In another aspect, the automation support program may automatically generate a GUI driver based on information for designating each control and a control driver prepared in advance.

自動化支援プログラムは、各コントロールをそれぞれ指定するための情報を取得するために、例えば、Codeer社が提供するライブラリFriendlyを用いてもよいし、Seleniumを用いてもよい。自動化支援プログラムは、これらのソフトウェアを内部に組み込んでもよいし、これらのソフトウェアと連携してもよい。ユーザーは、生成されたGUIドライバーをそのまま使用してもよいし、編集してもよい。具体的なGUI、コントロールドライバーおよびGUIドライバーの例は後述する。 The automation support program may use, for example, the library Friendly provided by Codeer, or Selenium to acquire information for designating each control. The automation support program may incorporate these pieces of software inside, or may cooperate with these pieces of software. The user may use the generated GUI driver as it is or edit it. Examples of specific GUIs, control drivers, and GUI drivers will be described later.

(手順2 キャプチャー)
次に、ユーザーは、アプリケーション102のGUIをテストするためのテストシナリオを用意する。自動化支援プログラムは、テストシナリオ作成のためのキャプチャー機能を提供する。ここでのキャプチャーとは、テスト対象のGUIの各コントロールの状態を取得することである。状態とは、イベントの発生または各コントロールに関連するデータ(入力フォームに入力された値等)の変化等を含み得る。
(Step 2 Capture)
The user then prepares a test scenario for testing the GUI of application 102 . The automation support program provides a capture function for creating test scenarios. Capturing here means acquiring the state of each control of the GUI under test. The state can include the occurrence of an event or a change in data related to each control (such as a value entered in an input form).

上述したように、テストシナリオは、テストコードを含む。テストコードは、アプリケーション102のGUIに含まれるコントロールの操作および検証コードを定義する。テストシナリオは、これらコントロールの操作および検証コードを定義するテストコード以外にも、ユーザー定義の任意のコードを含み得る。一例として、テストコード(A),(B),(C)を順番に実行するテストシナリオ(T1)があるとする。テストコード(A)は、テキストボックス(A)に何らかの文字列を書き込む機能を有する。テストコード(B)は、テキストボックス(B)にEメールアドレスを書き込む機能を有する。テストコード(C)は、送信ボタン(C)を押す機能を有する。この場合、テストシナリオ(T1)は、アプリケーション102のGUIに対して、メール本文と宛先アドレスとを設定して、メールを送信することになる。 As mentioned above, test scenarios include test code. The test code defines the manipulation and validation code for controls contained in the GUI of application 102 . A test scenario can include any user-defined code in addition to the test code that defines the manipulation and validation code for these controls. As an example, assume that there is a test scenario (T1) in which test codes (A), (B), and (C) are executed in order. Test code (A) has a function of writing some character string in text box (A). Test code (B) has the function of writing an e-mail address in text box (B). The test code (C) has the function of pushing the send button (C). In this case, the test scenario (T1) sets the mail text and the destination address for the GUI of the application 102, and sends the mail.

ユーザーは、これらのテストコード(A)~(C)を含むテストシナリオ(T1)を手動で書くことも可能であるが、手動でテストシナリオを作成した場合、プログラマーの作業工数が増えてしまう。そこで、自動化支援プログラムは、アプリケーション102のGUIの操作をキャプチャーし、当該操作に対応するテストコードを生成する機能を提供する。 The user can manually write the test scenario (T1) including these test codes (A) to (C), but manually creating the test scenario increases the programmer's man-hours. Therefore, the automation support program provides a function of capturing GUI operations of the application 102 and generating test code corresponding to the operations.

ある局面において、自動化支援プログラムは、アプリケーション102のGUIの操作をキャプチャーするとき、FriendlyまたはSelenium等を用いて、操作されたコントロールに関する情報を取得してもよい。 In one aspect, when the automation assistant program captures manipulation of the GUI of application 102, it may use Friendly or Selenium or the like to obtain information about the manipulated controls.

自動化支援プログラムは、キャプチャー結果に基づいて、コントロールドライバーに基づくテストコードを生成する。より具体的には、コントロールドライバーのクラスに含まれるメソッドまたはプロパティを呼び出すテストコードを生成する。一例として、アプリケーション102のGUIに含まれるボタンが押された場合、自動化支援プログラムは、ボタンを押すテストコードを生成する。このテストコードは、「ボタンに対応するコントロールドライバーのクラス」が有する「ボタンを押す操作を実行するメソッド」を呼び出す。 The automation assistant program generates test code based on the control driver based on the capture results. More specifically, it generates test code that calls methods or properties contained in the control driver's class. As an example, if a button included in the GUI of application 102 is pressed, the automation support program generates test code for pressing the button. This test code calls the "method for executing the button press operation" of the "control driver class corresponding to the button".

上記のように、自動化支援プログラムが生成するテストコードは、コントロールドライバー(クラス)のメソッドまたはプロパティを含むため、従来のキャプチャーリプレイソフトの生成するテストコードと比較して、極めて高い可読性を有する。さらに、GUIドライバーが、各コントロールをそれぞれ指定するための情報を隠蔽しているため、テストコードは、高いメンテナンス性も有する。自動化支援プログラムは、一連のキャプチャー結果に基づいて生成された複数のテストコードを含むテストシナリオをユーザーに提供する。具体的なテストコードの例は後述する。 As described above, the test code generated by the automation support program includes the methods or properties of the control driver (class), so it has extremely high readability compared to the test code generated by conventional capture and replay software. Furthermore, since the GUI driver hides the information for designating each control, the test code has high maintainability. The automation assistant presents the user with a test scenario containing multiple test codes generated based on a series of captured results. A specific test code example will be described later.

(手順3 テストシナリオの実行)
次に、ユーザーは、装置100にテストシナリオを実行させて、アプリケーション102の動作を確認する。装置100は、手書きのテストシナリオと同様に、自動化支援プログラムによって生成されたテストシナリオを実行することができる。
(Step 3 Execution of test scenario)
The user then causes the device 100 to run the test scenario to check the operation of the application 102 . The device 100 can execute test scenarios generated by automation support programs as well as handwritten test scenarios.

ある局面において、自動化支援プログラムによって生成されたテストシナリオは、プログラミング用のエディタ、IDEまたはコンソールアプリケーション等によって実行されてもよい。他の局面において、自動化支援プログラムが、テストシナリオを実行してもよい。 In one aspect, the test scenarios generated by the automation support program may be executed by a programming editor, IDE, console application, or the like. In other aspects, an automated assistant program may execute the test scenario.

図2は、装置100のハードウェア構成の一例を示す図である。図2を参照して、装置100のハードウェア構成と、各構成の機能とについて説明する。装置100は、上述したとおり、例えば、PCまたはワークステーション等である。ユーザーは、装置100を用いて、アプリケーション102のテストを実行する。 FIG. 2 is a diagram showing an example of the hardware configuration of the device 100. As shown in FIG. The hardware configuration of the device 100 and the functions of each configuration will be described with reference to FIG. Device 100 is, for example, a PC or workstation, as described above. A user uses device 100 to perform a test of application 102 .

装置100は、制御装置201と、RAM(Random Access Memory)202と、入力インターフェイス203と、出力インターフェイス204と、外部機器インターフェイス205と、通信インターフェイス206と、記憶装置207とを含む。 The device 100 includes a control device 201 , a RAM (Random Access Memory) 202 , an input interface 203 , an output interface 204 , an external device interface 205 , a communication interface 206 and a storage device 207 .

制御装置201は、装置100を制御し、自動化支援プログラム、アプリケーション102および各種プログラミングツール等を実行する。制御装置201は、例えば、少なくとも1つの集積回路によって構成される。集積回路は、例えば、少なくとも1つのCPU(Central Processing Unit)、少なくとも1つのASIC(Application Specific Integrated Circuit)、少なくとも1つのFPGA(Field-Programmable Gate Array)、またはこれらの組み合わせ等によって構成される。 A control device 201 controls the device 100 and executes an automation support program, an application 102, various programming tools, and the like. The control device 201 is composed of, for example, at least one integrated circuit. The integrated circuit is composed of, for example, at least one CPU (Central Processing Unit), at least one ASIC (Application Specific Integrated Circuit), at least one FPGA (Field-Programmable Gate Array), or a combination thereof.

RAM202は、制御装置201によって実行されるプログラムと、制御装置201によって参照されるデータとを格納する。ある局面において、DRAM(Dynamic Random Access Memory)またはSRAM(Static Random Access Memory)が、RAM202として使用されてもよい。制御装置201は、アプリケーション102、自動化支援プログラムおよびその他のプログラミングツール等をRAM202から読み込んで実行する。 The RAM 202 stores programs executed by the control device 201 and data referred to by the control device 201 . In some aspects, dynamic random access memory (DRAM) or static random access memory (SRAM) may be used as RAM 202 . The control device 201 reads the application 102, the automation support program, other programming tools, etc. from the RAM 202 and executes them.

入力インターフェイス203は、キーボード、マウスまたはゲームパッド等の任意の入力装置に接続され得る。ある局面において、USB(Universal Serial Bus)端子、PS/2端子およびBluetooth(登録商標)モジュール等が入力インターフェイス203として使用されてもよい。ユーザーは、入力インターフェイス203を介して、自動化支援プログラムに対するキャプチャー実行命令等を装置100に入力する。 Input interface 203 may be connected to any input device such as a keyboard, mouse or gamepad. In one aspect, a USB (Universal Serial Bus) terminal, a PS/2 terminal, a Bluetooth (registered trademark) module, or the like may be used as the input interface 203 . A user inputs a capture execution command or the like for the automation support program to the device 100 via the input interface 203 .

出力インターフェイス204は、ブラウン管ディスプレイ、液晶ディスプレイまたは有機EL(electro-luminescence)ディスプレイ等の任意の出力装置に接続され得る。ある局面において、USB(Universal Serial Bus)端子、D-sub端子、DVI端子およびHDMI(登録商標)端子等が出力インターフェイス204として使用されてもよい。ユーザーは、出力インターフェイスを介して、液晶ディスプレイ等に表示されたアプリケーション102およびテストシナリオの実行結果等を確認することで、アプリケーション102の動作確認を行う。 The output interface 204 can be connected to any output device such as a CRT display, a liquid crystal display, or an organic EL (electro-luminescence) display. In some aspects, a USB (Universal Serial Bus) terminal, a D-sub terminal, a DVI terminal, an HDMI (registered trademark) terminal, or the like may be used as the output interface 204 . The user confirms the operation of the application 102 by confirming the application 102 displayed on the liquid crystal display or the like, the execution result of the test scenario, and the like via the output interface.

外部機器インターフェイス205は、プリンター、スキャナーおよび外付けHDD(Hard Disk Drive)等の任意の外部機器に接続され得る。ある局面において、USB(Universal Serial Bus)端子等が外部機器インターフェイス205として使用されてもよい。 The external device interface 205 can be connected to arbitrary external devices such as printers, scanners, and external HDDs (Hard Disk Drives). In one aspect, a USB (Universal Serial Bus) terminal or the like may be used as the external device interface 205 .

通信インターフェイス206は、有線または無線のネットワーク機器と接続される。ある局面において、有線LAN(Local Area Network)ポートおよびWi-Fi(登録商標)モジュール等が通信インターフェイス206として使用されてもよい。 The communication interface 206 is connected to wired or wireless network equipment. In some aspects, a wired LAN (Local Area Network) port, a Wi-Fi (registered trademark) module, or the like may be used as communication interface 206 .

記憶装置207は、不揮発性の記憶媒体であり、装置100の電源が切れた後もデータを保存しておくことができる。記憶装置207は、制御装置201によって実行されるプログラムと、制御装置201によって参照されるデータとを格納する。ある局面において、HDDおよびSSD(Solid State Drive)が記憶装置207として使用されてもよい。自動化支援プログラムによって生成されたGUIドライバーおよびテストシナリオ等は、記憶装置207に保存され得る。 The storage device 207 is a non-volatile storage medium and can retain data even after the power of the device 100 is turned off. The storage device 207 stores programs executed by the control device 201 and data referred to by the control device 201 . In one aspect, HDDs and SSDs (Solid State Drives) may be used as the storage device 207 . GUI drivers, test scenarios, etc. generated by the automation support program can be stored in the storage device 207 .

図3は、本実施の形態に従う自動化支援プログラム300の構成の一例を示す図である。自動化支援プログラム300は、GUIドライバー301と、コントロールドライバー302と、キャプチャージェネレイター303とを含む。 FIG. 3 is a diagram showing an example of the configuration of automation support program 300 according to the present embodiment. The automation support program 300 includes a GUI driver 301 , a control driver 302 and a capture generator 303 .

GUIドライバー301は、上述したように、テスト対象となるアプリケーションの個別のGUIに対応するクラスである。GUIドライバー301は、テスト対象となるアプリケーションのGUIごとに作成される。そのため、GUIドライバー301は、テスト対象となるアプリケーションのGUIの数だけ、自動または手動によって生成され得る。ある局面において、自動化支援プログラム300は、全てまたは一部のGUIドライバー301を外部プログラムとして読み込んでもよい。 The GUI driver 301 is a class corresponding to the individual GUI of the application to be tested, as described above. A GUI driver 301 is created for each GUI of an application to be tested. Therefore, GUI drivers 301 can be automatically or manually generated for the number of GUIs of the application to be tested. In one aspect, the automation support program 300 may load all or part of the GUI driver 301 as an external program.

コントロールドライバー302は、上述したように、GUIに含まれ得る個別のコントロールに対応するクラスである。特定のOS上で動作するアプリケーションまたはウェブアプリケーションに使用される全てのコントロールの各々に対応する複数のコントロールドライバー302が事前に定義されてもよい。ある局面において、自動化支援プログラム300は、コントロールドライバー302を外部プログラムとして読み込んでもよい。例えば、コントロールドライバー302は、各種コントロールという汎用的な部品に対応しており、DLL(Dynamic Link Library)等に組み込まれて外部プログラムとして使用されることで、ユーザーの利便性が向上する。 Control drivers 302 are classes that correspond to individual controls that may be included in the GUI, as described above. Multiple control drivers 302 may be predefined, one for each of all controls used by an application or web application running on a particular OS. In one aspect, automation support program 300 may load control driver 302 as an external program. For example, the control driver 302 supports general-purpose components such as various controls, and is incorporated into a DLL (Dynamic Link Library) or the like and used as an external program, thereby improving user convenience.

キャプチャージェネレイター303は、テストコードを生成するプログラムであり、コントロールごとに定義され得る。各キャプチャージェネレイター303は、各コントロールドライバー302にそれぞれ対応する。一例として、ボタンのキャプチャージェネレイター303は、ボタンのコントロールドライバー302に対応する。他の例として、テキストボックスのキャプチャージェネレイター303は、テキストボックスのコントロールドライバー302に対応する。 Capture generator 303 is a program that generates test code and can be defined for each control. Each capture generator 303 corresponds to each control driver 302 respectively. As an example, button capture generator 303 corresponds to button control driver 302 . As another example, the textbox capture generator 303 corresponds to the textbox control driver 302 .

ユーザーは、キャプチャージェネレイター303も、コントロールドライバー302と同様に独自に定義することができる。自動化支援プログラム300は、ユーザー定義の任意のコントロールドライバー302およびキャプチャージェネレイター303を使用し得る。 The user can also independently define the capture generator 303 as well as the control driver 302 . Automation assistant program 300 may use any user-defined control driver 302 and capture generator 303 .

キャプチャージェネレイター303は、テスト対象のアプリケーションのGUIに含まれるコントロールが操作されたときに、当該操作に対応するテストコードを生成する。ある局面において、自動化支援プログラム300は、テスト対象のアプリケーションにキャプチャージェネレイター303を送信してもよい。この場合、テスト対象のアプリケーションのGUIに含まれるコントロールが操作されたとき(イベントが発生またはコントロールに関連するデータに変化が発生したとき)、テスト対象のアプリケーション内でキャプチャージェネレイター303が実行される。キャプチャージェネレイター303は、テストコードを生成し、当該テストコードを自動化支援プログラム300に送信する。 The capture generator 303 generates test code corresponding to the operation when a control included in the GUI of the application under test is operated. In one aspect, automation assistant program 300 may send capture generator 303 to the application under test. In this case, when a control included in the GUI of the application under test is operated (when an event occurs or data associated with the control changes), the capture generator 303 is executed within the application under test. The capture generator 303 generates test code and transmits the test code to the automation support program 300 .

他の局面において、自動化支援プログラム300は、FriendlyまたはSelenium等のソフトウェアの機能を利用して、テスト対象のアプリケーションのイベント発生またはコントロールに関連するデータの変化を常に監視てしておいてもよい。この場合、自動化支援プログラム300は、テスト対象のアプリケーションのGUIに含まれるコントロールが操作されたとき(イベントが発生またはコントロールに関連するデータに変化が発生したとき)、キャプチャージェネレイター303に当該操作に対応するテストコードを生成させる。 In other aspects, the automation assistant program 300 may utilize features of software such as Friendly or Selenium to constantly monitor changes in data related to event generation or control of the application under test. In this case, when a control included in the GUI of the application under test is operated (when an event occurs or data related to the control changes), the automation support program 300 causes the capture generator 303 to respond to the operation. Generate test code to

次に、図4~図7を参照して、テスト対象のアプリケーションのGUI、GUIドライバー301およびコントロールドライバー302の詳細について説明する。以下の説明では、PC上で動作するネイティブアプリケーションおよびウェブアプリケーションを例示しているが、タブレットおよびスマートフォン等の他の機器で動作するGUIアプリケーションについても同様の手法を適用できる。 Next, details of the GUI of the application under test, the GUI driver 301 and the control driver 302 will be described with reference to FIGS. 4 to 7. FIG. Although native applications and web applications that run on PCs are exemplified in the following description, similar techniques can be applied to GUI applications that run on other devices such as tablets and smartphones.

図4は、PCで動作するネイティブアプリケーション400の一例を示す図である。ネイティブアプリケーション400は、コントロールの一部として、名前のテキストボックス401と、カレンダー402と、数字入力ボックス403と、Eメールのテキストボックス404と、言語選択のプルダウンメニュー405と、性別選択のラジオボタン406と、エントリーボタン407と、キャンセルボタン408とを含む。ネイティブアプリケーション400のName、Birthday等のラベルおよび画面上部のメニュー等もコントロールであるが、以下の説明には関係しないため、詳細は説明しない。 FIG. 4 is a diagram showing an example of a native application 400 running on a PC. The native application 400 includes, as part of its controls, a name text box 401, a calendar 402, a number input box 403, an email text box 404, a language selection pull-down menu 405, and a gender selection radio button 406. , an entry button 407 and a cancel button 408 . Labels such as Name and Birthday of the native application 400 and menus at the top of the screen are also controls, but they are not related to the following description and will not be described in detail.

テキストボックス401,404は、文字列の入力を受け付ける。カレンダー402は、年月日の選択操作を受け付ける。数字入力ボックス403は、数値の入力を受け付け、数値のカウントアップ、カウントダウンのボタンを含む。プルダウンメニュー405は、予め定められたメニューの選択操作を受け付ける。ラジオボタン406は、選択肢のうちの1つを選択する操作を受け付ける。エントリーボタン407およびキャンセルボタン408は、押下処理を受け付ける。 Text boxes 401 and 404 accept input of character strings. Calendar 402 accepts an operation to select a date. The number input box 403 accepts input of numerical values, and includes buttons for counting up and counting down numerical values. Pull-down menu 405 accepts a predetermined menu selection operation. Radio button 406 accepts an operation to select one of the options. The entry button 407 and the cancel button 408 accept pressing processing.

ユーザーは、上記のネイティブアプリケーション400を作成し、テキストボックス401~キャンセルボタン408までのコントロールを用いたテストを行いたいとする。その場合、一例として、図5に示すGUIドライバー301のクラス501が必要になる。 A user wants to create the native application 400 described above and perform a test using the controls from the text box 401 to the cancel button 408 . In that case, as an example, a class 501 of the GUI driver 301 shown in FIG. 5 is required.

図5は、GUIドライバー301の第1の例を示す図である。図5に示されるソースコードは、GUIドライバー301の一部分を示している。ある局面において、自動化支援プログラム300は、GUIドライバー301を使用するとき、当該GUIドライバー301のソースファイルを読み込んでビルドしてもよい。他の局面において、自動化支援プログラム300は、予めビルドされたGUIドライバー301のバイナリファイルを読み込んでもよい。 FIG. 5 is a diagram showing a first example of the GUI driver 301. As shown in FIG. The source code shown in FIG. 5 shows part of the GUI driver 301 . In one aspect, the automation support program 300 may read and build the source files of the GUI driver 301 when using the GUI driver 301 . In another aspect, the automation support program 300 may load a pre-built GUI driver 301 binary file.

クラス501は、GUIドライバー301を定義する。クラス501は、複数のコントロールドライバー302をコントロールプロパティ502として含み得る。より具体的には、クラス501は、テキストボックス401~キャンセルボタン408までのコントロールの各々に対応する各コントロールドライバー302のインスタンスの作成処理を含む。 Class 501 defines GUI driver 301 . A class 501 may contain multiple control drivers 302 as control properties 502 . More specifically, the class 501 includes processing for creating an instance of each control driver 302 corresponding to each of the controls from the text box 401 to the cancel button 408 .

さらに、クラス501は、「各コントロールをそれぞれ指定するための情報」と、「各コントロールドライバー302のインスタンス」とを対応付けする。図5の例では、各コントロールをそれぞれ指定するための情報を各コントロールドライバー302に、引数として渡すことで、関連付けている。 Further, the class 501 associates "information for designating each control" with "instance of each control driver 302". In the example of FIG. 5, information for designating each control is passed to each control driver 302 as an argument to associate them.

以降の説明では、区別のために、コントロールドライバー302によって特定されるGUIドライバー301内のインスタンスを「コントロールプロパティ」と呼ぶ。例えば、「Name」,「Birthday」はコントロールプロパティ502である。コントロールプロパティ502に割り当てられるクラスを「コントロールドライバー302」と呼ぶ。例えば、「WPFTextBox」,「WPFCalendar」はコントロールドライバー302である。 In the following description, the instance in the GUI driver 301 specified by the control driver 302 is called "control property" for distinction. For example, “Name” and “Birthday” are control properties 502 . A class assigned to the control property 502 is called a "control driver 302". For example, “WPFTextBox” and “WPFCalendar” are control drivers 302 .

図5の例では、コントロールプロパティ502は、WPFを用いて作成されたコントロールを操作する機能を有するが、各コントロールドライバー302の機能はこれに限られない。ある局面において、各コントロールドライバー302は、任意のOS、ウェブ等の各種プラットフォームのコントロールごとに定義され得る。 In the example of FIG. 5, the control property 502 has the function of operating controls created using WPF, but the functions of each control driver 302 are not limited to this. In one aspect, each control driver 302 can be defined for each control of various platforms such as any OS, web, and the like.

クラス501は、テキストボックス401~キャンセルボタン408までのコントロールの各々に対応する各コントロールプロパティ502を含むことにより、外部からネイティブアプリケーション400のコントロール(テキストボックス401~キャンセルボタン408)を操作することができる。 The class 501 includes each control property 502 corresponding to each of the controls from the text box 401 to the cancel button 408, so that the controls (the text box 401 to the cancel button 408) of the native application 400 can be operated from the outside. .

各コントロールプロパティ502は、上述したように、任意のOS、ウェブ等の各種プラットフォームのコントロールごとに定義される汎用的なコントロールドライバー302によって作成される。そのため、ユーザーは、GUIドライバー301に、自身の作成したネイティブアプリケーション400に含まれるコントロールに対応するコントロールドライバー302のコントロールプロパティ502(インスタンス)の作成処理を追加するだけでよい。例えば、Name~Cancelまでのインスタンスは、全て事前に用意されているコントロールドライバー302から作成されている。 Each control property 502 is created by the general-purpose control driver 302 defined for each control of various platforms such as any OS, web, etc., as described above. Therefore, the user only needs to add to the GUI driver 301 the process of creating the control property 502 (instance) of the control driver 302 corresponding to the control included in the native application 400 created by the user. For example, instances from Name to Cancel are all created from the control driver 302 prepared in advance.

装置100は、実際に自動化支援プログラム300を実行するときに、各コントロールプロパティ502のインスタンス生成時のクラス名(コントロールドライバー302)および引数(各コントロールをそれぞれ指定するための情報)を参照することで、各コントロールプロパティ502が、いずれのコントロールを操作するのか判別することができる。一例として、「Email」は、「WPFTextBox」クラスであり、テキストボックスを操作する。「Email」の引数(各コントロールをそれぞれ指定するための情報)は、「~ByBinding("Mail.Value").Single()」となっており、「Email」は、Eメールのテキストボックス404を操作することがわかる。各コントロールをそれぞれ指定するための情報となる情報は、プラットフォームにより異なる。 When the automation support program 300 is actually executed, the device 100 refers to the class name (control driver 302) and argument (information for designating each control) at the time of instantiation generation of each control property 502. , each control property 502 can determine which control to operate. As an example, "Email" is a "WPFTextBox" class and manipulates text boxes. The argument (information for specifying each control) of "Email" is "~ByBinding("Mail.Value").Single()", and "Email" is the text box 404 of the email. know to operate. The information for specifying each control differs depending on the platform.

上述のように、コントロールドライバー302は、GUIドライバー301内で汎用的な部品を操作するコントロールプロパティ502として使用され得る。さらに、自動化支援プログラム300は、ユーザーによって作成された新しいコントロールをテストすることも可能である。自動化支援プログラム300は、ユーザー定義のコントロールドライバー302を使用することで、ユーザー定義のコントロールドライバー302に対応する任意のコントロールのテストコードを生成できる。これらの新しく作成されたコントロールドライバー302は、DLL等に含められて配信されることで、他のユーザーも使用し得る。このように、自動化支援プログラム300は、汎用的なコントロールに対応するコントロールドライバー302以外にも、ユーザー定義のコントロールに対応するコントロールドライバー302を使用し得る。 As described above, control driver 302 can be used as control property 502 to manipulate generic components within GUI driver 301 . In addition, the automation assistant program 300 is also capable of testing new controls created by the user. The automation support program 300 can use the user-defined control driver 302 to generate test code for any control corresponding to the user-defined control driver 302 . These newly created control drivers 302 can also be used by other users by being included in a DLL or the like and distributed. Thus, the automation support program 300 can use control drivers 302 corresponding to user-defined controls in addition to control drivers 302 corresponding to general-purpose controls.

後述するテストコードは、GUIドライバー301に定義された各コントロールプロパティ502のメソッドまたはプロパティを呼び出す。すなわち、本実施の形態において、GUIドライバー301およびコントロールプロパティ502の定義と、テストコードを含むテストシナリオとは分離されている。GUIドライバー301およびコントロールプロパティ502の定義と、テストシナリオとが分離されることにより、テストシナリオの可読性およびメンテナンス性が高くなる。 A test code, which will be described later, calls methods or properties of each control property 502 defined in the GUI driver 301 . That is, in this embodiment, the definitions of the GUI driver 301 and the control properties 502 are separated from the test scenario including the test code. Separating the definition of the GUI driver 301 and the control property 502 from the test scenario increases the readability and maintainability of the test scenario.

従来のテストシナリオを作成するキャプチャープログラムは、「各コントロールをそれぞれ指定するための情報」および「コントロールを直接操作する処理」を全て含んだ可読性およびメンテナンス性の低いテストコードを生成していた。そのため、アプリケーションの仕様変更が発生した場合、今までに生成された全てのテストコードは使用できなくなった。 Conventional capture programs that create test scenarios generate test code with low readability and low maintenance that includes both "information for specifying each control" and "processing that directly manipulates controls". Therefore, when the specification of the application is changed, all the test codes that have been generated so far cannot be used.

これに対し、本実施の形態における自動化支援プログラム300は、ネイティブアプリケーション400の仕様が変更されたとしても、コントロールプロパティ502の定義(クラスの型、引数等(各コントロールをそれぞれ指定するための情報))等を変更するだけで、テストシナリオを利用することができる。 On the other hand, the automation support program 300 according to the present embodiment, even if the specifications of the native application 400 are changed, the definition of the control property 502 (class type, argument, etc. (information for specifying each control)) ), etc., the test scenario can be used.

図6は、ウェブアプリケーションのGUI600の一例を示す図である。ウェブアプリケーションは、ブラウザ等により実行されるため、様々な機器に配信されるアプリケーションとして使用されることも多い。自動化支援プログラム300は、このようなウェブアプリケーションのGUIに関しても、ネイティブアプリケーションのGUIと同様にテストすることができる。 FIG. 6 is a diagram showing an example of a GUI 600 of a web application. Since web applications are executed by browsers and the like, they are often used as applications distributed to various devices. The automation support program 300 can test the GUI of such a web application as well as the GUI of a native application.

ウェブアプリケーション600は、コントロールの一部として、タイトルのテキストボックス601と、放送開始日のテキストボックス602と、ジャンルのテキストボックス603と、値段のテキストボックス604と、保存ボタン605とを含む。 The web application 600 includes, as part of the controls, a title text box 601, a broadcast start date text box 602, a genre text box 603, a price text box 604, and a save button 605. FIG.

ユーザーは、上記のウェブアプリケーションのGUI600を作成し、テキストボックス601~保存ボタン605までのコントロールを用いたテストを行いたいとする。その場合、一例として、図7に示すGUIドライバー301のクラス701が必要になる。 A user creates the GUI 600 of the above web application and wants to test using the controls from the text box 601 to the save button 605 . In that case, as an example, a class 701 of the GUI driver 301 shown in FIG. 7 is required.

図7は、GUIドライバー301の第2の例を示す図である。図7に示すソースコードは、GUIドライバー301の一部分を示している。ある局面において、自動化支援プログラム300は、GUIドライバー301を使用するとき、当該GUIドライバー301のソースファイルを読み込んでビルドしてもよい。他の局面において、自動化支援プログラム300は、予めビルドされたGUIドライバー301のバイナリファイルを読み込んでもよい。 FIG. 7 is a diagram showing a second example of the GUI driver 301. As shown in FIG. The source code shown in FIG. 7 shows part of the GUI driver 301 . In one aspect, the automation support program 300 may read and build the source files of the GUI driver 301 when using the GUI driver 301 . In another aspect, the automation support program 300 may load a pre-built GUI driver 301 binary file.

クラス701は、GUIドライバー301を定義する。クラス701は、複数のコントロールドライバー302をコントロールプロパティ702として含み得る。より具体的には、クラス501は、テキストボックス601~保存ボタン605までのコントロールの各々に対応するコントロールドライバー302のインスタンスの作成処理を含む。 Class 701 defines GUI driver 301 . A class 701 may contain multiple control drivers 302 as control properties 702 . More specifically, class 501 includes processing for creating instances of control driver 302 corresponding to each of the controls from text box 601 to save button 605 .

図5と図7とを比較すると、コントロールプロパティ502およびコントロールプロパティ702の記述が異なることがわかる。コントロールプロパティ502は、WPFのコントロールを操作するコントロールドライバー302に、WPFに関する情報を渡している。一方で、コントロールプロパティ702は、ウェブアプリケーションのコントロールを操作するコントロールドライバー302に、ウェブアプリケーションに関する情報を渡している。すなわち、自動化支援プログラム300は、GUIドライバー301内で使用するコントロールドライバー302および当該コントロールドライバー302に渡される情報(各コントロールをそれぞれ指定するための情報)を変更するだけで、様々なプラットフォームに対応することができる。 Comparing FIG. 5 and FIG. 7 reveals that the descriptions of the control property 502 and the control property 702 are different. The control property 502 passes information about WPF to the control driver 302 that operates the WPF controls. Control properties 702, on the other hand, pass information about the web application to the control driver 302, which manipulates the web application's controls. That is, the automation support program 300 supports various platforms simply by changing the control driver 302 used in the GUI driver 301 and the information passed to the control driver 302 (information for specifying each control). be able to.

次に、図8~図10を参照して、テストシナリオの生成処理について説明する。以降の説明では、図4のネイティブアプリケーション400を例に説明するが、自動化支援プログラム300は、ウェブアプリケーション600およびその他のプラットフォームのGUIアプリケーションのテストに関しても、同様の手順でテストシナリオを作成できる。 Next, test scenario generation processing will be described with reference to FIGS. 8 to 10. FIG. In the following description, the native application 400 in FIG. 4 will be used as an example, but the automation support program 300 can also create test scenarios for testing the web application 600 and GUI applications of other platforms using similar procedures.

図8は、キャプチャージェネレイター303の動作概要の一例を説明する。手順801において、自動化支援プログラム300は、アプリケーション102に、キャプチャージェネレイター303を送信する。このとき、コントロールプロパティ502の各々に対応したキャプチャージェネレイター303が、アプリケーション102に送信される。キャプチャージェネレイター303は、アプリケーション102内部で実行される。 FIG. 8 illustrates an example of an outline of the operation of the capture generator 303. FIG. In procedure 801 , the automation support program 300 sends the capture generator 303 to the application 102 . At this time, the capture generator 303 corresponding to each control property 502 is sent to the application 102 . Capture generator 303 runs inside application 102 .

ある局面において、自動化支援プログラム300は、GUIドライバー301としてクラス501を使用する場合、コントロールプロパティ502の各々に対応する各キャプチャージェネレイター303をアプリケーション102に送信してもよい。 In one aspect, automation assistant program 300 may send each capture generator 303 corresponding to each of control properties 502 to application 102 when using class 501 as GUI driver 301 .

他の局面において、キャプチャージェネレイター303は、同一のコントロールドライバー302によって定義された複数のコントロールプロパティ502に対応付けられていてもよい。例えば、コントロール(A)~(C)に対応するコントロールプロパティ(A)~(C)のいずれもが、「WPFTextBox」クラスである場合、「WPFTextBox」クラスに対応するキャプチャージェネレイター303(X)がコントロールプロパティ(A)~(C)に対応付けられてもよい。その場合、自動化支援プログラム300は、コントロール(A)~(C)の操作をキャプチャーするために、キャプチャージェネレイター303(X)をアプリケーション102に送信し得る。 In other aspects, capture generator 303 may be associated with multiple control properties 502 defined by the same control driver 302 . For example, if all of the control properties (A) to (C) corresponding to the controls (A) to (C) are of the "WPFTextBox" class, the capture generator 303 (X) corresponding to the "WPFTextBox" class is the control It may be associated with properties (A) to (C). In that case, automation assistant program 300 may send capture generator 303(X) to application 102 to capture the manipulation of controls (A)-(C).

手順802において、送信された各キャプチャージェネレイター303は、アプリケーション102で発生したイベントまたはコントロールに関連するデータの変化を検知して、対応するテストコードを生成する。例えば、テキストボックス401を監視するキャプチャージェネレイター303(Y)は、テキストボックス401の操作イベントの発生を検知して、当該操作イベントに対応するテストコードを生成する。テストコードは、実際に行われた操作と同じ処理になる。一例として、テキストボックス401に「たなか」と入力された場合、キャプチャージェネレイター303(Y)は、テキストボックス401に「たなか」と入力するテストコードを生成する。自動化支援プログラム300は、各キャプチャージェネレイター303によって生成されたテストコードを取得し、一つにまとめることによりテストシナリオ803を作成する。 In step 802, each transmitted capture generator 303 detects changes in data associated with events or controls occurring in the application 102 and generates corresponding test code. For example, the capture generator 303(Y) that monitors the text box 401 detects the occurrence of an operation event for the text box 401 and generates test code corresponding to the operation event. The test code will be the same processing as the actual operation. As an example, when “tanaka” is entered in the text box 401 , the capture generator 303 (Y) generates test code for entering “tanaka” in the text box 401 . The automation support program 300 acquires the test code generated by each capture generator 303 and integrates them into one to create a test scenario 803 .

ある局面において、自動化支援プログラム300は、キャプチャージェネレイター303をアプリケーション102に送信する代わりに、Friendly等の機能を用いてアプリケーション102の各コントロールの操作(イベント発生またはコントロールに関連するデータの変化)を監視するだけでもよい。自動化支援プログラム300は、各コントロールの操作を検知したときに、キャプチャージェネレイター303にテストコードを生成させてもよい。 In one aspect, instead of sending the capture generator 303 to the application 102, the automation support program 300 uses a function such as Friendly to monitor the operation of each control of the application 102 (occurrence of an event or change in data related to the control). You can just do it. The automation support program 300 may cause the capture generator 303 to generate test code when detecting the operation of each control.

図9は、テストシナリオの一例を示す図である。テストシナリオは、生成されたテストコード901と、検証用コード902とを含む。テストコード901は、キャプチャージェネレイター303によって生成されたものであり、当該テストコード901は、アプリケーション102に対して、テスト操作を実行する。 FIG. 9 is a diagram showing an example of a test scenario. The test scenario includes generated test code 901 and verification code 902 . The test code 901 is generated by the capture generator 303 and the test code 901 executes test operations on the application 102 .

検証用コード902は、テストコード901が実行されたときの各コントロールへの出力結果等を検証する。キャプチャージェネレイター303は、テストコードを生成したときの出力結果に基づいて、当該検証用コード902を生成し得る。検証用コード902は、本来と異なる出力結果が得られたときに例外を発生させ得る。検証用コード902は、テストコード901と同様に、コントロールドライバー302のメソッドまたはプロパティを含む。 The verification code 902 verifies output results to each control when the test code 901 is executed. The capture generator 303 can generate the verification code 902 based on the output result when generating the test code. The verification code 902 can raise an exception when an output result different from the original is obtained. The verification code 902 includes methods or properties of the control driver 302, similar to the test code 901. FIG.

各テストコード901および検証用コード902は、いずれもGUIドライバー301のクラス501に含まれるコントロールプロパティ502のメソッドまたはプロパティを呼び出している。そのため、手書きコードと同様に可読性が高く、編集も容易である。さらに、GUIドライバー301のクラス501およびテストシナリオは分離されているので、コントロールプロパティ502の各コントロールをそれぞれ指定するための情報が変更されても、自動化支援プログラム300は、問題無くテストシナリオを実行可能である。 Each test code 901 and verification code 902 both call methods or properties of control properties 502 included in the class 501 of the GUI driver 301 . Therefore, it is highly readable and easy to edit, like handwritten code. Furthermore, since the class 501 of the GUI driver 301 and the test scenario are separated, even if the information for specifying each control in the control property 502 is changed, the automation support program 300 can execute the test scenario without any problem. is.

図10は、生成されたテストシナリオ1001の例を示す図である。ユーザーは、IDE等のビルド機能を有するソフトウェアがあれば、生成されたテストシナリオ1001を実行することができる。 FIG. 10 is a diagram showing an example of a generated test scenario 1001. As shown in FIG. The user can execute the generated test scenario 1001 if there is software such as an IDE that has a build function.

図11は、自動化支援プログラム300の通信処理の手順の一例を示す図である。図11を参照して、自動化支援プログラム300およびテスト対象のアプリケーション102の通信処理について説明する。ある局面において、アプリケーション102は、ネイティブアプリケーションでもよいし、ウェブアプリケーションのフロント部分であってもよい。他の局面において、制御装置201は、RAM202に自動化支援プログラム300を読み込んで、図11の処理を実行してもよい。 FIG. 11 is a diagram showing an example of a communication processing procedure of the automation support program 300. As shown in FIG. Communication processing between the automation support program 300 and the application 102 under test will be described with reference to FIG. In some aspects, application 102 may be a native application or a front part of a web application. In another aspect, the control device 201 may load the automation support program 300 into the RAM 202 and execute the process of FIG. 11 .

処理は、主に、処理1150と、処理1160とに分けられる。処理1150は、GUIドライバー301を生成する処理であり、処理1160は、テストシナリオを作成する処理である。ステップS1110において、自動化支援プログラム300は、FriendlyまたはSelenium等と連携して、各コントロールをそれぞれ指定するためのアプリケーション102に関する情報を取得する。 Processing is mainly divided into processing 1150 and processing 1160 . Processing 1150 is processing for generating the GUI driver 301, and processing 1160 is processing for creating a test scenario. In step S1110, the automation support program 300 cooperates with Friendly, Selenium, or the like to obtain information on the application 102 for designating each control.

ある局面において、自動化支援プログラム300は、起動時に、テスト対象のアプリケーション102を示す情報を取得し得る。テスト対象のアプリケーション102を示す情報は、例えば、プロセスIDまたはURL(Uniform Resource Locator)等の任意の情報であってよい。他の局面において、自動化支援プログラム300は、テスト対象のアプリケーション102を起動させてもよいし、ブラウザを起動して、当該ブラウザにウェブアプリケーションのGUIを表示させてもよい。 In one aspect, the automation assistant program 300 may obtain information indicative of the application under test 102 upon startup. The information indicating the application 102 under test may be arbitrary information such as a process ID or a URL (Uniform Resource Locator). In another aspect, the automation support program 300 may launch the application under test 102, or may launch a browser and cause the browser to display the GUI of the web application.

ステップS1120において、自動化支援プログラム300は、アプリケーション102から、各コントロールをそれぞれ指定するための情報を受信する。各コントロールをそれぞれ指定するための情報は、各コントロールの種類に関する情報と、各コントロールを一意に特定する情報とを含み得る。自動化支援プログラム300は、各コントロールをそれぞれ指定するための情報に基づいて、GUIドライバー301を自動生成し得る。ユーザーは、自動生成されたGUIドライバー301を編集することができる。 In step S1120, the automation support program 300 receives information for designating each control from the application 102. FIG. The information for designating each control can include information about the type of each control and information uniquely identifying each control. The automation support program 300 can automatically generate the GUI driver 301 based on the information for designating each control. A user can edit the automatically generated GUI driver 301 .

ステップS1130において、自動化支援プログラム300は、監視対象のコントロールに対応するキャプチャージェネレイター303をアプリケーション102に送信する。ステップS1140において、自動化支援プログラム300は、アプリケーション102内で動作するキャプチャージェネレイター303から、テストコードを受信する。 In step S1130, the automation support program 300 sends the capture generator 303 corresponding to the monitored control to the application 102. FIG. In step S1140, the automation support program 300 receives test code from the capture generator 303 operating within the application 102. FIG.

図12は、自動化支援プログラム300のテストシナリオ生成の処理手順の一例を示す図である。図12を参照して、自動化支援プログラム300の内部処理について説明する。ある局面において、制御装置201は、RAM202に自動化支援プログラム300を読み込んで、図12の処理を実行してもよい。 FIG. 12 is a diagram showing an example of a test scenario generation processing procedure of the automation support program 300. As shown in FIG. Internal processing of the automation support program 300 will be described with reference to FIG. In one aspect, the control device 201 may load the automation support program 300 into the RAM 202 and execute the process of FIG. 12 .

ステップS1210において、自動化支援プログラム300は、GUIドライバー301を生成する。当該ステップは、処理1150に相当する。自動化支援プログラム300は、テスト対象のアプリケーション102に関する情報を取得し、アプリケーション102が含むコントロールを判別する。自動化支援プログラム300は、判別したコントロールに対応するコントロールドライバー302を用いて、コントロールプロパティを生成する。 In step S1210, the automation support program 300 creates the GUI driver 301. FIG. This step corresponds to process 1150 . The automation support program 300 obtains information about the application under test 102 and determines the controls that the application 102 contains. The automation support program 300 uses the control driver 302 corresponding to the determined control to generate control properties.

ステップS1220において、自動化支援プログラム300は、ユーザーからのGUIドライバー301の編集処理を受け付ける。ある局面において、ユーザーは、他のエディタまたはIDE等でGUIドライバー301を編集してもよい。他の局面において、ユーザーは、手動でGUIドライバー301を定義してもよい。 In step S1220, the automation support program 300 accepts editing processing of the GUI driver 301 from the user. In some aspects, a user may edit GUI driver 301, such as with another editor or IDE. In other aspects, the user may manually define GUI drivers 301 .

ステップS1230において、自動化支援プログラム300は、装置100に表示されているアプリケーション102の情報を取得する。ある局面において、自動化支援プログラム300は、起動時または実行中に、ユーザーからアプリケーション102を示す情報の入力を受け付けてもよい。アプリケーション102を示す情報は、一例として、プロセスIDまたはURL等である。他の局面において、自動化支援プログラム300は、ファイル上のパスまたはURL等に基づいて、アプリケーション102を起動してもよい。 In step S<b>1230 , the automation support program 300 acquires information on the application 102 displayed on the device 100 . In one aspect, the automation assistance program 300 may accept input of information indicative of the application 102 from the user at startup or during execution. Information indicating the application 102 is, for example, a process ID or a URL. In other aspects, automation support program 300 may launch application 102 based on a path on a file, a URL, or the like.

ステップS1240において、自動化支援プログラム300は、アプリケーション102の情報に基づいて、予め作成されているGUIドライバー301の中から、使用するGUIドライバー301を選択する。 In step S<b>1240 , the automation support program 300 selects the GUI driver 301 to be used from the GUI drivers 301 created in advance based on the information of the application 102 .

ステップS1250において、自動化支援プログラム300は、GUIドライバー301のコントロールプロパティに基づいて、キャプチャー対象であるコントロールを特定する。より具体的には、自動化支援プログラム300は、コントロールプロパティ(インスタンス)を生成するコントロールドライバー302の種類と、コントロールプロパティに渡される各コントロールをそれぞれ指定するための情報とに基づいて、キャプチャー対象であるコントロールを特定する。 In step S<b>1250 , the automation support program 300 identifies controls to be captured based on the control properties of the GUI driver 301 . More specifically, the automation support program 300 is a capture target based on the type of the control driver 302 that generates the control property (instance) and information for specifying each control passed to the control property. Identify controls.

ステップS1260において、自動化支援プログラム300は、ステップS1250で特定したコントロールプロパティに対応するキャプチャージェネレイター303をアプリケーション102に送信し、アプリケーション102の受け付ける操作を監視する。キャプチャージェネレイター303は、アプリケーション102の操作に基づいて、テストコードを生成し、当該テストコードを自動化支援プログラム300に送信する。 In step S1260, the automation support program 300 sends the capture generator 303 corresponding to the control property specified in step S1250 to the application 102, and monitors the operations received by the application 102. FIG. The capture generator 303 generates test code based on the operation of the application 102 and transmits the test code to the automation support program 300 .

ステップS1270において、自動化支援プログラム300は、テストコードを受信し、当該テストコードをテストシナリオに含める。ステップS1280において、自動化支援プログラム300は、テストコードの出力結果を検証する検証用コードを生成し、テストシナリオに追加する。 In step S1270, the automation support program 300 receives the test code and includes the test code in the test scenario. In step S1280, the automation support program 300 generates a verification code for verifying the output result of the test code and adds it to the test scenario.

以上説明したように、本実施の形態において、GUIドライバー301およびコントロールドライバー302がテストシナリオとは独立して定義される。GUIドライバー301は、コントロールドライバー302をコントロールプロパティとして含むことで、各コントロールをそれぞれ指定するための情報と、コントロールを直接操作する処理とを隠蔽する。さらに、自動化支援プログラム300は、テスト対象のアプリケーションの操作のキャプチャー時に、コントロールドライバー302のメソッドまたはプロパティを呼び出すテストコードを生成する。当該処理により、自動化支援プログラム300は、可読性およびメンテナンス性の高いテストコードを含むテストシナリオを作成し得る。さらに、自動化支援プログラム300は、上記したテストシナリオの作成手順から検証用コードの追加処理を除くことにより、RPA用のシナリオを生成することができる。 As described above, in this embodiment, the GUI driver 301 and the control driver 302 are defined independently of the test scenario. By including the control driver 302 as a control property, the GUI driver 301 hides information for designating each control and processing for directly operating the control. In addition, the automation assistant program 300 generates test code that calls methods or properties of the control driver 302 when capturing the operations of the application under test. Through this processing, the automation support program 300 can create a test scenario including test code with high readability and maintainability. Furthermore, the automation support program 300 can generate a scenario for RPA by removing the verification code addition process from the test scenario creation procedure described above.

今回開示された実施の形態は全ての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味及び範囲内で全ての変更が含まれることが意図される。 It should be considered that the embodiments disclosed this time are illustrative in all respects and not restrictive. The scope of the present invention is indicated by the scope of the claims rather than the above description, and is intended to include all modifications within the meaning and scope equivalent to the scope of the claims.

10,100 装置、101 IDE、102 アプリケーション、201 制御装置、202 RAM、203 入力インターフェイス、204 出力インターフェイス、205 外部機器インターフェイス、206 通信インターフェイス、207 記憶装置、300 自動化支援プログラム、301 GUIドライバー、302 コントロールドライバー、303 キャプチャージェネレイター、400 ネイティブアプリケーション、401,404,601,602,603,604 テキストボックス、402 カレンダー、403 数字入力ボックス、405 プルダウンメニュー、406 ラジオボタン、407 エントリーボタン、408 キャンセルボタン、501,701 クラス、502,702 コントロールプロパティ、600 ウェブアプリケーション、605 保存ボタン、803,1001 テストシナリオ、901 テストコード、902 検証用コード。 10, 100 device, 101 IDE, 102 application, 201 control device, 202 RAM, 203 input interface, 204 output interface, 205 external device interface, 206 communication interface, 207 storage device, 300 automation support program, 301 GUI driver, 302 control Driver, 303 Capture Generator, 400 Native Application, 401, 404, 601, 602, 603, 604 Text Box, 402 Calendar, 403 Number Input Box, 405 Pull-down Menu, 406 Radio Button, 407 Entry Button, 408 Cancel Button, 501, 701 class, 502, 702 control property, 600 web application, 605 save button, 803, 1001 test scenario, 901 test code, 902 verification code.

Claims (7)

コンピューターを制御するプログラムであって、前記プログラムは前記コンピューターに、
1以上のコントロールを含み、前記コンピューターのモニターに表示されているGUI(Graphical User Interface)の情報を取得するステップと、
前記1以上のコントロールの各々をそれぞれ操作する1以上のコントロールドライバーを含むGUIドライバーを選択するステップと、
取得した前記GUIの情報と、前記1以上のコントロールドライバーとに基づいて、前記1以上のコントロールの中から、キャプチャー対象となるコントロールを選択するステップと、
前記選択されたコントロールが受け付けた操作をキャプチャーするステップと、
前記1以上のコントロールドライバーの各々に対応する操作コード生成プログラムを呼び出すステップと、
前記キャプチャーの結果に基づいて、前記1以上のコントロールドライバーのいずれかに対応する操作コードを生成するステップと、
前記操作コード生成プログラムから、前記GUIのイベント発生時または前記コントロールに関連するデータの変化時に、前記操作コード生成プログラムが生成する操作コードを受信するステップとを実行させる、プログラム。
A program for controlling a computer, said program causing said computer to:
Acquiring information on a GUI (Graphical User Interface) including one or more controls and displayed on the monitor of the computer;
selecting a GUI driver comprising one or more control drivers respectively operating each of said one or more controls;
selecting a control to be captured from among the one or more controls based on the acquired GUI information and the one or more control drivers;
capturing operations received by the selected control;
calling an operation code generation program corresponding to each of the one or more control drivers;
generating opcodes corresponding to any of the one or more control drivers based on the results of the capture;
and receiving an operation code generated by the operation code generation program from the operation code generation program when an event of the GUI occurs or data related to the control changes.
前記1以上のコントロールドライバーの各々は、前記1以上のコントロールの各々を外部から操作するクラスであり、
前記GUIドライバーは、
前記1以上のコントロールドライバーをメソッドまたはプロパティとして含むクラスであり、
前記GUIの情報に含まれる前記1以上のコントロールの各々を指定する情報と、前記1以上のコントロールドライバーの各々とを関連付けており、
前記操作コードは、前記1以上のコントロールドライバーのいずれかのメソッドまたはプロパティを含む、請求項1に記載のプログラム。
each of the one or more control drivers is a class that operates each of the one or more controls from the outside;
The GUI driver is
A class that includes the one or more control drivers as methods or properties,
Information specifying each of the one or more controls included in the GUI information is associated with each of the one or more control drivers,
2. The program of claim 1, wherein the operational code includes any method or property of the one or more control drivers.
前記1以上のコントロールドライバーは、ユーザーにより定義されたカスタムコントロールドライバーを含む、請求項1または2に記載のプログラム。 3. The program product of claim 1 or 2, wherein the one or more control drivers comprises a user-defined custom control driver. 前記プログラムは前記コンピューターに、
前記1以上のコントロールドライバーを含む外部プログラムを読み込むステップをさらに実行させる、請求項1~3のいずれかに記載のプログラム。
Said program, on said computer,
4. The program according to any one of claims 1 to 3, further causing the step of loading an external program containing said one or more control drivers.
前記プログラムは前記コンピューターに、
前記操作コードを実行した場合の出力結果を確認するための確認コードを生成するステップをさらに実行させ、
前記確認コードは、前記1以上のコントロールドライバーのいずれかのメソッドまたはプロパティを含む、請求項1~のいずれかに記載のプログラム。
Said program, on said computer,
Further executing a step of generating a confirmation code for confirming an output result when the operation code is executed;
A program according to any preceding claim, wherein said verification code comprises any method or property of said one or more control drivers.
ソフトウェアの操作コードを生成する方法であって、
1以上のコントロールを含み、コンピューターのモニターに表示されているGUIの情報を取得するステップと、
前記1以上のコントロールの各々をそれぞれ操作する1以上のコントロールドライバーを含むGUIドライバーを選択するステップと、
取得した前記GUIの情報と、前記1以上のコントロールドライバーとに基づいて、前記1以上のコントロールの中から、キャプチャー対象となるコントロールを選択するステップと、
前記選択されたコントロールが受け付けた操作をキャプチャーするステップと、
前記1以上のコントロールドライバーの各々に対応する操作コード生成プログラムを呼び出すステップと、
前記キャプチャーの結果に基づいて、前記1以上のコントロールドライバーのいずれかに対応する操作コードを生成するステップと、
前記操作コード生成プログラムから、前記GUIのイベント発生時または前記コントロールに関連するデータの変化時に、前記操作コード生成プログラムが生成する操作コードを受信するステップとを含む、方法。
A method of generating operation code for software, comprising:
obtaining information in a GUI that includes one or more controls and is displayed on a computer monitor;
selecting a GUI driver comprising one or more control drivers respectively operating each of said one or more controls;
selecting a control to be captured from among the one or more controls based on the obtained GUI information and the one or more control drivers;
capturing operations received by the selected control;
calling an operation code generation program corresponding to each of the one or more control drivers;
generating opcodes corresponding to any of the one or more control drivers based on the results of the capture;
receiving from the opcode generator an opcode that the opcode generator generates when an event occurs in the GUI or when data associated with the control changes.
ユーザーからの操作を受け付ける入力部と、
GUIを表示する表示部と、
1以上のGUIドライバーを格納するメモリーと、
制御部とを備え、
前記制御部は、
前記表示部に表示されている1以上のコントロールを含む前記GUIの情報を取得し、
前記メモリーを参照し、前記1以上のコントロールの各々をそれぞれ操作する1以上のコントロールドライバーを含む前記GUIドライバーを選択し、
取得した前記GUIの情報と、前記1以上のコントロールドライバーとに基づいて、前記1以上のコントロールの中から、キャプチャー対象となるコントロールを選択し、
前記選択されたコントロールが前記入力部から受け付けた操作をキャプチャーし、
前記1以上のコントロールドライバーの各々に対応する操作コード生成プログラムを呼び出し、
前記キャプチャーの結果に基づいて、前記1以上のコントロールドライバーのいずれかに対応する操作コードを生成
前記操作コード生成プログラムから、前記GUIのイベント発生時または前記コントロールに関連するデータの変化時に、前記操作コード生成プログラムが生成する操作コードを受信する、装置。
an input unit that receives an operation from a user;
a display unit for displaying a GUI;
a memory storing one or more GUI drivers;
and a control unit,
The control unit
obtaining information of the GUI including one or more controls displayed on the display;
selecting the GUI driver including one or more control drivers that refer to the memory and operate each of the one or more controls, respectively;
selecting a control to be captured from among the one or more controls based on the acquired GUI information and the one or more control drivers;
capturing an operation received by the selected control from the input unit;
calling an operation code generation program corresponding to each of the one or more control drivers;
generating opcodes corresponding to any of the one or more control drivers based on the results of the capture;
An apparatus for receiving, from the operation code generation program, an operation code generated by the operation code generation program when an event occurs in the GUI or when data associated with the control changes.
JP2019123702A 2019-07-02 2019-07-02 Program, Method, and Device for Supporting Software Operation Scenario Generation Active JP7294609B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019123702A JP7294609B2 (en) 2019-07-02 2019-07-02 Program, Method, and Device for Supporting Software Operation Scenario Generation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019123702A JP7294609B2 (en) 2019-07-02 2019-07-02 Program, Method, and Device for Supporting Software Operation Scenario Generation

Publications (2)

Publication Number Publication Date
JP2021009605A JP2021009605A (en) 2021-01-28
JP7294609B2 true JP7294609B2 (en) 2023-06-20

Family

ID=74199473

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019123702A Active JP7294609B2 (en) 2019-07-02 2019-07-02 Program, Method, and Device for Supporting Software Operation Scenario Generation

Country Status (1)

Country Link
JP (1) JP7294609B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022158346A1 (en) 2021-01-25 2022-07-28 株式会社小糸製作所 Electromagnetic valve
US12067407B2 (en) * 2021-06-07 2024-08-20 UiPath, Inc. Web-based robotic process automation designer systems and automations for virtual machines, sessions, and containers
JPWO2025115177A1 (en) * 2023-11-30 2025-06-05

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009205242A (en) 2008-02-26 2009-09-10 Nec Corp Automatic generation device of program for verification, and method and program thereof
JP2011159113A (en) 2010-02-01 2011-08-18 Hitachi Solutions Ltd Automatic web application execution device
JP2013149178A (en) 2012-01-23 2013-08-01 Arp Co Ltd Test code automatic generation program using debugger function

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009205242A (en) 2008-02-26 2009-09-10 Nec Corp Automatic generation device of program for verification, and method and program thereof
JP2011159113A (en) 2010-02-01 2011-08-18 Hitachi Solutions Ltd Automatic web application execution device
JP2013149178A (en) 2012-01-23 2013-08-01 Arp Co Ltd Test code automatic generation program using debugger function

Also Published As

Publication number Publication date
JP2021009605A (en) 2021-01-28

Similar Documents

Publication Publication Date Title
CN109840206B (en) Data testing method, device, terminal and storage medium
US11714625B2 (en) Generating applications for versatile platform deployment
US9400784B2 (en) Integrated application localization
US11449348B2 (en) Pre/post deployment customization
US9280451B2 (en) Testing device
US20140258989A1 (en) Method and system for automating a scene-based test
US8745521B2 (en) System and method for annotating graphical user interface
JP7294609B2 (en) Program, Method, and Device for Supporting Software Operation Scenario Generation
CN115658529A (en) Automatic testing method for user page and related equipment
US8984487B2 (en) Resource tracker
JP4395761B2 (en) Program test support apparatus and method
JP6441786B2 (en) Test support apparatus, test support method, and program
CN108287720B (en) Software compiling method, device, equipment and storage medium
US10891113B2 (en) Source code rewriting during recording to provide both direct feedback and optimal code
WO2020209227A1 (en) Analysis device, analysis method, and program
US20190149614A1 (en) Storage medium, information processing device, and processing method
US11113359B1 (en) Method and system for navigation control
JP7506339B2 (en) Information processing system, control method thereof, and program
JP2001318796A (en) Program execution control method using internal and external event driven system, recording medium and program preparation support system
US20250348289A1 (en) Extended component generation method in user interface platform development system and program performing this
JP2019192135A (en) Information processing device, processing method therefor and program
JP7319516B2 (en) Program, information processing device, and control method thereof
JP7323755B2 (en) Information processing system, its control method and program
CN120335797A (en) Method, device, storage medium and terminal device for reusing VScode plug-in code in IDEA plug-in package
CN120950118A (en) Code branch merging methods, devices and electronic equipment

Legal Events

Date Code Title Description
A80 Written request to apply exceptions to lack of novelty of invention

Free format text: JAPANESE INTERMEDIATE CODE: A80

Effective date: 20190731

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190822

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220606

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230329

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230404

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230516

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230531

R150 Certificate of patent or registration of utility model

Ref document number: 7294609

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250