healenium / healenium-web

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

[Need support]: Unable to execute tests after including healenium web dependency #275

Open anjanamoorthy opened 3 months ago

anjanamoorthy commented 3 months ago

Describe the problem

Followed the below instructions to intergrate with healenium web: https://github.com/healenium/healenium-web?tab=readme-ov-file#how-to-start. But my tests are not executing and there is no error. The tests were executing before the integration and after I remove the healenium dependency too. TestNG version: 7.10.2

Healenium Web version

3.5.3

Healenium Backend version

Latest

Selenium version

4.22.0

Platform

Java

Properties file

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

Logs appeared during using Healenium

[WARNING] The artifact junit:junit-dep:jar:4.11 has been relocated to junit:junit:jar:4.11: The artifact junit:junit does not contain Hamcrest anymore but declares a dependency to Hamcrest. Thus, junit:junit-dep has become obsolete.
[INFO] 
[INFO] --- resources:3.3.0:resources (default-resources) @ ias-help-demo ---
[INFO] Copying 7 resources
[INFO] 
[INFO] --- compiler:3.10.1:compile (default-compile) @ ias-help-demo ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- resources:3.3.0:testResources (default-testResources) @ ias-help-demo ---
[INFO] Copying 1 resource
[INFO] 
[INFO] --- compiler:3.10.1:testCompile (default-testCompile) @ ias-help-demo ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- surefire:3.1.2:test (default-test) @ ias-help-demo ---
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

Additional context

No response

FlaviusZichil commented 2 months ago

I had this issue too.

After adding the healenium-web dependency, the tests started to use JUnitPlatformProvider (in your code: Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider). This provider did not recognize any of my tests.

I needed the tests to be run using testng provider (Using auto detected provider org.apache.maven.surefire.testng.TestNGProvider). To do so, I excluded 2 junit dependencies from healenium-web:

       <dependency>
            <groupId>com.epam.healenium</groupId>
            <artifactId>healenium-web</artifactId>
            <version>3.5.3</version>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.jupiter</groupId>
                    <artifactId>junit-jupiter-engine</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.junit.jupiter</groupId>
                    <artifactId>junit-jupiter-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>