Step documentation for Database

Load 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 ([a-zA-Z0-9_@$#]+)$

Arguments

Parameter Datatype Description
dbConfig String The name of the database config
tableName String The name of the table to insert the data into
table Table The data to load into the table

Examples

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

Retrieve data from a table or view

Retrieves data from a table or view

Sentences

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

Arguments

Parameter Datatype Description
dbConfig String The name of the database config
tableName String The name of the table to retrieve the data from

Examples

When I retrieve the contents of the demo CUST_SAT table

Delete data from table

Deletes data from a table

Sentences

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

Arguments

Parameter Datatype Description
dbConfig String The name of the database config
tableName String The name of the table to delete the data from

Examples

Given the demo table CUST_SAT is empty

Add a key table to a 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 ([a-zA-Z0-9_@$#]+) in ([a-zA-Z0-9_@$#]+) for object ([a-zA-Z0-9_@$#]+)$

Arguments

Parameter Datatype Description
keyTable String The name of the key table to add to the composite object
dbConfig String The name of the database config that applies to the key table
compositeObject 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 a context table to a 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 ([a-zA-Z0-9_@$#]+) in ([a-zA-Z0-9_@$#]+) for object ([a-zA-Z0-9_@$#]+)$

Arguments

Parameter Datatype Description
contextTable String The name of the context table to add to the composite object
dbConfig String The name of the database config that applies to the context table
compositeObject 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 all tables belonging to a composite object

Deletes data from all tables belonging to a composite object

Sentences

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

Arguments

Parameter Datatype Description
objectName String The name of the composite object

Examples

Given the object Customer is empty

Load data for a 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 ([a-zA-Z0-9_@$#]+)$

Arguments

Parameter Datatype Description
objectName String The name of the composite object to insert the data for
table Table The data to load into the tables

Examples

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