Tests
Build reliable workflows by creating automated tests that validate your outputs against specific criteria. Tests help ensure your workflows perform consistently across different inputs and edge cases.
Overview
Tests allow you to validate workflow outputs automatically by defining criteria that must be met for a test to pass. When you create a test, Lleverage saves the inputs from your run and can replay them to check if your workflow still meets your requirements after making changes.
Key features:
Automatic input capture from workflow runs
Natural language criteria definition
Pass/fail scoring with 90%+ threshold for passing
Test suite management for multiple scenarios
Edge case validation for complex workflows
How to Access Tests
Run your workflow in the canvas at least once
Look for two tabs at the top: "Workflow" and "Test"
Click on the "Test" tab to view your test suite
If no tests exist, you'll see options to create your first test
How to Create a Test from a Run
After running your workflow, hover over the output result
Look for a "Create Test" button or link near the output
Click "Create Test"
The test creation form will appear pre-filled with your run data
Define your criteria in natural language (e.g., "output should contain a person's name")
Save the test to add it to your test suite
💡 Tip: Tests automatically capture and store the inputs from your original run, so you can replay the exact same scenario multiple times.
How to Expand Test View
Look for the test panel at the bottom of the screen
Click "Expand" to open the full test interface
In expanded view, you can:
Set detailed schemas instead of just natural language criteria
Add custom names and descriptions for your tests
Access advanced test configuration options
How to Configure Test Criteria
In the test creation form, focus on the criteria field
Write criteria in natural language describing what should be true about your output
Examples of good criteria:
"The extracted PDF text should contain a person's name"
"The output should include at least 3 bullet points"
"The response should be under 500 words"
For advanced users: Use the expanded view to set JSON schemas instead of natural language
How to Save and Run Tests
After configuring your test, choose one of two options:
Save: Stores the test without running it immediately
Save & Run: Stores the test and executes it right away
If you choose "Save & Run", you'll see:
Real-time execution of the test
A score out of 100 (90%+ is passing, below 90% is failing)
Detailed results showing what passed or failed
How to Manage Existing Tests
To view test results:
Select any test from your test suite
Review the pass/fail status and score
Examine the inputs and outputs that were used
To run a test again:
Select the test you want to re-run
Click "Run" to execute it with the stored inputs
Compare results to see if your workflow changes improved performance
To duplicate a test:
Find the test you want to copy
Click "Duplicate"
Modify the criteria or inputs as needed for your new test scenario
To edit a test:
Select the test you want to modify
Click "Edit"
Update the criteria, name, or description
Save your changes
To delete a test:
Select the test you want to remove
Click "Delete"
Confirm the deletion
⚠️ Important: Tests use the inputs from your original run. If you want to test different inputs, create a new test or duplicate an existing one and modify it.
How to Build Comprehensive Test Suites
Test different input types: Create tests for various data formats your workflow might receive
Test edge cases: Include unusual or extreme inputs that might break your workflow
Test business logic: Validate that your workflow handles different business scenarios correctly
Run all tests together: Execute your entire test suite to ensure all scenarios still pass after making changes
💡 Best Practice: For complex business processes, create multiple tests with different inputs to ensure your workflow handles all possible scenarios reliably.
Understanding Test Results
Score above 90%: Test passes ✅
Score below 90%: Test fails ❌
Detailed feedback: Each test provides specific information about what passed or failed
Input/Output review: See exactly what data was used and what was produced
Tests are essential for maintaining workflow reliability, especially when making changes or handling complex business processes with varied input types.
Last updated