liguofeng29’s blog

個人勉強用ブログだっす。

2017-03-02から1日間の記事一覧

groovy,geb(selenium),spockによる自動化テスト その11- Report機能

gebは検証pageに対するレポート機能(HTML,PNG)を提供している。 ・シナリオ リスナー定義&追加(レポートする度にprintlnが実行される) googleに移動する レポートする yahooに移動する レポートする googleに移動する レポートする yahooに移動する レポー…

groovy,geb(selenium),spockによる自動化テスト その10- GebConfig.groovy

GebConfig.groovyはGebの環境設定ファイルである。 参考: http://www.gebish.org/manual/1.1/ Geb attempts to load a ConfigSlurper script named GebConfig.groovy from the default package (in other words, in the root of a directory that is on the…

groovy,geb(selenium),spockによる自動化テスト その9 - Page Object Pattern - Module

複数の画面で使う共通部品(メニュとか)はMoudleを継承することで再利用できる。 import geb.Browser import geb.Module import geb.Page Browser.drive { to YahooTopUseModule 検索モジュール.検索欄.value("検索内容") 検索モジュール.検索ボタン.click() …

groovy,geb(selenium),spockによる自動化テスト その8 - Page Object Pattern - Pageの属性

Pageオブジェクトの属性 url属性 : PageのURLを表す ・シナリオ 相対パス指定のpageに移動 (to ExamplePage1) 絶対パス指定のpageに移動 (to ExamplePage2) 引数指定のpageに移動 (to ExamplePageWithArguments) インスタンス引数指定のpageに移動 (to Ex…

groovy,geb(selenium),spockによる自動化テスト その7 - Page Object Pattern

gebのPage Object Page Object Patternとは? PageObjectデザインパターンとは、アプリケーションの画面を1つのオブジェクトとしてとらえるデザインパターンの1種のことです。 Seleniumの公式サイトでも推奨されている、保守性の高いテストコードの書き方…