Skip to main content

Variables and datasets

info

Before you start.

The Variables tab​

Declared run variables (Name, Written by), Declare Variables button, VARIABLE RESOLUTION table, Save variables button.

Declared run variables (Name, Written by), Declare Variables button, VARIABLE RESOLUTION table, Save variables button.

Purpose: declare {{run.x}} variables and see who writes/reads them.

ElementSource / optionsFunction & result
"About variables" panel + REFERENCE SOURCES—Summary of the four reference kinds (env, run, secret, local). baseUrl is reserved.
Declared run variables (required)You enter + automaticTable with columns Name (input) and Written by (automatic, e.g. "TC-14 · Extract", "TC-18 · Setup": who writes the variable). Counter "3 of 3". Empty: "No run variables declared".
Declare Variables (button)—Adds a new declaration row (not "Add variable").
Undeclared referencesAutomaticVariables used but not declared → publish will fail.
VARIABLE RESOLUTIONAutomaticReference table: Reference (e.g. {{run.cursor}}), Declared (Yes/No), Read by (reading cases) and so on. Used to check that every reference is declared.
Overrides (note)—Env vars and run vars without a writer can be overridden at Run; secrets cannot.
Save variables—Saves the declarations into the draft.
Conflict: Reload latest & re-apply my edits / Discard my editsAppears when the revision changedLoad the latest version and re-apply your edits, or discard your edits.

The Datasets tab​

Example collection with datasets: Dataset column (name + file type CSV/JSON/INLINE) and Type column (ROW + row count).

Example collection with datasets: Dataset column (name + file type CSV/JSON/INLINE) and Type column (ROW + row count).

Datasets tab: + Retrieve from an external source button, Show filter (ALL), Refresh, Dataset / Type / Origin table and DEFINITIONS table.

Datasets tab: + Retrieve from an external source button, Show filter (ALL), Refresh, Dataset / Type / Origin table and DEFINITIONS table.

Purpose: manage the data cases may use. This is not where you upload: files are submitted from Source → Submit to API Tests Dataset.

ElementSource / optionsFunction & result
Dataset columnAutomaticDataset name + file type underneath (CSV, JSON, INLINE, …).
Status, Used by, Actions columnsAutomaticStatus "Ready". Used by = list of using cases (e.g. "TC-02", "TC-01, T…"). Actions = trash icon (delete); disabled while a case still uses the dataset.
Type columnROW or DOCUMENTROW = data rows; DOCUMENT = text/log. File kinds: CSV, JSON, INLINE, XLSX, XLS, LOG, TXT, YAML, WSDL, XML, XSD.
Origin / fetch columnAutomaticWhere the dataset came from: a Source file, or "Now · environment" / "During each run" when fetched from an external source. The At runtime tag = fetched every run.
File unavailable tagAutomaticThe source file is gone (e.g. "Source not found in this project").
Read as definition / Definition / Reading…For OpenAPI/WSDL/Postman documentsReads the file as an API definition. The result feeds automatic assertion suggestions and field-name validation. Shows Reading… while processing.
Rename dataset iconDialog + Dataset nameRenames.
Delete dataset iconConfirmationDeletes; blocked while a case still binds it (e.g. a layout spreadsheet).
Retrieve from an external source (dialog)—Pulls a document from an outside server into a Document dataset. Fields below.
— Dataset nameYou enterName of the resulting dataset.
— External sourceFrom the "name · connector" listThe source used.
— Retrieve"During each case's run" (RUNTIME) or "Now"RUNTIME: the document is fetched after each request using that run's environment & variables. Now: the server fetches immediately, saves it to Source, then attaches it to the dataset.
— Saved commandFrom the commands saved on the external sourceThe command executed on the server.
— Environment (Now mode)From the configured serversThe environment used when fetching now.
— Wait secondsYou enterDelay before fetching (wait for the log to be written).
Show dropdown (default ALL)Choice of viewFilters the dataset list. The Refresh button next to it reloads.
DEFINITIONS table (columns Name, Type, Ops)AutomaticList of API definitions (OpenAPI/WSDL/Postman/Inferred) already read. The count is shown in the title ("DEFINITIONS 0").

Definitions​

A definition describes an API's operations so the product can suggest assertions, check generated tests and validate field names. The DEFINITIONS table of the Datasets tab lists them with the columns Name, Type, Operations and Status; the Type is OpenAPI, WSDL, Postman or Inferred.

ElementFunction & result
Read as definition on a Document datasetReads an OpenAPI/WSDL/Postman file as a definition. Status goes Reading… → Definition. Empty list: "No definitions yet."
Open a definitionShows each Operation with Request fields and Response fields (Path, Type, Required, Detail) and the response Success, Errors and Links. Very large definitions say "This definition is large; field details are omitted." Close definition closes the view.
Inferred definitionBuilt from a pasted sample response ("Inferred from a pasted sample response"); see below.

Inferred definitions (Create definition from response)​

In a case's Request tab, paste a JSON/XML response into Sample response and click Create definition from response. The status shows Operation · not confirmed until you confirm it. Only field names, types and your marks are kept; the response itself is not stored.

ControlFunction & result
Operation nameName of the operation being described.
Fields table (Path, Type, Required, Max length, Role, Detail)Every field found in the sample. Role marks what a field means, for example the status field, an echo of a request field (Echo of…) or a field to check (Check this field).
Status field + Success values, comma separatedExactly one Status field with success values is needed before the operation can be confirmed.
Suggestions: Accept / Dismiss / Accept all / Dismiss allThe product suggests marks. "No suggestions pending" when there are none. Suggestions work on the saved version, so save first.
Read from spec sheet: Spreadsheet, Sheet, Header row, Field column (name or letter), Required column, Max length column, Read sheetFills Required and Max length from a spreadsheet. Name the Required column, the Max length column, or both.
Save changes, Confirm operationConfirming makes the operation read-only: "Confirmed operations are read-only; paste a new sample to change one."
Move to definition / Stay in this definitionAsks whether to keep working in the inferred definition or move the operation into the definition list.
Close operationCloses the editor.