protected synchronized void runTest() throws Throwable {
checkLists.clear();
screenCaptures.clear();
try {
String scriptText = getScriptContents();
IRuntimeFactory rf = getRuntimeFactory(scriptText);
boolean shouldRunFixture = false;
if (runtime == null || !reuseFixture) {
// This condition is added for Unit Testing purposes.
if (runtime == null || !runtime.getClass().getName().equals("net.sourceforge.marathon.runtime.RuntimeStub")) {
if (runtime != null)
runtime.destroy();
shouldRunFixture = true;
runtime = rf.createRuntime(MarathonMode.OTHER, scriptText, console);
}
}
script = runtime.createScript(scriptText, file.getAbsolutePath(), false, true);
if (dataVariables != null)
script.setDataVariables(dataVariables);