Giter Site home page Giter Site logo

tokrchna / berg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hal/berg

0.0 0.0 0.0 159.46 MB

HAL test suite based on Cypress

Home Page: https://hal.github.io/berg/

License: Apache License 2.0

JavaScript 0.18% Java 0.38% TypeScript 99.44%

berg's Introduction

Berg

Berg is a test-suite for HAL Management Console based on Cypress UI test automation. Berg as a name is heavily inspired by Gutenberg, inventor of printing press :) (printing press -> press -> Cypress).

Technological Stack

NodeJS

Node (https://nodejs.org/en/) is the JavaScript runtime engine used to run Berg, since Cypress is built only for JavaScript.

Cypress

Cypress (https://www.cypress.io) is the main automation framework used for developing, running & reporting tests. Main benefit of Cypress is, that it is bundling the testing code directly into the system (browser) under testing. Since JavaScript is the main language used by modern browsers, the test execution is swift, stable and less environment error-prone as in standard (Selenium + WebDriver) UI automation tools.

TestContainers

TestContainers (https://github.com/testcontainers/testcontainers-node) serves to launch & manage test scoped containers. Currently following containers are being used for testing:

  • Standalone HAL image used for most of the UI testing. It is a standalone HAL binary delivered by a container image that will be connected to a running WildFly server (that exposes management interface)
  • WildFly Server Image used for resource management. Exposes management interfaces onto which the Standalone HAL Image connects.
  • DB Images (such as postgres) serving (mostly) to run DB instances, that are being used in the datasource related tests.

Requirements

Following tools are required to run the test suite

  • NodeJS as a runtime environment.
    • nvm is optional tool to install & manage multiple Node environments
  • npx CLI tool used to exeute binaries from project's node_modules directly (instead of providing absolute/relative path to the commannds). It is used in multiple build steps.
  • Podman | Docker as a container runtime used by TestContainers. Note that when using Podman as container runtime you may need to export following environment variables and start podman socket:
    • TESTCONTAINERS_RYUK_DISABLED=true
    • DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock
      • the path can be found by command podman info --debug and look for path in remoteSocket section.
    • systemctl --user start podman.socket
  • Java. Yes we'll need Java to write deployments/applications that will be deployed onto the running WildFly container.
  • Maven. Yes, we'll need Maven to ease up the development of the deployed applications & downloading needed JDBC drivers for datasource & drivers UI tests. Maven is mostly used embedded by node-maven JS wrapper to execute Maven & Java related tasks into the build automation.

How to build & run

  • Make sure you have all the tools from Requirements installed
  • Run
npm install

in the root directory to download all of the NPM dependencies specified in package.json

  • If you want to run Cypress developer console with the loaded spec files, run
npm run develop
  • If you want to execute whole testsuite, navigate to packages/testsuite and from within that directory execute npm test
    • It is also possible to run on specific browser by supplying --browser argument, e.g
    npm test -- --browser=chrome
    
    • It is also possible to reduce the amount of specs executed by passing --specs flag. This flag must be relative to the packages/testsuite directory and supports glob patterns, e.g to execute only ejb related tests, run
    npm test -- --specs="cypress/e2e/ejb/*.cy.ts"
    
    • If you wish to run the test suite against custom HAL or WildFly images, you can use HAL_IMAGE and WILDFLY_IMAGE environment variables to specify custom images, e.g
    HAL_IMAGE=quay.io/myorg/hal WILDFLY_IMAGE=quay.io/myorg/wildfly npm test ...
    

berg's People

Contributors

spriadka avatar hpehl avatar kstekovi avatar ondrejkotek 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.