Set aside a field that changes every run
Stop a field that differs on every run from showing as a change nobody announced.
See the field change
Section titled “See the field change”The greeting below answers with servedBy, the id of the process that served it. Nothing changed between the base and
the head, yet each run has another process, so the comparison reports a slip.
$ rehearse compare0 as on the base · 1 changed without saying so
changed without saying so: The greeting says hello (greeting.hurl:2) $.servedBy: 1351401 → 1351426
unannounced, by what changed: $.servedBy — in 1 scenario
1 id, time or opaque value was set aside before comparing.Rehearse sets aside ids, times and opaque values on its own. A plain number under a key it doesn’t know as an id is compared.
Add a rule
Section titled “Add a rule”Name the key in setAside in rehearse.yaml. Each entry of keys is a regular expression over JSON keys, and their
values are set aside.
base: mainservices: api: up: node server.mjs {{port}} port: auto ready: http://127.0.0.1:{{port}}/healthscenarios: calls: ['**/*.hurl']setAside: keys: ['^servedBy$']Compare again. Rehearse keeps observations raw, so the rule applies to the cached base without running it again.
$ rehearse compare1 as on the base
2 ids, times and opaque values were set aside before comparing.1 base observation came from the cache (a7e89b212432).The field is set aside on both sides, and the count says so. For text, such as a value inside an accessibility tree,
use values instead; to protect one field from the rules, list it under keep. See
setAside.