本文へ移動
cccskills
無料GitHub で公開

StreamFlow Testing

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.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md2.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

StreamFlow Testing Skill

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

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

This skill should be used when the user asks to "update the changelog", "add a changelog entry", "write a CHANGELOG entry", or when preparing a git commit in StreamFlow that requires updating the `## [Unreleased]` section of `CHANGELOG.md`.

日本語の概要は準備中です。原文の説明を表示しています。

alpha-unito/streamflow662026年10月11日 更新

This skill should be used when the user asks to "add docstrings", "write error handling", "use naming conventions", "handle exceptions", or when writing new Python code for StreamFlow that requires docstring format, naming conventions, exception handling, or async cleanup patterns.

日本語の概要は準備中です。原文の説明を表示しています。

alpha-unito/streamflow662026年10月11日 更新

This skill should be used when the user asks to "write documentation", "add a doc page", "update RST files", "add a tutorial", or when writing or editing Sphinx RST documentation for StreamFlow.

日本語の概要は準備中です。原文の説明を表示しています。

alpha-unito/streamflow662026年10月11日 更新

This skill should be used when the user asks to "add an example", "write a tutorial", "document a new workflow example", or when creating a new worked example under `docs/source/examples/`.

日本語の概要は準備中です。原文の説明を表示しています。

alpha-unito/streamflow662026年10月11日 更新

This skill should be used when the user asks to "write a commit message", "create a commit", "format a commit", "what commit type to use", or when preparing changes for a git commit in StreamFlow. Provides commit message format, type conventions, and examples.

日本語の概要は準備中です。原文の説明を表示しています。

alpha-unito/streamflow662026年10月11日 更新

This skill should be used when the user encounters "no-untyped-def" mypy errors, asks to "fix no-untyped-def errors", "add type annotations to functions", or mentions "Function is missing a type annotation". Provides specific workflow for fixing missing type annotations while respecting forbidden type constraints.

日本語の概要は準備中です。原文の説明を表示しています。

alpha-unito/streamflow662026年10月11日 更新

alpha-unito のスキルをすべて見る

このスキルの問題を報告する