E2E Testing with Cypress

Edit on GitHub

Cypress is an end-to-end testing framework that provides a modern approach to testing web applications. Spryker provides a Cypress boilerplate project with a pre-configured setup, best practices, and examples for testing Spryker-based applications. The boilerplate is built to run against the Spryker B2B Marketplace demo shop, which you then adapt to your own project.

Cypress boilerplate

For comprehensive information on setting up and using Cypress with Spryker, refer to the topics described below. The Cypress-boilerplate tests are built into the Spryker B2B Marketplace demo shop and located in the folder tests/cypress-boilerplate.

The boilerplate does not include the following:

  • Complete test coverage: add and adjust the example tests to fit your project.
  • Correct locators: the locators in the boilerplate are based on the Spryker B2B Marketplace demo shop. Adjust them to match your project.

Topics

Internal Cypress tests

Cypress tests are used by Spryker for internal testing of the core Spryker features as well. You should remove the mentions of cypress-tests from composer.json. You can re-use and customize these tests for your project, however, Spryker does not guarantee these tests will work on your project, if you keep them. Spryker recommends using boilerplate tests instead of these and extending them to cover your functionality.