What is Workflow Testing?
Workflow Testing in Xano allows you to quickly build sets of tests that you can use to make sure a specific flow is working as expected. You can think of a ‘flow’ as a set of separate actions, such as multiple APIs that a user might hit when utilizing your application, or data processing across multiple function stacks. Workflow Testing allows you to validate these sets or flows with a single click and get instant visibility into your backend functionality.How do I build workflow tests?
From the left-hand navigation menu, choose Library > Workflow Tests


Function Name | Use Case |
---|---|
Run API Endpoint | Sends a request to one of your API endpoints and returns the result |
Run Addon | Runs an addon |
Run Function | Runs a custom function and returns the result |
Run Middleware | Runs a middleware and returns the result |
Run Trigger | Runs a trigger and returns the result |
Run Task | Runs a background task and returns the result |
Test Expressions
Test Expressions are functions used typically in conjunction with a Run Stack to determine if the output of a Run Stack is valid.Function Name | Use Case |
---|---|
Expect a variable to be defined Expect a variable to not be defined | Checks to see if a variable has been defined. Example: You have an API that returns a user object with a name key inside of it. You can use this to check if user.name is defined. |
Expect variable to be empty | Checks to see if a variable exists, but is empty. Example: You are calling an external API that is used to process data. If the API call is successful, you know that response.result is empty because the API just returns a status code informing you that the job is being processed. |
Expect variable to be false Expect variable to be true | Checks to see if a variable with a boolean data type is returning false or true |
Expect variable to be greater than Expect variable to be less than Expect variable to equal Expect a variable to not equal Expect variable to be within | Checks to see if a variable matches the specific condition, such as >, <, =, or is within a certain range. |
Expect variable to be null | Checks to see if a variable contains a null value |
Expect variable to start with Expect variable to end with | Checks to see if the value inside of a variable starts or ends with a specific value |
Expect function to throw | Checks a function to see if it throws an error |
Expect function to match | Checks to see if the output of a variable matches a regular expression |
Using Workflow Tests
In this example, we’ve built a workflow test to make sure our login flow works as expected.


- We have 38% coverage. This means that out of all of the function stacks that exist across our backend, 3/8 of them are used in our tests.
- We have 50% success. This means that out of all of our workflow tests, half of them are successful.
- To run all of our tests takes less than a second.

Additional Information
- Click the settings icon next to a workflow test to clone or delete it.
- When adding a Run Stack, you can click theOpen icon to open that function stack being tested in a new window or tab and quickly make changes.
- When you test a function stack that currently is in draft mode, your workflow test will run the drafted version.
- You can change the data source that all of your workflow test’s functions run against by clicking the Live button at the top of the workflow test function stack.
Databases in Workflow Tests

Selecting a Data Source for a Workflow Test