ITADN

Add generic Gherkin adapter for zero-code BDD scenarios

#261Closediammac2 创建于 2026-03-01
I
iammac2commented
## Summary Adds `examples/behave/gherkin_adapter/` — a self-contained example that lets you write plain-English Gherkin feature files and drive Alumnium with **no hand-coded step definitions per scenario**. Step text is forwarded verbatim to `Alumni.do()` (Given/When) or `Alumni.check()` (Then). One generic step file handles any feature file. Closes #<issue-number> ## Files added | File | Purpose | |---|---| | `steps/adapter.py` | `GherkinStep` dataclass + `AlumniumGherkinAdapter` | | `steps/alumnium_steps.py` | Catch-all behave dispatcher | | `features/environment.py` | Playwright lifecycle template | | `features/saucedemo.feature` | Scenario + Scenario Outline examples | | `features/compliance.feature` | Doc Strings, Data Tables, `*` keyword | | `alumnium-gherkin.md` | Overview and getting started guide | `behave.ini` updated to include the new example path. ## Design decision Delivered as an example rather than a library sub-package to keep Alumnium framework-agnostic. No `behave` dependency added to `pyproject.toml`. ## Testing poetry run behave examples/behave/gherkin_adapter/ --dry-run ALUMNIUM_MODEL=ollama/mistral-small3.1:24b poetry run behave examples/behave/gherkin_adapter/ --no-capture poetry run behave # existing suite unaffected make check-format ## Contributor https://neuno.ai
关闭于 2026-03-18 1 条评论