Merge lp:~canonical-platform-qa/snappy-ecosystem-tests/dont-install-chromedriver into lp:snappy-ecosystem-tests

Proposed by Omer Akram
Status: Merged
Approved by: Omer Akram
Approved revision: 65
Merged at revision: 54
Proposed branch: lp:~canonical-platform-qa/snappy-ecosystem-tests/dont-install-chromedriver
Merge into: lp:snappy-ecosystem-tests
Diff against target: 47 lines (+4/-6)
4 files modified
requirements.txt (+1/-1)
snappy_ecosystem_tests/configs/ecosystem_tests.cfg (+1/-1)
snappy_ecosystem_tests/helpers/web_test_base.py (+1/-2)
snappy_ecosystem_tests/tests/test_store_login.py (+1/-2)
To merge this branch: bzr merge lp:~canonical-platform-qa/snappy-ecosystem-tests/dont-install-chromedriver
Reviewer Review Type Date Requested Status
Heber Parrucci (community) Approve
platform-qa-bot continuous-integration Approve
Review via email: mp+321737@code.launchpad.net

Commit message

* Don't install chromedriver as it requires sudo in jenkins.
* Point to new staging web store.

Description of the change

Don't install chromedriver in jenkins when run_system_tests is run as it requires sudo, which causes chrome/chromium to not start.

I have permanently installed chromedriver_installer in jenkins, so we don't really need to install it again.

To post a comment you must log in.
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
54. By Omer Akram

Skip store login tests as they are not working on jenkins

Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
55. By Omer Akram

Try to add proxy for chrome selenium test

Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
56. By Omer Akram

update:

57. By Omer Akram

more fixes

58. By Omer Akram

s

Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
59. By Omer Akram

debugging

Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
60. By Omer Akram

Another attempt

Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
61. By Omer Akram

no proxy

Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
62. By Omer Akram

Update url

Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
63. By Omer Akram

Next debug

Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
64. By Omer Akram

Lets try this

65. By Omer Akram

remove unused code

Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Omer Akram (om26er) wrote :
Revision history for this message
Heber Parrucci (heber013) wrote :

The removal of chromedriver_installer is ok for me. However, I think that installing the drivers by hand in each host is not a good solution.
I would think in a way to automate it, it might be done as part of the setup process as well.

For example:

1 - Install pre-requisites if any.
2 - Download the driver binary to a specific folder. Uncompress if necessary.
3 - Move the binary to the needed locations: '/usr/bin' and/or '/usr/local/share/'

The same could apply to other drivers as well.

review: Needs Information
Revision history for this message
Omer Akram (om26er) wrote :

You are right, but I believe the whole story of installing chromedriver is currently broken. As we are not installing chromium-browser, selenium or xvfb in an automated way, so chromedriver will get added to that list as well. I will create a trello card to fix that.

Selenium can be added to the requirements.txt

for others something like this would work:

tempdir=$(mktemp -d)
cd $tempdir
apt update
apt install chromium-browser xvfb unzip -y
latest_version=$(wget -qO - https://chromedriver.storage.googleapis.com/LATEST_RELEASE | xargs)
arch=$(getconf LONG_BIT)
filename=chromedriver_linux${arch}.zip
wget https://chromedriver.storage.googleapis.com/${latest_version}/${filename}
unzip ${filename}
sudo cp chromedriver /usr/local/bin/

Revision history for this message
Heber Parrucci (heber013) wrote :

I am ok landing this if the card is created for handling the installation of drivers automatically.
Also we need to take into account that running the tests headless should be an option, not a mandatory thing. In the jenkins slave we cannot run on real browser for the lack of u7 and u8. But we should be able to setup a remote hub running the selenium server in another host. We can discuss if further offline.

review: Approve
Revision history for this message
Omer Akram (om26er) wrote :

Card created. Also note these tests are only running headless in jenkins environment as they are executed with xvfb-run, on your local setup it should fireup your browser.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'requirements.txt'
--- requirements.txt 2017-03-01 21:51:29 +0000
+++ requirements.txt 2017-04-03 17:49:54 +0000
@@ -18,4 +18,4 @@
18pyyaml18pyyaml
19retrying19retrying
20paramiko20paramiko
21chromedriver_installer21#chromedriver_installer
2222
=== modified file 'snappy_ecosystem_tests/configs/ecosystem_tests.cfg'
--- snappy_ecosystem_tests/configs/ecosystem_tests.cfg 2017-02-22 17:41:52 +0000
+++ snappy_ecosystem_tests/configs/ecosystem_tests.cfg 2017-04-03 17:49:54 +0000
@@ -10,7 +10,7 @@
10upload=https://upload.apps.staging.ubuntu.com/10upload=https://upload.apps.staging.ubuntu.com/
11sso=https://login.staging.ubuntu.com/api/v2/11sso=https://login.staging.ubuntu.com/api/v2/
12search=https://search.apps.staging.ubuntu.com/12search=https://search.apps.staging.ubuntu.com/
13web=https://myapps.developer.staging.ubuntu.com/13web=https://dashboard.staging.snapcraft.io/
1414
15[production_urls]15[production_urls]
16root_api=https://myapps.developer.ubuntu.com/dev/api/16root_api=https://myapps.developer.ubuntu.com/dev/api/
1717
=== modified file 'snappy_ecosystem_tests/helpers/web_test_base.py'
--- snappy_ecosystem_tests/helpers/web_test_base.py 2017-02-15 19:14:19 +0000
+++ snappy_ecosystem_tests/helpers/web_test_base.py 2017-04-03 17:49:54 +0000
@@ -154,8 +154,7 @@
154 self.wait_for_visible()154 self.wait_for_visible()
155 logout_link = driver.find_element_by_link_text("Log out")155 logout_link = driver.find_element_by_link_text("Log out")
156 logout_link.click()156 logout_link.click()
157157 self.wait_for_page_title("You have been logged out")
158 self.wait_for_page_title("Sign in to see your packages")
159158
160 def tearDown(self):159 def tearDown(self):
161 super().tearDown()160 super().tearDown()
162161
=== modified file 'snappy_ecosystem_tests/tests/test_store_login.py'
--- snappy_ecosystem_tests/tests/test_store_login.py 2017-03-08 17:29:20 +0000
+++ snappy_ecosystem_tests/tests/test_store_login.py 2017-04-03 17:49:54 +0000
@@ -46,5 +46,4 @@
46 # the dropdown arrow46 # the dropdown arrow
47 self.logout()47 self.logout()
48 self.assertEqual(48 self.assertEqual(
49 self.driver.title, "Sign in to see your packages",49 self.driver.title, "You have been logged out", "Failed to logout")
50 "Failed to logout")

Subscribers

People subscribed via source and target branches