You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the SeederPlugin allows for deterministic random behavior via global seeding options such as --seed and --fixed-seed. However, there is no flexibility for configuring seeds or the use_fixed_seed behavior at the scenario level. This feature request proposes the addition of a @seed decorator, which would allow users to set both a custom seed and the use_fixed_seed parameter for individual scenarios.
Proposed Solution:
Introduce a @seed decorator that supports both a custom seed and an optional use_fixed_seed parameter at the scenario level. This would provide flexibility for users to define:
A specific seed for individual scenarios.
Whether the seed should remain fixed across multiple executions of that scenario within the same test run.
This per-scenario configuration would override the global seed and use_fixed_seed settings for those specific scenarios.
The decorator would accept two parameters:
seed: A string that specifies the seed for the scenario.
use_fixed_seed: A boolean (optional) to indicate whether the seed should remain fixed for repeated runs of the scenario within the same test run.
The Scenario is seeded with "custom-seed-123", ensuring deterministic random behavior.
The use_fixed_seed=True option ensures that the same seed will be used for each repetition of the scenario in a single test run, even if it's repeated multiple times.
If the use_fixed_seed parameter is not provided, it will default to the global setting, allowing flexibility without needing to redefine it for every scenario.
The text was updated successfully, but these errors were encountered:
Summary:
Currently, the
SeederPlugin
allows for deterministic random behavior via global seeding options such as--seed
and--fixed-seed
. However, there is no flexibility for configuring seeds or theuse_fixed_seed
behavior at the scenario level. This feature request proposes the addition of a@seed
decorator, which would allow users to set both a custom seed and theuse_fixed_seed
parameter for individual scenarios.Proposed Solution:
Introduce a
@seed
decorator that supports both a custom seed and an optionaluse_fixed_seed
parameter at the scenario level. This would provide flexibility for users to define:This per-scenario configuration would override the global seed and
use_fixed_seed
settings for those specific scenarios.The decorator would accept two parameters:
seed
: A string that specifies the seed for the scenario.use_fixed_seed
: A boolean (optional) to indicate whether the seed should remain fixed for repeated runs of the scenario within the same test run.Example Usage:
In this example:
Scenario
is seeded with"custom-seed-123"
, ensuring deterministic random behavior.use_fixed_seed=True
option ensures that the same seed will be used for each repetition of the scenario in a single test run, even if it's repeated multiple times.If the
use_fixed_seed
parameter is not provided, it will default to the global setting, allowing flexibility without needing to redefine it for every scenario.The text was updated successfully, but these errors were encountered: