How n-harsha-vardhan-dev/llm-testcase-generator works
The product turns a functional requirement into structured, classified test cases and edge cases, validates the LLM response, scores coverage, and presents or exports the result. Users can initiate generation through either the FastAPI endpoint or Streamlit UI. The internal generation layer builds a prompt, calls Gemini, and retries invalid output. The README documents JSON and CSV export capabilities; sampled code shows in-memory UI downloads and CSV file export. The graph omits unverified internal details of the unsampled API and export paths.
Main entry points: main.py FastAPI endpoint · streamlit_app.py Streamlit UI · llm_service.py Retry orchestrator · coverage.py Coverage scoring
Components 12
User interfaces
- FastAPI endpoint
app/main.py - Streamlit UI
streamlit_app.py
Test generation
- Prompt template
app/prompt.py - Retry orchestrator
app/llm_service.py - LLM client
app/llm_client.py
Validation and coverage
- JSON validator
app/validator.py - Test case schema
app/schema.py - Coverage scoring
app/coverage.py
Results and export
- CSV and JSON export
app/exporter.py - Test cases and coverage
Other components
- QA user
- Gemini model
Connections 18
- QA user → FastAPI endpoint: submits requirement
README.md - QA user → Streamlit UI: enters requirement
streamlit_app.py - FastAPI endpoint → Prompt template: formats requirement
app/main.py - Streamlit UI → Prompt template: formats requirement
streamlit_app.py - FastAPI endpoint → Retry orchestrator: requests generation
app/main.py - Streamlit UI → Retry orchestrator: requests generation
streamlit_app.py - Retry orchestrator → LLM client: calls model
app/llm_service.py - LLM client → Gemini model: sends prompt
app/llm_client.py - Retry orchestrator → JSON validator: validates response
app/llm_service.py - JSON validator → Test case schema: parses into
app/validator.py - FastAPI endpoint → Coverage scoring: scores coverage
app/main.py - Streamlit UI → Coverage scoring: scores coverage
streamlit_app.py - FastAPI endpoint → CSV and JSON export: saves CSV
app/main.py - Streamlit UI → CSV and JSON export: creates CSV download
streamlit_app.py - FastAPI endpoint → Test cases and coverage: returns data and score
app/main.py - Streamlit UI → Test cases and coverage: displays and downloads
streamlit_app.py - CSV and JSON export → Test cases and coverage: produces export
- Coverage scoring → Test cases and coverage: provides score