Configuration Parameters
The stable branch is the name of the main working branch in the repository. For example, you can use
main
as the stable branch name.Configuring the stable branch is a mandatory step in using Redefine.
To set the stable branch, run the following command:
redefine config set stable_branch=<stable_branch_name>
The time budget represents the maximum expected testing time for an optimized run, measured in seconds. It allows you to define the maximum duration your tests should take. For example, to set a time budget of 5 minutes, configure the value as
300
seconds.Please note that the time budget includes the total testing time, accounting for parallelism. For instance, if a run is expected to take 5 minutes with 3 parallel processes, the configured time budget should be set to
900
seconds.To set the time budget, use the following command:
redefine config set budget=<budget_in_seconds>
When using Optimize/Fail-Fast modes, it is mandatory to configure either a time budget or a time limit. If you prioritize accuracy over time in the optimized runs, we recommend using a time budget.
The time limit represents the maximum clock time for an optimized run, measured in seconds. It defines the overall duration of the testing phase from start to end. For example, to set a time limit of exactly 5 minutes, configure the value as 300 seconds.
Unlike the time budget, the time limit refers to the precise start-to-end time. If a run is expected to take 5 minutes with 3 parallel processes, the configured time limit should still be 300 seconds.
To set the time limit, use the following command:
redefine config set time_limit=<time_limit_in_seconds>
When using Optimize/Fail-Fast modes, it is mandatory to configure either a time budget or a time limit. If prioritizing the maximum time for the run over precise accuracy is important, we recommend using a time limit.
The
flaky_filter_threshold
config is used to skip tests that have a high flake rate, which is defined as the percentage of test runs in the last 30 days that were flaky. By default, the value is set to 1, which means that no tests are skipped based on flakiness. To skip tests based on flakiness, set the value of flaky_filter_threshold
to a number between 0.01 and 1, representing the maximum allowable flake rate as a percentage. For example, setting it to 0.15 would skip tests that have a flake rate of 15% or higher.To set the value of
flaky_filter_threshold
, run the following command: redefine config set flaky_filter_threshold=<threshold_value>
This config determines whether Redefine should send non-anonymized test metadata to the server. By default, this is set to true, which means that test metadata will be sent to the server for analysis. Note that this metadata is sent only for the tests and not for the code.
Test metadata includes information such as test names and file names, and is used to provide insights in the Test Inspection Dashboard. If this config is set to false, test metadata will be anonymized and will not be sent to the server.
To set the value of this config, use the following command:
redefine config set report_tests_metadata=<true/false>
This config determines how Redefine should behave in case of a failure or error. By default, if a failure occurs, Redefine will run all tests. However, you can change this behavior by setting the
fallback_strategy
config.The available options are:
FALLBACK_STRATEGY_RUN_ALL
: If an error occurs, Redefine will run all tests.FALLBACK_STRATEGY_RUN_NOTHING
: If an error occurs, Redefine will not run any tests.
Note that this config is used only in case of an error or failure. If everything runs smoothly, the value of
fallback_strategy
will not affect the behavior of Redefine.To set the value of this config, use the following command:
redefine config set fallback_strategy=<fallback_strategy>
To enable AI Slack Notifications, you need to configure Redefine tool to send the messages from the CI. Run the following command before starting Redefine in your CI workflow:
redefine config set slack_bot_enabled=true
Last modified 3d ago