Add all BMAD skill artifacts: epics, stories, sprint-status, QA tests, project-context, readiness report
Co-authored-by: Kenearos <86194771+Kenearos@users.noreply.github.com>
This commit is contained in:
parent
e37cb6f4c0
commit
3be3cb73b6
14 changed files with 1577 additions and 4 deletions
159
_bmad-output/implementation-artifacts/qa-e2e-tests.md
Normal file
159
_bmad-output/implementation-artifacts/qa-e2e-tests.md
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
---
|
||||
inputDocuments:
|
||||
- _bmad-output/planning-artifacts/epics.md
|
||||
- _bmad-output/planning-artifacts/architecture.md
|
||||
- backend/tests/
|
||||
bmadSkill: 'QA Agent (Quinn) — /bmad-agent-bmm-qa → [QE] Generate E2E Tests'
|
||||
bmadWorkflow: '_bmad/bmm/workflows/qa-generate-e2e-tests/workflow.yaml'
|
||||
---
|
||||
|
||||
<!-- 🧪 Generated by BMAD QA Skill — Agent: Quinn (QA Engineer) -->
|
||||
<!-- Skill Command: /bmad-agent-bmm-qa → Generate E2E Tests -->
|
||||
<!-- Workflow: _bmad/bmm/workflows/qa-generate-e2e-tests/workflow.yaml -->
|
||||
|
||||
# QA E2E Test-Manifest — CouncilOS
|
||||
|
||||
**Autor:** Quinn (🧪 BMAD QA Agent)
|
||||
**Datum:** 2026-03-12
|
||||
|
||||
---
|
||||
|
||||
## 1. Bestehende Unit-Tests (Backend)
|
||||
|
||||
| Datei | Beschreibung | Status |
|
||||
|-------|-------------|--------|
|
||||
| `backend/tests/test_state.py` | CouncilState-Reducer, operator.add | ✅ |
|
||||
| `backend/tests/test_routing.py` | Routing-Logik (score < 8, ≥ 8, safety valve) | ✅ |
|
||||
| `backend/tests/test_api.py` | Health-Check, Run-Endpunkte (httpx AsyncClient) | ✅ |
|
||||
| `backend/tests/test_blueprint_api.py` | Blueprint CRUD REST-API | ✅ |
|
||||
| `backend/tests/test_blueprint_service.py` | Blueprint-Service-Layer | ✅ |
|
||||
| `backend/tests/test_dynamic_graph_builder.py` | Dynamischer Graph-Builder | ✅ |
|
||||
| `backend/tests/test_god_mode.py` | Human-in-the-Loop (approve/reject/modify) | ✅ |
|
||||
| `backend/tests/test_run_service.py` | Run-History-Service | ✅ |
|
||||
| `backend/tests/test_run_store.py` | In-Memory-Run-Store | ✅ |
|
||||
| `backend/tests/test_tools.py` | Web-Search und PDF-Reader (gemockt) | ✅ |
|
||||
|
||||
## 2. Frontend-Unit-Tests
|
||||
|
||||
| Datei | Beschreibung | Status |
|
||||
|-------|-------------|--------|
|
||||
| `frontend/app/__tests__/` | Vitest-Tests für React-Komponenten | ✅ |
|
||||
|
||||
---
|
||||
|
||||
## 3. E2E-Test-Szenarien (für Playwright / Cypress — Post-MVP)
|
||||
|
||||
### TC-E2E-001: Council erstellen und ausführen (Happy Path)
|
||||
|
||||
**Voraussetzung:** Backend läuft auf Port 8000, Frontend auf 3000
|
||||
|
||||
**Schritte:**
|
||||
1. Öffne `http://localhost:3000`
|
||||
2. Wechsel zum Tab „Rat-Architekt"
|
||||
3. Ziehe einen Agent-Node auf den Canvas
|
||||
4. Setze Name: „Test Master", System-Prompt: „Du bist ein Test-Agent"
|
||||
5. Ziehe einen zweiten Node (Critic)
|
||||
6. Verbinde die Nodes mit einer linearen Edge
|
||||
7. Klicke „Speichern" → Bestätigungsmeldung erscheint
|
||||
8. Wechsel zum Tab „Konferenzzimmer"
|
||||
9. Gib Prompt: „Schreibe einen kurzen Test-Text" ein
|
||||
10. Wähle „Auto-Pilot"
|
||||
11. Klicke „Starten"
|
||||
12. Beobachte: Erster Node pulsiert gelb
|
||||
13. Nach Abschluss: Finaler Text erscheint im Output-Bereich
|
||||
|
||||
**Erwartetes Ergebnis:** Run erreicht `status=completed`, `final_draft` nicht leer
|
||||
|
||||
---
|
||||
|
||||
### TC-E2E-002: God Mode — Approve
|
||||
|
||||
**Schritte:**
|
||||
1. Wähle „God Mode" im Toggle
|
||||
2. Starte Run mit beliebigem Prompt
|
||||
3. Nach erstem Node: Overlay erscheint
|
||||
4. Klicke „Genehmigen"
|
||||
5. Nächster Node startet (pulsiert)
|
||||
6. Bis Abschluss: alle Nodes genehmigen
|
||||
|
||||
**Erwartetes Ergebnis:** Run erreicht `status=completed`
|
||||
|
||||
---
|
||||
|
||||
### TC-E2E-003: God Mode — Reject
|
||||
|
||||
**Schritte:**
|
||||
1. Starte Run in God Mode
|
||||
2. Overlay erscheint
|
||||
3. Klicke „Ablehnen"
|
||||
|
||||
**Erwartetes Ergebnis:** Run `status=failed`, Fehlermeldung „Rejected by user" sichtbar
|
||||
|
||||
---
|
||||
|
||||
### TC-E2E-004: PDF-Upload und Verwendung
|
||||
|
||||
**Schritte:**
|
||||
1. Öffne `POST /api/councils/upload-pdf` mit Test-PDF
|
||||
2. Response enthält `chunks_ingested > 0`
|
||||
3. Erstelle Council mit Agent, der `pdf_reader=true` hat
|
||||
4. Starte Run mit Thema aus dem PDF
|
||||
5. Agent-Output referenziert PDF-Inhalte
|
||||
|
||||
**Erwartetes Ergebnis:** Chunks werden korrekt eingelesen und sind abrufbar
|
||||
|
||||
---
|
||||
|
||||
### TC-E2E-005: WebSocket-Events in korrekter Reihenfolge
|
||||
|
||||
**Schritte:**
|
||||
1. Verbinde mit `WS /ws/council/{run_id}`
|
||||
2. Starte Run
|
||||
3. Zeichne alle empfangenen Events auf
|
||||
|
||||
**Erwartetes Ergebnis:**
|
||||
```
|
||||
{"node": "master_agent", "status": "running"}
|
||||
{"node": "master_agent", "status": "completed"}
|
||||
{"node": "critic_agent", "status": "running"}
|
||||
{"node": "critic_agent", "status": "completed"}
|
||||
... (ggf. Schleife)
|
||||
{"node": "writer_agent", "status": "running"}
|
||||
{"node": "writer_agent", "status": "completed"}
|
||||
{"status": "done"}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 4. Test-Mocking-Konventionen
|
||||
|
||||
```python
|
||||
# Standard-Mock-Pattern für alle Agent-Tests (CLAUDE.md-Anforderung)
|
||||
from unittest.mock import patch, MagicMock
|
||||
|
||||
@patch("agents.master_agent.ChatAnthropic")
|
||||
def test_master_agent_node_appends_to_messages(mock_llm):
|
||||
mock_llm.return_value.invoke.return_value = MagicMock(content="Draft v2")
|
||||
state = {...}
|
||||
result = master_agent_node(state)
|
||||
assert result["current_draft"] == "Draft v2"
|
||||
```
|
||||
|
||||
**Regeln (aus CLAUDE.md):**
|
||||
- ❌ Niemals echte LLM-API-Aufrufe in Tests
|
||||
- ❌ Kein shared Test-Datenbankzustand (Transactions rollback)
|
||||
- ❌ Kein Snapshot-Test für React Flow Canvas
|
||||
- ✅ Immer beide Seiten der Threshold-Grenze testen (7.9 und 8.0)
|
||||
|
||||
---
|
||||
|
||||
## 5. Coverage-Ziele
|
||||
|
||||
| Modul | Ziel-Coverage |
|
||||
|-------|--------------|
|
||||
| `backend/state.py` | ≥ 90 % |
|
||||
| `backend/services/graph_builder.py` | ≥ 90 % |
|
||||
| `backend/services/dynamic_graph_builder.py` | ≥ 85 % |
|
||||
| `backend/agents/` | ≥ 80 % |
|
||||
| `backend/api/` | ≥ 75 % |
|
||||
| `backend/tools/` | ≥ 75 % |
|
||||
Loading…
Add table
Add a link
Reference in a new issue