Skip to content

Testing API Endpoints

Your VoP service comes with comprehensive testing endpoints to validate your integration and ensure compliance.

URL: https://localhost:8443/test

What you get:

  • Point-and-click testing - No command line needed
  • Pre-loaded test cases - 131+ EPC compliance tests ready to run
  • Real-time results - See verification results instantly
  • Certificate testing - Validate your SSL setup
  • Error simulation - Test how your app handles errors
Terminal window
# Execute complete EPC test suite (takes ~5 minutes)
curl -X POST https://localhost:8443/test/epc/run \
--cert certs/client/client.crt \
--key certs/client/client.key \
-H "Content-Type: application/json" \
-d '{
"testSuite": "epc139-25",
"generateReport": true
}'

Expected response:

{
"testRunId": "test_run_123456",
"status": "running",
"totalTests": 131,
"estimatedDuration": "5-10 minutes"
}
Terminal window
# Get detailed test report
curl https://localhost:8443/test/epc/report/test_run_123456 \
--cert certs/client/client.crt \
--key certs/client/client.key

Expected results:

{
"status": "completed",
"summary": {
"totalTests": 131,
"passed": 129,
"failed": 2,
"compliance": "98.5%"
}
}
Terminal window
# Create 100 test verification requests
curl -X POST https://localhost:8443/test/data/generate \
--cert certs/client/client.crt \
--key certs/client/client.key \
-H "Content-Type: application/json" \
-d '{
"count": 100,
"scenarios": ["exact_match", "no_match", "close_match"]
}'
  • Name verification - 45 test cases
  • BIC verification - 32 test cases
  • LEI verification - 28 test cases
  • ID verification - 26 test cases
  • Certificate validation - Valid/invalid certificates
  • Authentication tests - mTLS authentication
  • Rate limiting - Abuse prevention
  • Error handling - Malformed requests
  • Load testing - Multiple concurrent requests
  • Response time - Latency measurements
  • Throughput - Requests per second
  • Resource usage - Memory and CPU monitoring
  1. Open browser: https://localhost:8443/test
  2. Select test type: Choose from pre-built scenarios
  3. Enter test data: IBAN and name combinations
  4. Run test: Click “Verify” button
  5. View results: See instant verification results
  • Perfect matches - Names that should match exactly
  • Fraud cases - Names that should be blocked
  • ⚠️ Partial matches - Close matches needing review
  • 🚫 Error cases - Invalid IBANs and malformed data
Terminal window
# Test with 50 concurrent requests
curl -X POST https://localhost:8443/test/performance/load \
--cert certs/client/client.crt \
--key certs/client/client.key \
-H "Content-Type: application/json" \
-d '{
"concurrentUsers": 50,
"duration": "60s",
"rampUpTime": "10s"
}'
Terminal window
# Get real-time performance data
curl https://localhost:8443/test/performance/metrics \
--cert certs/client/client.crt \
--key certs/client/client.key

Expected metrics:

{
"requestsPerSecond": 45.2,
"averageResponseTime": "125ms",
"successRate": "99.8%",
"activeConnections": 12
}
Terminal window
# Validate certificate chain
curl https://localhost:8443/test/certificates/chain \
--cert certs/client/client.crt \
--key certs/client/client.key
Terminal window
# Test different certificate scenarios
curl -X POST https://localhost:8443/test/certificates/validate \
--cert certs/client/client.crt \
--key certs/client/client.key \
-H "Content-Type: application/json" \
-d '{
"scenarios": [
"valid_certificate",
"expired_certificate",
"invalid_chain"
]
}'
Terminal window
# Clean slate for testing
curl -X POST https://localhost:8443/test/environment/reset \
--cert certs/client/client.crt \
--key certs/client/client.key \
-H "Content-Type: application/json" \
-d '{
"resetDatabase": true,
"reloadTestData": true
}'
Terminal window
# Load standard EPC test data
curl -X POST https://localhost:8443/test/data/load \
--cert certs/client/client.crt \
--key certs/client/client.key \
-H "Content-Type: application/json" \
-d '{
"dataSet": "epc_reference_data",
"version": "v1.0"
}'
Terminal window
# 1. Reset environment
curl -X POST https://localhost:8443/test/environment/reset \
--cert certs/client/client.crt --key certs/client/client.key \
-H "Content-Type: application/json" \
-d '{"resetDatabase": true, "reloadTestData": true}'
# 2. Load test data
curl -X POST https://localhost:8443/test/data/load \
--cert certs/client/client.crt --key certs/client/client.key \
-H "Content-Type: application/json" \
-d '{"dataSet": "epc_reference_data", "version": "v1.0"}'
# 3. Run compliance tests
curl -X POST https://localhost:8443/test/epc/run \
--cert certs/client/client.crt --key certs/client/client.key \
-H "Content-Type: application/json" \
-d '{"testSuite": "epc139-25", "generateReport": true}'
# 4. Check results (wait 5-10 minutes)
curl https://localhost:8443/test/epc/report/{testRunId} \
--cert certs/client/client.crt --key certs/client/client.key
// Complete test automation
async function runVoPTests() {
const baseUrl = 'https://localhost:8443';
const options = {
// Add certificate configuration here
headers: { 'Content-Type': 'application/json' }
};
try {
// 1. Reset environment
console.log('Resetting test environment...');
await fetch(`${baseUrl}/test/environment/reset`, {
method: 'POST',
...options,
body: JSON.stringify({
resetDatabase: true,
reloadTestData: true
})
});
// 2. Run EPC tests
console.log('Starting EPC compliance tests...');
const testResponse = await fetch(`${baseUrl}/test/epc/run`, {
method: 'POST',
...options,
body: JSON.stringify({
testSuite: 'epc139-25',
generateReport: true
})
});
const testRun = await testResponse.json();
console.log(`Test run started: ${testRun.testRunId}`);
// 3. Wait for completion and get results
let completed = false;
while (!completed) {
await new Promise(resolve => setTimeout(resolve, 30000)); // Wait 30s
const resultResponse = await fetch(
`${baseUrl}/test/epc/report/${testRun.testRunId}`,
options
);
const result = await resultResponse.json();
if (result.status === 'completed') {
console.log('Tests completed:', result.summary);
console.log(`Compliance: ${result.compliance.overall}`);
completed = true;
} else {
console.log(`Test status: ${result.status}`);
}
}
} catch (error) {
console.error('Test execution failed:', error);
}
}
// Run tests
runVoPTests();
import requests
import time
import json
def run_vop_tests():
base_url = 'https://localhost:8443'
cert = ('certs/client/client.crt', 'certs/client/client.key')
try:
# 1. Reset environment
print('Resetting test environment...')
requests.post(
f'{base_url}/test/environment/reset',
cert=cert,
json={'resetDatabase': True, 'reloadTestData': True}
)
# 2. Run EPC tests
print('Starting EPC compliance tests...')
test_response = requests.post(
f'{base_url}/test/epc/run',
cert=cert,
json={'testSuite': 'epc139-25', 'generateReport': True}
)
test_run = test_response.json()
test_run_id = test_run['testRunId']
print(f'Test run started: {test_run_id}')
# 3. Wait for completion
while True:
result_response = requests.get(
f'{base_url}/test/epc/report/{test_run_id}',
cert=cert
)
result = result_response.json()
if result['status'] == 'completed':
print(f"Tests completed: {result['summary']}")
print(f"Compliance: {result['compliance']['overall']}")
break
else:
print(f"Test status: {result['status']}")
time.sleep(30) # Wait 30 seconds
except Exception as error:
print(f'Test execution failed: {error}')
if __name__ == '__main__':
run_vop_tests()
{
"error": {
"code": "TEST_EXECUTION_FAILED",
"message": "Test execution failed due to invalid configuration",
"details": {
"suggestion": "Check test data availability and certificate validity"
}
}
}
  • Certificate errors: Regenerate certificates with make generate-docker-certs
  • Test data missing: Load test data with /test/data/load endpoint
  • Environment issues: Reset environment with /test/environment/reset
name: VoP API Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup certificates
run: |
echo "${{ secrets.CLIENT_CERT }}" > client.crt
echo "${{ secrets.CLIENT_KEY }}" > client.key
- name: Run EPC compliance tests
run: |
curl -X POST https://localhost:8443/test/epc/run \
--cert client.crt --key client.key \
-H "Content-Type: application/json" \
-d '{"testSuite": "epc139-25", "generateReport": true}'