Skip to content

Commit

Permalink
moved initialization method into TestRunner interface
Browse files Browse the repository at this point in the history
  • Loading branch information
S1artie committed Sep 27, 2013
1 parent 1e38869 commit dfd68a3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,28 +358,7 @@ protected int getChildProcessKillTimeout() {
*/
protected Map<ForkDefinition, Set<SuiteDefinition>> setupSuitesExecuted = new HashMap<ForkDefinition, Set<SuiteDefinition>>();

/**
* Initializes a fresh test runner instance.
*
* @param aModel
* the model to execute
* @param 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.
* @param aCallback
* the callback to use to report test results
* @param aRemotingPort
* the port on which the remoting server should listen, or null if remoting should be disabled
* @param aRemotingBindHost
* the host name (or IP) to which the remoting server should bind
* @param aRandomSeed
* the seed for the {@link RandomNumberOperation} (optional; randomly determined if not given).
* @param someCommandLineArguments
* all command line arguments as given to the original Java programs' main routine (required for
* forking!)
* @throws IOException
* if the remoting server startup fails
*/
@Override
public void initialize(TestModel aModel, Map<String, String> someParameterizedConstants,
TestRunnerCallback aCallback, Integer aRemotingPort, String aRemotingBindHost, Long aRandomSeed,
String[] someCommandLineArguments) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ public TestRunner initializeTestRunner(TestRunnerCallback aCallback,
Long aRandomSeed, String[] someCommandLineArguments) throws IOException {
TestRunner tempRunner = injector.getInstance(TestRunner.class);

((DefaultTestRunner) tempRunner).initialize(this, someParameterizedConstants, aCallback, aRemotingPort,
aRemotingBindHost, aRandomSeed, someCommandLineArguments);
tempRunner.initialize(this, someParameterizedConstants, aCallback, aRemotingPort, aRemotingBindHost,
aRandomSeed, someCommandLineArguments);

return tempRunner;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
*******************************************************************************/
package de.gebit.integrity.runner;

import java.io.IOException;
import java.util.Map;

import de.gebit.integrity.dsl.SuiteDefinition;
import de.gebit.integrity.dsl.VariantDefinition;
import de.gebit.integrity.runner.callbacks.TestRunnerCallback;
import de.gebit.integrity.runner.results.SuiteSummaryResult;

/**
Expand All @@ -19,6 +23,33 @@
*/
public interface TestRunner {

/**
* Initializes a fresh test runner instance.
*
* @param aModel
* the model to execute
* @param 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.
* @param aCallback
* the callback to use to report test results
* @param aRemotingPort
* the port on which the remoting server should listen, or null if remoting should be disabled
* @param aRemotingBindHost
* the host name (or IP) to which the remoting server should bind
* @param aRandomSeed
* the seed for the {@link de.gebit.integrity.runner.operations.RandomNumberOperation} (optional;
* randomly determined if not given).
* @param someCommandLineArguments
* all command line arguments as given to the original Java programs' main routine (required for
* forking!)
* @throws IOException
* if the remoting server startup fails
*/
void initialize(TestModel aModel, Map<String, String> someParameterizedConstants, TestRunnerCallback aCallback,
Integer aRemotingPort, String aRemotingBindHost, Long aRandomSeed, String[] someCommandLineArguments)
throws IOException;

/**
* Executes a specified suite. Designated starting point for test execution.
*
Expand Down

0 comments on commit dfd68a3

Please sign in to comment.