Interface TestRunner

  • All Known Implementing Classes:
    DefaultTestRunner

    public interface TestRunner
    The test runner executes tests.
    Author:
    Rene Schneider - initial API and implementation
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void initialize​(TestModel aModel, java.util.Map<java.lang.String,​java.lang.String> someParameterizedConstants, TestRunnerCallback aCallback, java.lang.String aResultLocale, java.lang.Integer aRemotingPort, java.lang.String aRemotingBindHost, java.lang.Long aRandomSeed, java.lang.String[] someCommandLineArguments)
      Initializes a fresh test runner instance.
      SuiteSummaryResult run​(SuiteDefinition aRootSuite, VariantDefinition aVariant, boolean aBlockForRemotingFlag)
      Executes a specified suite.
      void shutdown​(boolean anEmptyRemotingOutputQueueFlag)
      Shuts down this test runner instance.
    • Method Detail

      • initialize

        void initialize​(TestModel aModel,
                        java.util.Map<java.lang.String,​java.lang.String> someParameterizedConstants,
                        TestRunnerCallback aCallback,
                        java.lang.String aResultLocale,
                        java.lang.Integer aRemotingPort,
                        java.lang.String aRemotingBindHost,
                        java.lang.Long aRandomSeed,
                        java.lang.String[] someCommandLineArguments)
                 throws java.io.IOException
        Initializes a fresh test runner instance. In case of forks, this method guarantees that when it exits without an exception, the master has successfully connected and injected the test scripts and a setlist into it.
        Parameters:
        aModel - the model to execute (may not contain any test script data yet in case of forks!)
        someParameterizedConstants - Maps fully qualified constant names (must be those with the "parameterized" keyword) to their desired value. This way, test execution can be parameterized from outside.
        aCallback - the callback to use to report test results
        aResultLocale - the locale to be used for the test result generation (if not provided, use the non-localized default strings, which usually are in English)
        aRemotingPort - the port on which the remoting server should listen, or null if remoting should be disabled
        aRemotingBindHost - the host name (or IP) to which the remoting server should bind
        aRandomSeed - the seed for the RandomNumberOperation (optional; randomly determined if not given).
        someCommandLineArguments - all command line arguments as given to the original Java programs' main routine (required for forking!)
        Throws:
        java.io.IOException - if the remoting server startup fails, or if the connection from the master process does not complete in time (for forks only)
      • run

        SuiteSummaryResult run​(SuiteDefinition aRootSuite,
                               VariantDefinition aVariant,
                               boolean aBlockForRemotingFlag)
        Executes a specified suite. Designated starting point for test execution.
        Parameters:
        aRootSuite - the suite to execute
        aBlockForRemotingFlag - whether execution should pause before actually starting until execution is resumed via remoting
        Returns:
        the suite execution result (this may also be null in case there is no tangible "result", like when the test runner is actually just running the part of a single fork within a bigger test suite - the partial result in this case is not relevant, but is automatically integrated in the result of the master process)
      • shutdown

        void shutdown​(boolean anEmptyRemotingOutputQueueFlag)
        Shuts down this test runner instance.
        Parameters:
        anEmptyRemotingOutputQueueFlag - true if the remoting server shall be given time to send all remaining messages to clients while closing connections