This guide covers different methods to test your Firebase Cloud Functions after deployment.
# Check if functions are deployed
firebase functions:list --project YOUR_PROJECT_IDExpected Output:
│ functionName │ version │ trigger │ region │ memory │ runtime │
│ yourFunction1 │ v1 │ https │ us-central1 │ 256MB │ nodejs18 │
│ yourFunction2 │ v1 │ https │ us-central1 │ 256MB │ nodejs18 │
# Test that functions require authentication (should return 403)
curl -s -w "Status: %{http_code}\n" "https://REGION-PROJECT_ID.cloudfunctions.net/FUNCTION_NAME"Expected Output:
Status: 403
This confirms the function is deployed and properly secured!
# Test your health check endpoint
curl "https://REGION-PROJECT_ID.cloudfunctions.net/healthCheck"Expected Output:
{"status":"healthy","timestamp":"2025-01-27T...","project":"PROJECT_ID"}
curl -s -w "Status: %{http_code}\n" "https://REGION-PROJECT_ID.cloudfunctions.net/FUNCTION_NAME"# Test multiple functions at once
for func in function1 function2 function3; do
echo "Testing $func..."
curl -s -w "Status: %{http_code}\n" "https://REGION-PROJECT_ID.cloudfunctions.net/$func"
done# Get Firebase token
firebase login --no-localhost
# Test with authentication
curl -H "Authorization: Bearer YOUR_FIREBASE_TOKEN" \
"https://REGION-PROJECT_ID.cloudfunctions.net/FUNCTION_NAME"# Get Google Cloud token
TOKEN=$(gcloud auth print-access-token)
# Test with token
curl -H "Authorization: Bearer $TOKEN" \
"https://REGION-PROJECT_ID.cloudfunctions.net/FUNCTION_NAME"./remote/quick-test.sh./remote/test-functions-consolidated.sh./remote/health-check.sh- Function is deployed and working
- Security is properly configured
- Authentication is required (as expected)
- Function is deployed and publicly accessible
- No authentication required
- Function is not deployed
- Check deployment status
- Network connectivity issue
- Check internet connection
- Firebase Functions List - All functions deployed
- Security Test - Functions return appropriate status codes
- Health Check - Health endpoints working
- Individual Tests - Each function responds correctly
- Authentication Test - Functions work with proper auth
- All functions deployed successfully
- All health checks working
- No deployment errors
- Functions properly secured
- Authentication configured correctly
- No unauthorized access
- Complete workflow available
- All components operational
- Ready for production use
- Choose authentication method for your application
- Implement proper error handling for 403/401 responses
- Set up monitoring for function health
- Configure IAM roles for production use
- Set up alerts for function failures
✅ All functions deployed ✅ Security working correctly ✅ Health checks operational ✅ System ready for production ✅ Testing tools available
Your Firebase Functions are ready for production use!