Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
E2E Test Tips
Search
はない
August 28, 2016
Technology
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
E2E Test Tips
Symfony Meetup #14資料
はない
August 28, 2016
More Decks by はない
See All by はない
2018年目標を達成できなかった私が 今年こそ達成するためにしていること
hanahiroaze
3
540
組み合わせテストを簡単にするgemを作った話
hanahiroaze
0
270
MySQLとデッドロックの話
hanahiroaze
1
1.4k
ここが変だよ。このテスト〜テストケース爆発と戦う〜
hanahiroaze
1
1.6k
Symfony Best Practiceを読もう!(ついでに翻訳した話)
hanahiroaze
2
950
テストことはじめ
hanahiroaze
0
510
Symfony2のi18n対応
hanahiroaze
0
850
開発合宿に行ってきました
hanahiroaze
0
160
GitHubよちよち会#3
hanahiroaze
0
180
Other Decks in Technology
See All in Technology
SQL文一行も書けない人事がCortexもろもろを使って人事業務を楽にしてみる
ponponmikankan
1
220
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
1
230
2026/09/10 Spring Bootから Jakarta EE/MicroProfileへの移行
megascus
0
310
Snowflakeのコスト最適化を支えるアーキテクチャ設計
ktatsuya
1
1.4k
synctest時代のhttptest Go 1.27で変わるHTTPサーバテストの裏側 / go conference2026 synctest and httptest
budougumi0617
1
2.6k
10分で知る最近のOmarchy
komagata
0
250
Sigmaユーザーのための有用リソース一挙公開 & Sigmaで使えるMCP #sigma_ucj /useful-resources-for-sigma-computing-users-and-mcps-with-sigma
shinyaa31
0
190
OpenTelemetry eBPF Instrumentationの舞台裏 / Behind the Scenes of OpenTelemetry eBPF Instrumentation
ymotongpoo
3
980
AI-DLCって実際どう? 〜聞きたいこと全部聞いてみる〜
news_it_enj
0
260
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
1
470
こんなアーキテクチャ図は嫌だ BEYOND THE TIME: 半年後の自分へ贈る15のメッセージ / 15 of Anti-pattern in AWS Architecture Diagrams
naospon
3
310
AI時代に顧客へ最速で価値を 届けるための試行錯誤 〜「AI × マネジメント」領域におけるmentoのケース〜
posterkeisuke
0
110
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Side Projects
sachag
456
43k
Claude Code のすすめ
schroneko
67
230k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
520
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
470
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
240
Transcript
&&ςετ5JQT !IBOBIJSP@B[F
ͳ·͑ɿՖҪɹߦ UXJUUFSɿ!IBOBIJSP@B[F ॴଐɿIJUPNFEJB 4ZNGPOZྺɿ̍ 99
継続的デリバリー p129 技術視点 ビジネス視点 支 援 評 価 機能の受け入れ テスト ユニットテスト
インテグレーションテスト システムテスト ショーケース(デモなど) ユーザビリティテスト 探索的テスト 非機能の受け入れテスト (キャパシティ/セキュリティなど) リグレッション テスト 前回の復習
「同じ機能に対して手動テストを2回以上 行っていることに気づいたら、 その機能がこの先変更されるかどうか 確かめてみる。」 変更がなさそうなら自動化する。 よく変更されるなら自動化から外す。 継続的デリバリー p139-140 前回の復習
None
http://codeception.com/ https://www.browserstack.com/
"require": { "phpunit/phpunit": "^4.7", "facebook/webdriver": "^1.0" }, http://qiita.com/imunew/items/8806cd68a401c6975d44
・PHPUnit ・codecept ・Phantomjs
$url = 'http://'. self::BROWSERSTACK_USER. ':'. self::BROWSERSTACK_KEY. '@hub.browserstack.com/wd/hub'; return RemoteWebDriver::create($url, [
'browser' => "Chrome", 'browser_version' => "49.0", 'os' => "Windows", 'os_version' => "7", 'browserstack.debug' => "true", 'acceptSslCerts' => "true” ]); https://www.browserstack.com/automate/php
modules: enabled: - WebDriver: url: ‘https://hogehoge.com' browser: chrome - \Helper\Acceptance
Tips1 操作対象の項目にidを振って幸せになる
$I->fillField('//*[@id="main"]/div/div[2]/div/div[2]/div/input'); $textBox = $this->webDriver- >findElement(WebDriverBy::cssSelector('tbody input:nth- child(1)')); $textBox->sendKeys(’hogehoge'); idがないと、「cssセレクタをブラウザのコンソールで確認->貼付」の 繰り返しになり、時間がかかってテストコードを書くのが辛くなってく
る。 codeceptionのXPath指定はかなり便利。
Tips2 テストで確認する範囲を絞る
・複数の画面にまたがるテスト ・成功/失敗をいっぺんに確認するテスト は コード量・実行時間が増えて大変です。
Tips3 取得したスクリーショットを連結して 1枚にする
// about taking screenshots protected function concatFile($domain) { // saveScreenshot時に保存したファイルパスを取得
if(!empty($this->concatFiles)){ $now = new DateTime(); // 連結するベースになる画像の生成 $baseImg = imagecreatetruecolor(AbstractWebDriverTestCase::screenshotWidth, AbstractWebDriverTestCase::screenshotHeight*count($this- >concatFiles)); // ベースイメージにスクリーンショットを貼り付け for($i=0;$i<count($this->concatFiles);$i++){ $screenShot = imagecreatefrompng($this->concatFiles[$i]); imageCopy($baseImg, $screenShot, 0, AbstractWebDriverTestCase::screenshotHeight*$i, 0, 0, AbstractWebDriverTestCase::screenshotWidth, AbstractWebDriverTestCase::screenshotHeight); } // 連結した画像の保存 imagepng($baseImg, AbstractWebDriverTestCase::fileSavePath.$now->format('Ymd').'/'.$domain.'.png'); imagedestroy($baseImg); } // 個別のスクリーンショットは削除 for($i=0;$i<count($this->concatFiles);$i++){ if(file_exists($this->concatFiles[$i])){ unlink($this->concatFiles[$i]); } } // ループする時に前回実行時の情報が残ってしまうので、削除済みの情報を削除 $this->concatFiles = []; }
実行結果がvideoになって便利!
Tips4 あんなことやこんなことしたい
https://github.com/facebook/php-webdriver/issues http://codeception.com/docs/03-AcceptanceTests http://piccagliani.github.io/Codeception.docs.ja_JP/ index.html issuesに「こんなことしたいんだけど」->「こうすればできるよ」が豊富。 使い始めるとdocumentationより頻繁に見てる気がする。 日本語documentがあって安心。
)BWFBOJDF&&5FTU-JGF