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

  1. Run your workflow in the canvas at least once

  2. Look for two tabs at the top: "Workflow" and "Test"

  3. Click on the "Test" tab to view your test suite

  4. If no tests exist, you'll see options to create your first test

How to Create a Test from a Run

  1. After running your workflow, hover over the output result

  2. Look for a "Create Test" button or link near the output

  3. Click "Create Test"

  4. The test creation form will appear pre-filled with your run data

  5. Define your criteria in natural language (e.g., "output should contain a person's name")

  6. 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

  1. Look for the test panel at the bottom of the screen

  2. Click "Expand" to open the full test interface

  3. 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

  1. In the test creation form, focus on the criteria field

  2. Write criteria in natural language describing what should be true about your output

  3. 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"

  4. For advanced users: Use the expanded view to set JSON schemas instead of natural language

How to Save and Run Tests

  1. 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

  2. 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:

  1. Select any test from your test suite

  2. Review the pass/fail status and score

  3. Examine the inputs and outputs that were used

To run a test again:

  1. Select the test you want to re-run

  2. Click "Run" to execute it with the stored inputs

  3. Compare results to see if your workflow changes improved performance

To duplicate a test:

  1. Find the test you want to copy

  2. Click "Duplicate"

  3. Modify the criteria or inputs as needed for your new test scenario

To edit a test:

  1. Select the test you want to modify

  2. Click "Edit"

  3. Update the criteria, name, or description

  4. Save your changes

To delete a test:

  1. Select the test you want to remove

  2. Click "Delete"

  3. 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

  1. Test different input types: Create tests for various data formats your workflow might receive

  2. Test edge cases: Include unusual or extreme inputs that might break your workflow

  3. Test business logic: Validate that your workflow handles different business scenarios correctly

  4. 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