Midio docs
  • Getting Started
    • Welcome
    • Quick Start Guide
  • Your First Midio App
  • Guides
    • HTTP
      • Making HTTP Requests
      • Responding to HTTP Requests
      • How to reach your own endpoints
      • CORS
      • Server-Sent Events (SSE)
    • Branching
    • Loops
    • Map, filter, reduce
    • Working with Data
    • Expressions
    • Building Agents
      • Streaming Agent API (experimental)
    • Debugging
    • Secrets and Environment variables
    • Convert JSON to data nodes
    • Writing tests
    • Cleaning up your flows
  • Package Manager
  • Integrating with third party services
  • Troubleshooting
  • Tutorials
    • Connecting LLMs to MCP-servers using the MCP-client package
    • Making Your Own MCP Server in Midio
    • A Fast Path to Functional RAG Agents
    • How to build a streaming agent using Server-Sent Events (SSE)
  • Reference
    • The Midio Editor
      • The Node Editor
      • User Traces
      • Traces (execution)
      • Processes
      • Log
      • Services
      • Problems
      • Function Signature
      • Data
      • Settings
    • The Midio Language
      • Nodes and execution
      • Functions and Events
        • Anonymous functions
      • Modules
      • Contexts
      • Data type
      • Local variables
      • Portals
      • Waypoint node
      • Partial function application
  • The Midio Engine
  • Built in Nodes
    • Core (std)
    • HTTP
    • LLM
Powered by GitBook
On this page
  • Adding a new test
  • Assertions
  • Tips

Was this helpful?

Edit on GitHub
  1. Guides

Writing tests

PreviousConvert JSON to data nodesNextCleaning up your flows

Last updated 1 month ago

Was this helpful?

Adding a new test

Midio comes with a simple interface for writing and running tests, found in the module.

To add a test, first add a event node, and give it a name.

If you open the 'Services' panel and click the 'refresh services list' button, you will get a new item called Testing. Click it to get an overview of all your tests, and buttons to execute them.

Assertions

The Testing module contains several functions which can be used to perform assertions during a test, like Testing.AssertEqual. These functions can only be used in the context of a test, and will report to the testing service whether they pass or fail.

You can then click on the Run all button to run all tests, or the individual Run buttons to run a single test at a time.

Tips

Clicking on a test in the services panel will make the editor jump directly to where that test is defined.

Testing
Testing Test