Implement Feature Acceptance Tests
BPE-4 Order: #4 Construction Has Dependencies
Updated 4 weeks, 2 days ago
Guidance
APPEND TO GUIDANCE:
TFK Integration: Behave-Based Acceptance Tests
Feature acceptance tests are executed via behave-django against .feature files in docs/features/ (spec + AT runner — single source of truth). There is no separate tests/acceptance/ tree and no promote/copy step.
Updated Process
- Locate spec: Find the feature's BDD scenarios in
docs/features/act-*/. - Verify steps exist: Check that all steps used in the spec have implementations in
docs/features/steps/. If any are missing, invoke TFK-07. - Remove
@wipwhen ready: Tag unimplemented scenarios@wipduring ESM; remove the tag when implementation is complete so CI runs them (behave.iniusestags = ~@wip). - Prepare fixtures: Check the Fixture Library Catalog for needed test data. If presets are missing, invoke TFK-07.
- Run acceptance tests:
make test-at(runsdocs/features/viabehave.ini). - The dual approach remains: Django test client unit/integration tests remain valuable for fast feedback. Behave AT runs the same scenarios through the BDD layer. Both must pass.
Key Principle
Acceptance tests are the real thing minus the GUI (Django test client — not Playwright). No mocking. The .feature file in docs/features/ IS the grounding executable requirements document for AT.
Skills (additional)
- Behave-Django BDD Runner (BDD_RUNNER)
Inputs (additional)
- Step Library Catalog (Document, Required) — produced by TFK-03.
- Fixture Library Catalog (Document, Required) — produced by TFK-04.
- Behave Configuration (Code, Required) — produced by TFK-02 (Artifact #51).
TFK Integration: Behave-Based Acceptance Tests
Feature acceptance tests are executed via behave-django against .feature files in docs/features/ (spec + AT runner — single source of truth). There is no separate tests/acceptance/ tree and no promote/copy step.
Updated Process
- Locate spec: Find the feature's BDD scenarios in
docs/features/act-*/. - Verify steps exist: Check that all steps used in the spec have implementations in
docs/features/steps/. If any are missing, invoke TFK-07. - Remove
@wipwhen ready: Tag unimplemented scenarios@wipduring ESM; remove the tag when implementation is complete so CI runs them (behave.iniusestags = ~@wip). - Prepare fixtures: Check the Fixture Library Catalog for needed test data. If presets are missing, invoke TFK-07.
- Run acceptance tests:
make test-at(runsdocs/features/viabehave.ini). - The dual approach remains: Django test client unit/integration tests remain valuable for fast feedback. Behave AT runs the same scenarios through the BDD layer. Both must pass.
Key Principle
Acceptance tests are the real thing minus the GUI (Django test client — not Playwright). No mocking. The .feature file in docs/features/ IS the grounding executable requirements document for AT.
TFK boundary: AT (user-visible) vs @agent_proof pytest
Do not express agent orchestration proofs as Behave scenarios.
| Concern | Layer | Runner | Marker / location |
|---|---|---|---|
| User-visible behavior, screens, HTMX, API responses humans see | AT | behave-django (make test-at) |
.feature in docs/features/ |
| Agent control-plane wiring (PRF-*): tool allowlists, blackboard, plan handoff, HITL gates, 429 retry | Integration | pytest @pytest.mark.agent_proof |
tests/integration/agent/ |
| Deterministic shell (lane 2): D0 pre-filter, JSON parse, validate-before-LLM | Integration | pytest (no @agent_proof) |
tests/integration/ |
| Model quality / golden tasks (TASK-*, lane 4) | Eval | pytest @pytest.mark.quality + @pytest.mark.live_llm |
tests/fixtures/agent_tasks/ — nightly, not AT |
Rules:
- AT proves what the user sees — forms, redirects, ChangeSet approval UI, error messages.
- @agent_proof proves what the agent loop did under CAP-004 ScriptedLLM — trace beats via assert_agent_story, not chat prose assertions in Gherkin.
- When a feature touches both surfaces, BPE-04 adds/updates .feature scenarios and BPE-02 (or the agent slice) adds @agent_proof tests — both green before DoD; neither substitutes for the other.
- Skip @agent_proof rows in BPE-04 when SAO §17 is N/A.
Skills (additional)
- Behave-Django BDD Runner (BDD_RUNNER)
- Agent Integration Proof Patterns (TEST_INTEGRATION) — when SAO §17 in scope; AT does not replace this skill
Inputs (additional)
- Step Library Catalog (Document, Required) — produced by TFK-03.
- Fixture Library Catalog (Document, Required) — produced by TFK-04.
- Behave Configuration (Code, Required) — produced by TFK-02 (Artifact #51).
- Agent Proof Table (from BPE-01 Section G, when SAO §17) — PRF rows map to pytest, not
.featurefiles.
Details
- Order:
- #4
- Phase:
- Predecessor:
- BPE-3 Implement Frontend
- Created:
- Apr 12, 2026
- Last Updated:
- Aug 21, 2026
Workflow
Build Feature
Interactive, feature-by-feature AI-assisted development. Use BPE after ESM, DTA, DSP, and BSP are complete to build one feature spec at …
View WorkflowAssigned Agent
Dr. Dobbs v2
Cautious Developer Agent Guide Motto: "Code that's easy to prove correct is code that works" …
Required Skills
- pytest Continuous Testing TEST_FRAMEWORK pytest+Python
Rules
-
Not Mock In Integration Tests
do-not-mock-in-integration-tests -
Runner
do-runner -
Test First
do-test-first -
Test Fixture Data Management
do-test-fixture-data-management
Input Artifacts 4
-
Feature Files
Document
Required
Produced by: Write Feature Files -
HTML Mockups
Code
Produced by: Create Mockups -
Implementation Plan Template
Document
Required
Produced by: Plan Feature -
Screen Flow / Dialogue Map
Diagram
Required
Produced by: Create Dialogue Maps
Output Artifacts
No output artifacts