The "time_limit" configuration parameter plays a crucial role in Redefine as it allows you to balance the trade-off between CI execution time and test coverage. In the Redefine test selection model, tests are selected based on changes made to your codebase. This optimization can be customized to suit specific risk tolerance levels and resource availability.
By utilizing the "time_limit" configuration, you gain control over the duration of each testing session. This enables you to receive rapid feedback and effectively manage your resources. The time limit is measured in CPU time (seconds) and determines the total testing time (excluding test setup and teardown). This derived testing time can be used to adjust the model's accuracy, which refers to the probability of the model selecting failed tests within the given time constraint.
It's important to note that the "time_limit" parameter is not fixed and can be adjusted as per dynamic requirements, improvements in model performance, and changes in testing paradigms.
To set the time limit, run the following command:
redefine config set time_limit=<time_limit>