How richie010/ai-tcase works
AI Test Case Portal accepts requirement documents, creates test cases with Gemini-backed retrieval, and returns a formatted Excel workbook. The main path is browser upload → FastAPI job dispatch → extraction, chunking, embedding/retrieval and generation → workbook export → status polling and download. The README also describes positive, negative, boundary, and edge coverage. Edges follow the cited route and pipeline calls; the README supports the documented embedding and retrieval stages where source wiring is incomplete.
Main entry points: jobs.py Job Orchestration · main.py HTTP Routes · testcase_generator.py RAG Test Generation · app.js Upload and Results UI
Components 15
Portal UI
- Upload and Results UI
frontend/app.js
API and Jobs
- HTTP Routes
backend/app/main.py - Job Orchestration
backend/app/jobs.py - In-Memory Job State
backend/app/jobs.py - Job and Data Models
backend/app/models.py - Runtime Settings
backend/app/config.py
Requirement Processing
- Document Extraction
backend/app/extraction.py - Section Chunking
backend/app/chunking.py
RAG Generation
- Gemini Embeddings
backend/app/gemini_client.py - Cosine Vector Store
backend/app/vector_store.py - RAG Test Generation
backend/app/testcase_generator.py
Workbook Output
- Excel Workbook Export
backend/app/excel_export.py - Generated Workbook
backend/data/exports
Other components
- User
- Gemini API
Connections 26
- User → Upload and Results UI: uploads files
frontend/app.js - Upload and Results UI → HTTP Routes: submits job
frontend/app.js - HTTP Routes → Job Orchestration: creates and dispatches
backend/app/main.py - HTTP Routes → In-Memory Job State: reads status
backend/app/main.py - Job Orchestration → In-Memory Job State: updates state
backend/app/jobs.py - Job Orchestration → Document Extraction: extracts documents
backend/app/jobs.py - Job Orchestration → Section Chunking: chunks sections
backend/app/jobs.py - Job Orchestration → Gemini Embeddings: embeds chunks
backend/app/jobs.py - Job Orchestration → RAG Test Generation: generates cases
backend/app/jobs.py - Job Orchestration → Excel Workbook Export: exports cases
backend/app/jobs.py - Job Orchestration → Runtime Settings: reads settings
backend/app/jobs.py - Document Extraction → Job and Data Models: produces sections
- Section Chunking → Job and Data Models: creates chunks
backend/app/chunking.py - RAG Test Generation → Job and Data Models: creates test cases
backend/app/testcase_generator.py - Excel Workbook Export → Job and Data Models: reads test cases
backend/app/excel_export.py - RAG Test Generation → Gemini Embeddings: embeds queries
backend/app/testcase_generator.py - RAG Test Generation → Cosine Vector Store: searches chunks
backend/app/testcase_generator.py - Job Orchestration → Cosine Vector Store: stores embeddings
backend/app/jobs.py - Gemini Embeddings → Gemini API: requests embeddings
backend/app/gemini_client.py - RAG Test Generation → Gemini API: requests generation
- Gemini Embeddings → Runtime Settings: reads settings
backend/app/gemini_client.py - Excel Workbook Export → Generated Workbook: writes workbook
backend/app/excel_export.py - HTTP Routes → Upload and Results UI: serves frontend
backend/app/main.py - Upload and Results UI → HTTP Routes: polls job
frontend/app.js - Upload and Results UI → HTTP Routes: downloads workbook
frontend/app.js - HTTP Routes → Generated Workbook: serves download
backend/app/main.py