Class ExperimentLauncherFromShell
Object
ExperimentLauncherFromShell
Launches an experiment by calling the application 'anchor' via the shell.
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 Summary
ConstructorsConstructorDescriptionCreate with a specific loader. -
Method Summary
Modifier and TypeMethodDescriptionvoid
runExperiment
(String testPathToExperiment) Runs an experiment identified by an XML found in the resourcesvoid
runExperiment
(String testPathToExperiment, Optional<String> testPathToInput, Optional<String> testPathToOutput) Runs an experiment identified by an XML found in the resourcesrunExperimentInTemporaryDirectory
(String testPathToExperiment, Path temporaryDirectory) Creates a temporary-folder, copies data all data from the associated test-loader, and runs an experimentrunExperimentInTemporaryDirectory
(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
-
Constructor Details
-
ExperimentLauncherFromShell
Create with a specific loader.- Parameters:
loader
- the loader, that loads resources for tests.
-
-
Method Details
-
runExperiment
Runs an experiment identified by an XML found in the resources- Parameters:
testPathToExperiment
- path to the resources where the experiment XML is found
-
runExperiment
public void runExperiment(String testPathToExperiment, Optional<String> testPathToInput, Optional<String> testPathToOutput) Runs an experiment identified by an XML found in the resources- Parameters:
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.
-
runExperimentInTemporaryDirectory
public TestLoader runExperimentInTemporaryDirectory(String testPathToExperiment, Path temporaryDirectory) Creates a temporary-folder, copies data all data from the associated test-loader, and runs an experiment- Parameters:
testPathToExperiment
- path to the resources where the experiment XML is foundtemporaryDirectory
- the temporary folder to copy files to- Returns:
- a test-loader bounded to the temporary folder
-
runExperimentInTemporaryDirectory
public 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- Parameters:
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.- Returns:
- a test-loader bounded to the temporary folder
-