# prathameshyawalkar15/agentic-test-generator architecture

> Architecture diagram of the GitHub repository prathameshyawalkar15/agentic-test-generator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prathameshyawalkar15/agentic-test-generator
- Repository: https://github.com/prathameshyawalkar15/agentic-test-generator

## Overview

This repository turns Markdown requirements into generated BDD scenarios, then binds those scenarios to placeholder steps for pytest-bdd execution and reporting. The main generation flow is implemented in `src/orchestrator.py`; requirement parsing, condition selection, and Gherkin generation are separate stages. The README documents HTML/Allure reports and GitHub issue reporting, but their implementation is not shown in the sampled source. The Ollama client is present, though the sampled orchestrator does not call it during requirement processing.

Main entry points: [`src/orchestrator.py`](https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/src/orchestrator.py) (Generation orchestrator), [`features`](https://github.com/prathameshyawalkar15/agentic-test-generator/tree/main/features) (Gherkin features), [`src/generate_steps.py`](https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/src/generate_steps.py) (Step generator), [`.github/workflows/3_report_results.yml`](https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/.github/workflows/3_report_results.yml) (Report workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_generation["Test generation"]
  node_requirements["Markdown requirements"]
  node_orchestrator["Generation orchestrator<br/>[orchestrator.py]"]
  node_reader["Requirement reader"]
  node_conditions["Condition generator"]
  node_gherkin["Gherkin generator"]
end

subgraph group_execution["Test execution"]
  node_features["Gherkin features"]
  node_stepgen["Step generator<br/>[generate_steps.py]"]
  node_pytest["pytest-bdd runner"]
  node_stepdefs["Generated step definitions"]
end

subgraph group_reporting["Result reporting"]
  node_reports["Test reports"]
  node_reportflow["Report workflow"]
end

subgraph group_integration["LLM integration"]
  node_ollama_client["Ollama client<br/>[llm_client.py]"]
end

node_engineer(("Requirement author"))
node_github["GitHub issues"]
node_ollama["Ollama service"]

node_engineer -->|"writes"| node_requirements
node_orchestrator -->|"reads"| node_reader
node_reader -->|"reads"| node_requirements
node_orchestrator -->|"generates"| node_conditions
node_orchestrator -->|"generates"| node_gherkin
node_gherkin -->|"writes"| node_features
node_stepgen -->|"reads"| node_features
node_stepgen -->|"generates"| node_stepdefs
node_pytest -->|"executes"| node_features
node_pytest -->|"loads"| node_stepdefs
node_pytest -->|"produces"| node_reports
node_reportflow -->|"archives"| node_reports
node_reportflow -->|"creates issue"| node_github
node_ollama_client -->|"requests generation"| node_ollama

click node_requirements "https://github.com/prathameshyawalkar15/agentic-test-generator/tree/main/requirements"
click node_orchestrator "https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/src/orchestrator.py"
click node_reader "https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/src/requirement_reader.py"
click node_conditions "https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/src/test_condition_generator.py"
click node_gherkin "https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/src/gherkin_generator.py"
click node_features "https://github.com/prathameshyawalkar15/agentic-test-generator/tree/main/features"
click node_stepgen "https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/src/generate_steps.py"
click node_reportflow "https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/.github/workflows/3_report_results.yml"
click node_ollama_client "https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/src/llm_client.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_requirements,node_orchestrator,node_reader,node_conditions,node_gherkin toneBlue
class node_features,node_stepgen,node_pytest,node_stepdefs toneAmber
class node_reports,node_reportflow toneMint
class node_ollama_client toneRose
class node_engineer,node_github,node_ollama toneIndigo
```

## Components

### Test generation

- [Markdown requirements](https://github.com/prathameshyawalkar15/agentic-test-generator/tree/main/requirements): `requirements`
- [Generation orchestrator](https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/src/orchestrator.py): `src/orchestrator.py`
- [Requirement reader](https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/src/requirement_reader.py): `src/requirement_reader.py`
- [Condition generator](https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/src/test_condition_generator.py): `src/test_condition_generator.py`
- [Gherkin generator](https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/src/gherkin_generator.py): `src/gherkin_generator.py`

### Test execution

- [Gherkin features](https://github.com/prathameshyawalkar15/agentic-test-generator/tree/main/features): `features`
- [Step generator](https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/src/generate_steps.py): `src/generate_steps.py`
- **pytest-bdd runner**
- **Generated step definitions**

### Result reporting

- **Test reports**
- [Report workflow](https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/.github/workflows/3_report_results.yml): `.github/workflows/3_report_results.yml`

### LLM integration

- [Ollama client](https://github.com/prathameshyawalkar15/agentic-test-generator/blob/main/src/llm_client.py): `src/llm_client.py`

### Other components

- **Requirement author**
- **GitHub issues**
- **Ollama service**

## Connections

- Requirement author → Markdown requirements: writes
- Generation orchestrator → Requirement reader: reads
- Requirement reader → Markdown requirements: reads
- Generation orchestrator → Condition generator: generates
- Generation orchestrator → Gherkin generator: generates
- Gherkin generator → Gherkin features: writes
- Step generator → Gherkin features: reads
- Step generator → Generated step definitions: generates
- pytest-bdd runner → Gherkin features: executes
- pytest-bdd runner → Generated step definitions: loads
- pytest-bdd runner → Test reports: produces
- Report workflow → Test reports: archives
- Report workflow → GitHub issues: creates issue
- Ollama client → Ollama service: requests generation
