Package de.xima.fc.e2e.environment.api
Interface IFormcycleProvisioner
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
FormcycleProvisioner
public interface IFormcycleProvisioner extends AutoCloseable
Provisions the formcycle app to meet the necessary preconditions before a test case can be executed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclose()default IFormcycleAppStatecombine(IFormcycleProvisionAction... actions)Runs multiple setup actions and returns the combined result.IFormcycleAppStatecombine(Iterable<IFormcycleProvisionAction> actions)Runs multiple setup actions and returns the combined result.default IFormcycleAppStatecreateNewDefaultClient()Creates a new default tenant with default settings, similar to how a new tenant would be created in the UI.IFormcycleAppStatecreateNewDefaultClient(IExternalClientServices services)Creates a new default tenant with default settings, similar to how a new tenant would be created in the UI.IFormcycleAppStatecreateSystem()Ensures the formcycle system is up and running, but does not create any tenants.default IFormcycleAppStateimportClient(URI pathToExportDir)Reads a tenant export file and creates a new tenant with the data from that export file.IFormcycleAppStateimportClient(URI pathToExportDir, IExternalClientServices services)Reads a tenant export file and creates a new tenant with the data from that export file.default IFormcycleAppStateimportProject(URI pathToExportDir, Long tenantId)Reads a project export file, creates a new tenant and import the project contained in the export file.IFormcycleAppStateimportProject(URI pathToExportDir, Long tenantId, IExternalClientServices services)Reads a project export file, creates a new tenant and import the project contained in the export file.default IFormcycleAppStateinstallClientPlugin(URI jarDir, Long tenantId)Installs a plugin in the running formcycle application.IFormcycleAppStateinstallClientPlugin(URI jarDir, Long tenantId, Properties properties)Installs a plugin in the running formcycle application.IFormcycleUriManagernewUriManager(FormcycleSetupResult setupResult)Creates a URI manager for formcycle URLs with the results of a certain setup result.
-
-
-
Method Detail
-
close
void close() throws InterruptedException- Specified by:
closein interfaceAutoCloseable- Throws:
InterruptedException
-
combine
default IFormcycleAppState combine(IFormcycleProvisionAction... actions) throws de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException
Runs multiple setup actions and returns the combined result.- Parameters:
actions- Actions to run.- Returns:
- Context with data about the state of the formcycle app after the setup.
- Throws:
de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException- When any of the actions failed.
-
combine
IFormcycleAppState combine(Iterable<IFormcycleProvisionAction> actions) throws de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException
Runs multiple setup actions and returns the combined result.- Parameters:
actions- Actions to run.- Returns:
- Context with data about the state of the formcycle app after the setup.
- Throws:
de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException- When any of the actions failed.
-
createNewDefaultClient
default IFormcycleAppState createNewDefaultClient() throws de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException
Creates a new default tenant with default settings, similar to how a new tenant would be created in the UI.- Returns:
- Context with data about the created tenant.
- Throws:
de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException- When the tenant could not be created.
-
createNewDefaultClient
IFormcycleAppState createNewDefaultClient(IExternalClientServices services) throws de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException
Creates a new default tenant with default settings, similar to how a new tenant would be created in the UI.- Parameters:
services- External services to use for the new tenant.- Returns:
- Context with data about the created tenant.
- Throws:
de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException- When the tenant could not be created.
-
createSystem
IFormcycleAppState createSystem() throws de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException
Ensures the formcycle system is up and running, but does not create any tenants.- Returns:
- Context with data about the performed setup.
- Throws:
de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException- When the system could not be prepared.
-
importClient
default IFormcycleAppState importClient(URI pathToExportDir) throws de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException
Reads a tenant export file and creates a new tenant with the data from that export file.- Parameters:
pathToExportDir- Path to the directory containing the tenant export.- Returns:
- Context with data about the imported data.
- Throws:
de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException- When the tenant could not be imported.
-
importClient
IFormcycleAppState importClient(URI pathToExportDir, IExternalClientServices services) throws de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException
Reads a tenant export file and creates a new tenant with the data from that export file.- Parameters:
pathToExportDir- Path to the directory containing the tenant export.services- External services to use for the new tenant.- Returns:
- Context with data about the imported data.
- Throws:
de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException- When the tenant could not be imported.
-
importProject
default IFormcycleAppState importProject(URI pathToExportDir, Long tenantId) throws de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException
Reads a project export file, creates a new tenant and import the project contained in the export file.- Parameters:
pathToExportDir- Either a URI pointing to the project export file itself, or a path to the directory containing the project export file namedproject-export.zip.tenantId- ID of the tenant where to create the project. Whennull, a new project is created.- Returns:
- Context with data about the imported data.
- Throws:
de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException- When the project could not be imported.
-
importProject
IFormcycleAppState importProject(URI pathToExportDir, Long tenantId, IExternalClientServices services) throws de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException
Reads a project export file, creates a new tenant and import the project contained in the export file.- Parameters:
pathToExportDir- Either a URI pointing to the project export file itself, or a path to the directory containing the project export file namedproject-export.zip.tenantId- ID of the tenant where to create the project. Whennull, a new tenant is created.services- External services to use for the new tenant.- Returns:
- Context with data about the imported data.
- Throws:
de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException- When the project could not be imported.
-
installClientPlugin
default IFormcycleAppState installClientPlugin(URI jarDir, Long tenantId) throws de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException
Installs a plugin in the running formcycle application.- Parameters:
jarDir- Either a URI pointing to the JAR file itself, or a URI pointing to the directory with theplugin.jsondescriptor.tenantId- ID of the tenant scope where the plugin should be installed. Whennull, a new tenant is created.- Returns:
- Context with data about the imported plugin.
- Throws:
de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException- When the plugin could not be installed.
-
installClientPlugin
IFormcycleAppState installClientPlugin(URI jarDir, Long tenantId, Properties properties) throws de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException
Installs a plugin in the running formcycle application.- Parameters:
jarDir- Either a URI pointing to the JAR file itself, or a URI pointing to the directory with theplugin.jsondescriptor.tenantId- ID of the tenant scope where the plugin should be installed. Whennull, a new tenant is created.properties- Optional properties for the plugin.- Returns:
- Context with data about the imported plugin.
- Throws:
de.xima.e2e.test_harness_selenium.common.exception.TestCaseSetupFailedException- When the plugin could not be installed.
-
newUriManager
IFormcycleUriManager newUriManager(FormcycleSetupResult setupResult)
Creates a URI manager for formcycle URLs with the results of a certain setup result.- Parameters:
setupResult- Setup result obtained by a provisioner.- Returns:
- A URI manager for the given setup result.
-
-