Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Testing your Electron apps with ChromeDriver

Kevin Sawicki
November 02, 2015

Testing your Electron apps with ChromeDriver

Kevin Sawicki

November 02, 2015
Tweet

More Decks by Kevin Sawicki

Other Decks in Technology

Transcript

  1. ELECTRON ▸Write apps in JavaScript, HTML, CSS ▸Run apps on

    Mac, Windows, Linux ▸Built on Chromium and Node.js ▸Free and open source ▸http://electron.atom.io
  2. 5 main process menu tray dialog window window window renderer

    process node DOM renderer process renderer process node DOM node DOM node ipc
  3. CONS ▸Complex setup and teardown ▸Leaks happens between tests ▸Main

    process code goes untested ▸Hard to test launch behavior
  4. 10 main process menu tray dialog window window window renderer

    process node DOM renderer process renderer process node DOM node DOM node ipc
  5. WEBDRIVER IS AN OPEN SOURCE TOOL FOR AUTOMATED TESTING OF

    WEBAPPS ACROSS MANY BROWSERS. ChromeDriver Docs WHAT IS WEBDRIVER?
  6. CHROMEDRIVER IS A STANDALONE SERVER WHICH IMPLEMENTS WEBDRIVER'S WIRE PROTOCOL

    FOR CHROMIUM. ChromeDriver Docs WHAT IS CHROMEDRIVER?
  7. SPECTRON ▸Test harness for Electron ChromeDriver ▸Easily setup and teardown

    apps ▸Commands for BrowserWindow APIs ▸Test framework agnostic
  8. SPECTRON ▸npm install --save-dev spectron ▸Tested on Mac, Windows, and

    Linux ▸Tested on AppVeyor and Travis CI ▸github.com/kevinsawicki/spectron