Healenium-Web with Docker
  1. Make sure you have the recent Docker version installed.
  2. Download latest version or clone Healenium repository:
Structure of archive:

  • docker-compose.yaml - compose file to use Healenium with Solenoid as server.
  • docker-compose-selenium-grid.yaml - compose file to use Healenium with Selenium Grid as server.
  • docker-compose-web.yaml - compose file to use Healenium with web approach.
  • docker-compose-appium.yaml - compose file to use Healenium with mobile Appium framework.
  • /db/init/init.sql - init sql file for PostgreSQL
  • /shell-installation/ - directory for install Healenium without docker. That will be described in more detail later.
3. Up and run docker services:
docker-compose -f docker-compose-web.yaml up -d
Navigate to http://<hlm-backend-address>/healenium/report to check healenium backend is running.
Locally: http://localhost:7878/healenium/report
Install Healenium-Web using a shell script
Requirements:

  • Java 8+
  • Python
  • PostgerSQL
Install PostgreSQL: https://www.postgresql.org/download/

After successful installation, you need to prepare the database for Healenium services using psql:

1.1. Create database and user
    CREATE DATABASE healenium;
    CREATE USER healenium_user WITH ENCRYPTED PASSWORD 'YDk2nmNs4s9aCP6K';
    GRANT ALL PRIVILEGES ON DATABASE healenium TO healenium_user;
    ALTER USER healenium_user WITH SUPERUSER;
    \c healenium healenium_user;
    1.2. Create schema
      CREATE SCHEMA healenium AUTHORIZATION healenium_user;
      GRANT USAGE ON SCHEMA healenium TO healenium_user;
      Install Healenium components

      1. Download latest version or clone Healenium repository:
      Structure of archive:

      • /shell-installation/ - directory for install Healenium without docker. It contains /selenium-grid (for Healenium-Proxy) and /web (for Healenium-Web) directories

      2. Go to /shell-installation/web and Download Healenium components. Run download_services.sh

      3. Run start_healenium.sh

      Navigate to http://<hlm-backend-address>/healenium/report to check healenium backend is running.
      Locally: http://localhost:7878/healenium/report
      4. Add Project dependancy
      <dependency>
          <groupId>com.epam.healenium</groupId>
          <artifactId>healenium-web</artifactId>
          <version>3.5.4</version>
      </dependency>
      implementation 'com.epam.healenium:healenium-web:3.5.4'
      5. Init driver instance of SelfHealingDriver
      //declare delegate
      WebDriver delegate = new ChromeDriver();
      //create Self-healing driver
      SelfHealingDriver driver = SelfHealingDriver.create(delegate);
      5.1 Init wait driver instance of SelfHealingDriverWait. Healenium support Explicity wait from 3.4.4+ version. In this case, healing will happen after a 10-second wait.
      //declare delegate
      WebDriver delegate = new ChromeDriver();
      //create Self-healing driver
      SelfHealingDriver driver = SelfHealingDriver.create(delegate);
      //create SelfHealingDriverWait - wrapper of WebDriverWait
      WebElement element = new SelfHealingDriverWait(driver, Duration.ofSeconds(10))
                      .until(ExpectedConditions.visibilityOfElementLocated(By.id("wait_new_element")));
      6. Create healenium.properties file in resources folder in your project and fill it with the following properties:
      recovery-tries = 1
      score-cap = .6
      heal-enabled = true
      hlm.server.url = http://localhost:7878
      hlm.imitator.url = http://localhost:8000
      Logging
      By default Healenium logging info level. Add simplelogger.properties file in resources folder in your project to retrieve all logs:
      org.slf4j.simpleLogger.log.healenium=debug
      Configuration
      Attribures of healenium.properties file:
      Evirovemend variables of Healenium-backend (docker-compose-web.yaml):

      About Healenium
      Contacts
      • Anna_Chernyshova@epam.com - Project Manager
      • Dmitriy_Gumeniuk@epam.com - Project Supervisor