For E2E testing, we use Cypress. It's available to be run in Docker or natively.
Run in Docker¶
From the root of the project run
This will prepare both the backend and frontend for Cypress to be able to test scenarios on the correct setup.
Then go to
/project-base/storefront/cypress folder and install all dependencies.
Then you should be able to run Cypress itself by command
npx cypress run
You should be able to see text results in your terminal after Cypress finishes the testing.
There are also generated videos (for all scenarios) in folder
/project-base/storefront/cypress/videos and screenshots (for failed scenarios) in folder
Test scenarios are placed in folder
/project-base/storefront/cypress/integration. They are split into two folders
Functions are meant for reusable actions used in test scenarios.
Tests are scenarios itself split into several folders according to the tested part in the Storefront application.