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.
This commit is contained in:
Paul Gschwendtner
2017-11-28 19:34:39 +01:00
committed by tinayuangao
parent 1a383ced5e
commit a0075fff4c
3 changed files with 6 additions and 9 deletions
+1 -1
View File
@@ -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 }},
+1 -1
View File
@@ -80,7 +80,7 @@ module.exports = (config) => {
browserDisconnectTimeout: 20000,
browserNoActivityTimeout: 240000,
captureTimeout: 120000,
browsers: ['Chrome_1024x768'],
browsers: ['ChromeHeadlessLocal'],
singleRun: false,
+4 -7
View File
@@ -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",