healenium / healenium-web

Self-healing library for Selenium Web-based tests
Apache License 2.0
169 stars 40 forks source link

Healenium Report is generating empty and healenium plugin giving java.lang.ExceptionInInitializerError on clicking Healing Results in intellij IDE #131

Closed KritikaSahare1611 closed 2 years ago

KritikaSahare1611 commented 3 years ago

image

image

Alex-Reif commented 3 years ago

Hello @KritikaSahare1611 ,

Could you check health of backend container? Please use actual version: healenium-web 3.1.4 healenium/hlm-backend 3.1.2 healenium/hlm-selector-imitator 1

KritikaSahare1611 commented 3 years ago

empty report issue has been resolved by updating the version, but still healenium plugin is giving java.lang.ExceptionInInitializerError

Alex-Reif commented 3 years ago

Please, describe full case, step by step. It'll help to find out root cause.

KritikaSahare1611 commented 3 years ago

@Aliaksei-Ashukha can we discuss this over a call? We were using selenoid in our project and now we have integrated healenium on top of it.I am facing multiple issues like

  1. healenium tries to heal the correct findelements. locators (not required)
  2. Failed to make response socket timeout exception
  3. If any test case failed , the report is not generating even if in the same test case ,one locator is healed
  4. Intellij plugin is giving exception
Raghuramanvaradhan commented 3 years ago

Hi @Aliaksei-Ashukha W The following are the issues we are facing currently . could you please help us out

  1. Healing at run time happens but we could not find anything on the generated report (Report is empty always).
  2. Is there a way we can grab the healed locater via code and append on our HTML report ?
  3. While using findelements we always face indexoutofbound exceptions throws any solutions for this ?.
  4. Normal Webdriver findelements returns there are 4 elements for the xpath whereas selfhealind driver returns 19 and fails as index out of bound . Ps: We have made all the above said version upgrades and we use Eclipse Editor TIA.
Alex-Reif commented 3 years ago

Hello @Raghuramanvaradhan , @KritikaSahare1611 Please contact with me through email to discuss and schedule the call.

aliaksei_ashukha@epam.com

Alex-Reif commented 2 years ago

Hello @Raghuramanvaradhan , @KritikaSahare1611 Probably, your hlm-backend container doesn't starting up during run plugin. Please check

sangameshwar-balur commented 1 year ago

@Alex-Reif @Raghuramanvaradhan @KritikaSahare1611 : I am also facing the same issue with latest versions. Report is empty with for both pass and fail scenario.

Main issue is when there is a change in webelement Healenium is not healing

Report plugin

image

Dependencies in the project used.

`dependencies {

 testImplementation(platform('org.junit:junit-bom:5.9.0'))
    testImplementation('org.junit.jupiter:junit-jupiter')
    implementation 'io.github.bonigarcia:selenium-jupiter:4.3.1' 
    testImplementation 'org.hamcrest:hamcrest:2.1'
    testImplementation 'org.hamcrest:hamcrest-library:2.1'
    testCompile 'org.junit.jupiter:junit-jupiter-api:5.4.2'
    testRuntime 'org.junit.platform:junit-platform-launcher:1.4.2'
    testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.4.2'
    compile group: 'org.jsoup', name: 'jsoup', version: '1.9.2'
    compile group: 'org.apache.poi', name: 'poi', version: '3.9'
    compile group: 'org.apache.poi', name: 'poi-contrib', version: '3.6'
    implementation 'org.seleniumhq.selenium:selenium-java:4.4.0'
    compile group: 'io.qameta.allure', name: 'allure-junit5', version: '2.11.0'
    compile group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.16'
    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.1'
    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.1'
    compile group: 'io.qameta.allure', name: 'allure-gradle', version: '2.7.0'
    compile group: 'org.apache.poi', name: 'poi-ooxml', version: '3.7'
    compile group: 'org.apache.xmlbeans', name: 'xmlbeans', version: '4.0.0'
    compile group: 'com.automation-remarks', name: 'video-recorder-junit5', version: '2.+'
    compile('com.assertthat:selenium-shutterbug:0.9.2')
    compile 'org.slf4j:slf4j-nop:1.7.25'
    compile group: 'org.jsoup', name: 'jsoup', version: '1.9.2'
    compile group: 'com.surevine', name: 'ews-java-api', version: '2.3'
    compile group: 'ru.yandex.qatools.ashot', name: 'ashot', version: '1.5.4'
    implementation group: 'javax.mail', name: 'mail', version: '1.4.7'
    implementation group: 'javax.mail', name: 'javax.mail-api', version: '1.6.2'
    runtimeClasspath group: 'javax.mail', name: 'javax.mail-api', version: '1.6.2'
    implementation group: 'org.json', name: 'json', version: '20201115'
    implementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
    implementation group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: '7.2.2.jre8'
    implementation 'net.java.dev.jna:jna-platform:5.9.0'
    testImplementation 'org.junit.platform:junit-platform-engine:1.9.0'
    implementation 'org.seleniumhq.selenium:selenium-java:4.6.0'
    compile group: 'com.epam.healenium', name: 'healenium-web', version: '3.3.1'
    implementation 'com.fasterxml.jackson:jackson-bom:2.14.1'

}`

image

image

image

image

image

image

image

NidhiGarg15 commented 11 months ago

I am also facing the same challenge report folder is empty

adarsh12308 commented 10 months ago

@Alex-Reif @KritikaSahare1611 > empty report issue has been resolved by updating the version, but still healenium plugin is giving java.lang.ExceptionInInitializerError

I am using updated version of selenium 4.13.0 Healenium -web 3.4.6 Hlm-backend version is 3.4.1 Immitator 1.2 and also tried for hlm-backend 3.4.2 Jdk version 17 But still the empty or no report

QACodeDev commented 2 months ago

Self-Healing is working but generating blank report(Healenium Web 3.5.2)

Please find below details: i am using healenium-web(3.5.2),Selenium version(4.19.1),java 16.0.1,Healenium Backend version(3.4.5)

Properties file

recovery-tries = 1 score-cap = 0.5 heal-enabled = true hlm.server.url = http://localhost:7878/ hlm.imitator.url = http://localhost:9000/

docker-compose-web.yaml

version: "3.8"

services:

postgres-db: image: postgres:15.5-alpine container_name: postgres-db restart: always ports:

healenium: image: healenium/hlm-backend:3.4.5 container_name: healenium restart: on-failure ports:

selector-imitator: image: healenium/hlm-selector-imitator:1.4 container_name: selector-imitator restart: on-failure ports:

networks: healenium: name: healenium

Maven Execution Logs:

Maven Execution logs: [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running TestSuite SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Jul 03, 2024 1:16:50 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch WARNING: Unable to find an exact match for CDP version 126, returning the closest version; found: 123; Please update to a Selenium version that supports CDP version 126 [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 19.295 s - in TestSuite [INFO] [INFO] Results: [INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- hlm-report-mvn:1.1:buildReport (hlmReportB) @ ltms-selenium-ai --- Jul 03, 2024 1:17:04 PM com.epam.healenium.client.HealingClient makePost INFO: External service call completes with success: healenium/report/bcb5a0c7-9fc3-4a63-a5c3-2eb8dd06071c [INFO] Report available at http://localhost:7878/healenium/report/bcb5a0c7-9fc3-4a63-a5c3-2eb8dd06071c [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 29.802 s [INFO] Finished at: 2024-07-03T13:17:04+05:30 [INFO] ------------------------------------------------------------------------