Skip to content

Framework initialization failures never surface their real cause #42

Closed

Description

@shossain786

File: selenium-boot/src/main/java/com/seleniumboot/listeners/SuiteExecutionListener.java, onStart() (lines 32-76).

Any bootstrap exception during framework initialization is caught and rethrown as new IllegalStateException("Selenium Boot failed to initialize. Aborting test suite execution.", e). The original cause e is attached in Java, but it never reaches the user.

How this was found

Verified via target/surefire-reports/*.dumpstream while reproducing the missing-execution.mode bug (a separate issue). The dumpstream contains only:

Selenium Boot failed to initialize. Aborting test suite execution.

No stack trace, no cause — even though the code attaches one.

Root cause

This exception aborts the whole forked JVM (a TestNG suite-listener failure, not a normal test failure), so Surefire's fork-crash-dump path only prints getMessage() and never walks getCause(). Whatever actually broke — bad config, bad locator, environment issue — is completely invisible to the user; they just see the generic wrapper message no matter what actually failed.

Suggested fix direction (not prescriptive)

Print or log the full cause chain before/when this exception is thrown, rather than relying on Surefire to surface it.

Activity

  1. mdraza7544 commented on Sep 10, 2026

    @mdraza7544
    Contributor

    I have created a PR for this issue.
    It now shows the actual cause of the initialization failure, which should make the error easier to understand and debug.
    PR: #45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions