Modern QA2026Surface 2: Testing A2A Flows — tiles
Log inJoin
102 / 108 · 03 Agentic Testing Architectures · Testing Agentic Systems: MCP, A2A, and Agent Evals← prev⊞ allnext →☰ Read as one page

14.3Surface 2: Testing A2A Flows

A2A (Agent-to-Agent) standardizes how agents from different vendors and runtimes discover and delegate to each other: an agent card advertises capabilities, and a task lifecycle (submitted → working → input-required → completed/failed) structures the exchange. Test it like a stateful API:

def test_agent_card_advertises_contracted_capabilities(a2a_client):
    card = a2a_client.get_agent_card("https://triage-agent.internal")
    skill_ids = {s.id for s in card.skills}
    assert "classify_bug_report" in skill_ids
    assert card.capabilities.streaming is True

def test_task_lifecycle_happy_path(a2a_client):
    task = a2a_client.send_task(
        agent="https://triage-agent.internal",
        message="Classify: 'checkout button unresponsive on mobile Safari'",
    )
    final = a2a_client.wait_for_terminal_state(task.id, timeout=60)
    assert final.state == "completed"
    assert final.artifacts, "Completed task must return an artifact"

def test_delegation_failure_propagates_cleanly(a2a_client, dead_downstream):
    """When the downstream agent is unreachable, the orchestrating agent
    must fail the task -- not silently answer from its own guesswork."""
    task = a2a_client.send_task(
        agent="https://orchestrator.internal",
        message="Route this to the triage specialist",
    )
    final = a2a_client.wait_for_terminal_state(task.id, timeout=60)
    assert final.state == "failed"
    assert "triage" in final.status_message.lower()

The last test is the one teams skip and regret. Multi-agent systems degrade plausibly: when a specialist is down, the orchestrator often fabricates a substitute answer. Your negative tests must pin down what "correct failure" looks like at every delegation edge -- the same error-propagation discipline from Communication Protocols, applied across organizational boundaries.