lighthouse-ci
lighthouse-ci copied to clipboard
Matrix doesn't stop on first matched route
Describe the bug
Having following lighthouserc.yml
- matchingUrlPattern: .*/some-specific-path.*
- matchingUrlPattern: .*
when runing it against /some-specific-path it matches both pattern.
2 result(s) for https://xxx/some-specific-path :
✘ categories.performance failure for minScore assertion
expected: >=0.96
found: 0.51
all values: 0.51
✘ categories.performance failure for minScore assertion
expected: >=0.97
found: 0.51
all values: 0.51
To Reproduce Steps to reproduce the behavior:
ci:
assert:
assertMatrix:
- matchingUrlPattern: .*/some-specific-path.*
assertions:
categories:performance: [ error, { minScore: 0.95 } ]
## Default pattern for all other urls
- matchingUrlPattern: .*
assertions:
categories:performance: [ error, { minScore: 0.97 } ]
collect:
numberOfRuns: 1
Expected behavior When I run against url "/some-specific-path" to assert only against performance: .95 When I run against url "/" to assert only against performance: .97
Actual behaviour
1 result(s) for https://xxxx/ :
✘ categories.performance failure for minScore assertion
expected: >=0.97
found: 0.44
all values: 0.44
2 result(s) for https://xxxx/some-specific-path/ :
✘ categories.performance failure for minScore assertion
expected: >=0.95
found: 0.46
all values: 0.46
✘ categories.performance failure for minScore assertion
expected: >=0.97
found: 0.46
all values: 0.46
Environment (please complete the following information):
- OS: Docker image
- Browser N/A
- Version latest
Additional context
Hello!!
I face the same issue and I understand why. This being said it is much harder to "unmatch" a url than to match it.
Could we have an ignoreUrlPattern
configuration to accomplish this unmatching?
Thank you in advance.
Hello!!
I face the same issue and I understand why. This being said it is much harder to "unmatch" a url than to match it.
Could we have an
ignoreUrlPattern
configuration to accomplish this unmatching?Thank you in advance.
My understanding is that it will match first route only.