public class ExperimentLauncherFromShell extends Object
This is particularly useful for unit-tests that call experiments, but want to do it with all the libraries and plugins instantiated, as they would be from the shell.
Constructor and Description |
---|
ExperimentLauncherFromShell(TestLoader loader)
Create with a specific loader.
|
Modifier and Type | Method and Description |
---|---|
void |
runExperiment(String testPathToExperiment)
Runs an experiment identified by an XML found in the resources
|
void |
runExperiment(String testPathToExperiment,
Optional<String> testPathToInput,
Optional<String> testPathToOutput)
Runs an experiment identified by an XML found in the resources
|
TestLoader |
runExperimentInTemporaryDirectory(String testPathToExperiment,
Optional<String> testPathToInput,
Optional<String> testPathToOutput,
Path temporaryDirectory,
String[] specificSubdirectories)
Creates a temporary-folder, copies data all data from the associated test-loader, and runs an
experiment
|
TestLoader |
runExperimentInTemporaryDirectory(String testPathToExperiment,
Path temporaryDirectory)
Creates a temporary-folder, copies data all data from the associated test-loader, and runs an
experiment
|
public ExperimentLauncherFromShell(TestLoader loader)
loader
- the loader, that loads resources for tests.public void runExperiment(String testPathToExperiment)
testPathToExperiment
- path to the resources where the experiment XML is foundpublic void runExperiment(String testPathToExperiment, Optional<String> testPathToInput, Optional<String> testPathToOutput)
testPathToExperiment
- path to the resources where the experiment XML is foundtestPathToInput
- if non-null, the path to a replacement input-manager. if null,
ignored.testPathToOutput
- if non-null, the path to a replacement output-manager. if null,
ignored.public TestLoader runExperimentInTemporaryDirectory(String testPathToExperiment, Path temporaryDirectory)
testPathToExperiment
- path to the resources where the experiment XML is foundtemporaryDirectory
- the temporary folder to copy files topublic TestLoader runExperimentInTemporaryDirectory(String testPathToExperiment, Optional<String> testPathToInput, Optional<String> testPathToOutput, Path temporaryDirectory, String[] specificSubdirectories)
testPathToExperiment
- path to the resources where the experiment XML is foundtestPathToInput
- if defined, the path to a replacement input-manager. if empty(),
ignored.testPathToOutput
- if defined, the path to a replacement output-manager. if empty(),
ignored.temporaryDirectory
- the temporary folder to copy files tospecificSubdirectories
- if non-null, specific subdirectories to copy. if null, ignored.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.