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.6k
ripgrep をライブラリとして使う
rhysd
0
410
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.2k
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
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
250
【re:Invent 2024 アプデ】 Prompt Routing の紹介
champ
0
150
PHPerのための計算量入門/Complexity101 for PHPer
hanhan1978
5
160
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
480
生成AIのガバナンスの全体像と現実解
fnifni
1
190
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
830
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
1
250
Amazon VPC Lattice 最新アップデート紹介 - PrivateLink も似たようなアップデートあったけど違いとは
bigmuramura
0
200
Amazon Kendra GenAI Index 登場でどう変わる? 評価から学ぶ最適なRAG構成
naoki_0531
0
110
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
190
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
160
MLOps の現場から
asei
6
650
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
327
38k
KATA
mclloyd
29
14k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
A Philosophy of Restraint
colly
203
16k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Adopting Sorbet at Scale
ufuk
73
9.1k
Practical Orchestrator
shlominoach
186
10k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
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