Working with data tables
This topic describes how to create, populate, and update data tables.
Create a data table
The section describes how to create a data table with several data sets.
To create a data table, use the following API:
POST .../api/shared_spaces/<space_id>/workspaces/<workspace_id>/test_data_tables
The following table describes the payload for the API.
Argument | Description |
---|---|
name | The name of the data table. |
data |
The json object that contains the data.
|
The following guidelines apply:
- The data sets will only hold values for parameters that appear in the parameter's property.
- If the parameter's property is not provided, if it is empty, or if it contains names other than the ones used in the data sets, the values of the undeclared parameters in the data sets will be empty.
Sample data sets
{ "data": [ { "name": "graphics", "data": { "parameters": [ "color", "shape", "size" ], "data_sets": [ { "name": "primary", "iterations": [ { "color": "red", "shape": "circle", "size": "small" }, { "color": "blue", "shape": "rectangle", "size": "medium" } ] }, { "name": "secondary", "iterations": [ { "color": "green", "shape": "triangle", "size": "large" }, { "color": "yellow", "shape": "hexagon", "size": "small" } ] } ] } ] }
Assign a data table to a test
The section describes how to assign a data table to a test.
To assign a data table, use the following API:
PUT …/api/shared_spaces/<space_id>/workspaces/<workspace_id>/tests/<test_id>
The following table describes the payload for the API.
Argument | Description |
---|---|
id | The test ID. |
test_data_table |
The data table reference.
|
Update a data table
The section describes how to update an existing data table.
To update a data table, use the following API:
PUT .../api/shared_spaces/<space_id>/workspaces/<workspace_id>/test_data_tables/<data_table_id>
The following table describes the payload for the API.
Argument | Description |
---|---|
id | The ID of the data table. |
data |
The json object that contains the data.
|
See also: