Skip to content

Instantly share code, notes, and snippets.

@nelsonsilva
Last active January 14, 2021 13:25
Show Gist options
  • Select an option

  • Save nelsonsilva/18a3b2f7393fbb9776000eb586bf6247 to your computer and use it in GitHub Desktop.

Select an option

Save nelsonsilva/18a3b2f7393fbb9776000eb586bf6247 to your computer and use it in GitHub Desktop.
Web UI - QA

Web UI - QA

Unit tests

  • Easy, fast and cheap (mock services)
  • Cross browser

Current stack

  • Mocha + Chai
  • @nuxeo/testing-helpers
    • Promisified helpers
    • Mock Nuxeo client
  • Karma
    • Local launchers
    • Saucelabs launcher
  • @open-wc/karma-esm (no build)
  • JenkinsX

Future

Storybook

  • Built and deployed for PR
  • Acceptance testing
  • Validates element analysis

Functional tests

Documentation

  • Run in CI using nuxeo-ftest to start local server
  • Can run against any server (WebUI dev server, docker, k8s, etc..)

Current stack

  • webdriver.io v4
  • Chai
  • Selenium standalone launcher
  • Cucumber BDD
  • JUnit and Cucumber HTML reporters

Web UI FTest Framework

Documentation

  • Simple way to run Web UI functional tests:

npx @nuxeo/nuxeo-web-ui-ftest --report --screenshots --headless --tags='not @ignore'

  • Reuse of common page objects and step definitions

  • Convention based approach for custom features:

    ├── features
    │   ├── myfeature1.feature
    │   ├── ...
    │   └── step_definitions
    │       ├── myfeature1.js
    │       └── ...
    └── resources
        ├── image.png
        └── ...

Challenges

  • Shadow DOM (wdio-shadow-plugin vs Component objects (shadow$) )
  • Speed: timeouts and polling make things slow
  • Flakyness: sensitive to performance, non transactional commands, etc..

Future

  • webdriver.io v6
    • suport for Puppetter (Chrome DevTools Protocol)
    • no Playwright yet to avoid download of custom browsers
  • visual regression

Rainforest tests

  • Run on UAT environments
  • Exploratory tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment