StreamFlow Testing

SkillDev tools

This skill should be used when the user asks to "write a test", "run tests", "add a test for", "test this function", "check test coverage", "run the test suite", or when writing pytest tests for StreamFlow features or bug fixes.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the StreamFlow Testing skill

What this skill tells your AI

The instructions your AI receives, as published by alpha-unito/streamflow in .agents/skills/testing/SKILL.md and read by ahel’s review.

Guidelines for writing and running tests in StreamFlow.

Test Commands

# Run full test suite
uv run make test

# Run a specific test file
uv run pytest tests/test_file.py

# Run a single test function
uv run pytest tests/test_file.py::test_function_name

# Run with coverage report
uv run make testcov

# Test specific connectors only
uv run pytest --deploys local,docker tests/test_remotepath.py

# CWL conformance tests
./cwl-conformance-test.sh
# Supports env vars: VERSION, DOCKER, EXCLUDE

Requirements

Most tests require external services:

ServiceUsed by
DockerMost connector tests
Singularity / ApptainerSingularity connector tests
Kubernetes (minikube)Kubernetes connector tests

All connectors are tested in CI — local runs only need the services available on the current machine.

Writing Tests

Use pytest with async support. Tests live in tests/.

New feature or bug fix: Always add a test. For bugs, write a regression test that fails before the fix and passes after.

Async test pattern:

import pytest

async def test_workflow_execution(context: StreamFlowContext) -> None:
    """Verify basic workflow execution completes successfully."""
    workflow = await build_workflow(context)
    result = await workflow.execute()
    assert result.status == "completed"

Fixture: The context: StreamFlowContext fixture is available project-wide. Import from tests/conftest.py or rely on auto-discovery.

Connector-specific tests: Use the --deploys flag to scope tests to available connectors:

uv run pytest --deploys local,docker,ssh tests/test_remotepath.py

Coverage

Coverage reports: https://app.codecov.io/gh/alpha-unito/streamflow

Run locally with uv run make testcov — generates an HTML report in htmlcov/.

See Also

  • StreamFlow Code Style skill — naming conventions and docstrings for test code
  • StreamFlow Git Workflow skill — commit message format when committing tests

Signals

GitHub stars
65
Forks
19
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
streamflow-testing
Source
github.com/alpha-unito/streamflow