Skip to content

Commit

Permalink
Display current configuration before running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kokosing committed Dec 12, 2017
1 parent 070bad4 commit 8d06913
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ public TestInitializationListener(
@Override
public void onStart(ITestContext context)
{
displayConfigurationToUser();

Module suiteModule = combine(combine(getSuiteModules()), bind(suiteLevelFulfillers), bind(testMethodLevelFulfillers));
GuiceTestContext initSuiteTestContext = new GuiceTestContext(suiteModule);
TestContextStack<GuiceTestContext> suiteTextContextStack = new TestContextStack<>();
Expand All @@ -189,6 +191,14 @@ public void onStart(ITestContext context)
setSuiteTestContextStack(suiteTextContextStack);
}

private void displayConfigurationToUser()
{
LOGGER.info("Configuration:");
for (String key : configuration.listKeys()) {
LOGGER.info(String.format("%s -> %s", key, configuration.getString(key).orElse("<NOT SET>")));
}
}

@Override
public void onFinish(ITestContext context)
{
Expand Down

0 comments on commit 8d06913

Please sign in to comment.