-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjustments in Settings UI tests to avoid flakyness #2737
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...roidTest/java/com/owncloud/android/settings/camerauploads/OCSettingsLocalFolderPickerTest.kt
Outdated
Show resolved
Hide resolved
4d6d410
to
43fca1a
Compare
After merging #2725, the Log menu UI has changed, so the tests were failing in the BitRise push job. Latest commit adapts it, by simple checks on the new options. |
43fca1a
to
80f0010
Compare
@hannesa2 i guess you trigger the tests in a local emulator. By executing in a real device, and also BitRise are working. Taking a look as well |
I've been executing the tests in a Nexus 6P emulator and there's some intent errors triggered during I've performed some changes there and it increased a bit the success rate. Could you check them @jesmrec ? It would be great to have 100% even with emulator. Anyway, this issue is about the Settings tests, not all of instrumented ones so first we want the Settings tests to be fixed and the other related to shares and capabilities are being fixed via #2728 So as soon as the Setting tests are not flacky anymore (no more OCSettingsWhatever tests failing when executing |
e19fccc
to
f9f75c7
Compare
I have get rid of the ugly implicit wait in the I have updated and performed more testing, with the following results:
Which emulators are you using @davigonz @hannesa2? do you trigger directly with |
@jesmrec thanks for this detailed report, the work done here is enough imho. We can not guarantee the tests passing in all emulators for now, Bitrise was the blocker here and the tests are passing there now and also in at least, a local emulator. There seems to be a problem with Nexus 6P emulators. |
…al folder picker activity. remove non-significant flaky test
f9f75c7
to
b535e51
Compare
Ugly code of the review was removed from the PR, and conversation was resolved.
Tests are properly passing on Bitrise |
which emulator are you using? Pixel? Nexus? as i have written above, in different emulators i got different results. Also, it'd be helpful to know which tests are failing, since there are other PRs with fixed tests. |
my idea is the same, but... when things do not work, you have to know where the problem is (in order to fix it... ). Thanks for the additional info, i will take a look. |
Issues: #2732 #2709
Some actions performed:
For these tests, the whole preferences activity was loaded, taking advantage that the section is on the top (visible at a glance). Some tests were flaky because the activity takes a bit longer in loading, before the action over the camera uploads checkbox is done (this is something not desirable that the testing framework should take care). Therefore, the dialog warning users to set up correctly the camera uploads is not displayed, failing the matcher over the "OK" button.
As fix, the activity is only loaded with the camera uploads section.
Here, the fix is a bit hacky. An implicit wait till the UI componentes are visible to launch the tests. Although there is a loop, it will not be infinite since the
activityRule
always is created.The test for cancelling the activity was removed. It was being flaky due to
isFinishing
assertion. Such test is not a critical one (too far from this.. it only checks that a cancelled view is dismissed). So, better to get rid of.These fixes were tested with: