Databridge - S41nz/TBTAF GitHub Wiki
TBTAF Databridge
Overview
The Databridge is the interface with the main datasource(s) where all the data from TBTAF is stored. This can be from a file to memory to a set of databases.
API Specification
AddMetadata
-
Inputs:
-
Reference to the Metadata collection, generated by the TBTAF Discoverer which will be stored on the datasource.
-
Project ID key which defines under which key all the metadata will be stored.
-
-
Outputs:
- None
-
Exceptions:
-
If the provided reference to the Metadata collection is null or empty as well as the project key, then an Invalid Argument Exception will be thrown.
-
If the provided Project key already exist on the currently connected datasource, then a Already Existing Project Exception will be thrown.
-
GetMetadata
-
Inputs:
-
Project ID key which defines under which key all the metadata will be stored.
-
Optional collection of strings specifying the desired tags wanted to be used to fetch the corresponding metadata.
-
-
Outputs:
- Collection of TB MetaData objects describing the tests that meet the actual provided criteria.
-
Exceptions:
-
If the provided reference to the tag collection is null or empty as well as the project key, then an Invalid Argument Exception will be thrown.
-
If the provided project key does not exist in the storage, then a Not Existing Project exception will be thrown.
-
UpdateMetadata
-
Inputs:
-
Reference to the Metadata collection, generated by the TBTAF Discoverer which will be updated on the datasource.
-
Project ID key which defines under which key all the metadata will be updated.
-
-
Outputs:
- None
-
Exceptions:
-
If the provided reference to the Metadata collection is null or empty as well as the project key, then an Invalid Argument Exception will be thrown.
-
If the provided Project key does not exist on the currently connected datasource, then a Not Existing Project Exception will be thrown.
-
RemoveMetadata
-
Inputs:
- Project ID key which defines under which key all the metadata will be removed.
-
Outputs:
- None
-
Exceptions:
-
If the project key is null, then an Invalid Argument Exception will be thrown.
-
If the provided Project key does not exist on the currently connected datasource, then a Not Existing Project Exception will be thrown.
-
AddTestReport
-
Inputs:
-
Reference to the TBTAFTestResult, generated by the TBTAF Executor which will be stored on the datasource.
-
Project ID key which defines under which key the TBTAFTestResult instance will be stored.
-
-
Outputs:
- None
-
Exceptions:
-
If the provided reference to the TBTAFTestResult report is null or empty as well as the project key, then an Invalid Argument Exception will be thrown.
-
If the provided Project key already exist on the currently connected datasource, then a Already Existing Project Exception will be thrown.
-
GetTestReport
-
Inputs:
-
Project ID key which defines under which key the TBTAFTestResult is stored.
-
Optional Report ID key which identifies the test report to be fetched.
-
-
Outputs:
- Collection of TBTAFTestResult objects describing the tests that meet the actual provided criteria.
-
Exceptions:
-
If the provided project or test result keys are null, then an Invalid Argument Exception will be thrown.
-
If the provided project nor test result keys do not exist in the storage, then a Not Existing Project or Not Existing TestResult exception will be thrown.
-
RemoveTestResult
-
Inputs:
-
Project ID key which defines under which key a specific TBTAFTestResult will be removed.
-
Optional Test Result ID key which identifies the TBTAFTestResult which will be removed.
-
-
Outputs:
- None
-
Exceptions:
-
If the project or test result key are null, then an Invalid Argument Exception will be thrown.
-
If the provided Project key does not exist on the currently connected datasource, then a Not Existing Project Exception will be thrown.
-
If the provided test result key does not exist on the currently connected datasource, then a Not Existing TestResult Exception will be thrown.
-
GetAllProjects
-
Inputs:
- None
-
Outputs:
- Collection of the ID,Name pairs of all the Projects stored on the current database.
-
Exceptions:
- None
Connect
-
Inputs:
-
Enumeration containing the type of connection that will be performed (File, MySQL, Oracle, etc.).
-
Collection of strings specifying the different connection parameters in order to perform the datasource connection.
-
-
Outputs:
- None
-
Exceptions:
-
If the provided connection type enumeration is not supported then a Non Supported Connection Exception will be thrown.
-
If the provided connection parameters are null or empty then and Invalid Argument Exception will be thrown.
-
If an unexpected error happened during the connection then a Connection Exception will be thrown.
-
Disconnect
-
Inputs:
- None
-
Outputs:
- None
-
Exceptions:
- If an unexpected error happened during the connection then a Connection Exception will be thrown.