Dogfooding: Test Coverage Matrix

The agent team runs 72 E2E tests across 8 test modules (79 with optional transports and signing). All tests pass in ~2.5 seconds.

Tests 1-10: Core Paths (basic.rs)

#TestTransportWhat it exercises
1sync-jsonrpc-sendJSON-RPCSynchronous SendMessage, artifact count
2streaming-jsonrpcJSON-RPCSSE streaming, event ordering, artifact metadata
3sync-rest-sendRESTREST synchronous path
4streaming-restRESTREST SSE streaming
5build-failure-pathRESTTaskState::Failed lifecycle
6get-taskJSON-RPCGetTask retrieval by ID
7list-tasksJSON-RPCListTasks with pagination token
8push-config-crudRESTPush config create/get/list/delete/verify lifecycle
9multi-part-messageJSON-RPCText + data parts, HealthMonitor agent-to-agent
10agent-to-agentRESTCoordinator delegates to CodeAnalyzer

Tests 11-20: Lifecycle (lifecycle.rs)

#TestTransportWhat it exercises
11full-orchestrationRESTCoordinator -> CodeAnalyzer + BuildMonitor fan-out
12health-orchestrationRESTCoordinator -> HealthMonitor -> all agents (3-level)
13message-metadataJSON-RPCRequest metadata passthrough
14cancel-taskRESTMid-stream cancellation via CancelTask
15get-nonexistent-taskJSON-RPCError: TaskNotFound (-32001)
16pagination-walkJSON-RPCListTasks page_size=1, no duplicates
17agent-card-discoveryRESTresolve_agent_card on REST endpoint
18agent-card-jsonrpcJSON-RPCresolve_agent_card on JSON-RPC endpoint
19push-not-supportedJSON-RPCError: NotSupported (-32003) for no-push agent
20cancel-completedRESTError: InvalidState for completed task cancel

Tests 21-30: Edge Cases (edge_cases.rs)

#TestTransportWhat it exercises
21cancel-nonexistentRESTError: TaskNotFound for fake task ID
22return-immediatelyRESTreturn_immediately client config propagation
23concurrent-requestsJSON-RPC5 parallel requests to same agent
24empty-parts-rejectedJSON-RPCValidation: empty message parts
25get-task-restRESTGetTask via REST transport
26list-tasks-restRESTListTasks via REST transport
27push-crud-jsonrpcJSON-RPCPush config CRUD via JSON-RPC (HealthMonitor)
28resubscribe-restRESTSubscribeToTask concurrent resubscription
29metrics-nonzeroAll 4 agents have non-zero request counts
30error-metrics-trackedJSON-RPCError metric increments on invalid request

Tests 31-40: Stress & Durability (stress.rs)

#TestTransportWhat it exercises
31high-concurrencyJSON-RPC20 parallel requests to same agent
32mixed-transportBothREST + JSON-RPC simultaneously
33context-continuationJSON-RPCTwo messages with same context_id
34large-payloadJSON-RPC64KB text payload processing
35stream-with-get-taskRESTGetTask during active SSE stream
36push-delivery-e2eRESTPush config set during streaming task
37list-status-filterJSON-RPCListTasks with TaskState::Completed filter
38store-durabilityJSON-RPCCreate 5 tasks, retrieve all 5
39queue-depth-metricsCumulative metrics tracking (>20 total requests)
40event-orderingJSON-RPCWorking -> artifacts -> Completed sequence

Tests 41-50: SDK Dogfood Regressions (dogfood.rs)

#TestTransportWhat it exercises
41card-url-correctJSON-RPCAgent card URL matches actual bound address
42card-skills-validBothAll 4 agent cards have name, description, version, skills, interface
43push-list-regressionJSON-RPCListTaskPushNotificationConfigs via JSON-RPC (regression for bug 11)
44push-event-classifyRESTWebhook event classifier uses correct field names
45resubscribe-jsonrpcJSON-RPCSubscribeToTask via JSON-RPC transport
46multiple-artifactsJSON-RPCMultiple artifacts per task (>=2)
47concurrent-streamsREST5 parallel SSE streams on same agent
48list-context-filterJSON-RPCListTasks with context_id filter
49file-partsJSON-RPCPart::file_bytes with base64 content
50history-lengthJSON-RPChistory_length configuration via builder

Tests 51-58: WebSocket, Multi-Tenancy & gRPC (transport.rs)

#TestTransportWhat it exercises
51ws-send-messageWebSocketJSON-RPC SendMessage over WebSocket (feature-gated)
52ws-streamingWebSocketSendStreamingMessage with multi-frame streaming (feature-gated)
53tenant-isolationJSON-RPCDifferent tenants cannot see each other's tasks
54tenant-id-independenceDirect storeSame task ID in different tenants doesn't collide
55tenant-countDirect storeTenantAwareInMemoryTaskStore::tenant_count() tracking
56grpc-send-messagegRPCJSON-RPC SendMessage over gRPC transport (feature-gated)
57grpc-streaminggRPCSendStreamingMessage over gRPC transport (feature-gated)
58grpc-get-taskgRPCGetTask after SendMessage over gRPC (feature-gated)

Note: Tests 51-52 require the websocket feature flag: cargo run -p agent-team --features websocket Tests 56-58 require the grpc feature flag: cargo run -p agent-team --features grpc

Tests 61-79: E2E Coverage Gaps (coverage_gaps.rs)

#TestCategoryWhat it exercises
61batch-single-elementBatch JSON-RPCSingle-element batch [{...}] with SendMessage
62batch-multi-requestBatch JSON-RPCMulti-request batch: SendMessage + GetTask
63batch-emptyBatch JSON-RPCEmpty batch [] returns parse error
64batch-mixedBatch JSON-RPCMixed valid/invalid requests in batch
65batch-streaming-rejectedBatch JSON-RPCSendStreamingMessage in batch returns error
66batch-subscribe-rejectedBatch JSON-RPCSubscribeToTask in batch returns error
67real-auth-rejectionAuthInterceptor rejects unauthenticated requests
68extended-agent-cardCardsGetExtendedAgentCard via JSON-RPC
69dynamic-agent-cardCardsDynamicAgentCardHandler runtime card generation
70agent-card-cachingCachingETag, If-None-Match, 304 Not Modified
71backpressure-laggedStreamingSlow reader skips lagged events (capacity=2)
72push-global-limitPush configGlobal push config limit enforcement (DoS prevention)
73webhook-url-schemePush configRejects non-HTTP webhook URL schemes (ftp://, file://)
74combined-filterListTasksCombined status + context_id filtering
75latency-metricsMetricsVerifies on_request() callback fires
76timeout-retryableRetryTimeout errors are classified as retryable
77concurrent-cancelsStress10 parallel cancel requests on same task
78stale-page-tokenPaginationGraceful handling of invalid page tokens
79agent-card-signingSigningES256 key generation, JWS sign/verify, tamper detection (signing feature)

Coverage by SDK Feature

SDK FeatureTests exercising it
AgentExecutor trait1-5, 9-14, 22, 31-36, 38, 40, 46, 49, 51-52
JSON-RPC dispatch1-2, 6-7, 9, 13, 15-16, 18-19, 23-24, 27, 29-34, 37-43, 45-46, 48-50, 53
REST dispatch3-5, 8, 10-12, 14, 17, 20-22, 25-26, 28, 32, 35-36, 44, 47
WebSocket dispatch51, 52
SSE streaming2, 4, 14, 28, 35-36, 40, 44, 45, 47
WebSocket streaming52
GetTask6, 14, 25, 35
ListTasks + pagination7, 16, 26, 37, 48, 50
CancelTask14, 20, 21
Push config CRUD8, 19, 27, 36, 43
Agent card discovery17, 18, 41, 42
ServerInterceptorAll tests (audit interceptor on every agent)
Metrics hooks29, 30, 39
return_immediately22
CancellationToken14
Error handling15, 19, 20, 21, 24, 30
Multi-agent orchestration10, 11, 12
Concurrent requests23, 31, 32, 47
SubscribeToTask resubscribe28, 45
Multiple artifacts46
File parts (binary)49
History length config50
Context ID filtering33, 48
Multi-tenancy53, 54, 55
TenantAwareInMemoryTaskStore53, 54, 55
TenantContext::scope54, 55
Batch JSON-RPC61, 62, 63, 64, 65, 66
Auth rejection (interceptor)67
GetExtendedAgentCard68
DynamicAgentCardHandler69
Agent card HTTP caching (ETag/304)70
Agent card signing (JWS/ES256)79
Backpressure / Lagged events71
Push config global limit72
Webhook URL scheme validation73
Combined status+context filter74
Metrics callbacks29, 30, 39, 75
Timeout retryability (Bug #32)76
Concurrent cancel stress77
Stale page token handling78
Agent card signing (JWS/ES256)79

Dedicated Integration Tests (Outside Agent-Team)

In addition to the 72 agent-team E2E tests (79 with optional transports and signing), the SDK includes dedicated integration test suites:

SuiteLocationTestsWhat it covers
TLS/mTLScrates/a2a-client/tests/tls_integration_tests.rs7Client cert validation, SNI hostname verification, unknown CA rejection, mutual TLS
WebSocket servercrates/a2a-server/tests/websocket_tests.rs7Send/stream, error handling, ping/pong, connection reuse, close frames
Memory & load stresscrates/a2a-server/tests/stress_tests.rs5200 concurrent requests, sustained load (500 requests/10 waves), eviction under load, multi-tenant isolation (10×50), rapid connect/disconnect

Features NOT Covered by E2E Tests

All previously uncovered features now have E2E test coverage. Agent card signing is covered by test 79 (#[cfg(feature = "signing")]).