Agent skill

chain-tester

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/chain-tester

SKILL.md

Chain Tester

Templates for testing node chains with real nodes.

Testing Tiers

Tier Nodes Complexity Marker
Simple 2-3 Linear (none)
Complex 5-10 Branching (none)
Full 10+ Multi-branch @pytest.mark.slow

WorkflowBuilder API

python
from tests.nodes.chain.conftest import WorkflowBuilder

chain = WorkflowBuilder() \
    .add(StartNode(), id="start") \
    .add(SomeNode(param="value"), id="action") \
    .add(EndNode(), id="end") \
    .connect_sequential() \
    .build()

Simple Chain Template

python
@pytest.mark.asyncio
async def test_basic_linear_chain(chain_executor):
    chain = WorkflowBuilder() \
        .add(StartNode(), id="start") \
        .add(SetVariableNode(name="x", value=42), id="set") \
        .add(EndNode(), id="end") \
        .connect_sequential() \
        .build()

    result = await chain_executor.execute(chain)

    assert result.status == ExecutionStatus.COMPLETED
    assert result.context.variables["x"] == 42

Assertion Patterns

python
# Status assertions
assert result.success is True

# Variable assertions
assert result.final_variables["output"] == expected_value

# Execution assertions
assert "node_id" in result.nodes_executed

# Error assertions
assert len(result.errors) > 0

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results