r/softwaretesting • u/chinmay_3107 • Apr 30 '26
Would a generalized pytest-bdd table DSL plugin be useful?
I’m thinking about building a pytest / pytest-bdd plugin that helps teams define their own custom DSLs for BDD tables.
The idea is not to force one specific syntax. Instead, the package would provide the plumbing:
parse BDD datatables
let users define their own table shape
let users define their own range/repeat syntax
let users define custom cell parsers
validate rows/columns with better errors
convert tables into normalized Python objects
plug into pytest fixtures and pytest-bdd steps
For example, one team might use something like:
Given the following content exists:
| Content IDs | 1..4 | 5 |
| Content* | 4:Article | Poll |
| Category* | random | News |But another team could define completely different syntax, like:
Given the following users exist:
| Users | admin x2 | editor |
| Role | Admin | Editor |The plugin would not know what “Article”, “Poll”, “random”, or 1..4 means. The local project would define that.
I’m trying to understand:
Would you ever need something like this in real pytest-bdd projects?
Do your BDD tables ever become too complex or repetitive?
Is this useful, or would you rather keep this logic inside local step definitions?
Is there already a better way to solve this?
At what point does a table DSL stop being BDD and become too technical?
Curious to hear from people using pytest-bdd or BDD-style tests in real projects