From b0c201ed6caa647a1cc4b492cf80a10f12036d1b Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Mon, 24 Oct 2016 00:43:12 +0200 Subject: [PATCH 1/6] test --- .zuul.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.zuul.yml b/.zuul.yml index 2cc4b3c..73caf9f 100644 --- a/.zuul.yml +++ b/.zuul.yml @@ -3,3 +3,4 @@ tunnel: type: ngrok authtoken: 6Aw8vTgcG5EvXdQywVvbh_3fMxvd4Q7dcL2caAHAFjV proto: tcp +browser_retries: 20 From 500da20954c190a5052b674a9f2097a84db6bb92 Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Mon, 24 Oct 2016 01:07:32 +0200 Subject: [PATCH 2/6] add zuul debug --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 068eb5f..3df1c5a 100644 --- a/Makefile +++ b/Makefile @@ -11,12 +11,12 @@ test-node: test-zuul: @if [ "x$(BROWSER_PLATFORM)" = "x" ]; then \ - ./node_modules/zuul/bin/zuul \ + DEBUG=zuul* ./node_modules/zuul/bin/zuul \ --browser-name $(BROWSER_NAME) \ --browser-version $(BROWSER_VERSION) \ test/index.js; \ else \ - ./node_modules/zuul/bin/zuul \ + DEBUG=zuul* ./node_modules/zuul/bin/zuul \ --browser-name $(BROWSER_NAME) \ --browser-version $(BROWSER_VERSION) \ --browser-platform "$(BROWSER_PLATFORM)" \ From 1837df463d0db34da6aa9240580af395c8b2d5c1 Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Thu, 8 Dec 2016 23:34:27 +0100 Subject: [PATCH 3/6] update zuul token --- .zuul.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zuul.yml b/.zuul.yml index 73caf9f..ec9c7d8 100644 --- a/.zuul.yml +++ b/.zuul.yml @@ -1,6 +1,6 @@ ui: mocha-bdd tunnel: type: ngrok - authtoken: 6Aw8vTgcG5EvXdQywVvbh_3fMxvd4Q7dcL2caAHAFjV + authtoken: 2c54HKt2XhnnyXGyqfuUB_4iNMifwwcb3J4xkrCWFbW proto: tcp browser_retries: 20 From 2fa6b918803a4e082a819162736072f6280a7106 Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Sat, 10 Dec 2016 22:54:29 +0100 Subject: [PATCH 4/6] another test --- .travis.yml | 34 ++------------------------------ .zuul.yml | 6 ------ Makefile | 21 ++++++++------------ zuul.config.js | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+), 51 deletions(-) delete mode 100644 .zuul.yml create mode 100644 zuul.config.js diff --git a/.travis.yml b/.travis.yml index c659554..035a195 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,35 +9,5 @@ notifications: irc: irc.freenode.org##socket.io matrix: include: - - node_js: '0.12' - env: BROWSER_NAME=chrome BROWSER_VERSION=latest - - node_js: '0.12' - env: BROWSER_NAME=safari BROWSER_VERSION=latest - - node_js: '0.12' - env: BROWSER_NAME=firefox BROWSER_VERSION=latest BROWSER_PLATFORM="Windows 10" - - node_js: '0.12' - env: BROWSER_NAME=ie BROWSER_VERSION=6 - - node_js: '0.12' - env: BROWSER_NAME=ie BROWSER_VERSION=7 - - node_js: '0.12' - env: BROWSER_NAME=ie BROWSER_VERSION=8 - - node_js: '0.12' - env: BROWSER_NAME=ie BROWSER_VERSION=9 - - node_js: '0.12' - env: BROWSER_NAME=ie BROWSER_VERSION=10 BROWSER_PLATFORM="Windows 2012" - - node_js: '0.12' - env: BROWSER_NAME=ie BROWSER_VERSION=latest BROWSER_PLATFORM="Windows 2012" - - node_js: '0.12' - env: BROWSER_NAME=microsoftedge BROWSER_VERSION=13 BROWSER_PLATFORM="Windows 10" - - node_js: '0.12' - env: BROWSER_NAME=iphone BROWSER_VERSION=8.4 - - node_js: '0.12' - env: BROWSER_NAME=iphone BROWSER_VERSION=9.2 - - node_js: '0.12' - env: BROWSER_NAME=android BROWSER_VERSION=4.3 - - node_js: '0.12' - env: BROWSER_NAME=android BROWSER_VERSION=4.4 - - node_js: '0.12' - env: BROWSER_NAME=android BROWSER_VERSION=5.1 - - node_js: '0.12' - env: BROWSER_NAME=android BROWSER_VERSION=latest + - node_js: 'node' + env: BROWSERS=1 diff --git a/.zuul.yml b/.zuul.yml deleted file mode 100644 index ec9c7d8..0000000 --- a/.zuul.yml +++ /dev/null @@ -1,6 +0,0 @@ -ui: mocha-bdd -tunnel: - type: ngrok - authtoken: 2c54HKt2XhnnyXGyqfuUB_4iNMifwwcb3J4xkrCWFbW - proto: tcp -browser_retries: 20 diff --git a/Makefile b/Makefile index 3df1c5a..8430d49 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ REPORTER = dot test: - @if [ "x$(BROWSER_NAME)" = "x" ]; then make test-node; else make test-zuul; fi + @if [ "x$(BROWSERS)" = "x" ]; then make test-node; else make test-zuul; fi test-node: @./node_modules/.bin/mocha \ @@ -10,17 +10,12 @@ test-node: test/index.js test-zuul: - @if [ "x$(BROWSER_PLATFORM)" = "x" ]; then \ - DEBUG=zuul* ./node_modules/zuul/bin/zuul \ - --browser-name $(BROWSER_NAME) \ - --browser-version $(BROWSER_VERSION) \ - test/index.js; \ - else \ - DEBUG=zuul* ./node_modules/zuul/bin/zuul \ - --browser-name $(BROWSER_NAME) \ - --browser-version $(BROWSER_VERSION) \ - --browser-platform "$(BROWSER_PLATFORM)" \ - test/index.js; \ - fi + @./node_modules/zuul/bin/zuul \ + test/index.js + +test-local: + @./node_modules/zuul/bin/zuul \ + --local 0\ + test/index.js .PHONY: test diff --git a/zuul.config.js b/zuul.config.js new file mode 100644 index 0000000..dd11001 --- /dev/null +++ b/zuul.config.js @@ -0,0 +1,53 @@ +'use strict'; + +var zuulConfig = module.exports = { + tunnel: { + type: 'localtunnel' + }, + ui: 'mocha-bdd', + + // only used when run with saucelabs + // not activated when dev or phantom + concurrency: 2, // ngrok only accepts two tunnels by default + // if browser does not sends output in 120s since last output: + // stop testing, something is wrong + browser_output_timeout: 120 * 1000, + browser_open_timeout: 60 * 4 * 1000, + // we want to be notified something is wrong asap, so no retry + browser_retries: 1, + + browsers: [{ + name: 'chrome', + version: '-1..latest', + platform: 'Windows 10' + }, { + name: 'firefox', + version: '-1..latest', + platform: 'Windows 10' + }, { + name: 'internet explorer', + version: '8..11' + }, { + name: 'safari', + version: '-3..latest' + }, { + name: 'iphone', + version: '-3..latest' + }, { + name: 'android', + version: '-3..latest' + }, { + name: 'ipad', + version: '-3..latest' + }, { + name: 'microsoftedge', + version: 'latest' + }] +}; + +if (process.env.CI === 'true') { + zuulConfig.tunnel = { + type: 'ngrok', + bind_tls: true + }; +} From 9a3f4785d9fda4c5e582390fc61dd5af670b0006 Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Sat, 10 Dec 2016 23:16:56 +0100 Subject: [PATCH 5/6] edit versions --- Makefile | 5 ----- zuul.config.js | 12 +++++------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 8430d49..9c94daf 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,4 @@ test-zuul: @./node_modules/zuul/bin/zuul \ test/index.js -test-local: - @./node_modules/zuul/bin/zuul \ - --local 0\ - test/index.js - .PHONY: test diff --git a/zuul.config.js b/zuul.config.js index dd11001..4a6012d 100644 --- a/zuul.config.js +++ b/zuul.config.js @@ -18,18 +18,16 @@ var zuulConfig = module.exports = { browsers: [{ name: 'chrome', - version: '-1..latest', - platform: 'Windows 10' + version: 'latest' }, { name: 'firefox', - version: '-1..latest', - platform: 'Windows 10' + version: 'latest' }, { name: 'internet explorer', - version: '8..11' + version: '6..10' }, { name: 'safari', - version: '-3..latest' + version: 'latest' }, { name: 'iphone', version: '-3..latest' @@ -38,7 +36,7 @@ var zuulConfig = module.exports = { version: '-3..latest' }, { name: 'ipad', - version: '-3..latest' + version: 'latest' }, { name: 'microsoftedge', version: 'latest' From 1b7866d379dad90b687e6d5213ff7a9634be29e5 Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Wed, 21 Dec 2016 08:46:09 +0100 Subject: [PATCH 6/6] Use external browsers list --- package.json | 1 + zuul.config.js | 40 +++++++++------------------------------- 2 files changed, 10 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index e4a52ff..dbf9e95 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "devDependencies": { "expect.js": "0.3.1", "mocha": "2.2.5", + "socket.io-browsers": "^1.0.0", "zuul": "3.11.0", "zuul-ngrok": "4.0.0" }, diff --git a/zuul.config.js b/zuul.config.js index 4a6012d..68c2d1a 100644 --- a/zuul.config.js +++ b/zuul.config.js @@ -1,13 +1,13 @@ 'use strict'; +var browsers = require('socket.io-browsers'); + var zuulConfig = module.exports = { - tunnel: { - type: 'localtunnel' - }, ui: 'mocha-bdd', - // only used when run with saucelabs - // not activated when dev or phantom + // test on localhost by default + local: true, + concurrency: 2, // ngrok only accepts two tunnels by default // if browser does not sends output in 120s since last output: // stop testing, something is wrong @@ -15,37 +15,15 @@ var zuulConfig = module.exports = { browser_open_timeout: 60 * 4 * 1000, // we want to be notified something is wrong asap, so no retry browser_retries: 1, - - browsers: [{ - name: 'chrome', - version: 'latest' - }, { - name: 'firefox', - version: 'latest' - }, { - name: 'internet explorer', - version: '6..10' - }, { - name: 'safari', - version: 'latest' - }, { - name: 'iphone', - version: '-3..latest' - }, { - name: 'android', - version: '-3..latest' - }, { - name: 'ipad', - version: 'latest' - }, { - name: 'microsoftedge', - version: 'latest' - }] }; if (process.env.CI === 'true') { + zuulConfig.local = false; zuulConfig.tunnel = { type: 'ngrok', bind_tls: true }; } + +var isPullRequest = process.env.TRAVIS_PULL_REQUEST && process.env.TRAVIS_PULL_REQUEST !== 'false'; +zuulConfig.browsers = isPullRequest ? browsers.pullRequest : browsers.all;