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
ProxyServerを使った本番環境でのE2Eテスト
Search
Taketoshi Aono(青野健利 a.k.a brn)
June 28, 2017
2.5k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ProxyServerを使った本番環境でのE2Eテスト
本番環境でjavascriptのE2Eテストを行った方法の説明です。
Taketoshi Aono(青野健利 a.k.a brn)
June 28, 2017
More Decks by Taketoshi Aono(青野健利 a.k.a brn)
See All by Taketoshi Aono(青野健利 a.k.a brn)
document.write再考
brn
7
3.2k
Parsing Javascript
brn
14
9.6k
JSON & Object Tips
brn
1
600
CA 1Day Youth Bootcamp for Frontend LT
brn
0
1.1k
Modern TypeScript
brn
2
890
javascript - behind the scene
brn
3
830
tc39 proposals
brn
0
1k
プロダクト開発とTypeScript
brn
7
3k
React-Springでリッチなアニメーション
brn
1
780
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
510
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
The Language of Interfaces
destraynor
162
27k
エンジニアに許された特別な時間の終わり
watany
109
250k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
620
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
610
Design in an AI World
tapps
1
350
Ruling the World: When Life Gets Gamed
codingconduct
0
390
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Transcript
Production E2E test with ProxyServer
せ: @brn (ꫬꅿ⨳ⵃa.k.a ـٕ٦ظ) 耵噟: ؿٗٝزؒٝسؒٝآص،٥iOSؒٝآص، ⠓爡: Cyberagent ،سذؙأةآؔRightSegment٥AI Messenger
ـؚٗ: http://abcdef.gets.b6n.ch/ Twitter: https://twitter.com/brn227 GitHub: https://github.com/brn
Why test against production? 猘ך⫴ְגְ،سذؙأةآؔדכBtoBָً؎ٝחזתׅկ ًر؍،瘝ךBtoCךؿٗٝزؒٝس㹋鄲ׅ堣⠓כ婁ו֮תׇկ ךծE2Eذأزחꟼ׃ג㼰ղ暴婊ז✲䞔ָ㢳ְדׅկ
Why test against production? ז鏬ד➙㔐כ剑㹋鄲ֿׅהָ㢳ְծ javascript SDKךE2Eذأزך׀稱➜׃ְה䙼ְתׅկ
Why is javascript SDK? ךחjavascript SDKהכוזך䭷׃גְַ׀铡僇׃תׅկ javascript SDKהכ⚺חծscriptה㼰׃ךةؚךإحزד䲿⣘ׁhtml ػ٦خדׅկ
Ⱗ⡤⢽ד鎉ֲהGoogle Analyticsךأصلحز瘝ךֿהדׅկ
Special E2E test ׁגծֿךjavascript SDKךE2Eذأزָ暴婊ַהְֲהծ 㛇劤涸חؙٓ؎،ٝزךWebل٦آח㙵鴥תֿה䲿ה׃גְ ծ涯秵ך橆㞮דE2Eذأز׃הֿדծ㹋ꥷךذأزחזז ְֿהָ㢳ְךדׅկ ך…
Solution ؙٓ؎،ٝزךWEBل٦آ♳ד 㹋ꥷחذأز׃תׅ
How? ֿװזְה… ⟃厤طحزغؙٝךؚٗ؎ٝل٦آォֹ굲ל׃ֿהָ… ⾱㔓כؙٓ؎،ٝزךل٦آח֮document.writeָChromeחـٗح ׁؙגְךדָׅծJSSDKך⚥דdocument.open׃גְծ㹋 遤ׁג׃תגل٦آָ涯秵חזג׃תגְַדׅկ
How? ֲֿזזְחذأز׃
How? ׃ַ׃ؙٓ؎،ٝزךWEBل٦آחכ㹋ꥷח劤殢ךةָؚ㙵תגֶծ ذأزׅחכֿךةؚرفٗ؎ךdev橆㞮ךךח縧ֹ䳔ִ䗳銲 ָ֮תׅկ
ProxyServer ֿדـٓؐؠהWEBل٦آךחProxyServer䮠ծ Man in the middle(⚥罏余䷼)הְֲ䩛岀欽ְג WEBل٦آ何ׂ׃תׅw
ProxyServer ➙㔐כNodejsךדծ node-mitm-proxyהְֲךך׆לזnpmٌآُ٦ٕ崞欽׃תׅկ
node-mitm-proxy ֿךٌآُ٦ٕכוֲװծ client => proxy proxy => server server =>
proxy proxy => client ךぐ穗騟ד剅ֹ䳔ִָ〳腉ז״ֲדׅկזךדծ➙㔐כծ server => proxy client => proxy ך穗騟剅ֹ䳔ִגծ劤殢؟٦غפךؙٔؒأز涪؟٦غח崧׃ծ ؟٦غַךٖأهٝأ何甑׃גرغحؚ䞔㜠㙵鴥תׅկ
Nightwatch.js E2Eذأز荈⡤כNightwatch.jsⵃ欽׃ג遤ְתׅկ Nightwatch.jsהכSelenium⢪E2Eذأزח暴⻉׃ٓ؎ـٓٔדׅկ 湫חSeleniumח鍗״ַז嚂דֹתׅկ ׁחぐـٓؐؠכselenium-dockerⵃ欽׃גⴓ侔橆㞮ד遤ְתׅկ
Images Nightwatch selenium-hub Browser Browser Browser Proxy Proxy Proxy jsךURL剅ֹ䳔ִהWEBل٦آך何甑
Development Contents Server Production Contents Server 剅ֹ䳔ִURLד،ؙإأ WEB WEBل٦آ《䖤
E2E Test ֿד劤殢橆㞮פך،ؙإأד֮זָծ 涪橆㞮ךjsؿ؋؎ٕדE2Eذأز㹋遤ֿׅהָדֹתׅկ
Problems Nightwatch.jsדFirefoxחProxy鏣㹀ְְׅ倯岀ָזְծ Firefoxדذأزָדֹגְתׇկ 湫䱸Selenium⢪ִל〳腉זךדָׅ… ֮הٌغ؎ٕ…
Summary 穠㽷荈⹛ذأزֽדؕغ٦דֹ眔㔲חכꣲ歲ָ֮תׅկ זךדծ➂⸂ד嫣鹈ذأزث٦يָذأز׃גְתׅկ 暴חٌغ؎ٕ橆㞮ך劤殢E2Eذأزָ穠圓⿑׃ְךדծז הַז傈㣄鋅גְתׅ…
Summary ׀幠耮ָ֮הֲ׀ְׂת׃կ