Skip to main content
The CLI provides commands for running both unit tests and workflow tests, letting you validate your backend logic directly from the terminal.
Test commands require a workspace ID, either from your profile or via the -w flag.

Unit Tests

Unit tests validate individual functions and logic blocks.

List Unit Tests

Terminal
xano unit_test list
Filter by branch or object type:
Terminal
xano unit_test list --branch dev --obj-type function

Run a Unit Test

Terminal
xano unit_test run UNIT_TEST_ID

Run All Unit Tests

Terminal
xano unit_test run_all
Filter by branch or object type:
Terminal
xano unit_test run_all --branch dev --obj-type function

Workflow Tests

Workflow tests validate end-to-end backend logic by running test suites.

List Tests

Terminal
xano workflow_test list
Filter by branch with -b:
Terminal
xano workflow_test list -b dev
Use -o json for the full JSON response.

Get Test Details

Terminal
xano workflow_test get TEST_ID
FlagDescription
--include-draftInclude the draft version of the test
-oOutput format: summary, json, or xs (XanoScript source)

Run a Test

Terminal
xano workflow_test run TEST_ID

Run All Tests

Run every workflow test in the workspace:
Terminal
xano workflow_test run_all
Filter by branch with -b:
Terminal
xano workflow_test run_all -b dev

Delete a Test

Terminal
xano workflow_test delete TEST_ID
Add -f to skip the confirmation prompt.