How dharmadpi/functionaltestcasegenerator works
Functional Spec SQL Generator turns an uploaded or command-line XLSX functional specification into SQL test queries and a downloadable TXT file. The main flow parses table and column metadata, identifies fact/dimension structures and relationships, then generates queries; users can run this through either a CLI or one of two Streamlit interfaces. The chatbot adds conversational prompts, previews, and session state. The core source is partially excerpted, so internal query-generation details are represented only at the documented and visible level.
Main entry points: spec_agent.py SQL Generator · app.py CLI Runner · streamlit_app.py Web Generator · streamlit_chatbot.py Chat Interface
Components 12
User Interfaces
- CLI Runner
app.py - Web Generator
streamlit_app.py - Chat Interface
streamlit_chatbot.py
Specification Engine
- Metadata Parser
spec_agent.py - Table Modeling
spec_agent.py - Key Relations
spec_agent.py - SQL Generator
spec_agent.py
Query Delivery
- TXT Writer
app.py - Query Download
streamlit_app.py - Preview and Download
streamlit_chatbot.py
Other components
- User
- XLSX Spec
Connections 19
- User → CLI Runner: runs command
README.md - User → Web Generator: uploads spec
README.md - User → Chat Interface: uploads and prompts
README.md - XLSX Spec → CLI Runner: provides input
README.md - XLSX Spec → Web Generator: provides input
README.md - XLSX Spec → Chat Interface: provides input
README.md - CLI Runner → SQL Generator: calls generator
app.py - Web Generator → SQL Generator: calls generator
streamlit_app.py - Chat Interface → SQL Generator: calls generator
streamlit_chatbot.py - SQL Generator → Metadata Parser: loads specification
README.md - Metadata Parser → Table Modeling: extracts metadata
spec_agent.py - Table Modeling → Key Relations: infers joins
spec_agent.py - SQL Generator → Key Relations: uses relationships
spec_agent.py - SQL Generator → TXT Writer: returns queries
app.py - SQL Generator → Query Download: returns queries
streamlit_app.py - SQL Generator → Preview and Download: returns queries
streamlit_chatbot.py - TXT Writer → User: saves TXT
README.md - Query Download → User: downloads TXT
README.md - Preview and Download → User: previews or downloads
README.md