An abstract implementation that guarantees configurations to be initialized via
ServiceLoader
. Any downstream
consumer of SeLion would need to follow the below mentioned steps to leverage this capability.
- Create a customized configuration initializer by extending
AbstractConfigInitializer
- Incorporate the logic of initializing the configuration based on the current
ITestContext
by implementing
Initializer.initialize(ITestContext)
- Create a folder named
META-INF/services/
under your project (src/main/resources if it's a maven
project).
- Create a text file with its name as
com.paypal.selion.configuration.Initializer
.
- Add the fully qualified name of your custom configuration initializer (the one that extends
AbstractConfigInitializer
) into the file.
Once the above steps have been followed, SeLion now takes care of invoking your project specific configuration along
with invoking its own configuration as well. Now your project does not have to worry about TestNG listener order
being maintained etc.,