we build and then test web applications •We test in different ways: •manually •with functional automated tests •with visual regression tests •Testing of web applications requires usage of browsers (LOL)
of WebKit •Supports various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG •There is a lot of testing frameworks integrated with it: •Jasmine, QUnit, Mocha, Capybara etc
the the real display •Allows to use any browser you need •And all this is done on a server Disadvantages •More complex environment = less stable environment
headless/server environment •Headless mode is now available with Chrome 59 on Mac and Linux •Get it here: www.google.com/chrome/browser/desktop/ index.html •Windows support is coming soon!
the latest web platform awesomeness •Profiling and introspection tools (DevTools UI, tracing, etc.) •Everything below the User Interface What is missing? •No Chrome-level features (e.g., profiles, sync ...) •No UI - offscreen software rendering •No extensions (for now)
an instance with the DevTools protocol enabled •Navigate to http://localhost:9222 in another browser •You'll see a list of inspectable pages •You can click through and see what Headless is rendering
Chrome and other Blink-based browsers •Chrome DevTools use this protocol •The messaging is based on serialised JSON objects •Documentation here: chromedevtools.github.io/devtools-protocol/
Chrome and other Blink-based browsers •Chrome DevTools use this protocol •The messaging is based on serialised JSON objects •Documentation here: chromedevtools.github.io/devtools-protocol/ Chrome DevTools Protocol Chrome Debugging Protocol = Chrome Remote Protocol = The SamE!
and can break at any time •Captures the full capabilities of the protocol •v8-inspector (v8) •Available in node 6.3+ •Enables debugging & profiling of Node.js apps •Stable 1.2 (1-2) •Stable release of the protocol (Chrome 54) •Smaller subset of the complete protocol
using your favourite programming language: •Python •NodeJS •Go •etc. •Not all of them are in a good shape :) •More informations here: developer.chrome.com/devtools/docs/debugging- clients
•Headless Chrome Protocol Exploration (plain Python) gist.github.com/llimllib/ 7f6143a1a6955d243161b2fec23b8f4d •How to finally use headless Chrome to power your automated tests (Headless Chrome + capybara) blog.faraday.io/headless-chromium/ •Using headless Chrome as an automated screenshot tool (Node.js) medium.com/@dschnr/using-headless-chrome-as-an- automated-screenshot-tool-4b07dffba79a
browser sessions •Working with pop-up windows •File downloads to local folder •The Headless Chrome team offered PhantomJS to move from WebKit fork to Chromium • #$
release 59 •Opera: release 46 •Consensus & Standardization •Firefox: In development •Edge: No public signals •Safari: No public signals •Web Devs and QAs: Positive and Enthusiastic
features to the headless browser world •Powerful debugging tool - you see what your testing application sees •Can be run on server •Uses the latest version of Blink •Supported by Google (Chromium Community)
Protocol currently does not support multiple clients connected to the protocol simultaneously •There are only low-level APIs. High-level APIs are currently supported only by third-party clients. •Bleeding edge of development