Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Electron + WebDriver = Spectron
Search
Linda_pp
June 09, 2016
Technology
1
1.8k
Electron + WebDriver = Spectron
Introduction to Spectron; a E2E testing framework for Electron apps
Linda_pp
June 09, 2016
Tweet
Share
More Decks by Linda_pp
See All by Linda_pp
actionlint の Linter 設計
rhysd
6
3.1k
ripgrep をライブラリとして使う
rhysd
0
390
port-monolith-to-wasm-for-chrome-extension
rhysd
0
450
Fuzzing Rust Text Editor
rhysd
1
2.9k
Vim compiled to WebAssembly
rhysd
5
2.1k
about-neovim-0.4.0-floating-window
rhysd
3
2.1k
reply.vim
rhysd
0
1.2k
Vim ported to WebAssembly (VimConf 2018)
rhysd
4
3.3k
go-selfupdate-github で ツールを自己アップデートする
rhysd
5
4.3k
Other Decks in Technology
See All in Technology
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
310
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
390
SSMRunbook作成の勘所_20241120
koichiotomo
3
160
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
140
Engineer Career Talk
lycorp_recruit_jp
0
190
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
390
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
420
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
190
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
1k
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Writing Fast Ruby
sferik
627
61k
Statistics for Hackers
jakevdp
796
220k
Embracing the Ebb and Flow
colly
84
4.5k
Designing Experiences People Love
moore
138
23k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Docker and Python
trallard
40
3.1k
A designer walks into a library…
pauljervisheath
204
24k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
4 Signs Your Business is Dying
shpigford
180
21k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Transcript
&MFDUSPO 8FC%SJWFS 4QFDUSPO .PEFSO8FC"QQ-5 @Linda_pp @rhysd
&MFDUSPO w σεΫτοϓΞϓϦϑϨʔϜϫʔΫGSPN(JU)VC w $ISPNJVNϕʔε /PEFKT
&MFDUSPOΞϓϦ։ൃ༻ΞϓϦ 4QFDUSPO &OEUP&OEςετ ༻ͷςεςΟϯάɹ ϑϨʔϜϫʔΫ $ISPNFESJWFS XFCESJWFSJP %FWUSPO *1$ΠϕϯτΛ
ࢹͰ͖Δ%FW5PPMT ֦ு "1*%FNP"QQ &MFDUSPOͷ֤छ"1* ΛࢼͤΔσϞΞϓϦ
&MFDUSPOΞϓϦ։ൃ༻ΞϓϦ 4QFDUSPO &OEUP&OEςετ ༻ͷςεςΟϯάɹ ϑϨʔϜϫʔΫ $ISPNFESJWFS XFCESJWFSJP %FWUSPO *1$ΠϕϯτΛ
ࢹͰ͖Δ %FW5PPMT֦ு "1*%FNP"QQ &MFDUSPOͷ֤छ"1* ΛࢼͤΔσϞΞϓϦ
&MFDUSPOΞϓϦͷςετ w ୯ମςετʢ&MFDUSPO"1*ͷґଘແ͠ʣ w ϩʔΧϧͷ/PEFKTͰςετʢ߹ʹΑͬͯ KTEPNʣ w ୯ମςετʢ&MFDUSPO"1*ͷґଘ༗Γʣ w FMFDUSPONPDIBΛͬͯ&MFDUSPOͷϓϩηε্ͰςετΛΒͤΔ
w IUUQTHJUIVCDPNKQSJDIBSETPOFMFDUSPONPDIB w &OEUP&OEςετ w 4QFDUSPOΛ࣮ͬͯࡍͷΞϓϦΛಈ͔͢ w IUUQTHJUIVCDPNFMFDUSPOTQFDUSPO
σϞʂ w IUUQTHJUIVCDPNSIZTE:PVS'VLVSPV w πΠολʔΫϥΠΞϯτ w 5ZQF4DSJQU BWBKT BTZODBXBJU
4QFDUSPO w 4QFDUSPODISPNFESJWFS XFCESJWFSJP w DISPNFESJWFSͷηοτΞοϓΞϓϦଆͷ &MFDUSPO"1*Λୟͨ͘Ίͷϔϧύʔ w ΞϓϦͷQBUIΛࢦఆ͢Δ͚ͩͰ͙͢ςετ͕࢝Ί ΒΕΔ
w 5SBWJT$*"QQ7FZPSSFBEZ
XFCESJWFSJP w 4FMFOJVN8FC%SJWFSͷ+BWB4DSJQUόΠϯσΟϯ άɽ8FC%SJWFS"1*ܦ༝ͰϒϥβΛૢ࡞͢Δϥ ΠϒϥϦ w ඪ४ͷ+4όΠϯσΟϯάʹൺͯ؆ܿʹॻ͚Δ
&MFDUSPO $ISPNJVN 4QFDUSPO XFCESJWFSJP :PVS5FTU $PEF :PVS"QQ w DBQBCJMJUZࣗಈࢦఆ w
ESJWFSΦϒδΣΫ τ֦ு w 8FC%SJWFS"1* WJBDISPNFESJWFS w NPDIBBWBͳͲ Ͱςετ w &MFDUSPO"1*ͷϦ Ϟʔτ࣮ߦ
import test from 'ava'; import {Application} from 'spectron'; test.beforeEach(async t
=> { t.context.app = new Application({ path: '/Applications/MyApp.app/Contents/MacOS/MyApp' }); await t.context.app.start(); }); test.afterEach.always(async t => { await t.context.app.stop(); }); test(async t => { const app = t.context.app; const client = app.client; await client.waitUntilWindowLoaded(); // Electron API (BrowserWindow) const win = app.browserWindow; t.true(await win.isVisible()); // Operate app via WebDriver await client.element('#name-input').keys('my name'); await client.click('#submit-btn'); t.true(await client.waitForExist('#login-success')); });
FMFDUSPOQSFCVJMU ύοέʔδΛ͍͍ͨ࣌ import {Application} from 'spectron'; import * as electron
from 'electron-prebuilt'; test.beforeEach(async t => { t.context.app = new Application({ path: electron, args: ['/path/to/your/repository'], env: process.env, }); });
HPUP'"*- w ςετ͕GBJMͨ͠ͱ͖ w NBJOϓϩηεSFOEFSFSϓϩηεͷϩάΛऩूͯ͠อ ଘ w DMJFOUHFU.BJO1SPDFTT-PHT w
DMJFOUHFU3FOEFS1SPDFTT-PHT w DMJFOUDBQUVSF1BHF ͰεΫϦʔϯγϣοτอଘ w DMJFOUTBWF1BHF Ͱϖʔδͷ)5.-ςΩετΛอଘ
ࠓͯ͠ͳ͍͜ͱ w ςετέʔεઃܭ w 1BHF0CKFDUύλʔϯʹΑΔ6*ૢ࡞ͷϥΠϒϥϦ Խ w ςετεΫϦϓτͷϝϯςφϯε w ༷มߋʹڧ͍&&ςετεΫϦϓτઃܭ
·ͱΊ w &MFDUSPOΞϓϦͷ&OEUP&OEςετ 4QFDUSPOͰ؆୯ʹͰ͖Δ @Linda_pp @rhysd