pytest-dev / pytest-dev/pytest-bdd

Documentation request: pytest-bdd execution explanation

Open
#348 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
251
Avg merge
43m
Merged PRs (30d)
2

Description

I found the docs helpful for describing the different components within the framework - like feature files, step definitions, scenario decorators, etc. - but not for explaining how they work together.

What exactly happens when you run pytest with pytest-bdd?

At a high level, I imagine it goes something like this:

  1. Scan for feature files
  2. Create list of scenarios and step definitions from feature files
  3. Scan for scenario and step definitions
  4. Create list of scenario/step definitions
  5. For each step in each scenario, try to find a step definition and execute if found

I wonder if adding a brief section describing how it the framework executes might help clarify how it is meant to be used.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the existing pytest-bdd documentation for feature files, step definitions, scenario decorators, and pytest execution; the issue names no specific file or test. Document the high-level execution flow from running pytest through scenario and step-definition matching, with the result being a brief explanation of how the components work together.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, testing
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.