Testing and Development
Overview
AdCP servers support time simulation and dry run capabilities to enable comprehensive testing of advertising workflows without waiting for real-time events or spending actual budgets.Test Agent for Development
AdCP provides a public test agent with free credentials for development and testing: Agent URL:https://test-agent.adcontextprotocol.org
Free Test Credentials:
For MCP Protocol:
- Test authenticated operations
- Practice integration patterns
- Validate request/response structures
- Develop and debug client implementations
Protocol Compliance Testing
Use the AdCP Protocol Test Harness to validate your implementation’s compliance with the AdCP specification. This interactive tool allows you to test all AdCP tasks and verify correct behavior across different scenarios.Testing Modes
Dry Run Mode
Execute all operations without affecting real platforms or spending money:- No real platform API calls are made
- No actual money is spent
- Responses indicate test mode is active
- All operations return simulated but realistic results
Time Simulation Mode
Control simulated time to instantly progress through campaign events:X-Mock-Time: Set current simulated timeX-Auto-Advance: Auto-advance to next eventX-Jump-To-Event: Jump to specific campaign event
Request Headers
Testing Control Headers
Response Headers
Servers include these headers in test mode responses:Event Progression
Jumpable Events
UseX-Jump-To-Event to jump to specific campaign lifecycle events:
Lifecycle Events:
campaign_created- Initial setup completecampaign_approved- Ready for creative submissioncreative_approved- Ready for launchcampaign_launched- Live delivery beginscampaign_50_percent- Halfway through schedulecampaign_completed- Natural end reached
creative_policy_violation- Force creative rejectionbudget_exceeded- Simulate overspendinventory_unavailable- Simulate inventory shortagemanual_approval_delay- Add HITL approval delay
Time Advancement
Jump forward by duration:Testing Examples
Example: Testing Creative Rejection
Example: Testing Time Progression
Testing Patterns
Pattern 1: Happy Path Testing
Test successful campaign flows without forcing errors:Pattern 2: Error Recovery Testing
Test error handling by jumping to error events:Pattern 3: Time-Based Testing
Test long-running campaigns quickly:Pattern 4: Parallel Testing
Test multiple campaigns in isolated sessions:Implementation Requirements
Core Requirements
All AdCP implementations MUST support:-
Dry Run Mode
X-Dry-Runheader recognition- No side effects on production systems
- Clear indication of test mode in responses
-
Test Session Isolation
X-Test-Session-IDfor parallel test isolation- Independent state per session
- No cross-session interference
-
Basic Time Control
X-Mock-Timefor setting simulated timeX-Jump-To-Eventfor event progression- Consistent state across time jumps
Recommended Features
Implementations SHOULD support:-
Auto-Advancement
X-Auto-Advancefor automatic progressionX-Advance-Timefor duration-based jumps
-
Error Events
- Jump to error states via
X-Jump-To-Event - Common error events (policy violations, budget issues)
- Recovery testing
- Jump to error states via
Optional Features
Implementations MAY support:-
Advanced Testing
- Custom event definitions
- Complex error injection
- Performance simulation
-
Detailed Metrics
- Realistic performance curves
- Industry benchmark simulation
- Cost modeling
Security Considerations
- Test modes MUST be completely isolated from production
- Test mode operations should be logged separately
- Authentication is still required in test mode
- Rate limits apply (potentially with different thresholds)
Summary
AdCP testing features enable:- Rapid Development - Test full lifecycles in seconds
- Comprehensive Testing - Cover all scenarios deterministically
- Zero Cost - No real money spent on testing
- Isolation - Complete separation from production