Configuration
Contents
Configuration#
BlueRacer comes with sane default values for when to scream at you that a certain Pull Request made the tests slower. These thresholds can be customized for each of your repos using a .blueracer.cfg
file. Additionally, some other features can be configured to better fit your use case.
Thresholds#
BlueRacer recognizes two levels of tests slowness:
ok
: No slowdown detected, display ✔️ in the Pull Request comment.warn
: There is potentially a problem, display 👀 in the Pull Request comment.fail
: There is probably a problem, display ❌ and scream in the Pull Request comment, also block merging of the Pull Request.
Thresholds defining when to escalate to the next level are:
if the entire suite duration increases by 10%, escalate to
warn
,if the entire suite duration increases by 30%, escalate to
fail
,if the mean test duration increases by 10%, escalate to
warn
,if the mean test duration increases by 20%, escalate to
fail
,if number of tests increases by 10%, escalate to
warn
.
Each of these thresholds can be configured individually by adding the following to .blueracer.cfg
:
[fail]
suite_duration = 30
duration_per_100_tests = 20
[warn]
suite_duration = 10
duration_per_100_tests = 10
number_of_tests = 10
Pull Request comment updates#
On subsequent CI re-runs, BlueRacer updates its initial comment instead of posting a new one. You can disable this feature so BlueRacer will post a new comment for each CI re-run.
[comments]
update_existing_comment = false
Default values#
For reference, here is the full configuration file, along with default values.
[fail]
# Percentage increase of test suite duration to fail pull request
suite_duration = 30
# Percentage increase of duration per 100 tests to fail pull request
duration_per_100_tests = 20
[warn]
# Percentage increase of test suite duration to raise a warning comment
suite_duration = 10
# Percentage increase of duration per 100 tests to raise a warning comment
duration_per_100_tests = 10
# Percentage increase of number of tests to raise a warning comment
number_of_tests = 10
[comments]
# Update existing comment on reruns instead of posting a new one
update_existing_comment = true