Code Monkey home page Code Monkey logo

epinio-end-to-end-tests-forked's Introduction

Rancher UI E2E tests

Scenario 1 Chrome Scenario 2 Firefox

Standalone UI E2E tests

Standalone UI Chrome Standalone UI Firefox

epinio-end-to-end-tests

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.

Contents

Rancher UI and Epinio UI

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.

How To Quick-Start a development environment using k3d

โš ๏ธ Attention, this was only tested on Linux so far.

Epinio UI

  1. Clone the repository
git clone https://github.com/epinio/epinio-end-to-end-tests.git
  1. Check that all dependencies are installed:
make check-dependencies
  1. Create the cluster
make prepare-cluster

Check the output and export the IP as the IP_ADDR variable (export IP_ADDR=<IP>).

  1. Deploy Epinio
make deploy-epinio
  1. 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
  1. Start Cypress GUI
make cypress-gui

Scenario 1 - Using Chrome

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.

Scenario 2 - Using Firefox

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

Process explained in one chart

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;
Loading

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;
Loading

epinio-end-to-end-tests-forked's People

Contributors

juadk avatar mmartin24 avatar ldevulder avatar thehejik avatar andreas-kupries avatar jimmykarily avatar olblak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.