Testing Your VoP Integration
Quick Test Your Setup
Section titled “Quick Test Your Setup”1️⃣ Check Service is Running
Section titled “1️⃣ Check Service is Running”curl https://localhost:8443/health
Expected: {"status": "healthy"}
2️⃣ Test Basic Verification
Section titled “2️⃣ Test Basic Verification”curl -X POST https://localhost:8443/api/v1/verify \ --cert client.crt --key client.key \ -H "Content-Type: application/json" \ -d '{ "iban": "DE89370400440532013000", "name": "John Smith" }'
Expected: {"result": "MATCH", "confidence": "HIGH"}
3️⃣ Test Web Interface
Section titled “3️⃣ Test Web Interface”Visit: https://localhost:8443/test
- Enter test data
- Click “Verify”
- See instant results
Built-in Test Cases
Section titled “Built-in Test Cases”Your VoP service comes with 131+ pre-built test cases covering all European banking requirements.
🧪 Run All Tests
Section titled “🧪 Run All Tests”# Test everything (takes ~2 minutes)make test-epc-https
Expected output:
✅ Positive Tests: 48/48 passed✅ Error Handling: 41/41 passed✅ Security Tests: 42/42 passed📊 Success Rate: 100%
🎯 Test Specific Scenarios
Section titled “🎯 Test Specific Scenarios”Test successful verification:
curl -X POST https://localhost:8443/api/v1/verify \ -H "Content-Type: application/json" \ -d '{ "iban": "DE89370400440532013000", "name": "Max Mustermann" }'
Test fraud detection:
curl -X POST https://localhost:8443/api/v1/verify \ -H "Content-Type: application/json" \ -d '{ "iban": "DE89370400440532013000", "name": "Wrong Name" }'
Test invalid IBAN:
curl -X POST https://localhost:8443/api/v1/verify \ -H "Content-Type: application/json" \ -d '{ "iban": "INVALID123", "name": "John Smith" }'
Interactive Testing
Section titled “Interactive Testing”🌐 Web Testing Interface
Section titled “🌐 Web Testing Interface”URL: https://localhost:8443/test
Features:
- ✅ Pre-loaded test cases - Click and test instantly
- ✅ Custom test data - Enter your own IBAN/name combinations
- ✅ Real-time results - See verification results immediately
- ✅ Error simulation - Test how your app handles errors
📱 Test Categories
Section titled “📱 Test Categories”- ✅ Valid Matches - Names that should match
- ❌ Fraud Cases - Names that should be blocked
- ⚠️ Partial Matches - Close matches needing review
- 🚫 Error Cases - Invalid data and system errors
Testing Your Integration
Section titled “Testing Your Integration”JavaScript Example
Section titled “JavaScript Example”// Test your integration codeasync function testVoP() { try { const response = await fetch('/api/v1/verify', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ iban: 'DE89370400440532013000', name: 'John Smith' }) });
const result = await response.json(); console.log('VoP Result:', result);
// Test your business logic if (result.result === 'MATCH') { console.log('✅ Payment should proceed'); } else if (result.result === 'NO_MATCH') { console.log('❌ Payment should be blocked'); } } catch (error) { console.log('🚫 Handle error:', error); }}
Python Example
Section titled “Python Example”import requests
def test_vop(): response = requests.post('https://localhost:8443/api/v1/verify', json={ 'iban': 'DE89370400440532013000', 'name': 'John Smith' } )
result = response.json() print(f"VoP Result: {result}")
# Test your business logic if result['result'] == 'MATCH': print('✅ Payment should proceed') elif result['result'] == 'NO_MATCH': print('❌ Payment should be blocked')
Test Checklist
Section titled “Test Checklist”✅ Before Going Live
Section titled “✅ Before Going Live”- Health check passes - Service is running
- Basic verification works - Can verify valid names
- Fraud detection works - Blocks invalid names
- Error handling works - Handles invalid IBANs gracefully
- Certificate authentication works - Secure API access
- Your integration handles all response types - MATCH, NO_MATCH, PARTIAL_MATCH, ERROR
🔒 Security Testing
Section titled “🔒 Security Testing”- HTTPS only - No unencrypted connections
- Client certificates required - Authentication works
- Rate limiting works - Service protects against abuse
- Error messages don’t leak sensitive data
Common Test Issues
Section titled “Common Test Issues”Connection Refused
Section titled “Connection Refused”# Check if service is runningdocker psmake epc-status
Certificate Errors
Section titled “Certificate Errors”# Regenerate certificatesmake generate-docker-certs
Test Failures
Section titled “Test Failures”# Reset test environmentmake clean-epc && make setup-epc-complete
Performance Testing
Section titled “Performance Testing”Load Testing
Section titled “Load Testing”# Test with multiple concurrent requestsfor i in {1..10}; do curl -X POST https://localhost:8443/api/v1/verify \ --cert client.crt --key client.key \ -H "Content-Type: application/json" \ -d '{"iban":"DE89370400440532013000","name":"John Smith"}' &donewait
Expected Performance
Section titled “Expected Performance”- Response time: < 500ms average
- Throughput: 1000+ requests/minute
- Uptime: 99.9%