From a0075fff4c0522c1c1228c24f272d3b69f13da8d Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 28 Nov 2017 19:34:39 +0100 Subject: [PATCH] build: run tests in chrome headless local (#8651) Runs local tests in Chrome Headless. This speeds up the tests and also ensures more test stability. On Windows there are a lot of pixel deviation failures because the tests seemed to be affected by the screen resolution or window frame. By running the tests headless, the Chrome launcher has more control about the rendering and pixel deviations like before won't happen anymore. It's still the same Chrome that runs, just that the screen is kind of emulated like in XVFB. --- test/browser-providers.js | 2 +- test/karma.conf.js | 2 +- test/remote_browsers.json | 11 ++++------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/test/browser-providers.js b/test/browser-providers.js index cc0c2058406..d475817c573 100644 --- a/test/browser-providers.js +++ b/test/browser-providers.js @@ -5,7 +5,7 @@ * Target can be either: BS (Browserstack) | SL (Saucelabs) | TC (Travis CI) | null (To not run) */ const browserConfig = { - 'ChromeHeadless_CI': { unitTest: {target: 'TC', required: true }}, + 'ChromeHeadlessCI': { unitTest: {target: 'TC', required: true }}, 'FirefoxHeadless': { unitTest: {target: 'TC', required: true }}, 'ChromeBeta': { unitTest: {target: null, required: false }}, 'FirefoxBeta': { unitTest: {target: null, required: false }}, diff --git a/test/karma.conf.js b/test/karma.conf.js index 30399610d2a..c1440ad28ec 100644 --- a/test/karma.conf.js +++ b/test/karma.conf.js @@ -80,7 +80,7 @@ module.exports = (config) => { browserDisconnectTimeout: 20000, browserNoActivityTimeout: 240000, captureTimeout: 120000, - browsers: ['Chrome_1024x768'], + browsers: ['ChromeHeadlessLocal'], singleRun: false, diff --git a/test/remote_browsers.json b/test/remote_browsers.json index ae2c2cdce1c..fc5f3f0c831 100644 --- a/test/remote_browsers.json +++ b/test/remote_browsers.json @@ -1,22 +1,19 @@ { - "ChromeHeadless_CI": { + "ChromeHeadlessLocal": { "base": "ChromeHeadless", "flags": [ "--window-size=1024,768" ] }, - "Chrome_1024x768": { - "base": "Chrome", - "flags": [ - "--window-size=1024,768" - ] - }, "FirefoxHeadless": { "base": "Firefox", "flags": [ "-headless" ] }, + "ChromeHeadlessCI": { + "base": "ChromeHeadlessLocal" + }, "SL_CHROME": { "base": "SauceLabs", "browserName": "chrome",