This repository contains all the files necessary to run Epinio end-to-end tests.
The cypress
directory contains the tests written using the
Cypress testing framework.
GitHub Actions CI is used to execute the tests every night. Currently two scenarios are tested.
The E2E tests are executed against both Rancher's UI and Epinio's UI.
Note that they have differences between them.
Epinio is installed via Rancher when testing it against Rancher's UI.
For testing against its own UI, it is installed via its own Helm Chart instead.
The tests use the main branches of Epinio and Epinio's Helm Chart.
- Clone the repository
git clone https://github.com/epinio/epinio-end-to-end-tests.git
- Check that all dependencies are installed:
make check-dependencies
- Create the cluster
make prepare-cluster
Check the output and export the IP as the IP_ADDR variable (export IP_ADDR=<IP>
).
- Deploy Epinio
make deploy-epinio
- Export variables for Cypress
export RANCHER_USER=admin RANCHER_PASSWORD=password RANCHER_URL=https://epinio.${IP_ADDR}.nip.io SYSTEM_DOMAIN=${IP_ADDR}.nip.io
- Start Cypress GUI
make cypress-gui
In this scenario, Epinio is deployed in Rancher with default options and a basic UI test is then performed using menu.spec.ts. The underlying browser is Chrome.
The second scenario is the same as the first, except it uses Firefox as the browser.
TODO: Get back installation with S3 and external registry configuration within rancher installation. Ref Issue#236
flowchart TB;
A{{Color Legend}}
A --- B([Rancher UI Parts])
A --- C([Common Parts])
A --- D([Embedded UI Parts])
style B fill:#7998b3,stroke:#000000,stroke-width:2px;
style C fill:#b487a2,stroke:#000000,stroke-width:2px;
style D fill:#50895d,stroke:#000000,stroke-width:2px;
flowchart TB;
%% Rancher UI part
A[Epinio e2e tests]:::common --> B{Rancher UI}:::rancherUI
B --> C(Install </br> K3s - Helm - Rancher </br> via </br> <a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/.github/workflows/master_rancher_ui_workflow.yml#L59-L78'>Makefile</a>):::rancherUI
C --> D(Install Epinio </br> via </br> <a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/.github/workflows/master_rancher_ui_workflow.yml#L84-L130'>Cypress container</a>):::rancherUI
D --> E(Patch Epinio </br> to use latest code </br> via </br> <a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/.github/workflows/master_rancher_ui_workflow.yml#L132-L170'>Makefile</a>):::rancherUI
J --> S(Uninstall Epinio </br> via </br> <a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/.github/workflows/master_rancher_ui_workflow.yml#L196'>Cypress container</a>):::rancherUI
%% Common part
E --> F(E2E tests via <a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/.github/workflows/master_rancher_ui_workflow.yml#L173-L214'>Cypress container</a>):::common
F --> G(Scenario 1 </br> <a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/.github/workflows/scenario_1_chrome_rancher_ui.yml'>Chrome</a>):::rancherUI
F --> H(Scenario 2 </br> <a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/.github/workflows/scenario_2_firefox_rancher_ui.yml'>Firefox</a>):::rancherUI
F --> U([Scenario 1 </br> <a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/.github/workflows/scenario_1_chrome_std_ui.yml'>Chrome</a>]):::stdUI
F --> V([Scenario 2 </br> <a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/.github/workflows/scenario_2_firefox_std_ui.yml'>Firefox</a>]):::stdUI
subgraph one-test
I((Sample application </br> deployment using</br> <a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/cypress/integration/scenarios/with_s3_and_external_registry.spec.ts'>ext registry / s3</a>)):::common
end
H --> one-test
V --> one-test
one-test --> J[Upload results in GH]:::common
subgraph full-tests
direction LR
O((<a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/cypress/integration/unit_tests/applications.spec.ts'>applications</a>)):::common
Q((<a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/cypress/integration/unit_tests/configurations.spec.ts'>configurations</a>)):::common
R((<a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/cypress/integration/unit_tests/namespaces.spec.ts'>namespaces</a>)):::common
O -.-> Q -.-> R
end
U --> full-tests
G --> full-tests
full-tests --> J
S --> T[ <a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/.github/workflows/master_rancher_ui_workflow.yml#L222-L229'>Delete k3s / Clean worker</a>]:::common
%% Standalone UI part
A --> B1{Embedded UI}:::stdUI
B1 --> C1([Install </br> K3s - Helm - Epinio </br> via </br> <a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/.github/workflows/master_std_ui_workflow.yml#L70-L89'>Makefile</a>]):::stdUI
C1 --> F
J --> D1([Uninstall Epinio </br> via </br> <a href='https://github.com/epinio/epinio-end-to-end-tests/blob/main/.github/workflows/master_std_ui_workflow.yml#L144-L149'>Makefile</a>]):::stdUI
D1 --> T
%% CSS definition
classDef rancherUI fill:#7998b3,stroke:#000000,stroke-width:2px;
classDef common fill:#b487a2,stroke:#000000,stroke-width:2px;
classDef stdUI fill:#50895d,stroke:#000000,stroke-width:2px;