Skip to content
Osma Suominen edited this page Sep 21, 2023 · 3 revisions

Introduction

Cypress is used for end-to-end (both frontend and backend) testing of Skosmos 3.x, which is currently being developed on the skosmos-3 branch.

Installation

You need to have a recent version of Node.js installed. Then install the npm dependencies. By default, this includes the development dependencies, which includes Cypress.

npm install

Starting up Skosmos and Fuseki containers

Before you run Cypress tests, you need to ensure that Skosmos and Fuseki containers are running. See Unit and integration tests for details on starting up and shutting down the containers.

Note that changes done in Skosmos code do not automatically affect the Skosmos container, so if you have done any changes in Skosmos code since starting up the containers, you will need to shut the containers down and restart them.

Running Cypress tests

To run all tests from the console, run:

npx cypress run

To run only a specific test file:

npx cypress run --spec tests/cypress/template/feedback.cy.js

Developing tests using the Cypress UI

npx cypress open
Clone this wiki locally