@Override
    public void testPlanExecutionStarted(TestPlan testPlan) {
//        initDropwizardMetricsRegistry();

        // If we don't have a DB conn don't bother doing anything, e.g. is a pure unit test
        // TODO: 12/09/2022 There ought to be a better way to do this so we can avoid logging
        //  stuff about a DB for a pure unit test, but not sure we can tell what is a db
        //  test and what is a unit test.
        if (DbTestUtil.isDbAvailable()) {
            // Called before any tests have started on this JVM.
            // Note this may be run in a different thread to the actual test(s)
            if (!keepTestDatabases()) {
                // Tidy up any test databases from previous runs
                LOGGER.info("Dropping all test databases. Set {}=true to prevent this.", KEEP_TEST_DATABASES);
                if (!DROPPED_TEST_DATABASES) {
                    synchronized (StroomTestExecutionListener.class) {
                        if (!DROPPED_TEST_DATABASES) {
                            try {
                                DbTestUtil.dropUnusedTestDatabases();
                            } catch (Exception e) {
                                final Throwable rootCause = ExceptionUtils.getRootCause(e);
                                if (rootCause instanceof SQLException
                                    && rootCause.getMessage().contains("No suitable driver found")) {
                                    LOGGER.info("No DB connection to drop test databases. " +
                                                "Assuming this is not an integration test");
                                } else {
                                    throw e;
                                }
                            }
                            DROPPED_TEST_DATABASES = true;
                        }
                    }
                }
            }
        }

        // hibernate-validator seems to use jboss-logging which spits the following ERROR
        // out to the console if this prop is not set:
        //   ERROR StatusLogger Log4j2 could not find a logging implementation.
        //   Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
        System.setProperty("org.jboss.logging.provider", "slf4j");

        LOGGER.info("Starting test plan");
    }
This test listener is registered by service loader using the file
stroom-test-common/src/main/resources/META-INF/services/org.junit.platform.launcher.TestExecutionListener
Its methods will be called for any tests that include stroom-test-common as a dependency.
stroom-test-common/src/main/java/stroom/test/common/util/test/StroomTestExecutionListener.java