JP5958655B2 - Test program, test apparatus and test method - Google Patents
Test program, test apparatus and test method Download PDFInfo
- Publication number
- JP5958655B2 JP5958655B2 JP2015531373A JP2015531373A JP5958655B2 JP 5958655 B2 JP5958655 B2 JP 5958655B2 JP 2015531373 A JP2015531373 A JP 2015531373A JP 2015531373 A JP2015531373 A JP 2015531373A JP 5958655 B2 JP5958655 B2 JP 5958655B2
- Authority
- JP
- Japan
- Prior art keywords
- test
- scenario
- source code
- xpath
- correction data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/28—Error detection; Error correction; Monitoring by checking the correct order of processing
Description
本発明は、試験プログラム、試験装置及び試験方法に関する。 The present invention relates to a test program, a test apparatus, and a test method.
ウェブシステムは、監視対象のシステムの稼働状況等の情報をウェブ画面に表示して提供するサービスを行っている。サーバ/ストレージシステムのある機能が変更すると、これに伴いウェブ画面のレイアウトが変更される場合がある。一例としては、サーバ/ストレージシステムに新機能が追加された場合、サーバ/ストレージシステムに追加された機能に関する情報を表示するためにウェブ画面のレイアウトが変わる場合がある。同様に、サーバ/ストレージシステムからある機能が削除された場合、サーバ/ストレージシステムから削除した機能に関する情報を削除するために画面のレイアウトが変わることがある。 The web system provides a service for displaying information such as the operating status of a monitored system on a web screen. When a certain function of the server / storage system is changed, the layout of the web screen may be changed accordingly. As an example, when a new function is added to the server / storage system, the layout of the web screen may be changed to display information about the function added to the server / storage system. Similarly, when a certain function is deleted from the server / storage system, the layout of the screen may change in order to delete information related to the function deleted from the server / storage system.
サーバ/ストレージシステムでは、このような機能の変更以外の機能についての処理に変更はない。よって、ウェブシステムは、追加又は削除した機能以外の機能に関しては、機能変更の前後においてウェブ画面上で同じ動作が行われ、結果が表示されることを保証しなければならない。そのためのテスト方法としてリグレッションテストが知られている。 In the server / storage system, there is no change in processing for functions other than such a function change. Therefore, the web system must ensure that the functions other than the added or deleted functions are performed on the web screen before and after the function change and the result is displayed. A regression test is known as a test method for that purpose.
リグレッションテストはウェブテストシステムにより実行される。ウェブテストシステムはテストシナリオを実行して、変更した機能以外の機能に関し機能変更の前後でウェブ画面の結果が同じことを確認する。テストシナリオは、ウェブ画面のテスト用の操作手順を示す。テストシナリオには、ウェブ画面を記述するHTML(Hyper Text Markup Language)上の要素が指定される。ウェブ画面とそれに対するテストシナリオの一例を図34及び図35に示す。HTML上の各要素の位置指定にはウェブ画面上の位置を指定するXPathが用いられる。 The regression test is performed by a web test system. The web test system executes a test scenario, and confirms that the result of the web screen is the same before and after the function change for the function other than the changed function. The test scenario indicates an operation procedure for testing the web screen. In the test scenario, an element on HTML (Hyper Text Markup Language) describing a web screen is specified. An example of a web screen and a test scenario for the web screen are shown in FIGS. XPath for specifying the position on the web screen is used for specifying the position of each element on the HTML.
しかしながら、XPathは、ウェブ画面のレイアウトが変化するとそれに応じて変化する。よって、ウェブ画面のレイアウトが変わると機能変更前のXPathを、同じ要素の位置を指定する機能変更後のXPathとして使用することができない場合がある。 However, XPath changes accordingly when the web screen layout changes. Therefore, if the layout of the web screen changes, the XPath before the function change may not be used as the XPath after the function change that specifies the position of the same element.
つまり、テストシナリオにはXPathが記述されている。このため、サーバ/ストレージシステムの機能変更に応じてウェブ画面のレイアウトが変わると、機能変更前のXPathを含むテストシナリオを機能変更後のリグレッションテストのテストシナリオとしてそのまま使用することができなくなる。 That is, XPath is described in the test scenario. For this reason, if the layout of the web screen changes according to the function change of the server / storage system, the test scenario including the XPath before the function change cannot be used as it is as the test scenario of the regression test after the function change.
そこで、図1のフローチャート及び図2(a)に示すように、機能変更前後のサーバ/ストレージシステムの機能仕様書1,2から差分を抽出し、差分に基づき機能変更前の第1のテストシナリオを手動で修正して、機能変更後の第2のテストシナリオを作成することが行われている。しかし、この方法は、手動によるテストシナリオの修正であるため、修正に手間がかかる。加えて、その複雑さは、ウェブ画面の中の表示項目数、画面の数の多さに比例し、今後ますます多機能化するシステムのテストシナリオの修正にはさらに大きな手間がかかることが予想される。
Therefore, as shown in the flowchart of FIG. 1 and FIG. 2A, the difference is extracted from the
さらに、連続性のあるテストシナリオに対しては、テストシナリオの修正漏れのためにテストが実行できない場合、修正漏れによるエラー箇所以降のテストが正しく実行されない可能性が高いため、エラーの修正とテストの実行とを手動で繰り返し行わなければならず、追加工数が発生する。 In addition, for test scenarios that have continuity, if the test cannot be executed due to the omission of correction of the test scenario, it is highly likely that the test after the error location due to omission of correction will not be executed correctly. Must be manually repeated, resulting in additional man-hours.
そこで、一側面では、本発明は、ウェブ画面をテストするための機能変更前のテストシナリオに基づき、機能変更後のテストシナリオを自動作成することを目的とする。 Therefore, in one aspect, an object of the present invention is to automatically create a test scenario after a function change based on a test scenario before a function change for testing a web screen.
一つの案では、システムの機能変更前の処理が記述された第1のソースコードに所定の表記を付加した第1の修正ソースコードに基づき、機能変更前の第1のウェブ画面の位置を指定する第1のXPathと前記所定の表記とを含んだ第1のシナリオ修正用データを作成し、システムの機能変更後の処理が記述された第2のソースコードに所定の表記を付加した第2の修正ソースコードに基づき、機能変更後の第2のウェブ画面の位置を指定する第2のXPathと前記所定の表記とを含んだ第2のシナリオ修正用データを作成し、前記第1のシナリオ修正用データと前記第2のシナリオ修正用データとに含まれる前記所定の表記が一致する位置に応じて前記第1のXPathと前記第2のXPathとの対応情報を抽出し、前記抽出した対応情報に基づき、前記第1のウェブ画面の操作手順を示す第1のテストシナリオから前記第2のウェブ画面の操作手順を示す第2のテストシナリオを作成する、処理をコンピュータに実行させるための試験プログラムが提供される。 In one proposal, the position of the first web screen before the function change is specified based on the first modified source code in which a predetermined notation is added to the first source code in which the process before the function change of the system is described. The first scenario correction data including the first XPath to be performed and the predetermined notation is created, and a second notation in which the predetermined notation is added to the second source code in which processing after the function change of the system is described Based on the modified source code, a second scenario modification data including a second XPath designating the position of the second web screen after the function change and the predetermined notation is created, and the first scenario is created. Correspondence information between the first XPath and the second XPath is extracted according to a position where the predetermined notation included in the correction data and the second scenario correction data matches, and the extracted correspondence is extracted. Based on the information, A test program for causing a computer to execute a process for creating a second test scenario indicating an operation procedure of the second web screen from a first test scenario indicating an operation procedure of one web screen is provided.
一態様によれば、ウェブ画面をテストするための機能変更前のテストシナリオに基づき、機能変更後のテストシナリオを自動作成することができる。 According to one aspect, a test scenario after a function change can be automatically created based on a test scenario before the function change for testing a web screen.
以下、本発明の実施形態について添付の図面を参照しながら説明する。なお、本明細書及び図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付することにより重複した説明を省く。 Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In addition, in this specification and drawing, about the component which has the substantially same function structure, the duplicate description is abbreviate | omitted by attaching | subjecting the same code | symbol.
[システムの全体構成]
まず、。本発明の一実施形態に係るサーバ/ストレージシステム1、ウェブシステム20及びウェブテストシステム30の関係について、図3を参照しながら説明する。ウェブシステム20は、監視対象のサーバ/ストレージシステム1の稼働状況等の情報をウェブ画面に表示して提供する。[System overall configuration]
First of all. A relationship among the server /
本実施形態にかかるサーバ/ストレージシステム1において、サーバ/ストレージ装置10の機能構成の情報は、ウェブ画面11を用いて入力される。ウェブ画面11への入力及びウェブ画面11の更新は、ウェブシステム20により制御される。
In the server /
サーバ/ストレージシステム1において機能の追加や機能の削除が行われた場合、ウェブシステムは、追加又は削除した機能以外の機能に関しては、機能変更の前後において同じ動作が行われウェブ画面上に表示されることを保証しなければならない。そのためのテスト方法としてリグレッションテストが知られている。
When a function is added or deleted in the server /
リグレッションテストは、ウェブテストシステム30により実行される。ウェブテストシステム30は、まず、サーバ/ストレージ装置10の機能仕様書からウェブ画面11のテスト用の操作手順を作成する。ウェブ画面11のテスト用の操作手順を、以下「テストシナリオ」という。
The regression test is executed by the
ウェブテストシステム30は、テストシナリオを入力し、テストシナリオの操作手順に基づきウェブ画面11を操作してテストを実行し、その実行結果を検証する。このとき、ウェブテストシステム30は、テストシナリオに従ってウェブ画面11の操作を自動で行う。
The
テストシナリオには、ウェブ画面を記述するHTML上の各要素が指定される。HTMLの要素の位置指定には、XPathによる位置指定方法が用いられる。図4は、HTML上の各要素とXPathの位置指定の例を示す。XPathは、HTMLなどのXML(Extensible Markup Language)文書の中の特定の要素を指し示す記述方法を定めた規格であり、W3C(World Wide Web Consortium)が勧告した標準仕様に基づく。図4(b)に示すHTMLファイルの要素(E1)に対して、図4(a)のウェブ画面11に対応するテーブルの(1)で示される位置、は、図4(c)の(1)のXPathで示される。図4(b)に示すHTMLファイルの要素(E2)に対して、図4(a)のテーブルの(2)で示される位置は、図4(c)の(2)のXPathで示される。図4(b)に示すHTMLファイルの要素(E3)に対して、図4(a)のテーブルの(3)で示される位置は、図4(c)の(3)のXPathで示される。
Each element on the HTML describing the web screen is specified in the test scenario. For specifying the position of an HTML element, a position specifying method using XPath is used. FIG. 4 shows an example of specifying the position of each element on the HTML and the XPath. XPath is a standard that defines a description method for indicating a specific element in an XML (Extensible Markup Language) document such as HTML, and is based on a standard specification recommended by the W3C (World Wide Web Consortium). For the element (E1) of the HTML file shown in FIG. 4B, the position indicated by (1) in the table corresponding to the
テストシナリオでは、指定したウェブ画面を記述するHTMLファイルの要素に対する操作を記載する。XPathを使用したテストシナリオの一例を図5に示す。テストシナリオに記載されるコマンドには、文字入力(input)、クリック(Click)、任意のデータとの比較(Check)等がある。テストシナリオに記載のXPathには、そのコマンドを実行する場所が指定される。 In the test scenario, the operation for the element of the HTML file describing the designated web screen is described. An example of a test scenario using XPath is shown in FIG. The commands described in the test scenario include character input (input), click (click), comparison with arbitrary data (check), and the like. The XPath described in the test scenario specifies the location where the command is executed.
図5に示すようにテストシナリオには場所の指定であるXPathが記述されており、ウェブ画面11のレイアウトが変わるとHTMLファイルの要素の位置指定、つまりXPathが変わってしまう。このため、機能変更に応じてウェブ画面11のレイアウトが変わると、機能変更前のXPathを含むテストシナリオをそのまま機能変更後のテストシナリオとして使用することは困難である。
As shown in FIG. 5, the test scenario describes the XPath, which is the designation of the location. When the layout of the
例えば、図6の上図のウェブ画面11の「注釈2」が削除され、下図のウェブ画面11に示すようにレイアウトが変更した場合、レイアウト変更と共にXPathも変更される。このため、レイアウト変更後のウェブ画面11に対して元のテストシナリオをそのまま使用してテストを行うことはできない。
For example, when “
図4のウェブ画面11のレイアウト変更後のXPathの一例を図7及び図8に示す。図7は、図4に対して画面要素(De)が削除されたためXPathが変更になった例、図8は、図4に対して画面要素(Ad)が追加されたためXPathが変更になった例である。
An example of the XPath after the layout change of the
図4(b)に示すHTMLファイルの要素(E3)に対する変更前の図4(c)の(3)に示すXPathは「/html/body/table/tr[3]/td[2]」である。これに対して、図7(b)に示すHTMLファイルの要素(De)で示す部分が削除された場合、図7(b)に要素(E3)に対する変更後の図7(c)の(5)に示すXPathは「/html/body/table/tr[2]/td[2]」である。 The XPath shown in (3) of FIG. 4 (c) before the change to the element (E3) of the HTML file shown in FIG. 4 (b) is “/ html / body / table / tr [3] / td [2]”. is there. On the other hand, when the part indicated by the element (De) in the HTML file shown in FIG. 7B is deleted, the (5) in FIG. XPath shown in FIG. 4 is “/ html / body / table / tr [2] / td [2]”.
また、図8(b)に示すHTMLファイルの要素(Ad)で示す部分が追加された場合、図8(b)に要素(E3)に対する変更後の図8(c)の(6)に示すXPathは「/html/body/table/tr[4]/td[2]」である。このように、ウェブ画面11のレイアウトが変更され、HTMLファイルの要素が変更になるとXPathで示されるウェブ画面11上の位置の指定が変更される。
Further, when the part indicated by the element (Ad) of the HTML file shown in FIG. 8B is added, it is shown in FIG. 8B (6) of FIG. 8C after the change to the element (E3). XPath is “/ html / body / table / tr [4] / td [2]”. As described above, when the layout of the
以下に説明する一実施形態にかかるウェブテストシステム30は、機能変更前のウェブ画面11のテストに使用したテストシナリオから機能変更後のウェブ画面11のテストに使用するテストシナリオを自動作成する。これにより、ウェブテストシステム30が使用するテストシナリオを、機能仕様書に基づき手動で変更することを不要とする。なお、一実施形態にかかるウェブテストシステム30は、ウェブ画面11をテストする試験装置の一例である。ウェブテストシステム30は、例えばPC上で動くテストシステムであり、テストシナリオを入力してテストシナリオの操作手順に従いウェブ画面11のテストを行う。
The
[ウェブテストシステムの機能構成]
本発明の一実施形態に係るウェブテストシステム30の機能構成について、図9を参照しながら説明する。図9は、一実施形態に係るウェブテストシステム30の機能構成の一例を示す。一実施形態に係るウェブテストシステム30は、ソースコード読込部31、修正ソースコード作成部32、テストシナリオ読込部33、修正用データ作成部34、XPath抽出部35、テストシナリオ作成部36、テスト実行処理部37及び記憶部40を有する。[Functional configuration of Web test system]
The functional configuration of the
記憶部40は、ソースコードDB(Data Base)41、修正ソースコードDB42、テストシナリオDB43、シナリオ修正用DB44及びテスト実行結果DB45を有する。
The
ソースコード読込部31は、ソースコードDB41に格納された所定のソースコードを読み込む。ソースコードDB41は、ウェブシステム20が提供する機能変更前のウェブ画面11(第1のウェブ画面)を記述する。
The source
修正ソースコード作成部32は、ソースコードに、所定の表記を付加した修正ソースコードを作成する。例えば、修正ソースコード作成部32は、第1のソースコードに所定の関数又は固定値の表記を付加して第1の修正ソースコードを作成する(図2(b):(1)関数追加)。また、例えば、修正ソースコード作成部32は、第2のソースコードに所定の関数又は固定値の表記を付加して第2の修正ソースコードを作成する(図2(b):(3)関数追加)。
The modified source
第1のソースコードには、サーバ/ストレージシステム1の機能変更前の内部処理が記述されている。第2のソースコードには、サーバ/ストレージシステム1の機能変更後の内部処理が記述されている。
The first source code describes internal processing before changing the function of the server /
所定の表記の一例を示した関数リスト100を図10に示す。関数リスト100は、外部から入力する。関数リスト100は、関数の表記として変数対象関数名101及び挿入関数名102を有する。関数リスト100は、固定値の表記として第1のデバッグ出力情報103、第2のデバッグ出力情報104、第3のデバッグ出力情報105、第4のデバッグ出力情報106・・・を有する。なお、図11は、図10の関数リストの本体の一例を示す。所定の表記には、関数の表記、固定値(固定文字等)の表記、関数に記載された引数を含む。
A
テストシナリオ読込部33は、テストシナリオDB43に格納された所定のテストシナリオを読み込む。
The test
修正用データ作成部34は、第1の修正ソースコードに基づき、機能変更前の第1のウェブ画面の位置を指定する第1のXPathと前記所定の表記とを含んだ第1のシナリオ修正用データを作成する。修正用データ作成部34は、第2の修正ソースコードに基づき、機能変更後の第2のウェブ画面の位置を指定する第2のXPathと前記所定の表記とを含んだ第2のシナリオ修正用データを作成する。
The correction
例えば、図6の上図に示すウェブ画面11を第1のウェブ画面とし、システムの機能変更に応じて図6の下図に示すようにウェブ画面11のレイアウトの一部が変更された、ウェブ画面11を第2のウェブ画面とする。
For example, the
第2のウェブ画面をテストする場合、修正用データ作成部34は、第1の修正ソースコードに基づく処理を実行してシナリオ修正用データを作成する(図2(b):(2)実行)。作成されたシナリオ修正用データは、第1のウェブ画面のレイアウトを表記するための第1のXPathを含み、以下、「第1のシナリオ修正用データ」ともいう。
When testing the second web screen, the correction
また、例えば、修正用データ作成部34は、第2の修正ソースコードに基づく処理を実行してシナリオ修正用データを作成する(図2(b):(4)実行)。作成されたシナリオ修正用データは、第2のウェブ画面のレイアウトを表記するための第2のXPathを含み、以下、「第2のシナリオ修正用データ」ともいう。第1のシナリオ修正用データ及び第2のシナリオ修正用データは、シナリオ修正用DB44に格納される。
Further, for example, the correction
XPath抽出部35は、第1のシナリオ修正用データと第2のシナリオ修正用データとに含まれる前記所定の表記が一致する位置に応じて第1のXPathと第2のXPathとの対応情報を抽出する。
The
テストシナリオ作成部36は、対応情報に基づき、第1のウェブ画面のテスト用の操作手順を示す第1のテストシナリオから第2のウェブ画面のテスト用の操作手順を示す第2のテストシナリオを作成する(図2(b):(5)作成)。
Based on the correspondence information, the test
テスト実行処理部37は、第2のテストシナリオの操作手順に従い機能変更後の第2のウェブ画面のテストを行う。テストの実行結果のデータは、テスト実行結果DB45に保存される。
The test
[テストシナリオ自動作成の前提条件]
以上に説明したテストシナリオ自動作成のための前提条件1〜3について説明する。[Prerequisites for automatic test scenario creation]
前提条件1:HTMLファイルの生成前にウェブシステム20で実行する処理(関数)に変更がないこと
前提条件2:HTMLファイルの生成後にウェブシステム20で実行される処理(関数)に変更がないこと
前提条件3:ウェブテストシステム30においてテストシナリオの適用順序に変更がないこと
本実施形態に係るウェブテストシステム30によれば、上記前提条件の元、以下の仕組みでテストシナリオの再利用を可能とする。
(1)機能変更前と機能変更後のウェブシステム20のソースコードを書き換えて以下の情報を出力する。Precondition 1: There is no change in the processing (function) executed in the
(1) Rewrite the source code of the
・HTMLファイルの生成前に実行した内部処理
・HTMLファイルの生成
・HTMLファイルの生成後に実行した内部処理
上記の生成したHTMLファイルからXPathが生成される。HTMLファイルの生成前後の内部処理を付加したXPath(シナリオ修正用データ中のXPath)により、第1のウェブ画面用の機能変更前のテストシナリオから第2のウェブ画面用の機能変更後のテストシナリオが作成される。
(2)特定のHTMLファイル生成時の機能変更前処理と機能変更後処理の組み合わせは、同じ情報については、サーバ/ストレージシステム1のの機能変更の前後で変わらない。このことを前提として、HTMLファイル生成前と、HTMLファイル生成後に実行した内部処理の組み合わせが同じとなるものを見つけ出し、サーバ/ストレージシステム1の機能変更前後で変更のあるXPathを見つけ出す。
(3)第1のシナリオ修正用データと第2のシナリオ修正用データとに含まれる所定の関数又は固定値の表記が一致する位置に応じて変更前の第1のXPathと変更後の第2のXPathとの対応情報を抽出する。これにより、サーバ/ストレージシステム1のの機能変更の前後でXPathがどのように変わったかを取得できる。
(4)対応情報に基づき、機能変更前のテストシナリオから機能変更後のテストシナリオを書き換える。-Internal processing executed before generation of HTML file-Generation of HTML file-Internal processing executed after generation of HTML file XPath is generated from the generated HTML file. Test scenario after the function change for the second web screen from the test scenario before the function change for the first web screen by XPath (XPath in the scenario modification data) with internal processing before and after the generation of the HTML file Is created.
(2) The combination of pre-function change processing and post-function change processing at the time of generating a specific HTML file does not change before and after the function change of the server /
(3) The first XPath before the change and the second after the change according to the position where the notation of the predetermined function or the fixed value included in the first scenario correction data and the second scenario correction data matches The corresponding information with XPath is extracted. Thereby, it is possible to acquire how the XPath has changed before and after the function change of the server /
(4) Based on the correspondence information, the test scenario after the function change is rewritten from the test scenario before the function change.
これにより、図2(b)に示すように、サーバ/ストレージシステム1において機能変更前のウェブ画面11のテスト用に作成した第1のテストシナリオを使用して、機能変更後のテスト用に第2のテストシナリオを自動作成することができる。ウェブテストシステム30では、テストシナリオの自動作成とテストシナリオによるテストの実行とが繰り返し実施される。
As a result, as shown in FIG. 2B, the first test scenario created for testing the
[テストシナリオの自動作成処理]
次に、本実施形態に係るテストシナリオの自動作成処理について図12を参照しながら説明する。図12は、本実施形態にかかるテスト実行処理の一例を示すフローチャートである。以下のテストシナリオの自動作成処理は、左側がウェブシステム20において提供される機能変更前のウェブ画面11のテスト実行処理、右側がウェブシステム20において提供される機能変更後のウェブ画面11のテスト実行処理を示す。テストシナリオの自動作成処理は、右側に示す機能変更後のウェブ画面11のテスト実行処理前に実行される。[Automatic test scenario creation process]
Next, test scenario automatic creation processing according to the present embodiment will be described with reference to FIG. FIG. 12 is a flowchart illustrating an example of a test execution process according to the present embodiment. In the following test scenario automatic creation process, the left side is a test execution process of the
図12の左側の機能変更前の処理が開始されると、ソースコード読込部31は、機能変更前のソースコードを読み込む(ステップS10)。以下、機能変更前のソースコードを第1のソースコードともいう。
When the process before the function change on the left side of FIG. 12 is started, the source
次に、修正ソースコード作成部32は、第1のソースコードに関数及び固定値の表記を付加する処理(以下、「関数付加処理」ともいう。)を実行し、関数及び固定値の表記を付加した第1のソースコード(以下、「第1の修正ソースコード」ともいう。)を作成する(ステップS12)。なお、後述されるステップS12、S24、S32、S44の関数等の付加処理は図13に示され、付加する関数リストの生成処理は図14に示され、後述される。
Next, the modified source
次に、修正用データ作成部34は、第1の修正ソースコードに基づき第1のシナリオ修正用データを作成し(ステップS14)、テストシナリオ読込部33は、テストシナリオ(以下、「第1のテストシナリオ」ともいう。)を読み込む(ステップS16)。次に、ウェブシステム20は、生成した最新のHTMLファイルに従いウェブ画面11を表示する(ステップS18)。ここでは、第1のソースコードに基づき第1のウェブ画面が表示される。第1のウェブ画面には、機能変更前のサーバ/ストレージシステム1の稼働情報などの情報が表示されている。
Next, the modification
次に、テスト実行処理部37は、第1のテストシナリオを読み込み、第1のテストシナリオに基づきリグレッションテストを実行する(ステップS20)。記憶部40は、テストの実行処理結果をテスト実行結果DB45に保存する。次に、ソースコード読込部31は、機能変更前のウェブシステム20の次の第1のソースコードを読み込み(ステップS22)、修正ソースコード作成部32は、第1のソースコードに関数及び固定値の表記を付加する関数付加処理を実行し、次の第1の修正ソースコードを作成する(ステップS24)。次に、修正用データ作成部34は、第1の修正ソースコードに基づき次の第1のシナリオ修正用データを作成する(ステップS26)。
Next, the test
次に、テスト実行処理部37は、次の第1のテストシナリオがないかを判定し(ステップS28)、次の第1のテストシナリオはないと判定した場合、本処理は終了する。一方、次の第1のテストシナリオがあると判定した場合、テスト実行処理部37は、次の第1のテストシナリオを読み込む(ステップS29)。次に、テスト実行処理部37は、次の第1のテストシナリオに基づきステップS20にてリグレッションテストを実行し、記憶部40はテストの実行処理結果をテスト実行結果DB45に保存する。ステップS28にて次の第1のテストシナリオがないと判定されるまで、ステップS18〜S29の処理が繰り返される。
Next, the test
図12の右側の処理が開始されると、ソースコード読込部31は、機能変更後のソースコードを読み込む(ステップS30)。以下、機能変更後のソースコードを第2のソースコードともいう。次に、修正ソースコード作成部32は、第2のソースコードに関数付加処理を実行し、関数及び固定値の表記を付加した第2のソースコード(以下、「第2の修正ソースコード」ともいう。)を作成する(ステップS32)。
When the processing on the right side of FIG. 12 is started, the source
次に、修正用データ作成部34は、第2の修正ソースコードに基づき第1のシナリオ修正用データを作成する(ステップS34)。テストシナリオ作成部36は、第1のシナリオ修正用データ及び第2のシナリオ修正用データに基づき第1のテストシナリオを修正した第2のテストシナリオを自動作成する(ステップS36)。
Next, the correction
次に、ウェブシステム20は、生成した最新のHTMLファイルに従いウェブ画面11を表示する(ステップS38)。ここでは、第2のソースコードに基づき第2のウェブ画面が表示される。第2のウェブ画面には、機能変更後のサーバ/ストレージシステム1の稼働情報などの情報が表示されている。
Next, the
次に、テスト実行処理部37は、自動作成した第2のテストシナリオに基づきリグレッションテストを実行する(ステップS40)。記憶部40は、テストの実行処理結果をテスト実行結果DB45に保存する。次に、ソースコード読込部31は、次の第2のソースコードを読み込み(ステップS42)、修正ソースコード作成部32は、第1のソースコードに関数及び固定値の表記を付加する関数付加処理を実行する(ステップS44)。次に、修正用データ作成部34は、生成した第2の修正ソースコードに基づき次の第2のシナリオ修正用データを作成する(ステップS46)。
Next, the test
次に、テスト実行処理部37は、次のテストシナリオがないかを判定し(ステップS48)、次のテストシナリオはないと判定した場合、本処理は終了する。一方、次の第2のテストシナリオがあると判定した場合、テスト実行処理部37は、次の第2のテストシナリオを修正(自動作成)し(ステップS49)、ステップS40にてリグレッションテストを実行する。記憶部40は、テストの実行処理結果をテスト実行結果DB45に保存する。ステップS48にて次の第2のテストシナリオがないと判定されるまで、ステップS38〜S49の処理が繰り返される。
Next, the test
[関数付加処理]
本実施形態にかかる関数付加処理について、図13及び図14を参照しながら説明する。図13は、本実施形態にかかる関数付加処理を示すフローチャートである。図14は、本実施形態にかかる関数リストの生成処理を示すフローチャートである。本処理は、図2(b)の(1)に示す関数付加により第1のソースコードから第1の修正ソースコードを作成する処理である。また、図2(b)の(3)に示す関数付加により、第2のソースコードから第2の修正ソースコードを作成する処理である。[Function addition processing]
The function addition processing according to the present embodiment will be described with reference to FIGS. FIG. 13 is a flowchart showing the function addition processing according to the present embodiment. FIG. 14 is a flowchart showing a function list generation process according to the present embodiment. This process is a process for creating the first modified source code from the first source code by adding the function shown in (1) of FIG. Further, it is a process of creating the second modified source code from the second source code by adding the function shown in (3) of FIG.
図13の処理が開始されると、修正ソースコード作成部32が関数リストの生成処理(図14)を実行する(ステップS50)。
(関数リスト生成処理)
図14の関数リストの生成処理では、修正ソースコード作成部32は、ウェブシステム20のソースコードを{,}、(,)、空白、カンマ、';' 、'=' 、改行コードで分割し、リスト化する(ステップS70)。但し"…"、"//〜改行"内は分割しない。When the process of FIG. 13 is started, the modified source
(Function list generation processing)
In the function list generation process of FIG. 14, the modified source
次に、修正ソースコード作成部32は、リスト化されたソースコードに含まれる関数を判定し(ステップS71)、関数呼び出し部(関数Call)を走査する(ステップS72)。修正ソースコード作成部32は、走査が完了したかを判定し(ステップS73)、走査が完了したと判定した場合、本処理を終了し、図13の関数付加処理のステップS51に戻る。
Next, the modified source
一方、修正ソースコード作成部32は、走査が完了していないと判定した場合、関数の種類によってソースコード内の関数を下記の3つに分ける(ステップS74)。ステップS75〜S77にてリストを生成した後、ステップS72に戻り、ステップS72〜S77の処理を走査が完了するまで繰り返す。
(1)HTML出力関数リスト生成(ステップS75)
・関数名 関数タイプ 関数引数
(2)データベース書き込み関数リスト生成(ステップS76)
・関数名 関数タイプ 関数引数
(3)データベース読み込み関数リスト生成(ステップS77)
・関数名 関数タイプ 関数引数
図13の付加処理(ステップS51)に戻ると、修正ソースコード作成部32は、ウェブシステム20のソースコードを{,}、(,)、空白、カンマ、';' 、'=' 、改行コードで分割し、リスト化する。但し"…"、"//〜改行"内は分割しない。なお、修正ソースコード作成部32は、ステップS51において、ステップS70にてリスト化されたソースコードを取得してもよい。図15はソースコードの一例を示す。図16は図15のソースコードを分割し、リスト化した一例を示す。On the other hand, when it is determined that the scanning has not been completed, the modified source
(1) HTML output function list generation (step S75)
Function name Function type Function argument (2) Database write function list generation (step S76)
Function name Function type Function argument (3) Database reading function list generation (step S77)
Function Name Function Type Function Argument Returning to the additional processing of FIG. 13 (step S51), the modified source
次に、修正ソースコード作成部32は、リスト化されたソースコードから関数を判定し(ステップS52)、関数呼び出し部(関数Call)を走査する(ステップS53)。修正ソースコード作成部32は、走査が完了したかを判定し(ステップS54)、走査が完了したと判定した場合、リスト化されたソースコードを元のソースコードに戻し(ステップS63)、本処理を終了する。
Next, the modified source
一方、修正ソースコード作成部32は、ステップS54にて走査が完了していないと判定した場合、関数呼び出し部の関数の種類が図14にて生成した関数リストの対象関数と一致するかを判定する(ステップS55)。修正ソースコード作成部32は、関数呼び出し部の関数の種類が関数リストの対象関数と一致すると判定した場合、対象関数の直後に挿入関数名を挿入する(ステップS56)。図10は、上記の関数リスト生成のステップで使用する関数リストの一例を示す。
On the other hand, if it is determined in step S54 that the scanning has not been completed, the modified source
修正ソースコード作成部32は、図4の(b)のソースコードをリスト化し(図16)、リスト化したソースコードを構文解析し(図17)、対象関数の直後に挿入関数名を挿入する(図18)。
The modified source
次に、図13のステップS57にて、修正ソースコード作成部32は、関数リストからデバッグ出力情報を取得する。修正ソースコード作成部32は、デバッグ出力情報の取得が完了したかを判定し(ステップS58)、デバッグ出力情報の取得が完了したと判定した場合、ステップS62に進む。一方、修正ソースコード作成部32は、デバッグ出力情報の取得が完了していないと判定した場合、固定文字かを判定する(ステップS59)。固定文字の場合、修正ソースコード作成部32は、その固定文字を挿入する(ステップS60)。図18には、ステップS60の実行により挿入関数名の挿入後に固定文字が設定されている。一方、固定文字でない場合、修正ソースコード作成部32は、関数引数を挿入する(ステップS61)。図18には、挿入関数名及び固定文字の挿入後に関数引数(デバッグ出力情報103〜106の"arg"の関数引数)が設定されている。ステップS57に戻り、修正ソースコード作成部32は、ステップS57〜S61の処理を繰り返した後、ステップS58にてデバッグ出力情報の取得が完了したと判定したとき、ステップS62に進み、関数の終端表記を挿入し、ステップS53に戻る。修正ソースコード作成部32は、ステップS53に続くステップS54にて関数呼び出し部の走査が完了したと判定するまでS53〜S62の処理を繰り返し、走査が完了したと判定したときリスト化したソースコードを元の状態に戻し(ステップS63)、本処理を終了する。図19は、リスト化したソースコードから元の状態に戻されたソースコードを示す。なお、ステップS63の処理は省略できる。
Next, in step S57 of FIG. 13, the modified source
これにより、図18に示すように、一のソースコードから修正ソースコードが作成される。以上、図2(b)の(1)及び(3)の関数追加により修正ソースコードを作成する処理の詳細を説明した。図2では、修正ソースコード作成部32は、機能変更前の第1のソースコードから第1の修正ソースコードを作成し、機能変更前の第2のソースコードから第2の修正ソースコードを作成する。
As a result, as shown in FIG. 18, a modified source code is created from one source code. The details of the process of creating the modified source code by adding the functions (1) and (3) in FIG. In FIG. 2, the modified source
次に、図2(b)の(2)及び(4)の第1及び第2の修正ソースコードから第1及び第2のシナリオ修正用データを作成する処理の詳細、及び図2(b)の(5)第1のテストシナリオから第2のテストシナリオを自動作成する処理の詳細を説明する。図20は、本実施形態にかかるテストシナリオの自動作成処理の詳細を示すフローチャートである。 Next, details of processing for creating first and second scenario correction data from the first and second correction source codes of (2) and (4) of FIG. 2B, and FIG. (5) The details of the process of automatically creating the second test scenario from the first test scenario will be described. FIG. 20 is a flowchart showing details of the test scenario automatic creation processing according to the present embodiment.
図20の処理が開始されると、修正ソースコード作成部32は、シナリオ修正用DB44にシナリオ修正用データが存在するかを判定する(ステップS80)。図2(b)の(1)の時点では、シナリオ修正用データは存在しない。よって、修正用データ作成部34は、ソースコードに所定の関数等の表記を付加して修正ソースコードを作成する(ステップS81)。ここでは、修正ソースコード作成部32は、機能変更前のソースコードである第1のソースコードに所定の関数等の表記を付加して機能変更前の修正ソースコードである第1の修正ソースコードを作成する。
When the processing of FIG. 20 is started, the correction source
次に、ウェブシステム20が起動され(ステップS82)、第1の修正ソースコードに基づく処理の実行によりHTMLファイルが生成され、修正用データ作成部34は、HTMLファイルに応じた第1のシナリオ修正用データを作成する(ステップS83)。図21の左側に機能変更前のHTMLファイルの例を示し、図21の右側に作成した第1のシナリオ修正用データの例を示す。第1のシナリオ修正用データは、テストシナリオを修正するために使用される。
(シナリオ修正用データの作成処理)
シナリオ修正用データの作成処理の詳細について、図22を参照しながら説明する。図22は、本実施形態にかかるシナリオ修正用データの作成処理を示すフローチャートである。まず、修正用データ作成部34は、HTMLファイルの上から順に一行を取得する(ステップS101)。例えば、図21では、行番号「1」の一行が取得される。次に、修正用データ作成部34は、HTMLファイルの全行の処理が済んだかを判定する(ステップS102)。修正用データ作成部34は、全行の処理が済んだと判定した場合、本処理を終了する。一方、修正用データ作成部34は、全行の処理が済んでいないと判定した場合、取得した一行からタグの記述を取り出す(ステップS103)。タグの記述は、"<・・・>"又は"</・・・>"で示される。次に、修正用データ作成部34は、取得した一行に含まれる全データの処理が済んだかを判定する(ステップS104)。修正用データ作成部34は、取得した一行に含まれる全データの処理が済んだと判定した場合、ステップS101に戻り、ステップS101以降の処理を繰り返す。Next, the
(Scenario correction data creation process)
Details of the scenario correction data creation process will be described with reference to FIG. FIG. 22 is a flowchart showing a scenario correction data creation process according to this embodiment. First, the correction
一方、修正用データ作成部34は、取得した一行に含まれる全データの処理が済んでいないと判定した場合、取り出したデータの種類を判定する(ステップS105)。修正用データ作成部34は、取り出したデータがタグ以外と判定した場合、ステップS102に戻る。
On the other hand, if the correction
修正用データ作成部34は、取り出したデータがタグの終端(</タグ名>)と判定した場合、ステップS116に進み、ツリー情報に"/ "が入っているかを判定する(ステップS116)。ツリー情報は、HTMLファイルのタグ構造を示す。修正用データ作成部34は、ツリー情報に"/ "が入っていると判定した場合、ツリー情報終端の"/タグ名[タグ出現回数]"を除去し(ステップS117)、ステップS102に戻る。一方、修正用データ作成部34は、ツリー情報に"/ "が入っていないと判定した場合、ツリー情報を空にし(ステップS118)、ステップS102に戻る。
If the correction
ステップS105において、修正用データ作成部34は、取り出したデータがタグの開始(つまり、<タグ名>)と判定した場合、前回削除したタグ名と今回のタグ名とが同じかを判定する(ステップS106)。修正用データ作成部34は、同じでないと判定した場合、タグの出現回数を「1」とし(ステップS107)、同じと判定した場合、タグの出現回数を「+1」する(ステップS108)。
In step S105, the correction
次に、修正用データ作成部34は、ツリー情報は何かを判定する(ステップS109)。修正用データ作成部34は、ツリー情報が空であると判定した場合、ツリー情報に"/タグ名[タグ出現回数]"を保存する(ステップS110)。例えば、図21では、行番号が「1」のとき、ツリー情報に"/html[1]"が保存される。なお、タグ出現回数が1のときの[1]は省略されるため、ツリー情報に保存されるデータは、"/html"となる。一方、修正用データ作成部34は、ツリー情報に"/"が入っていると判定した場合、ツリー情報に"タグ名[タグ出現回数]"を保存する(ステップS111)。
Next, the correction
次に、修正用データ作成部34は、ツリー情報をシナリオ修正用データのXPathに保存する(ステップS112)。ツリー情報は、機能変更前の場合、第1のシナリオ修正用データのXPathに保存され、機能変更後の場合、第2のシナリオ修正用データのXPathに保存される。
Next, the correction
次に、修正用データ作成部34は、タグの終端(つまり、</タグ名>)かを判定する(ステップS113)。修正用データ作成部34は、タグの終端でないと判定した場合、ステップS102に戻る。一方、修正用データ作成部34は、タグの終端であると判定した場合、タグの出現回数から1を減算し(ステップS114)、ツリー情報終端の"/タグ名[タグ出現回数]"を除去し(ステップS115)、ステップS102に戻る。例えば、図21では、行番号「13」のとき、ツリー情報に保存されるデータは、"/html/body/table/tr"となる。
Next, the correction
以上、図22を参照しながら、図20のステップS83で呼び出されるシナリオ修正用データの作成処理の一例を説明した。次に、図20のステップS84に進み、テストシナリオ読込部33は、テストシナリオDB43から次に実行するテストシナリオを読み込む。次に、テスト実行処理部37は、テストシナリオのすべてについてテストが完了したかを判定する(ステップS85)。テスト実行処理部37は、テストシナリオのすべてについてテストが完了していないと判定した場合、テストシナリオを実行し(ステップS86)、ステップS83に戻り、テストシナリオのすべてについてテストが完了するまで、ステップS83〜S86の処理を繰り返す。ここでは、第1のテストシナリオの操作手順に従い機能変更前のウェブ画面11のテストが行われる。テストの実行結果のデータは、テスト実行結果DB45に保存される。
The example of the scenario correction data creation process called in step S83 of FIG. 20 has been described above with reference to FIG. Next, proceeding to step S84 of FIG. 20, the test
ステップS85において第1のテストシナリオのすべてについてテストが完了したと判定された場合、又は、ステップS80においてシナリオ修正用データが存在すると判定された場合、修正用データ作成部34は、ステップS87に進む。修正用データ作成部34は、ソースコードに所定の表記を付加して修正ソースコードを作成する。この時点では、サーバ/ストレージシステム1において機能変更がされている。よって、修正ソースコード作成部32は、機能変更後のソースコードである第2のソースコードに所定の表記を付加して機能変更後の修正ソースコードである第2の修正ソースコードを作成する。
If it is determined in step S85 that the test has been completed for all of the first test scenarios, or if it is determined in step S80 that there is scenario correction data, the correction
次に、ウェブシステム20が起動され(ステップS88)、第2の修正ソースコードに基づく処理の実行によりHTMLファイルが生成され、修正用データ作成部34は、HTMLファイルに応じた第2のシナリオ修正用データを作成する(ステップS89)。図23の左側に機能変更後のHTMLファイルの例を示し、図23の右側に作成した第2のシナリオ修正用データの例を示す。第2のシナリオ修正用データは、テストシナリオを修正するために使用される。
Next, the
次に、テストシナリオ作成部36は、シナリオ修正用DB44から、対応する機能変更前の第1のシナリオ修正用データを取得する(ステップS90)。テストシナリオ作成部36は、第1のシナリオ修正用データ及び第2のシナリオ修正用データに基づき、第1のテストシナリオから第2のテストシナリオを自動作成する(ステップS91)。つまり、XPath抽出部35は、第1のシナリオ修正用データと第2のシナリオ修正用データとに含まれる所定の表記が一致する位置に応じて第1のXPathと第2のXPathとの対応情報を抽出する。テストシナリオ作成部36は、対応情報に基づき、第1のウェブ画面のテスト用の操作手順を示す第1のテストシナリオから第2のウェブ画面のテスト用の操作手順を示す第2のテストシナリオを作成する。
(テストシナリオの自動作成処理)
テストシナリオの自動作成処理の詳細について、図24を参照しながら説明する。図24は、本実施形態にかかるテストシナリオの自動作成処理を示すフローチャートである。まず、テストシナリオ作成部36は、第1のシナリオ修正用データから"HTML"で始まる行を取り除く(ステップS120)。これにより、図25の左図の斜線で示す"HTML"で始まる行が取り除かれる。Next, the test
(Test scenario automatic creation process)
Details of the test scenario automatic creation processing will be described with reference to FIG. FIG. 24 is a flowchart showing automatic test scenario creation processing according to the present embodiment. First, the test
次に、テストシナリオ作成部36は、第2のシナリオ修正用データから"HTML"で始まる行を取り除く(ステップS121)。これにより、図25の右図の斜線で示す"HTML"で始まる行が取り除かれる。
Next, the test
次に、テストシナリオ作成部36は、第1のシナリオ修正用データから一行を取得する(ステップS122)。これにより、図25の左図の行番号「9」の一行が取得される。次に、テストシナリオ作成部36は、第1のシナリオ修正用データのすべての処理が済んだかを判定する(ステップS123)。テストシナリオ作成部36は、第1のシナリオ修正用データのすべての処理が済んだと判定した場合、本処理を終了する。一方、テストシナリオ作成部36は、第1のシナリオ修正用データのすべての処理は済んでいないと判定した場合、第1のシナリオ修正用データから次の一行を取得する(ステップS124)。これにより、図25の左図の行番号「11」の一行が取得される。
Next, the test
次に、テストシナリオ作成部36は、第2のシナリオ修正用データから一行を取得する(ステップS125)。これにより、図25の右図の行番号「16」の一行が取得される。次に、テストシナリオ作成部36は、第2のシナリオ修正用データのすべての処理が済んだかを判定する(ステップS126)。テストシナリオ作成部36は、第2のシナリオ修正用データのすべての処理が済んだと判定した場合、ステップS131に進む。一方、テストシナリオ作成部36は、第2のシナリオ修正用データのすべての処理は済んでいないと判定した場合、第1のシナリオ修正用データ及び第2のシナリオ修正用データから取得した最初の一行が一致するかを判定する(ステップS127)。
Next, the test
テストシナリオ作成部36は、第1のシナリオ修正用データ及び第2のシナリオ修正用データから取得した最初の一行が一致しないと判定した場合、ステップS125に戻る。一方、テストシナリオ作成部36は、一致すると判定した場合、第2のシナリオ修正用データから次の一行を取得する(ステップS128)。これにより、図25の右図の行番号「18」の一行が取得される。
If the test
次に、XPath抽出部35は、第1のシナリオ修正用データ及び第2のシナリオ修正用データから取得した次の一行が一致するかを判定する(ステップS129)。テストシナリオ作成部36は、第1及び第2のシナリオ修正用データから取得した次の一行が一致しないと判定し場合、ステップS125に戻る。一方、XPath抽出部35は、一致すると判定した場合、第1のシナリオ修正用データに含まれる第1のXPathと第2のシナリオ修正用データに含まれる第2のXPathとの対応情報を抽出する。XPath抽出部35は、第1のシナリオ修正用データ及び第2のシナリオ修正用データに含まれる所定の表記が一致する位置に応じて第1のXPathと第2のXPathとの対応情報を抽出する。本実施形態では、対応情報を抽出するために所定の表記が一致する位置は、第1のシナリオ修正用データ及び第2のシナリオ修正用データから取得した最初の一行と次の一行との複数位置である。ただし、所定の表記が一致する位置は、これに限らず、第1のシナリオ修正用データ及び第2のシナリオ修正用データから取得した最初の一行のみであってもよいし、次の一行のみであってもよい。
Next, the
テストシナリオ作成部36は、第1のシナリオ修正用データの取得した最初の行から次の行までの間のXPathと、第2のシナリオ修正用データの取得した最初の行から次の行までの間のXPathとの対応関係(対応情報)に基づき、第1のテストシナリオのXPathを置き換え、第2のテストシナリオを自動作成する(ステップS130)。
The test
例えば、図25の例では、第1のシナリオ修正用データの取得した二行の間(最初の行から次の行の間)と、第2のシナリオ修正用データの取得した二行の間(最初の行から次の行の間)との対応情報1に基づき、第1のテストシナリオのXPathが置き換えられ、第2のテストシナリオが自動作成される。対応情報2についても同様に第1のテストシナリオのXPathが置き換えられ、第2のテストシナリオが自動作成される。
For example, in the example of FIG. 25, between the two lines from which the first scenario correction data is acquired (between the first line and the next line) and between the two lines from which the second scenario correction data is acquired ( Based on the
これにより、図26に示すように、第1のテストシナリオの対応情報1のXPathは、図21の第1のシナリオ修正用データのXPath(A)から、図23の第2のシナリオ修正用データのXPath(a)に置き換えられる。また、第1のテストシナリオの対応情報2のXPathは、図21の第1のシナリオ修正用データのXPath(B)から、図23の第2のシナリオ修正用データのXPath(b)に置き換えられる。このようにして、システムの機能変更前の第1のテストシナリオから機能変更後の第2のテストシナリオを自動作成することができる。
Accordingly, as shown in FIG. 26, the XPath of the
図26の対応情報1では、図27(a)の第1のテストシナリオのコマンドinput(入力)において、値「1+2」を入力する場所(Xpath)は「/html/body/table/tr/td/input」で示されている。これに対して、本実施形態では、図27(b)の第2のテストシナリオのコマンドinputにおいて、値「1+2」を入力する場所(Xpath)が「/html/body/table/tr[2]/td/input」に自動変更される。
In the
また、図26の対応情報2では、図27(a)の第1のテストシナリオのコマンドCheck(チェック)において、値「3」が場所(Xpath)「/html/body/table/tr/td[2]」に表示されていることをチェックする。これに対して、本実施形態では、図27(b)の第2のテストシナリオのコマンドCheckにおいて、値「3」が表示されていることをチェックする場所(Xpath)が「/html/body/table/tr[2]/td[2]」に自動変更される。 26, in the command Check (check) of the first test scenario in FIG. 27A, the value “3” is the location (Xpath) “/ html / body / table / tr / td [ 2] ”is checked. On the other hand, in this embodiment, in the command Check of the second test scenario in FIG. 27B, the location (Xpath) for checking that the value “3” is displayed is “/ html / body / table / tr [2] / td [2] "is automatically changed.
図28に示す機能変更前のHTMLファイルに基づき生成した図29のウェブ画面11(第1のウェブ画面例)において、図28の「P」で示すテストシナリオの入力コマンドが実行されると、値「1+2」が図29に示す「注釈」の入力エリア(Xpathで示した場所)に入力される。また、図28の「Q」で示すテストシナリオの表示コマンドが実行されると、図29に示す「結果」(Xpathで示した場所)に表示された値「3」がチェックされる。 When the test scenario input command indicated by “P” in FIG. 28 is executed on the web screen 11 (first web screen example) in FIG. 29 generated based on the HTML file before the function change shown in FIG. “1 + 2” is input to the “annotation” input area (location indicated by Xpath) shown in FIG. When the test scenario display command indicated by “Q” in FIG. 28 is executed, the value “3” displayed in the “result” (location indicated by Xpath) shown in FIG. 29 is checked.
これに対して、機能変更後のHTMLファイルには、図30の「R」で示す「注釈2」が追加される。これにより、機能変更後の図31のウェブ画面11(第2のウェブ画面例)では、機能変更前の図29のウェブ画面11に対して「注釈」の前に「注釈2」が表示される。
On the other hand, “Note 2” indicated by “R” in FIG. 30 is added to the HTML file after the function change. Thereby, on the web screen 11 (second web screen example) in FIG. 31 after the function change, “
機能変更後の図31のウェブ画面11に対して、図27(a)に示す第1のテストシナリオのXpathが示す画面上の場所に値を表示しようとすると、テストでは、図32のように「注釈2」に値「1+2」を入力しようとしてしまう。また、図32のように「注釈」に値「3」が表示されていることを確認してしまう。
If a value is to be displayed at a location on the screen indicated by Xpath of the first test scenario shown in FIG. 27A with respect to the
しかしながら、本実施形態では、自動作成された第2のテストシナリオに基づき、図33に示したように、自動作成した第2のテストシナリオの図27(b)に示すXpathに基づき、「注釈」に値「1+2」が入力され、「結果」に値「3」が表示されていることが確認される。このようにして、第1のテストシナリオの機能変更前のXpathと機能変更後のXpathとを対応させて第2のテストシナリオを自動作成することで、機能変更後のテストシナリオのコマンドを機能変更後のウェブ画面11のレイアウトに合致させて実行できる。
However, in the present embodiment, based on the automatically created second test scenario, as shown in FIG. 33, based on the Xpath shown in FIG. 27B of the automatically created second test scenario, “annotation” It is confirmed that the value “1 + 2” is entered in “” and the value “3” is displayed in “Result”. In this way, the function of the command of the test scenario after the function change is created by automatically creating the second test scenario by associating the Xpath before the function change of the first test scenario with the Xpath after the function change. This can be executed in accordance with the layout of the
以上に説明したように、テストは、第1のテストシナリオから自動作成された第2のテストシナリオに基づき繰り返し実行される。すべてのテストシナリオが実行された後、テストが終了される。 As described above, the test is repeatedly executed based on the second test scenario automatically created from the first test scenario. After all test scenarios have been executed, the test is terminated.
図34は機能変更前のテストシナリオの実行例を示し、図35は機能変更後のテストシナリオの実行例を示す。図34及び図35では、左上図のログイン画面でウェブシステム20が起動され、ログイン後に図34及び図35の左下図のウェブ画面11に画面が遷移する。図34の左下図のウェブ画面11に対する第1のテストシナリオから、図35の左下図のウェブ画面11に新たな機能表示(ディスク使用量)が追加された場合の第2のテストシナリオが自動作成された一例が示されている。
FIG. 34 shows an execution example of the test scenario before the function change, and FIG. 35 shows an execution example of the test scenario after the function change. 34 and 35, the
以上に説明したように、一実施形態に係るウェブテストシステム30によれば、システムに機能変更が生じた場合、機能変更前のテストシナリオに基づきシステムの機能変更後のウェブ画面をテストするためのテストシナリオを自動作成することができる。つまり、システムの機能変更前後でウェブ画面11のレイアウトが変更されても、機能変更前後におけるテストシナリオに記述されたXpathの対応情報を抽出することで機能変更前のウェブ画面11をテストするためのテストシナリオから機能変更後のウェブ画面11をテストするためのテストシナリオを自動作成できる。これにより、手動によるテストシナリオの変更が不要になり、また、OSやブラウザに依存せずに画面のテストを行うことができる。
As described above, according to the
(ハードウェア構成例)
最後に、本実施形態に係るウェブテストシステム30のハードウェア構成例について、図36を参照して説明する。図36は、本実施形態に係るウェブテストシステム30のハードウェア構成例を示す図である。(Hardware configuration example)
Finally, a hardware configuration example of the
図36に示すように、ウェブテストシステム30は、入力装置101、表示装置102、外部I/F103、RAM(Random Access Memory)104、ROM(Read Only Memory)105、CPU(Central Processing Unit)106、通信I/F107、及びHDD(Hard Disk Drive)108などを備え、それぞれがバスBで相互に接続されている。
As shown in FIG. 36, the
入力装置101は、キーボードやマウスなどを含み、ウェブテストシステム30に各操作信号を入力するのに用いられる。表示装置102は、各種の処理結果を表示する。
The
通信I/F107は、ウェブテストシステム30をネットワークに接続するインタフェースである。これにより、ウェブテストシステム30は、通信I/F107を介してウェブシステム20とデータ通信を行うことができる。
The communication I /
HDD108は、プログラムやデータを格納している不揮発性の記憶装置である。格納されるプログラムやデータには、装置全体を制御する基本ソフトウェア及びアプリケーションソフトウェアがある。例えば、HDD108には、ソースコードDB41、修正ソースコードDB42、テストシナリオDB43、シナリオ修正用DB44及びテスト実行結果DB45が格納されている。
The
外部I/F103は、外部装置とのインタフェースである。外部装置には、記録媒体103aなどがある。これにより、ウェブテストシステム30は、外部I/F103を介して記録媒体103aの読み取り及び/又は書き込みを行うことができる。
The external I /
記録媒体103aには、フロッピー(登録商標)ディスク、CD(Compact Disk)、及びDVD(Digital Versatile Disk)、ならびに、SDメモリカード(SD Memory card)やUSBメモリ(Universal Serial Bus memory)などがある。
Examples of the
ROM105は、電源を切っても内部データを保持することができる不揮発性の半導体メモリ(記憶装置)である。ROM105には、ネットワーク設定などのプログラムやデータが格納されている。RAM104は、プログラムやデータを一時保持する揮発性の半導体メモリ(記憶装置)である。CPU106は、上記記憶装置(例えば「HDD108」や「ROM105」など)から、プログラムやデータをRAM104上に読み出し、処理を実行することで、装置全体の制御や搭載機能を実現する演算装置である。
The
上記ハードウェア構成により、例えば、CPU106が、ROM105やHDD108内に格納されたデータ及びプログラムを用いてテストシナリオの操作手順に基づきウェブ画面11のテストを実行する。
With the above hardware configuration, for example, the
なお、ソースコードDB41、修正ソースコードDB42、テストシナリオDB43、シナリオ修正用DB44及びテスト実行結果DB45に関する情報は、RAM104、HDD108に格納されてもよい。これらのDBは、ネットワークを介してウェブテストシステム30に接続されるクラウド上のサーバー等に格納されてもよい。
Information on the
以上、試験プログラム、試験装置及び試験方法を上記実施形態により説明したが、本発明にかかる試験プログラム、試験装置及び試験方法は上記実施形態に限定されるものではなく、本発明の範囲内で種々の変形及び改良が可能である。また、上記実施形態及び変形例が複数存在する場合、矛盾しない範囲で組み合わせることができる。 As described above, the test program, the test apparatus, and the test method have been described in the above embodiment. However, the test program, the test apparatus, and the test method according to the present invention are not limited to the above embodiment, and various modifications can be made within the scope of the present invention. Modifications and improvements are possible. In addition, when there are a plurality of the above-described embodiments and modifications, they can be combined within a consistent range.
例えば、上記実施形態に係る試験プログラム、試験装置及び試験方法の構成は一例であり、本発明の範囲を限定するものではなく、用途や目的に応じて様々なシステム構成例があることは言うまでもない。 For example, the configuration of the test program, the test apparatus, and the test method according to the above embodiment is an example, and does not limit the scope of the present invention. Needless to say, there are various system configuration examples depending on the application and purpose. .
1:サーバ/ストレージシステム
10:サーバ/ストレージ装置
11:ウェブ画面
20:ウェブシステム
30:ウェブテストシステム
31:ソースコード読込部
32:修正ソースコード作成部
33:テストシナリオ読込部
34:修正用データ作成部
35:XPath抽出部
36:テストシナリオ作成部
37:テスト実行処理部
40:記憶部
41:ソースコードDB
42:修正ソースコードDB
43:テストシナリオDB
44:シナリオ修正用DB
45:テスト実行結果DB1: Server / Storage System 10: Server / Storage Device 11: Web Screen 20: Web System 30: Web Test System 31: Source Code Reading Unit 32: Modified Source Code Creation Unit 33: Test Scenario Reading Unit 34: Correction Data Creation Unit 35: XPath extraction unit 36: Test scenario creation unit 37: Test execution processing unit 40: Storage unit 41: Source code DB
42: Modified source code DB
43: Test scenario DB
44: DB for scenario correction
45: Test execution result DB
Claims (4)
システムの機能変更後の処理が記述された第2のソースコードに所定の表記を付加した第2の修正ソースコードに基づき、機能変更後の第2のウェブ画面の位置を指定する第2のXPathと前記所定の表記とを含んだ第2のシナリオ修正用データを作成し、
前記第1のシナリオ修正用データと前記第2のシナリオ修正用データとに含まれる前記所定の表記が一致する位置に応じて前記第1のXPathと前記第2のXPathとの対応情報を抽出し、
前記抽出した対応情報に基づき、前記第1のウェブ画面の操作手順を示す第1のテストシナリオから前記第2のウェブ画面の操作手順を示す第2のテストシナリオを作成する、
処理をコンピュータに実行させるための試験プログラム。 First XPath that specifies the position of the first web screen before the function change based on the first modified source code in which a predetermined notation is added to the first source code in which the process before the function change of the system is described And first scenario correction data including the predetermined notation,
A second XPath for designating the position of the second web screen after the function change based on the second modified source code in which a predetermined notation is added to the second source code in which processing after the function change of the system is described And the second scenario correction data including the predetermined notation,
Corresponding information between the first XPath and the second XPath is extracted in accordance with a position where the predetermined notation included in the first scenario correction data and the second scenario correction data matches. ,
Based on the extracted correspondence information, a second test scenario indicating an operation procedure of the second web screen is created from a first test scenario indicating an operation procedure of the first web screen.
A test program for causing a computer to execute processing.
前記所定の表記が一致する位置に応じたHTMLファイルのタグ構造から前記第1のXPathと前記第2のXPathとの対応情報を抽出する、
請求項1に記載の試験プログラム。 The extraction process is:
Extracting correspondence information between the first XPath and the second XPath from the tag structure of the HTML file corresponding to the position where the predetermined notation matches;
The test program according to claim 1.
前記第1の修正ソースコードに基づき、機能変更前の第1のウェブ画面の位置を指定する第1のXPathと前記所定の表記とを含んだ第1のシナリオ修正用データを作成し、前記第2の修正ソースコードに基づき、機能変更後の第2のウェブ画面の位置を指定する第2のXPathと前記所定の表記とを含んだ第2のシナリオ修正用データを作成する修正用データ作成部と、
前記第1のシナリオ修正用データと前記第2のシナリオ修正用データとに含まれる前記所定の表記が一致する位置に応じて前記第1のXPathと前記第2のXPathとの対応情報を抽出する抽出部と、
前記抽出した対応情報に基づき、前記第1のウェブ画面の操作手順を示す第1のテストシナリオから前記第2のウェブ画面の操作手順を示す第2のテストシナリオを作成するテストシナリオ作成部と、
を有する試験装置。 A first modified source code is created by adding a predetermined notation to the first source code in which processing before the function change of the system is described, and second source code in which processing after the function change of the system is described A modified source code creation unit for creating a second modified source code by adding a predetermined notation to
Based on the first correction source code, first scenario correction data including a first XPath designating a position of the first web screen before the function change and the predetermined notation is created, and the first Based on the correction source code of No. 2, the correction data generation unit that generates the second scenario correction data including the second XPath that specifies the position of the second web screen after the function change and the predetermined notation When,
Corresponding information between the first XPath and the second XPath is extracted according to a position where the predetermined notation included in the first scenario correction data and the second scenario correction data matches. An extractor;
A test scenario creating unit that creates a second test scenario indicating the operation procedure of the second web screen from a first test scenario indicating the operation procedure of the first web screen based on the extracted correspondence information;
Test equipment with
システムの機能変更後の処理が記述された第2のソースコードに所定の表記を付加した第2の修正ソースコードに基づき、機能変更後の第2のウェブ画面の位置を指定する第2のXPathと前記所定の表記とを含んだ第2のシナリオ修正用データを作成し、
前記第1のシナリオ修正用データと前記第2のシナリオ修正用データとに含まれる前記所定の表記が一致する位置に応じて前記第1のXPathと前記第2のXPathとの対応情報を抽出し、
前記抽出した対応情報に基づき、前記第1のウェブ画面の操作手順を示す第1のテストシナリオから前記第2のウェブ画面の操作手順を示す第2のテストシナリオを作成する、
処理をコンピュータが実行する試験方法。
First XPath that specifies the position of the first web screen before the function change based on the first modified source code in which a predetermined notation is added to the first source code in which the process before the function change of the system is described And first scenario correction data including the predetermined notation,
A second XPath for designating the position of the second web screen after the function change based on the second modified source code in which a predetermined notation is added to the second source code in which processing after the function change of the system is described And the second scenario correction data including the predetermined notation,
Corresponding information between the first XPath and the second XPath is extracted in accordance with a position where the predetermined notation included in the first scenario correction data and the second scenario correction data matches. ,
Based on the extracted correspondence information, a second test scenario indicating an operation procedure of the second web screen is created from a first test scenario indicating an operation procedure of the first web screen.
A test method in which processing is performed by a computer.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2014/067162 WO2015198473A1 (en) | 2014-06-27 | 2014-06-27 | Test program, test device, and test method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP5958655B2 true JP5958655B2 (en) | 2016-08-02 |
JPWO2015198473A1 JPWO2015198473A1 (en) | 2017-04-20 |
Family
ID=54937597
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015531373A Active JP5958655B2 (en) | 2014-06-27 | 2014-06-27 | Test program, test apparatus and test method |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP5958655B2 (en) |
WO (1) | WO2015198473A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7040272B2 (en) * | 2018-05-08 | 2022-03-23 | 富士通株式会社 | Source code conversion program and source code conversion method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130086560A1 (en) * | 2011-09-30 | 2013-04-04 | International Business Machines Corporation | Processing automation scripts of software |
JP2014106589A (en) * | 2012-11-26 | 2014-06-09 | Fujitsu Ltd | Information processor, test program, and test method |
-
2014
- 2014-06-27 JP JP2015531373A patent/JP5958655B2/en active Active
- 2014-06-27 WO PCT/JP2014/067162 patent/WO2015198473A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130086560A1 (en) * | 2011-09-30 | 2013-04-04 | International Business Machines Corporation | Processing automation scripts of software |
JP2014106589A (en) * | 2012-11-26 | 2014-06-09 | Fujitsu Ltd | Information processor, test program, and test method |
Also Published As
Publication number | Publication date |
---|---|
JPWO2015198473A1 (en) | 2017-04-20 |
WO2015198473A1 (en) | 2015-12-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10684839B2 (en) | Plugin for software deployment | |
CN111142903B (en) | Configuration file interactive updating method and device based on file comparison | |
EP3557423B1 (en) | System and method for testing electronic visual user interface outputs | |
US11449348B2 (en) | Pre/post deployment customization | |
KR102341154B1 (en) | High-speed application for installation on mobile devices for permitting remote configuration of such mobile devices | |
US20160062963A1 (en) | Synchronizing DOM Element References | |
JP4395761B2 (en) | Program test support apparatus and method | |
US10908928B2 (en) | Rules-based workflow messaging | |
CN107220172B (en) | Method and system for automated User Interface (UI) testing via model-driven techniques | |
JP6217277B2 (en) | Software development method and system therefor | |
US10169218B2 (en) | Method for automatically validating data against a predefined data specification | |
CN107015903B (en) | Interface test program generation method and device and electronic equipment | |
US11656601B2 (en) | Method and electronic generation device for generating at least one configuration file for an automation tool, related computer program | |
US20170308379A1 (en) | Evaluating documentation coverage | |
JP5958655B2 (en) | Test program, test apparatus and test method | |
US10599424B2 (en) | Committed program-code management | |
US10209965B1 (en) | In-line function synchronization | |
CN115794214A (en) | Application module metadata management method, device, storage medium and device | |
JP5905313B2 (en) | Information processing apparatus, information processing method, information processing system, and program | |
US20160048550A1 (en) | Automatic detection of problems in a large-scale multi-record update system and method | |
JP7318704B2 (en) | Test equipment, test method and program | |
CN117421039B (en) | Version information generation method, device and equipment of front-end Vue engineering and storage medium | |
CN115167841A (en) | Database version management method and device and electronic equipment | |
WO2023162260A1 (en) | Environment construction assistance device, system, and method, and computer-readable medium | |
JP2017091027A (en) | System development support system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
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: 20160524 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160606 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5958655 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |