Skip to content

Commit

Permalink
Fix flow and limit concurrency (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGrandon authored Apr 6, 2018
1 parent 16ff55d commit 96b4763
Show file tree
Hide file tree
Showing 4 changed files with 507 additions and 732 deletions.
2 changes: 2 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ steps:
queue: workers
- name: ':saucelabs: :selenium:'
command: .buildkite/run-all-tests.sh
concurrency: 1
concurrency_group: "saucelabs"
plugins:
'docker-compose#v1.7.0':
run: browser-tests
Expand Down
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CI and adhoc testing for cross browser API support using nightwatch, selenium an

## Cross-browser testing using Buildkite CI

After each push Buildkite runs cross-browser UI tests over core libraries and plugins
After each push Buildkite runs cross-browser UI tests over core libraries and plugins

## Running Ad hoc chrome and firefox tests locally

Expand All @@ -15,28 +15,39 @@ In Chrome
In Firefox
`yarn test-firefox`

### Running cross-browser tests locally

You can run cross-browser tests locally leveraging docker and Sauce Labs by running the following:

```
docker-compose run
SAUCE_USERNAME=... SAUCE_ACCESS_KEY=... docker-compose run browser-tests .buildkite/run-all-tests.sh
```

## Running Ad hoc cross-browser tests remotely

(For convenience you should add SAUCE\_USERNAME and SAUCE\_ACCESS_KEY as environment variables)
(For convenience you should add SAUCE_USERNAME and SAUCE_ACCESS_KEY as environment variables)

1. Start the app server\
`yarn dev`
1. Start sauce connect\
`sc -u <saucelabs username> -k <saucelabs access key>`
1. Run the tests remotely\
run specific test: `yarn test-remote -- --env ie-11`\
run all tests: `yarn test-remote`
1. Start the app server\
`yarn dev`
1. Start sauce connect\
`sc -u <saucelabs username> -k <saucelabs access key>`
1. Run the tests remotely\
run specific test: `yarn test-remote -- --env ie-11`\
run all tests: `yarn test-remote`

## The Tests

### Basic UI Test

Runs simple UI over core fusion libraries and plugins. In theory should be sufficient to verify necessary API/polyfill support, though we should add more UI interactions to improve confidence level.

### Polyfills Test
Off by default. Tests for a selection of ES2015+ utils which are not transpiled by Babel at buildtime. Tested utils are somewhat arbitary as not all are necessarily required by fusion, so only uncomment if you want to test for specific API/polyfill support.

Off by default. Tests for a selection of ES2015+ utils which are not transpiled by Babel at buildtime. Tested utils are somewhat arbitary as not all are necessarily required by fusion, so only uncomment if you want to test for specific API/polyfill support.

## Nightwatch Configuration files

* Buildkite: `nightwatch-ci.js`
* Ad Hoc (local): `nightwatch.js`
* Ad Hoc (remote): `nightwatch-remote.js`
Expand All @@ -46,6 +57,7 @@ Off by default. Tests for a selection of ES2015+ utils which are not transpiled

**Test environments**\
e.g.

```js
'chrome-mac': {
desiredCapabilities: {
Expand Down
54 changes: 27 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,54 +22,54 @@
"check": "fusion check"
},
"dependencies": {
"fast-async": "^6.3.0",
"fusion-cli": "^1.3.2",
"fast-async": "^6.3.1",
"fusion-cli": "^1.3.3",
"fusion-core": "^1.2.2",
"fusion-plugin-browser-performance-emitter": "^1.0.2",
"fusion-plugin-browser-performance-emitter": "^1.4.0",
"fusion-plugin-csrf-protection-react": "^1.0.2",
"fusion-plugin-error-handling": "^1.0.2",
"fusion-plugin-error-handling": "^1.0.3",
"fusion-plugin-font-loader-react": "^1.0.2",
"fusion-plugin-i18n-react": "^1.0.2",
"fusion-plugin-jwt": "^1.0.2",
"fusion-plugin-jwt": "^1.0.4",
"fusion-plugin-node-performance-emitter": "^1.0.2",
"fusion-plugin-react-redux": "^1.0.2",
"fusion-plugin-react-router": "^1.0.2",
"fusion-plugin-react-router": "^1.0.5",
"fusion-plugin-redux-action-emitter-enhancer": "^1.0.2",
"fusion-plugin-rpc-redux-react": "^1.0.3",
"fusion-plugin-styletron-react": "^1.0.2",
"fusion-plugin-rpc-redux-react": "^1.0.4",
"fusion-plugin-styletron-react": "^2.0.1",
"fusion-plugin-universal-events-react": "^1.0.1",
"fusion-plugin-universal-logger": "^1.0.2",
"fusion-react": "^1.0.2",
"fusion-react-async": "^1.0.1",
"fusion-tokens": "^1.0.1",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-redux": "^5.0.6",
"fusion-react": "^1.0.3",
"fusion-react-async": "^1.1.2",
"fusion-tokens": "^1.0.3",
"react": "^16.3.1",
"react-dom": "^16.3.1",
"react-redux": "^5.0.7",
"recompose": "^0.26.0",
"redux": "^3.7.2",
"unfetch": "^3.0.0",
"winston": "^2.4.0"
"winston": "^2.4.1"
},
"devDependencies": {
"babel-eslint": "^8.2.1",
"babel-eslint": "^8.2.2",
"enzyme": "^3.3.0",
"eslint": "^4.17.0",
"eslint": "^4.19.1",
"eslint-config-fusion": "^1.0.0",
"eslint-plugin-cup": "^1.0.0",
"eslint-plugin-flowtype": "^2.44.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-flowtype": "^2.46.1",
"eslint-plugin-import": "^2.10.0",
"eslint-plugin-prettier": "^2.6.0",
"eslint-plugin-react": "^7.6.1",
"eslint-plugin-react": "^7.7.0",
"flow-bin": "^0.69.0",
"nightmare": "^2.10.0",
"nightwatch": "^0.9.19",
"node-fetch": "^2.0.0",
"nightmare": "^3.0.1",
"nightwatch": "^0.9.20",
"node-fetch": "^2.1.2",
"prettier": "1.11.1",
"react-addons-test-utils": "^15.6.2",
"react-test-renderer": "^16.2.0",
"request": "^2.83.0",
"selenium-download": "^2.0.11",
"tape": "^4.8.0"
"react-test-renderer": "^16.3.1",
"request": "^2.85.0",
"selenium-download": "^2.0.12",
"tape": "^4.9.0"
},
"engines": {
"node": ">= 8.9.0"
Expand Down
Loading

0 comments on commit 96b4763

Please sign in to comment.