Skip to content

Latest commit

 

History

History
80 lines (66 loc) · 2.25 KB

README.md

File metadata and controls

80 lines (66 loc) · 2.25 KB

End-to-end tests

This module is responsible for the automatic validation of the Starter components.

It contains:

  • content - providing the minimal set of pages and assets in paths:
    • /content/low-code-luna-test/*
    • /content/starter-tests/*
  • end-to-end - end-to-end tests validating Starter components on authoring and publication
    • functional tests with Cypress
    • visual tests with BackstopJS

Functional tests

We use Cypress to perform functional testing.

Running locally

From project <ROOT> folder build the latest CMS distribution and test content package:

./mvnw clean install

From ./end-to-end folder run CMS instance with testing content package:

target/dependency/org.apache.sling.feature.launcher/bin/launcher -f target/slingfeature-tmp/feature-starter-project-tests.json

From ./end-to-end folder run Cypress

npm run dev

From ./end-to-end folder cleanup CMS instance changes/repository

rm -rf launcher

Running from Maven

From project <ROOT> folder run:

./mvnw clean verify -P e2e-functional

Visual tests

We use BackstopJS for visual regression tests. These tests compare screenshots stored in ./end-to-end/backstop_data/bitmaps_reference created by backstop reference task.

Running locally

From project <ROOT> folder build the latest CMS distribution and test content package:

./mvnw clean install

From ./end-to-end folder run CMS instance with testing content package:

target/dependency/org.apache.sling.feature.launcher/bin/launcher -f target/slingfeature-tmp/feature-starter-project-tests.json

From ./end-to-end folder publish all pages

npm run content:publish

From ./end-to-end folder gather reference screenshots (backstop_data/bitmaps_reference)

npm run test:visual:seed
# do some changes in code

From ./end-to-end folder test the changes comparing the current CMS results with gathered ones

npm run test:visual:check

Running from Maven

From project <ROOT> folder run:

./mvnw clean verify -P e2e-visual-seed
# do some changes in the code
./mvnw clean verify -P e2e-visual-check