From 9bdb2bc8a54a0070378ec4c3ce8a5b223693cb3a Mon Sep 17 00:00:00 2001 From: Md Ashif Date: Fri, 11 Sep 2026 01:21:51 +0530 Subject: [PATCH] fix(initialization): expose bootstrap failure cause --- .../listeners/SuiteExecutionListener.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/seleniumboot/listeners/SuiteExecutionListener.java b/src/main/java/com/seleniumboot/listeners/SuiteExecutionListener.java index 6d86c23..ac7fd92 100644 --- a/src/main/java/com/seleniumboot/listeners/SuiteExecutionListener.java +++ b/src/main/java/com/seleniumboot/listeners/SuiteExecutionListener.java @@ -69,7 +69,18 @@ public void onStart(ISuite suite) { TestManagementReporter.getInstance().onSuiteStart(); } catch (Exception e) { - // Abort entire suite on bootstrap failure + // Abort entire suite on bootstrap failure — log the full cause chain first + // so the root cause stays visible in normal Maven/TestNG/Surefire output, + // where only the wrapper message is otherwise shown. + System.err.println( + "[Selenium Boot] Initialization failed: " + + "Selenium Boot failed to initialize. Aborting test suite execution."); + System.err.println("[Selenium Boot] Cause: " + e); + Throwable cause = e.getCause(); + while (cause != null) { + System.err.println("[Selenium Boot] Caused by: " + cause); + cause = cause.getCause(); + } throw new IllegalStateException( "Selenium Boot failed to initialize. Aborting test suite execution.", e); }