Configuration Parameters

confidence

The confidence configuration setting ensures test reliability by defining the level of confidence required before Redefine can stop the run. By tailoring the confidence level, you can effectively manage the trade-off between test completeness and time efficiency. Selecting a lower confidence level may reduce testing time but could increase risk, whereas a higher level is safer and has a lesser chance of missing a failed test but demands more time. Redefine recommends using the default setting.

Type: enum

Options: high / normal / low

Default value: normal - This setting offers a balanced approach between test thoroughness and time efficiency.

To set the confidence level, use the following command:

redefine config set confidence=<confidence_level>

min_accuracy

The min_accuracy configuration acts as a safety measure against drops in accuracy. It ensures continuous test execution until the desired accuracy is achieved. This helps prevent scenarios of extended test duration or sudden infrastructure changes causing inadequate test coverage.

Type: float the range is [0, 1]

Default value: 0 meaning do not use min_accuracy

To set the minimum accuracy, use the following command:

redefine config set min_accuracy=<min_accuracy>

time_limit

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.

Type: float

Default value: 0

To set the time limit, use the following command:

redefine config set time_limit=<time_limit_in_seconds>

flaky_filter_threshold

The flaky_filter_threshold config is used to skip tests with a high flake rate, which is defined as the percentage of test runs in the last 30 days that were flaky. To skip tests based on flakiness, set the value of theflaky_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 with a flake rate of 15% or higher.

Type: float the range is [0, 1]

Default value: 1.0 meaning don't skip any tests

To set the value of the flaky_filter_threshold, run the following command:

redefine config set flaky_filter_threshold=<threshold_value>

report_tests_metadata

This config determines whether Redefine should send non-anonymized test metadata to the server. The test metadata includes information such as test and file names, and its purpose is to provide insights into the Test Inspection Dashboard. If this config is set to false, the test metadata will be anonymized and will not be sent to the server.

Note that this metadata is sent only for the tests and not for the code.

Default value: true (Tests metadata will be sent to Redefine's server for analysis).

To set the value of this config, use the following command:

redefine config set report_tests_metadata=<true/false>

slack_bot_enabled

To enable AI Slack Notifications, you should configure Redefine's Slack integration to send the messages from the CI.

Type: boolean

Default value: false

Run the following command before starting Redefine in your CI workflow:

redefine config set slack_bot_enabled=true

disable_openai

To disable the OpenAI integration within the AI Slack Notifications, you may configure the Slack bot to now share information with OpenAI.

Type: boolean

Default value: false

Run the following command before starting Redefine in your CI workflow:

redefine config set disable_openai=true

file_based_prediction

To ensure the test execution order within each test file remains consistent, configure redefine to predict according to it.

Type: boolean

Default value: false

Run the following command before starting Redefine in your CI workflow:

redefine config set file_based_prediction=true

skip_known_failures

To reduce developer friction and prevent all changes from being blocked until the failed tests are fixed, we should skip tests that have already failed on the main branch. This approach will streamline the development process and allow continuous progress even while addressing the failed tests.

Type: boolean

Default value: true for Optimize Mode

Default value: false for Fail-Fast Mode

Default value: false for Prioritize Mode

To set the value of this config, use the following command:

redefine config set skip_known_failures=true

auto_uninstall

By default, Redefine automatically uninstalls after the first test executions to avoid impact for unrelated test executions. However, in certain scenarios, it may be necessary to keep the installation continuous for multiple consecutive test executions to ensure a valid Redefine installation. In such cases, it is recommended to modify the default behavior and set the auto_uninstall value to false.

Type: boolean

default value: true

redefine config set auto_uninstall=false

run_tests_on_file_change

This configuration controls whether Redefine automatically executes tests within a changed test file. By default, this configuration is enabled (true) to ensure running tests after changing them.

Type: boolean

Default value: true To set the value of this config, use the following command:

redefine config set run_tests_on_file_change=false

stable_branch

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.

Type: string

To set the stable branch, run the following command:

redefine config set stable_branch=<stable_branch_name>

Last updated