Package com.testomatio.reporter.core
Class GlobalRunManager
- java.lang.Object
-
- com.testomatio.reporter.core.GlobalRunManager
-
public class GlobalRunManager extends Object
Singleton manager for global test run lifecycle with Testomat.io. Handles test run initialization, suite tracking, result reporting, and finalization. Thread-safe implementation supporting concurrent test execution.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecrementSuiteCounter()Decrements active suite counter.static GlobalRunManagergetInstance()Returns the singleton instance of GlobalRunManager.voidincrementSuiteCounter()Increments active suite counter and initializes run if needed.voidinitializeIfNeeded()Initializes test run if not already initialized.booleanisActive()Checks if test run is currently active.voidreportTest(TestResult result)Reports individual test result to batch manager.
-
-
-
Method Detail
-
getInstance
public static GlobalRunManager getInstance()
Returns the singleton instance of GlobalRunManager.- Returns:
- the global run manager instance
-
initializeIfNeeded
public void initializeIfNeeded()
Initializes test run if not already initialized. Creates API client, test run UID, batch manager, and registers shutdown hook. Thread-safe operation that ensures single initialization.
-
incrementSuiteCounter
public void incrementSuiteCounter()
Increments active suite counter and initializes run if needed. Called when a test suite starts execution.
-
decrementSuiteCounter
public void decrementSuiteCounter()
Decrements active suite counter. Called when a test suite completes execution.
-
reportTest
public void reportTest(TestResult result)
Reports individual test result to batch manager.- Parameters:
result- test case result to report
-
isActive
public boolean isActive()
Checks if test run is currently active.- Returns:
- true if test run is initialized and active
-
-