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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
はない
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
550
組み合わせテストを簡単にするgemを作った話
hanahiroaze
0
280
MySQLとデッドロックの話
hanahiroaze
1
1.4k
ここが変だよ。このテスト〜テストケース爆発と戦う〜
hanahiroaze
1
1.7k
Symfony Best Practiceを読もう!(ついでに翻訳した話)
hanahiroaze
2
960
テストことはじめ
hanahiroaze
0
520
Symfony2のi18n対応
hanahiroaze
0
860
開発合宿に行ってきました
hanahiroaze
0
160
GitHubよちよち会#3
hanahiroaze
0
190
Other Decks in Technology
See All in Technology
[FECONF-2026] 신대륙을 향한 카카오페이증권 프론트엔드 항해기 (이주승)
l1ghthouse
0
150
Claude Code をローカルとサーバー上で利用した際の Bedrock 利用料をユーザー単位で一本化してみる
ohorig
0
150
2026-10-24 JAWS JAWS-UG 茨城 #18 IAM Policy Autopilotってなにさ。terraform planからIAM Policyつくれるの? / What's IAM Policy Autopilot
masasuzu
0
140
国際カードブランドルール変更に伴うクレジットカード決済取引仕様変更について
k1style
0
220
初海外で注意すべきこと12選!!!安全快適なre:invent生活にするために
yuuuuuuu168
1
220
Draft AIエージェントの トークン消費を最小化する 8つの原則
kinopeee
5
1.7k
「作れる」と「リリースできる」の間にあったもの── PdMを外して見えた、PdMがやるべき仕事/Buildable ≠ Shippable: What Removing the PM Taught Me About the PM’s Job
yappli_developers
0
260
reInvent2026stby LT00 "Change your life!"
shinichirokawano
1
160
トークン化預金DCJPYの取り組みと活用ユースケース
finengine
0
250
React改造してみた
tsukina_7mochi
0
160
ドメインエキスパートは いかにして AI を使って プロダクト開発をするか
tatsuyashiraishi
1
170
プロダクトが成長すると、 プロダクトマネージャーの仕事はどう変わるのか - 「まず作る」から「小さく学び、確かめながら進む」へ
sansantech
PRO
0
340
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
450
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
530
How to make the Groovebox
asonas
2
2.5k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
880
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
59k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Ruling the World: When Life Gets Gamed
codingconduct
0
420
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