autoseo-engine / test_browser_access.py
Ahmed766's picture
Upload test_browser_access.py with huggingface_hub
51d878c verified
import requests
print('=== AutoSEO Engine - Comprehensive Health Check ===')
print()
# Test health endpoint
try:
health = requests.get('http://127.0.0.1:8000/health')
print(f'βœ… Health Check: {health.json()}')
except Exception as e:
print(f'❌ Health Check Failed: {e}')
# Test root endpoint
try:
root = requests.get('http://127.0.0.1:8000/')
print(f'βœ… Root Endpoint: {root.json()}')
except Exception as e:
print(f'❌ Root Endpoint Failed: {e}')
# Test stats endpoint
try:
stats = requests.get('http://127.0.0.1:8000/stats')
data = stats.json()
print(f'βœ… Stats Retrieved: MRR=${data["customer_metrics"]["mrr"]}, Customers={data["customer_metrics"]["total_customers"]}')
except Exception as e:
print(f'❌ Stats Endpoint Failed: {e}')
# Test revenue dashboard
try:
revenue = requests.get('http://127.0.0.1:8000/revenue/dashboard')
data = revenue.json()
print(f'βœ… Revenue Dashboard Retrieved: MRR=${data["customer_metrics"]["mrr"]}')
except Exception as e:
print(f'❌ Revenue Dashboard Failed: {e}')
# Test customers endpoint
try:
customers = requests.get('http://127.0.0.1:8000/customers')
data = customers.json()
print(f'βœ… Customers Retrieved: {len(data["customers"])} customers')
except Exception as e:
print(f'❌ Customers Endpoint Failed: {e}')
print()
print('=== Browser Access Instructions ===')
print('Open your browser and navigate to:')
print('- Health: http://127.0.0.1:8000/health')
print('- API Docs: http://127.0.0.1:8000/docs')
print('- Stats: http://127.0.0.1:8000/stats')
print('- Dashboard: http://127.0.0.1:8000/revenue/dashboard')
print()
print('All systems are operational and accessible via browser!')