Axiom is an intelligent pipeline that transforms natural language specifications (Markdown) into executable Pytest suites using LangChain agents.
sequenceDiagram
autonumber
actor User
participant UI as Streamlit UI
participant Engine as Axiom Engine
participant LLM as OpenAI GPT-4
participant FS as File System
participant TestRunner as Pytest Container
participant Service as Mock Service API
Note over User, UI: Phase 1: Specification & Generation
User->>UI: Inputs Markdown Spec (ACs)
User->>UI: Clicks "Generate Test Suite"
UI->>Engine: Run Pipeline (Spec File)
rect rgb(240, 248, 255)
Note right of Engine: Agentic Orchestration
Engine->>Engine: Parse Markdown -> [Requirements]
loop For Each Requirement
Engine->>LLM: RequirementsAnalyst: Analyze & Create Scenario
LLM-->>Engine: JSON Test Scenario (Given/When/Then)
Engine->>LLM: SoftwareTester: Write Pytest Code
LLM-->>Engine: Python Code Block (httpx)
end
Engine->>LLM: SuiteComposer: Assemble File
LLM-->>Engine: Complete test_suite.py
end
Engine->>FS: Write tests/generated_suite_test.py
Engine-->>UI: Generation Complete
Note over User, UI: Phase 2: Verification
User->>UI: Clicks "Run Verification"
UI->>TestRunner: Execute Pytest
rect rgb(255, 240, 240)
Note right of TestRunner: Test Execution
TestRunner->>Service: GET /profile (Valid Token)
Service-->>TestRunner: 200 OK (PASS)
TestRunner->>Service: PUT /profile (Invalid Email)
Service-->>TestRunner: 200 OK (FAIL! Expected 422)
Note right of TestRunner: Bug Detected!
end
TestRunner-->>UI: Return Test Report
UI->>User: Display Results (Passed/Failed)
- Specification Generation: Users can manually write requirements in
docs/project_sample.md(User Stories, ACs), or use the Auto-Generate from Story feature in the UI to instantly expand a simple user story into a full Technical Specification. See Writing Guidelines for Markdown best practices. - Parsing: The Engine parses these into structured data.
- Analysis (Agent 1): The
RequirementsAnalystbreaks down ACs into logical Test Scenarios (Given/When/Then). - Test Generation (Agent 2): The
SoftwareTesterconverts Scenarios into executable Pytest code. - Verification: The generated suite runs against the Target Service (Mock Service).
docs/: Specifications.src/engine/: The core logic (Agents, Parser, Orchestrator).src/mock_service/: A sample FastAPI app with an intentional bug.tests/: Output directory for generated tests.main.py: Streamlit UI for interactive usage.
- Python 3.10+
- Docker (optional)
- OpenAI API Key
- Install Dependencies:
make install
- Run All (Mock Service + Engine + Tests):
make verify
This approach runs the Service, UI, and Tests in isolated containers on a shared network.
-
Start App:
docker-compose up -d axiom-ui
Access UI at
http://localhost:8501. -
Run Tests in Container:
docker-compose run --rm axiom-tests
- UI:
streamlit run main.py - Engine:
python src/engine/main.py docs/project_sample.md tests/generated_suite_test.py http://localhost:8000
Created with ❤️ with Gemini!
