CI and adhoc testing for cross browser API support using nightwatch, selenium and saucelabs
After each push Buildkite runs cross-browser UI tests over core libraries and plugins
In Chrome
yarn test-chrome
In Firefox
yarn test-firefox
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
(For convenience you should add SAUCE_USERNAME and SAUCE_ACCESS_KEY as environment variables)
- Start the app server
yarn dev
- Start sauce connect
sc -u <saucelabs username> -k <saucelabs access key>
- Run the tests remotely
run specific test:yarn test-remote -- --env ie-11
run all tests:yarn test-remote
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.
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.
- Buildkite:
nightwatch-ci.js
- Ad Hoc (local):
nightwatch.js
- Ad Hoc (remote):
nightwatch-remote.js
Test folder / file
src_folders: ['src/test/browser/index.js'],
Test environments
e.g.
'chrome-mac': {
desiredCapabilities: {
browserName: 'chrome',
platform: 'macOS 10.12',
},
},
To add additional test environments see https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/
browser-tests's People
browser-tests's Issues
Get integration tests working in Docker for CI
Run linters in Buildkite
Tracks work for the Buildkite docker foundation as well as running linters in Buildkite.
Docker commands for running integration tests locally
In #9 we are working on support for containerized integration tests in CI. It would be nice to have this locally as well so we wouldn't need the sauce labs keys. Maybe just test on Firefox/Chrome/Safari locally.
Implement concurrency limits & new user for saucelabs tests
We had a situation recently where saucelabs was not testing the correct tunnel. For a quick fix we can implement concurrency and lock a new CI user down to only run 1 test at a time.
include font loader plugin
Dependency Dashboard
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
Repository problems
These problems occurred while renovating this repository. View logs.
- WARN: Using npm packages for Renovate presets is now deprecated. Please migrate to repository-based presets instead.
Warning
These dependencies are deprecated:
Datasource | Name | Replacement PR? |
---|---|---|
npm | babel-eslint |
|
npm | request |
Rate-Limited
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
- Update selenium/standalone-chrome:latest Docker digest to 169f969
- Update selenium/standalone-firefox:latest Docker digest to 7555cc5
- Update uber/web-base-image Docker tag to v2.0.2
- Update Fusion.js packages (
fusion-cli
,fusion-plugin-i18n
,fusion-plugin-rpc-redux-react
) - Update dependency flow-bin to ^0.261.0
- Update dependency prettier to v1.19.1
- Update Fusion.js packages (major) (
fusion-cli
,fusion-core
,fusion-plugin-browser-performance-emitter
,fusion-plugin-csrf-protection
,fusion-plugin-error-handling
,fusion-plugin-font-loader-react
,fusion-plugin-i18n
,fusion-plugin-i18n-react
,fusion-plugin-jwt
,fusion-plugin-node-performance-emitter
,fusion-plugin-react-redux
,fusion-plugin-react-router
,fusion-plugin-redux-action-emitter-enhancer
,fusion-plugin-rpc-redux-react
,fusion-plugin-styletron-react
,fusion-plugin-universal-events
,fusion-plugin-universal-events-react
,fusion-plugin-universal-logger
,fusion-react
,fusion-tokens
) - Update dependency eslint to v9
- Update dependency eslint-config-fusion to v6
- Update dependency eslint-plugin-flowtype to v8
- Update dependency eslint-plugin-jest to v28
- Update dependency eslint-plugin-prettier to v5
- Update dependency jest-environment-jsdom to v29
- Update dependency nightwatch to v3
- Update dependency prettier to v3
- Update dependency react-redux to v9
- Update dependency redux to v5
- Update dependency styletron-react to v6
- Update dependency tape to v5
- Update dependency unfetch to v5
- Update react monorepo to v19 (major) (
react
,react-dom
,react-test-renderer
) - Update uber/web-base-image Docker tag to v14
- ๐ Create all rate-limited PRs at once ๐
Open
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
- Update dependency node-fetch to v2.6.7 [SECURITY]
- Replace dependency babel-eslint with @babel/eslint-parser ^7.11.0
Detected dependencies
buildkite
.buildkite/pipeline.yml
docker-compose
docker-compose.verify.yml
docker-compose.yml
selenium/standalone-chrome latest@sha256:8f265a536bb69b89c029bb05024a11eaa71315b89ad51deda05a4e9d6b942cfd
selenium/standalone-firefox latest@sha256:ee0abb000eb116e1ed3299ad887390539835887369cc2caf52889806315856cb
henrrich/docker-sauce-connect latest@sha256:9921657d1a3db8832f868ab25491363756abae52025a8d5af888aadc42ed31e9
dockerfile
Dockerfile
uber/web-base-image 2.0.0
npm
package.json
fast-async ^6.3.8
fusion-cli 1.13.1
fusion-core ^1.10.1
fusion-plugin-browser-performance-emitter ^1.8.0
fusion-plugin-csrf-protection ^2.0.0
fusion-plugin-error-handling ^1.0.7
fusion-plugin-font-loader-react ^1.1.1
fusion-plugin-i18n-react ^1.2.2-0
fusion-plugin-jwt ^1.0.7
fusion-plugin-node-performance-emitter ^1.0.8
fusion-plugin-react-redux ^1.1.0
fusion-plugin-react-router ^1.4.2
fusion-plugin-redux-action-emitter-enhancer ^2.0.1
fusion-plugin-rpc-redux-react 2.0.3-0
fusion-plugin-styletron-react ^2.5.4
fusion-plugin-universal-events ^1.3.0
fusion-plugin-universal-events-react ^1.0.4
fusion-plugin-universal-logger ^1.0.5
fusion-react ^1.3.5
fusion-tokens ^1.1.1
jest-environment-jsdom ^23.4.0
react ^16.7.0
react-dom ^16.7.0
react-redux ^6.0.0
recompose ^0.30.0
redux ^4.0.1
styletron-react ^4.4.4
unfetch ^4.0.1
@babel/core ^7.2.2
@babel/preset-env ^7.2.3
@babel/preset-flow ^7.0.0
@babel/register ^7.0.0
babel-eslint ^10.0.1
enzyme ^3.8.0
eslint ^5.11.1
eslint-config-fusion ^4.0.0
eslint-plugin-cup ^2.0.0
eslint-plugin-flowtype ^3.2.0
eslint-plugin-import ^2.14.0
eslint-plugin-jest ^22.1.2
eslint-plugin-prettier ^3.0.1
eslint-plugin-react ^7.12.1
flow-bin ^0.89.0
nightmare ^3.0.1
nightwatch ^1.0.18
node-fetch ^2.3.0
prettier 1.15.3
react-test-renderer ^16.7.0
request ^2.88.0
selenium-download ^2.0.15
tape ^4.9.2
node >= 8.9.0
fusion-plugin-i18n 1.1.5-0
- Check this box to trigger a request for Renovate to run again on this repository
Add escaped HTML test case
We should leverage the html
export from fusion-core
to verify application flow usage.
Fix Polyfill tests.
After much investigation, it seems that nightwatch.execute
is not including global polyfills in its window object.
update packages
Add Travis-CI
Update dependencies
Add assetUrl usage
This would help us detect flow and implementation errors with assetUrl
from fusion-core
.
Migrate browser-tests to DI
This means upgrading fusion-core to the latest pre-release version, as well as upgrading all dependencies.
Support local tests via Docker container
Running tests locally requires painful setup (download selenium, supply credentials etc)
Using docker container and selenium standalone plugins allow painless local chrome and firefox testing
Fix tests in all environments
release v0.2.0
Polyfill test is broken in master after greenkeeping
Add More Tests
More navigations, more polyfills
See https://github.com/uber-web/web-platform-tasks/issues/281
Fix yarn.lock
resolved paths were to unpm not yarn registry
update font loader and fusion-cli
Action Required: Fix Renovate Configuration
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (uber)
Report results back to saucelabs
There is a util to post results back to saucelabs but it's slow and flakey. Can probably live without it since Travis will correctly report success/fail
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.