keycloak-scim/tests/README.md
Aboullos daec4957f2
Add cypress framework (#271)
* Add cypress framework

* Add PR change requests

* Add initial .yml file for cypress tests

* Modify Run Keycloak line

* Modify Run Keycloak lines

* Modify Cypress test run

* Modify wait times

* Add more time

* Modify yarn start to npx http-server

* Try Cypress separate step

* Add test to set new admin console

* Modify uses to run

* Change yarn to npx http-server

* Add parameter to npx http-server

* Trigger GitHub actions

* Trigger GitHub actions

* Modify client_scope test messages

* Set headless mode

* Add steps to store artifacts

* Modify .yml

* Rebase onto realm fix and update real role message

* Update yaml file for artifact upload
2021-01-12 12:04:52 -05:00

2.4 KiB

Keycloak UI Test Suite in Cypress

This repository contains the UI tests for Keycloak developed with Cypress framework

Run the test suite

Prerequisites

via Cypress Test Runner

By using npx:

note: npx is included with npm > v5.2 or can be installed separately.

npx cypress open

After a moment, the Cypress Test Runner will launch:

image

via terminal

By executing:

$(npm bin)/cypress run

...or...

./node_modules/.bin/cypress run

...or... (requires npm@5.2.0 or greater)

npx cypress run

To execute a specific test on a specific browser run:

cypress run --spec "cypress/integration/example-test.spec.js" --browser chrome

note: the complete list of parameters can be found in the official Cypress documentation.

Project Structure

/assets (added to .gitignore)
  /videos - if test fails, the video is stored here
  /screenshots - if test fails, the screenshot is stored here
/cypress
  /fixtures - external pieces of static data that can be used by your tests
  /integration - used for test files (supported filetypes are .js, .jsx, .coffee and .cjsx)
  /plugins
    - index.js - extends Cypress behaviour, custom plugins are imported before every single spec file run
  /support - reusable behaviour
    - commands.js - custom commands
    - index.js - runs before each test file

/cypress.json - Cypress configuration file
/jsconfig.json - Cypress code autocompletion is enabled here

note: More about the project structure in the official Cypress documentation.

License