Skip to content

parallel support - #616

Open
xrg wants to merge 435 commits into
behave:mainfrom
xrg:eparallel
Open

xrg wants to merge 435 commits into
behave:mainfrom
xrg:eparallel

Conversation

@xrg

@xrg xrg commented Jan 3, 2018

Copy link
Copy Markdown

This is a refactoring of tokunbo/behave-parallel, as in issue #235 . At this take, I have let the multiprocessing module fork before loading context or running any hooks. Then, the jobs are communicated using their id() (because of the fork, these mem. positions remain identical to the children) and then results are pushed back to the master (as primitive types, too). They are gathered in the master and "replayed" using the formatters/reporters.

This take seems to work well, and solves a problem where customized steps would not be pickle-able for tokunbo's approach.

jenisys and others added 30 commits August 28, 2013 15:56
JSON formatter can now generate valid JSON output.
  * behave.step_durations.py: Shows longest step durations based on JSON data.
  * json.format.py: Reformats JSON files (and validates well-formedness).
… (and table annotations) and step processing with tables.
…ble).

Refactor out common parts to behave.model_describe (and reuse them).
Adapt pretty formatter accordingly.
Change output to improve readability in XML file (complete scenario).
Change output related to step failures slightly.
…that the parser does not raise an exception if they are encountered
CHANGES:

  * Add description attribute also to ScenarioOutline ctor.
  * Move description parameter to end of Scenario/ScenarioOutline ctor.
    => Problem because parameter was already used by steps.
  * Extend JsonFormatter to store Scenario/ScenarioOutline description.
  * Extend json_parser to handle Scenario/ScenarioOutline description.
  * Cleanup/refactor parser to avoid duplicated code fragments:
    => _build_*_statement()
    => subaction_detect_next_scenario() to avoid duplicated code fragments
    => action_next_scenario (tags and more...)
    => Add check that Background does not support tags.
    => ParseError: Add stripped line to exception message (better context).
@jenisys
jenisys force-pushed the main branch 3 times, most recently from eccf022 to 93e1218 Compare June 16, 2024 16:10
@jenisys
jenisys force-pushed the main branch 2 times, most recently from cc16ac0 to 22569f4 Compare October 14, 2024 20:09
@jenisys
jenisys force-pushed the main branch 2 times, most recently from 01407cf to 42e64a9 Compare October 24, 2024 23:28
@withnale

Copy link
Copy Markdown

I'd love to see this feature and would be happy to try and contribute some time to making it happen.

However, this branch has been around for too long with the branch originated so so so many years ago. I've tried to rebase this and there is so much complexity to it beyond "just" the multiprocessing element (which is relatively complex on its own.

Is there any way to break down this change into multiple PRs that can all be merged independently?

@jenisys
jenisys force-pushed the main branch 9 times, most recently from 9dc617b to b8b23bc Compare July 16, 2025 21:43
@jenisys
jenisys force-pushed the main branch 4 times, most recently from 612d6d1 to 5796057 Compare August 4, 2025 06:58
@jenisys
jenisys force-pushed the main branch 6 times, most recently from 370ce68 to cba3c4f Compare August 31, 2025 15:00
@wiebren

wiebren commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

@withnale I / Claude had a stab at this; wiebren@26b07b3

treat as highly experimental, when I have some more confidence I may make a PR request out of it to upstream it

@wiebren

wiebren commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

@withnale I / Claude had a stab at this; wiebren@26b07b3

treat as highly experimental, when I have some more confidence I may make a PR request out of it to upstream it

now available as a separate package; https://github.com/wiebren/behave-parallel-runner

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.