Skip to content

[Need support]: Correct Locators not getting stored in postgres-db #49

@amrita-sys

Description

@amrita-sys

Describe the problem

Hi All,
I am facing an issue like when I am running my automation script for the first time with correct locators,
the locators are not getting stored in the database : http://localhost:7878/healenium/selectors/.

So basically I am implementing healenium for appium automation with Java + gradle. Docker is set up and everything is up and running as shown below:

Image

Below are the necessary configurations I have set up:

healenium.properties: ---> src/test/resources
recovery-tries = 1
score-cap = .6
heal-enabled = true
hlm.server.url = http://localhost:7878
hlm.imitator.url = http://localhost:8000

docker-compose-appium.yaml:
version: "3.8"

services:

postgres-db:
image: postgres:15.5-alpine
container_name: postgres-db
restart: always
ports:
- "5432:5432"
volumes:
- ./db/sql/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_DB=healenium
- POSTGRES_USER=healenium_user
- POSTGRES_PASSWORD=YDk2nmNs4s9aCP6K
networks:
- healenium

healenium:
image: healenium/hlm-backend:3.4.7
container_name: healenium
restart: on-failure
ports:
- "7878:7878"
links:
- postgres-db
environment:
- SPRING_POSTGRES_DB=healenium
- SPRING_POSTGRES_SCHEMA=healenium
- SPRING_POSTGRES_USER=healenium_user
- SPRING_POSTGRES_PASSWORD=YDk2nmNs4s9aCP6K
- SPRING_POSTGRES_DB_HOST=postgres-db
- KEY_SELECTOR_URL=false
- COLLECT_METRICS=true
- FIND_ELEMENTS_AUTO_HEALING=false
- HLM_LOG_LEVEL=info
volumes:
- ./screenshots/:/screenshots
- ./logs/:/logs
networks:
- healenium

selector-imitator:
image: healenium/hlm-selector-imitator:1.5
container_name: selector-imitator
restart: on-failure
ports:
- "8000:8000"
networks:
- healenium

hlm-proxy:
image: healenium/hlm-proxy:2.1.5
container_name: hlm-proxy
restart: on-failure
ports:
- "8085:8085"
environment:
- RECOVERY_TRIES=1
- SCORE_CAP=.6
- HEAL_ENABLED=true
- SELENIUM_SERVER_URL=http://host.docker.internal:4723/wd/hub
- HEALENIUM_SERVER_URL=http://localhost:7878
- HEALENIUM_SERVICE=http://healenium:7878
- IMITATE_SERVICE=http://selector-imitator:8000
- HLM_LOG_LEVEL=info
volumes:
- ./logs/:/logs
networks:
- healenium

networks:
healenium:
name: healenium

init.sql: ---> infra/db/sql
CREATE SCHEMA healenium AUTHORIZATION healenium_user;
GRANT USAGE ON SCHEMA healenium TO healenium_user;

Please let me know if any other files are required from my end. I am really not able to figure out where the problem lies and need help here.

Healenium Backend version

3.4.7

Selenium version

4.18.1

Platform

Java

Logs appeared during using Healenium

hlm-backend logs:

2025-04-22 14:40:16.513 | 
2025-04-22 14:40:16.513 |      .*%@@@@@#- =#@@@@@#=
2025-04-22 14:40:16.513 |    :@@@@%**#@@@@@@%#**%@@@#
2025-04-22 14:40:16.513 |   =@@@.     +@@@-       =@@@.
2025-04-22 14:40:16.513 |  :@@#     =@@@+           @@@
2025-04-22 14:40:16.513 |  *@@-   -@@@*             +@@:
2025-04-22 14:40:16.513 |  +@@= .@@@#    -=-        *@@.
2025-04-22 14:40:16.513 |   @@@@@@@    #@@@@@      -@@*
2025-04-22 14:40:16.513 |   .@@@@.    @@@@@@@     @@@%
2025-04-22 14:40:16.513 |   %@@=     *@@@@@@    #@@@@@=
2025-04-22 14:40:16.513 |  =@@+       -@@*.   *@@@- #@@
2025-04-22 14:40:16.513 |  *@@-             =@@@+   +@@:
2025-04-22 14:40:16.513 |  =@@+           -@@@*     #@@
2025-04-22 14:40:16.513 |   #@@+        :@@@#      %@@=
2025-04-22 14:40:16.513 |    *@@@#-:.-+@@@@@=:.:=%@@@-
2025-04-22 14:40:16.513 |      *@@@@@@@@#=%@@@@@@@%=
2025-04-22 14:40:16.513 |                                
2025-04-22 14:40:16.721 | 2025-04-22 12:10:16.715  INFO 7 - [       main] c.epam.healenium.Application     : Starting Application v3.4.7 using Java 23.0.2 with PID 7 (/healenium-backend.jar started by root in /) 
2025-04-22 14:40:16.725 | 2025-04-22 12:10:16.724  INFO 7 - [       main] c.epam.healenium.Application     : No active profile set, falling back to 1 default profile: "default" 
2025-04-22 14:40:19.057 | 2025-04-22 12:10:19.056  INFO 7 - [       main] .RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 
2025-04-22 14:40:19.303 | 2025-04-22 12:10:19.302  INFO 7 - [       main] .RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 235 ms. Found 4 JPA repository interfaces. 
2025-04-22 14:40:20.843 | 2025-04-22 12:10:20.842  INFO 7 - [       main] o.s.b.w.e.t.TomcatWebServer      : Tomcat initialized with port 7878 (http) 
2025-04-22 14:40:20.884 | 2025-04-22 12:10:20.883  INFO 7 - [       main] o.a.c.core.StandardService       : Starting service [Tomcat] 
2025-04-22 14:40:20.887 | 2025-04-22 12:10:20.886  INFO 7 - [       main] o.a.c.core.StandardEngine        : Starting Servlet engine: [Apache Tomcat/10.1.36] 
2025-04-22 14:40:20.984 | 2025-04-22 12:10:20.984  INFO 7 - [       main] o.a.c.c.C.[.[localhost].[/]      : Initializing Spring embedded WebApplicationContext 
2025-04-22 14:40:20.986 | 2025-04-22 12:10:20.986  INFO 7 - [       main] rvletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 4102 ms 
2025-04-22 14:40:21.675 | 2025-04-22 12:10:21.672  INFO 7 - [       main] c.z.hikari.HikariDataSource      : HikariPool-1 - Starting... 
2025-04-22 14:40:22.106 | 2025-04-22 12:10:22.106  INFO 7 - [       main] c.z.hikari.HikariDataSource      : HikariPool-1 - Start completed. 
2025-04-22 14:40:22.386 | 2025-04-22 12:10:22.385  INFO 7 - [       main] liquibase.database               : Set default schema name to healenium 
2025-04-22 14:40:23.324 | 2025-04-22 12:10:23.323  INFO 7 - [       main] liquibase.changelog              : Reading from healenium.databasechangelog 
2025-04-22 14:40:23.441 | 2025-04-22 12:10:23.441  INFO 7 - [       main] liquibase.ui                     : Database is up to date, no changesets to execute 
2025-04-22 14:40:23.446 | 2025-04-22 12:10:23.445  INFO 7 - [       main] liquibase.changelog              : Reading from healenium.databasechangelog 
2025-04-22 14:40:23.459 | 2025-04-22 12:10:23.459  INFO 7 - [       main] liquibase.util                   : UPDATE SUMMARY 
2025-04-22 14:40:23.461 | 2025-04-22 12:10:23.460  INFO 7 - [       main] liquibase.util                   : Run:                          0 
2025-04-22 14:40:23.462 | 2025-04-22 12:10:23.462  INFO 7 - [       main] liquibase.util                   : Previously run:              10 
2025-04-22 14:40:23.464 | 2025-04-22 12:10:23.463  INFO 7 - [       main] liquibase.util                   : Filtered out:                 0 
2025-04-22 14:40:23.465 | 2025-04-22 12:10:23.464  INFO 7 - [       main] liquibase.util                   : ------------------------------- 
2025-04-22 14:40:23.466 | 2025-04-22 12:10:23.466  INFO 7 - [       main] liquibase.util                   : Total change sets:           10 
2025-04-22 14:40:23.469 | 2025-04-22 12:10:23.468  INFO 7 - [       main] liquibase.util                   : Update summary generated 
2025-04-22 14:40:23.496 | 2025-04-22 12:10:23.495  INFO 7 - [       main] liquibase.lockservice            : Successfully released change log lock 
2025-04-22 14:40:23.499 | 2025-04-22 12:10:23.498  INFO 7 - [       main] liquibase.command                : Command execution complete 
2025-04-22 14:40:23.761 | 2025-04-22 12:10:23.761  INFO 7 - [       main] o.h.j.internal.util.LogHelper    : HHH000204: Processing PersistenceUnitInfo [name: default] 
2025-04-22 14:40:23.882 | 2025-04-22 12:10:23.882  INFO 7 - [       main] org.hibernate.Version            : HHH000412: Hibernate ORM core version 6.5.3.Final 
2025-04-22 14:40:23.958 | 2025-04-22 12:10:23.957  INFO 7 - [       main] o.h.c.i.RegionFactoryInitiator   : HHH000026: Second-level cache disabled 
2025-04-22 14:40:24.640 | 2025-04-22 12:10:24.640  INFO 7 - [       main] .o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer 
2025-04-22 14:40:24.696 | 2025-04-22 12:10:24.695  WARN 7 - [       main] org.hibernate.orm.deprecation    : HHH90000021: Encountered deprecated setting [hibernate.temp.use_jdbc_metadata_defaults], use [hibernate.boot.allow_jdbc_metadata_access] instead 
2025-04-22 14:40:24.777 | 2025-04-22 12:10:24.776  WARN 7 - [       main] org.hibernate.orm.deprecation    : HHH90000025: PostgreSQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default) 
2025-04-22 14:40:26.206 | 2025-04-22 12:10:26.206  WARN 7 - [       main] o.h.m.internal.MetadataContext   : HHH015011: Unable to locate static metamodel field : com.epam.healenium.model.domain.Selector_#nodePathWrapper; this may or may not indicate a problem with the static metamodel 
2025-04-22 14:40:26.214 | 2025-04-22 12:10:26.213  INFO 7 - [       main] h.e.t.j.p.i.JtaPlatformInitiator : HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration) 
2025-04-22 14:40:26.220 | 2025-04-22 12:10:26.219  INFO 7 - [       main] ontainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 
2025-04-22 14:40:26.685 | 2025-04-22 12:10:26.684  INFO 7 - [       main] o.s.d.j.r.q.QueryEnhancerFactory : Hibernate is in classpath; If applicable, HQL parser will be used. 
2025-04-22 14:40:27.837 | 2025-04-22 12:10:27.836  INFO 7 - [       main] .a.w.s.WelcomePageHandlerMapping : Adding welcome page template: index 
2025-04-22 14:40:29.040 | 2025-04-22 12:10:29.039  INFO 7 - [       main] .s.b.a.e.w.EndpointLinksResolver : Exposing 1 endpoint beneath base path '/actuator' 
2025-04-22 14:40:29.584 | 2025-04-22 12:10:29.584  INFO 7 - [       main] o.s.b.w.e.t.TomcatWebServer      : Tomcat started on port 7878 (http) with context path '/' 
2025-04-22 14:40:29.759 | 2025-04-22 12:10:29.758  INFO 7 - [       main] c.epam.healenium.Application     : Started Application in 14.452 seconds (process running for 15.816) 
2025-04-22 14:49:22.828 | 2025-04-22 12:19:22.828  INFO 7 - [7878-exec-1] o.a.c.c.C.[.[localhost].[/]      : Initializing Spring DispatcherServlet 'dispatcherServlet' 
2025-04-22 14:49:22.830 | 2025-04-22 12:19:22.830  INFO 7 - [7878-exec-1] o.s.w.s.DispatcherServlet        : Initializing Servlet 'dispatcherServlet' 
2025-04-22 14:49:22.835 | 2025-04-22 12:19:22.835  INFO 7 - [7878-exec-1] o.s.w.s.DispatcherServlet        : Completed initialization in 4 ms

Additional context

No response

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions