-
Notifications
You must be signed in to change notification settings - Fork 696
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
Remove DEBUG output from functional tests, fix test requirements, add VNC server #3817
Remove DEBUG output from functional tests, fix test requirements, add VNC server #3817
Conversation
Originally was on DEBUG and was sending out mountains of output into the pytest process which made it difficult to assess anything. (cherry picked from commit a1f0134)
Now that torproject.org is back up, the next step is to update the version of Tor Browser on |
Pushed two commits to get the docker builds working again, note I also updated the pax flags for Tor Browser 8 based on our private infrastructure repo However we're hitting a new issue here which looks to be mozilla/geckodriver#913 likely due to the old version of geckodriver we are using. Indeed problems with Tor Browser 8 were reported over in webfp/tor-browser-selenium#105. Going to bump up versions of geckodriver (and Selenium if necessary) and see if that resolves... |
ok my attempts to resolve this CI issue so far are in commit 8da014e in
|
We should have the same version of |
yep, in 8da014e I am using Firefox ESR 60 which is what Tor Browser 8 is based on |
I tried updating to 8.0 last night as well; the teardown() function didn't seem to run between tests, so docker container ended up with a few dozen sets of firefox-esr,xvfb, and firefox.real processes, before running out of memory and giving up the ghost. |
Basically installed this because it can be used with pyvirtualdisplay as a backend AND because it brings in the Xvnc tooling which will start an X11 server as well as a VNC server.
Had to remove x11 display logic inside test scaffolding (initially tried to integrate it there but it kept building and destroying the VNC server per test). Made a VNC helper command with support for GNOME desktop and macOS (havent tested it on mac yet). Updated the docs
10 seconds is way too short.. 160 seconds.. maybe too long? Fingers crossed I can work with the team to get the wait_for logic running
Typically these actions were done manually but lets get our good old friend ansible to run them for us (at least under the upgrade env).
As per gitter, upgrading to geckodriver 0.22.0 seems to resolve this issue. The BadStatusLine messages are happening with 0.21.0 because it sets connection keep-alives to 5sec - this has been bumped to 90sec in 0.22.0. |
@msheiny stuck in a commit to skip pw prompt for remote-viewer. Works for me on Ubuntu but give it a lash on Debian? |
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.
🎉 not only are you a great canadian.. but you have fixed this PR from certain doom.
errr wait .. failing tests.. take it thats a new problem? |
im also getting the same failures locally that are happening in CI such as this gem i see a few github tickets that possibly reference a pathing issue .. checking |
Due to defect freedomofpress#3793, when using Firefox Quantum, the incorrect message is displayed on the source interface. This test will not pass until that is resolved.
107687b
to
a995fc8
Compare
There is some wonky CI logic in the staging-test-with-rebase job:
During the rebase on latest
|
Keeping the logic here as we want junit test output nicely parsed for the integration of the Tor Browser based tests we will eventually have in CI
staging.yml is a concatenation of multiple other variables files, one was updated during rebase, one was not.
I'm assuming this fully resolves #3718 as well? If so, please update PR description accordingly; thanks! :) |
In CI we are getting MoveTargetOutOfBoundsException, but not locally. We have had errors in the past due to different viewport sizes in CI and locally, so setting this to a standard size for the pages layout tests (where the exception is occurring).
2bda0e0
to
0071eaa
Compare
We were getting a NoAlertPresentException due to new behavior in geckodriver [0] where interacting with the driver closes the modal. Thus, we do not need to explicitly accept the modal here. [0] mozilla/geckodriver#1171
Codecov Report
@@ Coverage Diff @@
## tbb-0.9.0 #3817 +/- ##
============================================
Coverage ? 84.52%
============================================
Files ? 43
Lines ? 2720
Branches ? 295
============================================
Hits ? 2299
Misses ? 355
Partials ? 66 Continue to review full report at Codecov.
|
all tests passing here now... so merging |
Status
Ready for review
Description of Changes
Fixes #3698 , #3718
Changes proposed in this pull request:
This PR includes @msheiny's change to selenium's output level from DEBUG to WARNING, cherrypicked from commit a1f0134
It also includes an update to the test requirements file, to remove a duplicate entry for werkzeug that probably slipped in in a merge and was preventing the tests from running.
It also includes support for viewing functional tests in progress, using VNC on OSX and Debian workstations.
Testing
To verify that functional tests run and do not include DEBUG-level output, from the securedrop directory, run:
Docker build should complete without error, and tests should run without debug-level output (specifically not the base64-encoded firefox profile data)
To verify that VNC is set up and available, kick off the functional tests as above, and once the Docker container has started and the tests are in progress, run:
The system's default VNC viewer should start, displaying the functional tests' browsers.
Checklist
If you made non-trivial code changes: