Skip to content

Step documentation for DbTable

Load data into templated table

Loads data into a table that conforms to a configured table template

Sentences

Type Language Sentence
Given en the ([a-zA-Z0-9_@$#-]+) table (.+) is loaded with the following data:
Given nl de ([a-zA-Z0-9_@$#-]+) tabel (.+) met de volgende data geladen wordt:

Arguments

Parameter Datatype Description
table template string The name of the object template, referring to an object template from the config
table name string The name of the table to write the data to
data to insert Table The data to write to the table, formatted as a table with the appropriate column names. See TestDataTable.

Examples

 Given the staging table [dbo].[#testTable] is loaded with the following data:
  | Id | Description    |
  | 1  | 'FirstRow'       |
  | 2  | 'SecondRow' |
 Gegeven de staging tabel [dbo].[#testTable] met de volgende data geladen wordt:
  | Id | Description    |
  | 1  | 'FirstRow'       |
  | 2  | 'SecondRow' |

Load data into table

Loads data into a table

Sentences

Type Language Sentence
Given en the table (.+) is loaded with the following data:
Given nl de tabel (.+) met de volgende data geladen wordt:

Arguments

Parameter Datatype Description
table name string The name of the table to write the data to
data to insert Table The data to write to the table, formatted as a table with the appropriate column names. See TestDataTable.

Examples

 Given the table [dbo].[#testTable] is loaded with the following data:
  | Id | Description    |
  | 1  | 'FirstRow'       |
  | 2  | 'SecondRow' |
 Gegeven de tabel [dbo].[#testTable] met de volgende data geladen wordt:
  | Id | Description    |
  | 1  | 'FirstRow'       |
  | 2  | 'SecondRow' |

Retrieve data from table

Retrieves data from a table

Sentences

Type Language Sentence
When en I retrieve the contents of the [([a-zA-Z0-9_@$#]+)].[([a-zA-Z0-9_@$#]+)] (?:table
When en I retrieve the contents of the ([a-zA-Z0-9_@$#]+).([a-zA-Z0-9_@$#]+) (?:table
When nl ik de inhoud van de (?:tabel
When nl ik de inhoud van de (?:tabel

Arguments

Parameter Datatype Description
schema name string The name of the table or view's schema
table name string The name of the table or view to get the data from

Examples

 When I retrieve the contents of the [dbo].[#testTable] table
 When I retrieve the contents of the dbo.#testTable table
 Als ik de inhoud van de tabel dbo.#testTable ophaal
 Als ik de inhoud van de tabel [dbo].[#testTable] ophaal

Delete data from table

Deletes data from a table

Sentences

Type Language Sentence
Given en the table [([a-zA-Z0-9_@$#]+)].[([a-zA-Z0-9_@$#]+)] is empty
Given nl dat de tabel [([a-zA-Z0-9_@$#]+)].[([a-zA-Z0-9_@$#]+)] leeg is
Given en the table ([a-zA-Z0-9_@$#]+).([a-zA-Z0-9_@$#]+) is empty
Given nl dat de tabel ([a-zA-Z0-9_@$#]+).([a-zA-Z0-9_@$#]+) leeg is

Arguments

Parameter Datatype Description
schema name string The name of the table schema
table name string The name of the table to delete the data from

Examples

 Given the table [dbo].[#testTable] is empty
 Gegeven dat de tabel [dbo].[#testTable] leeg is
 Given the table [dbo].[#testTable] is empty
 Gegeven dat de tabel [dbo].[#testTable] leeg is

Delete templated table data

Deletes data from a table

Sentences

Type Language Sentence
Given en ^the ([a-zA-Z0-9_@$#-]+) table (.+) is empty$

Arguments

Parameter Datatype Description
database config string The name of the database config
table name string The name of the table to delete the data from

Examples

 Given the demo table CUST_SAT is empty

Retrieve data of templated table

Retrieves data from a table or view

Sentences

Type Language Sentence
When en ^I retrieve the contents of the ([a-zA-Z0-9_@$#-]+) (.+) (?:table

Arguments

Parameter Datatype Description
database config string The name of the database config
table name string The name of the table to retrieve the data from

Examples

 When I retrieve the contents of the demo CUST_SAT table

Insert data into table

Loads data into a table

Sentences

Type Language Sentence
When en ^I insert the following data in ([a-zA-Z0-9_@$#-]+) table (.+):$

Arguments

Parameter Datatype Description
database config string The name of the database config
table name string The name of the table to insert the data into
data to insert Table The data to load into the table. See TestDataTable.

Examples

 When I insert the following data in demo table CUST_SAT:
  | Id | Description    |
  | 1  | 'FirstRow'       |
  | 2  | 'SecondRow' |

Add key table to composite object

Adds a key table to a composite object. 'Key' means inserts into this table will be made distinct

Sentences

Type Language Sentence
Given en ^I have a key table named (.+) in ([a-zA-Z0-9_@$#-]+) for object (.+)$

Arguments

Parameter Datatype Description
table name string The name of the key table to add to the composite object
database config string The name of the database config that applies to the key table
composite object string The name of the composite object the key table is added to. This can be a new composite object or one that is configured in the CrossTest configuration.

Examples

 Given I have a key table named CUST_HUB in demo for object Customer

Add context table to composite object

Adds a context table to a composite object. 'Context' means inserts into this table will not be made distinct

Sentences

Type Language Sentence
Given en ^I have a context table named (.+) in ([a-zA-Z0-9_@$#-]+) for object (.+)$

Arguments

Parameter Datatype Description
table name string The name of the context table to add to the composite object
database config string The name of the database config that applies to the context table
composite object string The name of the composite object the context table is added to. This can be a new composite object or one that is configured in the CrossTest configuration.

Examples

 Given I have a context table named CUST_SAT in demo for object Customer

Delete data from composite object

Deletes data from all tables belonging to a composite object

Sentences

Type Language Sentence
Given en ^the object (.+) is empty$

Arguments

Parameter Datatype Description
composite object string The name of the composite object

Examples

 Given the object Customer is empty

Load data for composite object

Loads data into the tables that are configured for the composite object, either via step sentences or through the configuration.

Sentences

Type Language Sentence
When en ^I insert the following data for object (.+):$

Arguments

Parameter Datatype Description
composite object string The name of the composite object to insert the data for.
data to insert Table The data to load into the tables

Examples

 When I insert the following data for object Customer:
  | Id | Description    |
  | 1  | 'FirstRow'       |
  | 2  | 'SecondRow' |