You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1) Polls Concerns behaves like notifiable in-app Multiple users commented on my notifiable
Failure/Error: find(".icon-notification").click
Capybara::ElementNotFound:
Unable to find visible css ".icon-notification"
Shared Example Group: "notifiable in-app" called from ./spec/features/polls/polls_spec.rb:6
# ./spec/shared/features/notifiable_in_app.rb:35:in `block (2 levels) in <top (required)>'
How
Explain why the test is flaky, or under which conditions/scenario it fails randomly
Explain why your PR fixes it
Create a backport PR to consul/consul when the fixing PR is approved
Tips for flaky hunting
Random values issues
If the problem comes from randomly generated values, running multiple times a single spec could help you reproduce the failure by running at your command line:
forrunin {1..10}
do
bin/rspec ./spec/features/budgets/investments_spec.rb:256
done
You can also try running a single spec in Travis:
Add option :focus to the spec and push your branch to Github, for example:
scenario'Show',:focusdo
But remember to remove that :focus changes afterwards when submitting your PR changes!
Test order issues
Running specs in the order they failed may discover that the problem is that a previous test sets an state in the test environment that makes our flaky fail/pass. Tests should be independent from the rest.
After executing rspec you can see the seed used, add it as an option to rspec, for example: bin/rspec --seed 55638 (check Randomized seed value at beginning of issue)
Other things to look for
Time related issues (current time, two time or date comparisons with milliseconds/time when its not needed)
The text was updated successfully, but these errors were encountered:
MariaCheca
changed the title
Flaky spec: olls Concerns behaves like notifiable in-app Multiple users commented on my notifiable
Flaky spec: Polls Concerns behaves like notifiable in-app Multiple users commented on my notifiable
Feb 16, 2018
Tests that fail randomly are called "flakies", this one seems to be one:
Randomized seed: 6508
Travis failed build: https://travis-ci.org/AyuntamientoMadrid/consul/jobs/341029344
How
Tips for flaky hunting
Random values issues
If the problem comes from randomly generated values, running multiple times a single spec could help you reproduce the failure by running at your command line:
You can also try running a single spec in Travis:
Add option
:focus
to the spec and push your branch to Github, for example:But remember to remove that
:focus
changes afterwards when submitting your PR changes!Test order issues
Running specs in the order they failed may discover that the problem is that a previous test sets an state in the test environment that makes our flaky fail/pass. Tests should be independent from the rest.
After executing rspec you can see the seed used, add it as an option to rspec, for example:
bin/rspec --seed 55638
(check Randomized seed value at beginning of issue)Other things to look for
The text was updated successfully, but these errors were encountered: