This document covers all testing procedures for the Cloud Native DevOps Platform, from local unit-level checks to full production cluster validation.
- Test Environment URLs
- 1. Local Development Tests
- 2. Docker & Container Tests
- 3. API Endpoint Tests
- 4. Kubernetes Health Tests
- 5. Ingress & Routing Tests
- 6. CI/CD Pipeline Tests
- 7. Argo CD GitOps Tests
- 8. Monitoring & Alerting Tests
- 9. Auto-Scaling (HPA) Tests
- 10. Load Testing
- 11. Full End-to-End Test Checklist
- Expected Test Results Summary
| Environment | URL |
|---|---|
| Production (ELB) | http://a4977326368864f1cbe72703bd19174a-173171894.us-east-1.elb.amazonaws.com |
| Grafana (port-forward) | http://localhost:3001 |
| Prometheus (port-forward) | http://localhost:9090 |
| Argo CD (port-forward) | https://localhost:8080 |
Set this variable once to reuse in all test commands:
export BASE_URL="http://a4977326368864f1cbe72703bd19174a-173171894.us-east-1.elb.amazonaws.com"
cd backend
npm install
node server.jsExpected output:
✅ Server running on port 5000
📊 Metrics available at http://localhost:5000/metrics
❤️ Liveness probe at http://localhost:5000/health/live
✔️ Readiness probe at http://localhost:5000/health/ready
cd frontend
npm install
npm startExpected: Browser opens at http://localhost:3000 with the dashboard UI.
docker compose up --buildExpected:
✅ backend | Server running on port 5000
✅ frontend | Starting the development server...
Verify:
curl http://localhost:5000/api/message
curl http://localhost:3000docker build -t test-backend ./backendExpected: Successfully built <image-id> — no errors.
docker build -t test-frontend ./frontendExpected: Successfully built <image-id> — no errors.
docker run -d -p 5000:5000 --name test-backend test-backend
sleep 2
curl http://localhost:5000/health/live
docker rm -f test-backendExpected:
{"status":"alive","timestamp":"2026-..."}docker run -d -p 3000:3000 --name test-frontend test-frontend
sleep 2
curl -o /dev/null -s -w "%{http_code}\n" http://localhost:3000
docker rm -f test-frontendExpected: 200
docker pull chaninduimanjith/cloud-native-devops-backend:latest
docker pull chaninduimanjith/cloud-native-devops-frontend:latestExpected: Images pull successfully without errors.
Replace
$BASE_URLwith your ELB URL orhttp://localhost:5000for local.
curl -s -o /dev/null -w "Status: %{http_code}\n" $BASE_URL/Expected: Status: 200
curl -s $BASE_URL/api/message | python3 -m json.toolExpected:
{
"message": "DevOps Platform Backend Running 🚀",
"timestamp": "2026-06-24T...",
"version": "2.0.0"
}curl -s $BASE_URL/api/status | python3 -m json.toolExpected:
{
"status": "healthy",
"uptime": 3369.8,
"memory": {
"rss": 30650368,
"heapTotal": 15958016,
"heapUsed": 13682392
},
"timestamp": "2026-06-24T..."
}curl -s $BASE_URL/health/liveExpected: {"status":"alive","timestamp":"..."}
curl -s $BASE_URL/health/readyExpected: {"status":"ready","timestamp":"..."}
curl -s $BASE_URL/health/startupExpected: {"status":"started","timestamp":"..."}
curl -s $BASE_URL/metrics | head -30Expected output includes:
# HELP http_requests_total Total number of HTTP requests
# TYPE http_requests_total counter
http_requests_total{method="GET",route="/api/message",status_code="200"} ...
# HELP http_request_duration_seconds HTTP request duration in seconds
# TYPE http_request_duration_seconds histogram
...
# HELP nodejs_heap_size_total_bytes Process heap size from Node.js in bytes
...
curl -s -I -X OPTIONS $BASE_URL/api/message \
-H "Origin: http://example.com" \
-H "Access-Control-Request-Method: GET"Expected: Response includes Access-Control-Allow-Origin header.
curl -s -o /dev/null -w "%{http_code}\n" $BASE_URL/api/nonexistentExpected: 404
kubectl get nodesExpected:
NAME STATUS ROLES AGE VERSION
ip-10-0-1-xxx.ec2.internal Ready <none> ... v1.30.x
ip-10-0-2-xxx.ec2.internal Ready <none> ... v1.30.x
ip-10-0-3-xxx.ec2.internal Ready <none> ... v1.30.x
All 3 nodes must be Ready.
kubectl get pods -AExpected pods & status:
| Namespace | Deployment | Expected Status |
|---|---|---|
default |
frontend (×2) |
Running |
default |
backend (×2) |
Running |
default |
postgres |
Running |
default |
ingress-nginx-controller |
Running |
argocd |
argocd-server |
Running |
argocd |
argocd-application-controller |
Running |
argocd |
argocd-repo-server |
Running |
cert-manager |
cert-manager |
Running |
monitoring |
monitoring-grafana |
Running |
monitoring |
prometheus-* |
Running |
monitoring |
alertmanager-* |
Running |
kubectl get pods -A | grep -v "Running\|Completed\|NAME"Expected: No output (all pods healthy).
kubectl logs -l app=backend --tail=20Expected: No ERROR lines; shows startup logs.
kubectl logs -l app=frontend --tail=10Expected: NGINX access logs, no errors.
kubectl top nodes
kubectl top podsExpected: CPU and memory usage well within limits.
kubectl get svc -n defaultExpected:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
backend ClusterIP 172.20.x.x <none> 5000/TCP
frontend ClusterIP 172.20.x.x <none> 3000/TCP
postgres ClusterIP 172.20.x.x <none> 5432/TCP
ingress-nginx-controller LoadBalancer 172.20.x.x <ELB-URL> 80:xxx,443:xxx
kubectl get ingress -n default
kubectl describe ingress cloud-native-ingressExpected: ADDRESS shows ELB URL, rules show / → frontend and /api → backend.
curl -s -o /dev/null -w "/ → %{http_code}\n" $BASE_URL/Expected: / → 200
curl -s -o /dev/null -w "/api/message → %{http_code}\n" $BASE_URL/api/messageExpected: /api/message → 200
kubectl exec -it $(kubectl get pod -l app.kubernetes.io/name=ingress-nginx -o name | head -1) \
-- curl -s http://localhost/api/statusExpected: JSON status response from backend.
git commit --allow-empty -m "test: trigger CI/CD pipeline"
git push origin mainGo to: https://github.com/ChaninduImanjith/cloud-native-devops-platform/actions
Expected pipeline steps to pass:
| Step | Expected Result |
|---|---|
| Checkout Repository | ✅ Pass |
| Set up Docker Buildx | ✅ Pass |
| Login to Docker Hub | ✅ Pass |
| Build & Push Backend Image | ✅ Pass |
| Build & Push Frontend Image | ✅ Pass |
| Configure AWS Credentials | ✅ Pass |
| Update KubeConfig | ✅ Pass |
| Inject Secrets to Kubernetes | ✅ Pass |
| Apply monitoring config | ✅ Pass |
docker pull chaninduimanjith/cloud-native-devops-backend:latest
docker inspect chaninduimanjith/cloud-native-devops-backend:latest | grep CreatedExpected: Timestamp matches recent pipeline run.
kubectl get secret alertmanager-auth -n monitoringExpected: Secret exists with password key.
kubectl port-forward svc/argocd-server -n argocd 8080:443 &Open: https://localhost:8080
Login: admin / (get password below)
kubectl -n argocd get secret argocd-initial-admin-secret \
-o jsonpath="{.data.password}" | base64 -d && echokubectl get application -n argocdExpected:
NAME SYNC STATUS HEALTH STATUS
cloud-native-app Synced Healthy
- Make a small change to any file in
kubernetes/ - Push to
main - Watch Argo CD detect and apply the change:
kubectl get application -n argocd -wExpected: Status briefly shows OutOfSync → then returns to Synced automatically.
# Manually delete a deployment — Argo CD should recreate it
kubectl delete deployment frontend
sleep 30
kubectl get deployment frontendExpected: Frontend deployment is automatically recreated by Argo CD.
# Grafana
kubectl port-forward -n monitoring svc/monitoring-grafana 3001:80 &
# Prometheus
kubectl port-forward -n monitoring svc/monitoring-kube-prometheus-prometheus 9090:9090 &Open: http://localhost:3001
Username: admin
Password: vOZuY9kJ01Mt9BZxEMuvU2FWstqZtM6qaDdJiocQ
Expected: Grafana dashboard loads with pre-configured panels.
Open: http://localhost:9090/targets
Expected: default/backend-service appears in targets with state UP.
In Prometheus UI (http://localhost:9090), run these queries:
# Total HTTP requests
http_requests_total
# Request rate (last 5 minutes)
rate(http_requests_total[5m])
# Average response time
rate(http_request_duration_seconds_sum[5m]) / rate(http_request_duration_seconds_count[5m])
# Node.js heap usage
nodejs_heap_size_used_bytes
Expected: All queries return data points.
curl -s http://localhost:9090/api/v1/query?query=http_requests_total | python3 -m json.tool | head -20Expected: JSON with "status": "success" and result array.
curl -s http://localhost:9090/api/v1/rules | python3 -m json.tool | grep "name"Expected: Custom alert rule names appear (HighErrorRate, HighMemoryUsage, etc.)
kubectl get servicemonitor -n monitoring
kubectl describe servicemonitor -n monitoring | grep -A5 "Endpoints"Expected: ServiceMonitor targeting backend on /metrics port 5000.
kubectl get hpa -AExpected:
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS
backend-hpa Deployment/backend 25%/70%, 40%/80% 2 5 2
frontend-hpa Deployment/frontend 10%/70%, 30%/80% 2 5 2
kubectl get hpa -wKeep this running while performing load test (Section 10).
kubectl get deployment metrics-server -n kube-system
kubectl top pods -n defaultExpected: metrics-server is Running, and pod metrics are displayed.
# Scale down manually
kubectl scale deployment backend --replicas=1
# HPA should scale back up to minReplicas (2) within ~30 seconds
sleep 40
kubectl get pods -l app=backendExpected: 2 backend pods running (HPA enforces minimum).
Tool:
curlloop or installhey/abfor proper load testing.
for i in {1..50}; do
curl -s -o /dev/null -w "Request $i: %{http_code} | Time: %{time_total}s\n" \
$BASE_URL/api/message
doneExpected: All requests return 200, response time < 1s.
for i in {1..20}; do
curl -s -o /dev/null $BASE_URL/api/status &
done
wait
echo "All 20 concurrent requests completed"Expected: All complete without errors.
# Install hey
go install github.com/rakyll/hey@latest
# OR use apt:
# sudo apt install hey
# Run 200 requests, 10 concurrent
hey -n 200 -c 10 $BASE_URL/api/messageExpected output:
Summary:
Total: X.XX secs
Slowest: X.XXX secs
Fastest: X.XXX secs
Average: X.XXX secs
Requests/sec: XXX.XX
Status code distribution:
[200] 200 responses
While the load test runs, in another terminal:
kubectl get hpa backend-hpa -wExpected: REPLICAS increases beyond 2 as CPU/memory rises during load.
In Prometheus:
# Total requests processed
http_requests_total
# Requests per second
rate(http_requests_total[1m])
# 95th percentile latency
histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))
Use this checklist to verify the entire system before final submission or demo:
-
terraform outputshows correctcluster_endpointandcluster_name -
kubectl get nodesshows 3 nodes all inReadystate - Node instance type is
t3.micro - VPC CNI prefix delegation enabled (max 110 pods/node)
- Frontend loads at
$BASE_URL/→ HTTP 200 - Backend responds at
$BASE_URL/api/message→ HTTP 200 - Backend responds at
$BASE_URL/api/status→ HTTP 200 - Health probes return correct JSON (
/health/live,/health/ready,/health/startup) - Prometheus metrics available at
$BASE_URL/metrics
- All pods in
defaultnamespace areRunning - All pods in
argocdnamespace areRunning - All pods in
monitoringnamespace areRunning - All pods in
cert-managernamespace areRunning - NGINX Ingress Controller has external ELB IP assigned
- HPA is active for
backendandfrontend
- Push to
maintriggers GitHub Actions workflow - Docker images built and pushed to Docker Hub
- AWS credentials configured via GitHub Secrets
- Kubernetes secrets injected from GitHub Secrets
- Argo CD application status:
Synced+Healthy - Auto-sync works on
git push - Self-healing works (deleted pod gets recreated)
- Grafana accessible at
http://localhost:3001 - Prometheus targets show
backendasUP - Custom metrics (
http_requests_total) appear in Prometheus - Grafana dashboard shows live graphs
- Alert rules loaded in Prometheus
-
kubectl get hpashows both HPAs with valid targets -
kubectl top podsreturns live metrics - HPA scales up under load (min 2, max 5 replicas)
| Test Category | Total Tests | Expected Pass |
|---|---|---|
| Local Dev | 3 | ✅ 3/3 |
| Docker & Container | 5 | ✅ 5/5 |
| API Endpoints | 9 | ✅ 9/9 |
| Kubernetes Health | 7 | ✅ 7/7 |
| Ingress & Routing | 4 | ✅ 4/4 |
| CI/CD Pipeline | 3 | ✅ 3/3 |
| Argo CD GitOps | 4 | ✅ 4/4 |
| Monitoring | 7 | ✅ 7/7 |
| Auto-Scaling | 4 | ✅ 4/4 |
| Load Testing | 5 | ✅ 5/5 |
| TOTAL | 51 | ✅ 51/51 |
Run all critical checks at once:
#!/bin/bash
BASE_URL="http://a4977326368864f1cbe72703bd19174a-173171894.us-east-1.elb.amazonaws.com"
echo "🧪 Running Cloud Native DevOps Platform Tests..."
echo ""
# Test 1: Frontend
STATUS=$(curl -s -o /dev/null -w "%{http_code}" $BASE_URL/)
echo "Frontend (/) → HTTP $STATUS $([ "$STATUS" = "200" ] && echo "✅" || echo "❌")"
# Test 2: API Message
STATUS=$(curl -s -o /dev/null -w "%{http_code}" $BASE_URL/api/message)
echo "API Message (/api/message) → HTTP $STATUS $([ "$STATUS" = "200" ] && echo "✅" || echo "❌")"
# Test 3: API Status
STATUS=$(curl -s -o /dev/null -w "%{http_code}" $BASE_URL/api/status)
echo "API Status (/api/status) → HTTP $STATUS $([ "$STATUS" = "200" ] && echo "✅" || echo "❌")"
# Test 4: Liveness
STATUS=$(curl -s -o /dev/null -w "%{http_code}" $BASE_URL/health/live)
echo "Liveness (/health/live) → HTTP $STATUS $([ "$STATUS" = "200" ] && echo "✅" || echo "❌")"
# Test 5: Readiness
STATUS=$(curl -s -o /dev/null -w "%{http_code}" $BASE_URL/health/ready)
echo "Readiness (/health/ready)→ HTTP $STATUS $([ "$STATUS" = "200" ] && echo "✅" || echo "❌")"
# Test 6: Metrics
STATUS=$(curl -s -o /dev/null -w "%{http_code}" $BASE_URL/metrics)
echo "Metrics (/metrics) → HTTP $STATUS $([ "$STATUS" = "200" ] && echo "✅" || echo "❌")"
# Test 7: Kubernetes Nodes
READY=$(kubectl get nodes --no-headers | grep -c "Ready")
echo "K8s Nodes Ready → $READY/3 $([ "$READY" = "3" ] && echo "✅" || echo "❌")"
# Test 8: Running Pods
RUNNING=$(kubectl get pods -n default --no-headers | grep -c "Running")
echo "Pods Running (default ns) → $RUNNING $([ "$RUNNING" -ge "5" ] && echo "✅" || echo "❌")"
# Test 9: Argo CD Sync
SYNC=$(kubectl get application -n argocd cloud-native-app -o jsonpath='{.status.sync.status}' 2>/dev/null)
echo "Argo CD Sync Status → $SYNC $([ "$SYNC" = "Synced" ] && echo "✅" || echo "⚠️")"
# Test 10: HPA
HPA=$(kubectl get hpa backend-hpa --no-headers 2>/dev/null | awk '{print $6}')
echo "Backend HPA Replicas → $HPA $([ ! -z "$HPA" ] && echo "✅" || echo "❌")"
echo ""
echo "🎯 Tests Complete!"Save this as test.sh and run:
chmod +x test.sh
./test.shLast updated: June 2026 | Cloud Native DevOps Platform v2.0.0