Get Help

Tests

Learn how to create, edit, run, and manage automated tests in CAT Studio.

Tests Page Structure

Tests page displays quite a lot of things. In general, the page is split to two parts - left contains list of tests and right detail of one test.

There is a splitter between the two, you can choose whether you focus on list of tests or on detail of one of them.

On the left list of tests, on the right detail of a test

List of Tests

List of tests has this structure:

Toolbar, followed by grid with tests, progressbar and statistics

The toolbar contains action related to more tests.

The data grid with list of tests is very advanced. Try to right click header of any column - there is lots of magic. Searching, sorting based on more columns, filtering, columns chooser, grouping, custom filters and much more.

Below the grid there is a progress bar and statistics about the last run. When you don’t run all tests in your project, the total does NOT correspond with number of tests in your project.

On the right side, you see how many tests in total you have in your project. (Project, 337 on the picture). This is total number of tests in your project and is not affected by filtering in the grid.

Running Tests

The run button in the toolbar of the test list has two modes, chosen in its dropdown:

  • Run All (F9) - runs every test in the project.

  • Run Selected (F8) - runs the tests checked in the grid, or the focused test when nothing is checked.

The same dropdown holds the settings that narrow the run down further:

Include only tests with tags
Only tests carrying at least one of the chosen tags are run. The dropdown offers the tags used in the project.
Exclude tests with tags
Tests carrying any of the chosen tags are skipped. This combines with the include list and with the checked tests - a test has to satisfy all the conditions to run.
Generate outputs
When switched off, the run does not write any of the Outputs defined in the project. Results are still displayed in CAT Studio.

On the Starter plan, each test that ends in Passed or Failed uses one of your 500 checks per day. When a run needs more checks than are left, the tests beyond them end Inconclusive and a Plan limit reached dialog says how many were not evaluated and when the limit resets. When none are left, the same dialog appears before the run, the run does not start and the results of your last run stay. Upgrade Plan in the dialog opens the upgrade page in your browser; the Team plan has no daily limit.

Focused Test Details

Test detail part is split to two tabs:

  • Query tab - it contains one or two queries and your expectation about results
  • Test tab - attributes of test that you built on top of the query/queries - such as test name, categorization etc. It also contains result of last test run.

Two tabs, named “Query” and “Mandatory columns sys_ingested_at in table aodb_gates”

Query Tab

On Query Tab you need to specify one or two queries and what you expect from them.

Query tab contains these parts:

Query Tab split to 5 parts

Expectation
Here you set what do you expect from the query. Should it return nothing? Should the result be the same as result of another query? See Expectations. Depending on expectation you select, additional settings may appear. If you are just starting wiht CAT, the defaults should be OK for you. For details, see documentation of the selected expectation. Some expectations require two queries (sets match, first contains second, second contains first) - in this case CAT Studio displays two queires on the query tab. Tolerance, Tolerance Mode, Maximum Errors Logged and Log Number of Errors appear when Show all test properties is on in Settings, or when they hold a value.
Query Toolbar
On the left, there is a dropdown for selecting data source. Query will be run against the selected data source. When creating new tests, CAT automatically adds the first one in your project. When you have more data sources, pay attention to this dropdown. The last item of the dropdown is Entered data: it is in every project, see Entered Data below. There is also a button for running the query.
Query Editor
Here you can edit your query (SQL, DAX, MDX - depends on what data source you are querying). At the moment, there is no smart autocomplete or intellisense in place, just syntax highlighting (SQL).
Query Results
The results of your query. You can use advanced grid features - right click any column header to see options you have. Remember the query results are kept in memory - the editor is not yet designed to work with millions of rows. Tip: you can save your project and reload it - this way you get rid of any datasets you don’t work with.

Entered Data

When a test compares a query with a few values you know, the values need no database. Pick Entered data as the data source and the query holds the rows themselves: the first line the column names, then one line per row, values separated by commas. In the project file, and in the other CAT tools, this data source is named EnteredData, in one word; that is what CAT Studio writes when you pick it. How CAT reads that text is on the Entered data page.

With Entered data picked, a grid takes the place of the editor and of the query results, and Run Query is off for that query: its rows are the query, there is nothing to run. In a test with two queries, the other query keeps its editor, its Run Query and its results beside the grid. Pick another data source and the editor comes back, holding the text the grid wrote. A new test starts on Entered data only when the project has no data source of its own.

You do not write the text yourself, and there is no button to press: every edit in the grid writes the rows into the query, and the project is changed like by any other edit, so Save is the moment they are stored. For a moment after you pick Entered data the grid shows “Loading…” while it starts.

  • The first row of the grid holds the column names. Type into a cell to replace it, F2 or a double-click edits it, Esc gives up, Alt+Enter adds a line break to the value. Enter moves down, Tab right, Shift with an arrow selects a block, and a click on a row number selects the row.
  • The grey row and the grey column at the end are new: type there and they become part of the table.
  • Delete empties the selected cells, Ctrl+C, Ctrl+X, Ctrl+V and Ctrl+Z work as you know them. Right-click a row number to insert or delete rows, a column name to insert or delete columns, a cell for both; Shift+F10 opens the same menu for the selected cell.
  • Paste a range copied from Excel, SSMS or another tool. Pasted into an empty grid, its first row names the columns. Under the grid, Split by says how the text was split (tab, comma, semicolon, | or none) and lets you pick another.
  • First row as headers, under the grid beside Undo, switched off turns the column names into the first row of values; switched on again, the first row becomes the names.

The grid reads numbers and dates the way your Windows regional format writes them, so a Czech machine takes 1,5 and 3.4.2026, a US one 1.5 and 4/3/2026. A paste of comma-separated text, such as the output of catcli exec --format csv, is read the way CAT reads entered data instead: a dot for decimals, dates as 2026-04-03, a value in quotes is text.

A badge on each column name says how CAT will read the column: whole number, decimal, date, true/false, text or variable. Click it to keep the column text, so 10 stays a text and not a number; click it again to let CAT decide. A single value starting with ' is text too, and makes its whole column text: '10. A cell left empty is NULL; "" is an empty text.

A cell that holds only an environment variable, such as %LIMIT%, is written as you typed it, so CAT reads what the variable holds when the test runs, as if you had typed that. If the value of the variable has a comma, a quote or a line break in it, the row breaks when the test runs and the run reports which line CAT could not read. A variable inside a longer value, ID-%ENV%, is just text.

Problems, such as a column name used twice, are shown under the grid. The rows are written all the same, and a run of the test reports the problem, as for any query CAT cannot read.

If the query already holds a text CAT cannot read, for example one written in the project file by hand with another separator in it, the grid opens it as if you had just pasted it: split by what it detects, with Split by to pick another way. Nothing is changed until you edit.

The first time you pick Entered data in a project that uses no entered data yet, a note above the grid says that entered rows are saved in the project file and go wherever the file goes, source control and colleagues included, so do not enter data that must not leave your machine. Once you close the note, a warning icon under the grid carries the same text from then on in that project.

A test generated from a template, or one in a list CAT Studio cannot write to, shows its rows in a read-only grid: you can select and copy them, nothing else.

Test Tab

On test tab, you automate your test. Here you give the test a name, description, categorization info, tags etc. It also contains the results of the test.

Tab with lots of information about the selected test

Detail Info About Test
Give the test a short descriptive name. Optionally add tags separated by comma or semicolon. Fill description with information why the test exists and what to do when it fails.
Categorization
CAT organizes test into this hierarchy: Test Suite -> Test Case -> Test. The order setting is metadata only - CAT does NOT use it for ordering the tests when you run them. These fields appear when Show all test properties is on in Settings, or when they hold a value.
Other Test Settings
Timeout is total time in seconds for CAT to try retrieving results of query or queries, before it stops trying and ends the test with error timeout. In test results, CAT provides examples of erroneous data. By default it does not display lengthy strings there - long strings are truncated if they are longer than 25 characters - you can change this behavior using the “Maximum Sample Column Length” setting. These fields appear when Show all test properties is on in Settings, or when they hold a value.
Test Result
The result of the test - whether it passed, failed or ended up with an error. The result of a test with failed or error results contains descriptive information about the findings.
Status Bar
Shows statistics about the test execution, such as execution time.

Query, Test - But What is the Difference?

There is a difference when running your query and when running your test. Those are two different actions triggered by two different buttons. The difference might seem confusing.

You run the query to check what it returns. You do it when you are authoring or tuning a test or troubleshooting a failed test. This just returns to the grid the result of the query, as is. Just like in DBeaver, SSMS or other tool.

You run the test to verify your expectation in automated way. You usually run many test at once. This does NOT return the result of the query as is. CAT is trying to check whether your expectation is met and return sample of problematic rows. CAT does not even have to read all the query results if it spots problems earlier.

Simply said - on query tab, you get raw result of the query. On test detail tab, you get result of what you are testing.