How sannidhisriram-06/ai-test-generator works
This repository combines a FastAPI service that turns submitted Python code into pytest tests with a delivery workflow that tests, builds, and deploys the service. The main flow is developer push through Jenkins to ECR and a GitOps values update, followed by Argo CD reconciliation to Kubernetes. The application path is request validation and rate limiting, prompt construction, and Groq inference. Delivery details come from the README; only the application implementation was sampled, so deployment wiring is documented rather than source-verified.
Main entry points: main.py FastAPI endpoints · Jenkinsfile Jenkins pipeline · main.tf ECR provisioning · Dockerfile Container image
Components 17
Delivery workflow
- Jenkins pipeline
Jenkinsfile - Container image
Dockerfile
Infrastructure
- ECR provisioning
Terraform/main.tf
Test generator
- FastAPI endpoints
app/main.py - Input validation
app/main.py - Request limiting
app/main.py - Prompt construction
app/main.py - Generated tests
app/main.py - Health endpoint
app/main.py - Metrics endpoint
app/main.py
External systems
- AWS ECR
- GitOps Helm chart
- Argo CD
- Kubernetes cluster
- Groq LLM
Other components
- Developer
- API client
Connections 17
- Developer → Jenkins pipeline: pushes code
- Jenkins pipeline → Container image: builds image
- Jenkins pipeline → AWS ECR: pushes image
- ECR provisioning → AWS ECR: provisions
- Jenkins pipeline → GitOps Helm chart: updates image tag
- GitOps Helm chart → Argo CD: provides desired state
- Argo CD → Kubernetes cluster: syncs manifests
- Kubernetes cluster → AWS ECR: pulls image
- API client → FastAPI endpoints: sends request
- FastAPI endpoints → Input validation: validates payload
- FastAPI endpoints → Request limiting: applies limit
- FastAPI endpoints → Health endpoint: dispatches health
- FastAPI endpoints → Metrics endpoint: dispatches metrics
- FastAPI endpoints → Prompt construction: builds prompt
- Prompt construction → Groq LLM: requests completion
- FastAPI endpoints → Generated tests: returns tests
- Groq LLM → FastAPI endpoints: returns completion