Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement configurable scenario execution scheduler #331

Open
7 of 8 tasks
Suremaker opened this issue Aug 23, 2023 · 1 comment
Open
7 of 8 tasks

Implement configurable scenario execution scheduler #331

Suremaker opened this issue Aug 23, 2023 · 1 comment
Labels
enhancement An enhancement of the feature or new feature LightBDD 4.X Future version of LightBDD
Milestone

Comments

@Suremaker
Copy link
Collaborator

Suremaker commented Aug 23, 2023

Description

Implement scenario execution scheduler with support for:

  • asynchronous test execution (i.e. starting the next scenario when the current one is blocked on await),
  • parallelization support by scheduling scenario execution on the thread pool, enabling non-async scenarios to execute in parallel),
  • controlling max concurrent scenario tasks that are executed at the same time (defaulting to Environment.ProcessorCount),
  • execution prioritization (High, Normal, Low) impacting the execution order,
  • execution model, being thread pool (default), dedicated single thread, and further options to customize (to enable UI test run),
  • constraint/isolation model, supporting concurrent execution and exclusive execution

Features

  • Asynchronous test execution,
  • Execution model: Thread pool parallelization,
  • Concurrency limits,
  • Execution prioritization,
  • Execution model: Dedicated single thread
  • Execution model: extensions
  • Isolation model: concurrent execution
  • Isolation model: exclusive execution
@Suremaker Suremaker added enhancement An enhancement of the feature or new feature LightBDD 4.X Future version of LightBDD labels Aug 23, 2023
@Suremaker Suremaker added this to the 4.0.0 milestone Aug 23, 2023
Suremaker added a commit that referenced this issue Aug 23, 2023
…lat scenario execution with callback mechanism

Updated ScenarioExecutionScheduler to use ThreadPool to run scenarios
Added IRuntimeObjectInfo with RuntimeId property
Changed ExecutionPipelineAdapter to avoid using AsyncLocal when mapping scenarios to xunit tests
Suremaker added a commit that referenced this issue Aug 23, 2023
Suremaker added a commit that referenced this issue Aug 31, 2023
…hread

Created IScenarioExecutionScheduler, IScenarioExecutionSchedulerAttribute and ScenarioExecutionSchedulerTypes allowing to use different schedulers for scenarios
Added RunOnDedicatedThreadAttribute allowing to use the new scheduler
@Suremaker
Copy link
Collaborator Author

Note: consider implementing another constraint attribute, similar to IScenarioExecutionSchedulerAttribute but in the namespace of IScenarioRequireExclusiveRunAttribute, that would allow further customizable constraining of the scenario execution, allowing for example additional throttling of the annotated tests

Suremaker added a commit that referenced this issue Sep 10, 2023
… race condition and spawning unnecessary threads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement of the feature or new feature LightBDD 4.X Future version of LightBDD
Projects
None yet
Development

No branches or pull requests

1 participant