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:

    1. Reference to the Metadata collection, generated by the TBTAF Discoverer which will be stored on the datasource.

    2. Project ID key which defines under which key all the metadata will be stored.

  • Outputs:

    1. None
  • Exceptions:

    1. 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.

    2. If the provided Project key already exist on the currently connected datasource, then a Already Existing Project Exception will be thrown.

GetMetadata

  • Inputs:

    1. Project ID key which defines under which key all the metadata will be stored.

    2. Optional collection of strings specifying the desired tags wanted to be used to fetch the corresponding metadata.

  • Outputs:

    1. Collection of TB MetaData objects describing the tests that meet the actual provided criteria.
  • Exceptions:

    1. 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.

    2. If the provided project key does not exist in the storage, then a Not Existing Project exception will be thrown.

UpdateMetadata

  • Inputs:

    1. Reference to the Metadata collection, generated by the TBTAF Discoverer which will be updated on the datasource.

    2. Project ID key which defines under which key all the metadata will be updated.

  • Outputs:

    1. None
  • Exceptions:

    1. 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.

    2. If the provided Project key does not exist on the currently connected datasource, then a Not Existing Project Exception will be thrown.

RemoveMetadata

  • Inputs:

    1. Project ID key which defines under which key all the metadata will be removed.
  • Outputs:

    1. None
  • Exceptions:

    1. If the project key is null, then an Invalid Argument Exception will be thrown.

    2. If the provided Project key does not exist on the currently connected datasource, then a Not Existing Project Exception will be thrown.

AddTestReport

  • Inputs:

    1. Reference to the TBTAFTestResult, generated by the TBTAF Executor which will be stored on the datasource.

    2. Project ID key which defines under which key the TBTAFTestResult instance will be stored.

  • Outputs:

    1. None
  • Exceptions:

    1. 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.

    2. If the provided Project key already exist on the currently connected datasource, then a Already Existing Project Exception will be thrown.

GetTestReport

  • Inputs:

    1. Project ID key which defines under which key the TBTAFTestResult is stored.

    2. Optional Report ID key which identifies the test report to be fetched.

  • Outputs:

    1. Collection of TBTAFTestResult objects describing the tests that meet the actual provided criteria.
  • Exceptions:

    1. If the provided project or test result keys are null, then an Invalid Argument Exception will be thrown.

    2. 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:

    1. Project ID key which defines under which key a specific TBTAFTestResult will be removed.

    2. Optional Test Result ID key which identifies the TBTAFTestResult which will be removed.

  • Outputs:

    1. None
  • Exceptions:

    1. If the project or test result key are null, then an Invalid Argument Exception will be thrown.

    2. If the provided Project key does not exist on the currently connected datasource, then a Not Existing Project Exception will be thrown.

    3. 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:

    1. None
  • Outputs:

    1. Collection of the ID,Name pairs of all the Projects stored on the current database.
  • Exceptions:

    1. None

Connect

  • Inputs:

    1. Enumeration containing the type of connection that will be performed (File, MySQL, Oracle, etc.).

    2. Collection of strings specifying the different connection parameters in order to perform the datasource connection.

  • Outputs:

    1. None
  • Exceptions:

    1. If the provided connection type enumeration is not supported then a Non Supported Connection Exception will be thrown.

    2. If the provided connection parameters are null or empty then and Invalid Argument Exception will be thrown.

    3. If an unexpected error happened during the connection then a Connection Exception will be thrown.

Disconnect

  • Inputs:

    1. None
  • Outputs:

    1. None
  • Exceptions:

    1. If an unexpected error happened during the connection then a Connection Exception will be thrown.