Write selenium tests for Horizon running in a Devstack
We have unit tests with many many lines of mox stubbing. It'd be nice to be able to write selenium tests without bothering with all of that. This blueprint proposes the use of Selenium in integration tests run against a devstack, so we can catch higher-level integration issues earlier and have a layer of defence against missing unit tests or incorrect stubs.
Blueprint information
- Status:
- Complete
- Approver:
- Gabriel Hurley
- Priority:
- Medium
- Drafter:
- None
- Direction:
- Approved
- Assignee:
- Julie Pichon
- Definition:
- Approved
- Series goal:
- Accepted for icehouse
- Implementation:
-
Implemented
- Milestone target:
-
2014.1
- Started by
- Julie Pichon
- Completed by
- Matthias Runge
Related branches
Sprints
Whiteboard
Selenium tests also give us an easy way to generate screenshots for user documentation.
[gabriel] -- I fully agree, however I have thoughts on different directions this could go in terms of implementation. We should discuss at the testing session during the summit.
[jpichon 2013.10.09] If I recall correctly, there was no time to go into that topic during the last summit. Either way, it would be great to see notes on the blueprint as to the implementation ideas people had/have in mind.
Icehouse summit session: https:/
Wiki: https:/
[jpichon 2013.12.19] Wiki update with information on the Page Object Pattern, which we're planning on using for the tests.
[jpichon 2013.01.10] The current plan is to have the "infrastructure" bits done by I2, so that the tests can be run by people and a potential jenkins job. In I3 and forever more, more tests will be written.
[tnovacik 2014.05.29] Some sort of languge layer should be created because currently there is language specific code although horizon supports changing language. Common web ui regions should be seperated into module, so they can be reused in page objects (tables, sidemenu, forms, etc...). I think that testing horizon plugins should be seperated from general horizon testing, because plugins are not installed by default on gates. I would suggest creating seperate folder for plugin tests and add switch to run_tests.sh script that would start plugin testing (for example sahara integration tests).
[tnovacik 2014.06.23] It might be good idea to create screenshots and download page source in case of error. (Better debugging especially in case of random failures)
[jpichon 2014.06.23] Feel free to open another blueprint to track this work, thanks!
Gerrit topic: https:/
Addressed by: https:/
Integration tests - running the tests
Addressed by: https:/
Integration tests - page objects pattern
Addressed by: https:/
Changes in assert message and select dropdown
Addressed by: https:/
Add user and password parameters to _do_login
Addressed by: https:/
Add go_to_home_page method and two more properties
Addressed by: https:/
Integration tests - base class for all tests
Addressed by: https:/
Settings page ChangePassword page and their tests
Addressed by: https:/
Adds keypair create,delete tests
Addressed by: https:/
Adds securitygroup create,delete integration tests
Addressed by: https:/
Add heading property to BasePage class
Addressed by: https:/
Adds floatingip allocate,release integration tests
Addressed by: https:/
Adds container create/delete integration tests
Addressed by: https:/
Add translation layer from django
Addressed by: https:/
Add regions module
Addressed by: https:/
Fix typo in calling is_the_current_page method
Addressed by: https:/
Edit use heading property for page validation
Addressed by: https:/
Add new directory structure for page objects
Addressed by: https:/
Fix typo in select methods definition
Addressed by: https:/
Add form regions
Addressed by: https:/
Add menu regions
Addressed by: https:/
Adds router create/delete integration tests
Addressed by: https:/
Add navigation among pages
Addressed by: https:/
Add test skip decorator when service not available
Gerrit topic: https:/
Addressed by: https:/
Verify Help button redirects to the right URL
Addressed by: https:/
Add integration tests for Admin->Projects page
Addressed by: https:/
Add wait_till_
Gerrit topic: https:/
Addressed by: https:/
Integration tests - BaseWebElement class
Addressed by: https:/
Add workaround for StaleElementRef
Gerrit topic: https:/
Addressed by: https:/
Add test_image_
Gerrit topic: https:/
Addressed by: https:/
Integration tests - switch_window method
Addressed by: https:/
Add test_create_
Gerrit topic: https:/
Addressed by: https:/
Add multi user test possibility to integr. tests
Gerrit topic: https:/
Gerrit topic: https:/
Addressed by: https:/
Updating CSS locators to ID and LINK_TEXT. Partially implements blueprint: selenium-
Gerrit topic: https:/
Addressed by: https:/
Fix locator typo in go_to_accesssec
Addressed by: https:/
Integration tests - Imagespage and test
Gerrit topic: https:/
Gerrit topic: https:/
Addressed by: https:/
Add TabbedFormRegion to Integration tests
Addressed by: https:/
Integration tests - 3 new form fields
Addressed by: https:/
Integration test for fix the logout issue in basepage
Addressed by: https:/
Integration tests - networkspage and test
Gerrit topic: https:/
Addressed by: https:/
Fix dropdown menu does not open with firefox 34
Gerrit topic: https:/
Addressed by: https:/
Add "login as admin" for integration tests
Addressed by: https:/
Integration tests - Enable to test with chrome
Gerrit topic: https:/
Addressed by: https:/
Integration tests - Volumes tests
Gerrit topic: https:/
Addressed by: https:/
Test's random name gen now uses uuid4
Addressed by: https:/
Flavors page and basic create flavor test
Addressed by: https:/
Add integration tests for Creating user
Addressed by: https:/
Using get_url_
Gerrit topic: https:/
Addressed by: https:/
Fix wrong calling of selenium driver function
Gerrit topic: https:/
Addressed by: https:/
Fix method passed to selenium way it suggests
Gerrit topic: https:/
Addressed by: https:/
Integration test - support login multiple regions
Addressed by: https:/
Add general function for generating random names
Addressed by: https:/
Decorator for skipping tests hitting known bugs
Addressed by: https:/
Modified teardown method to handle login and logout failure.
Addressed by: https:/
Integration
Addressed by: https:/
Integration
Addressed by: https:/
Integration tests - Run test case under any user
Gerrit topic: https:/
Addressed by: https:/
Add page forward and refresh wrapper functions
Addressed by: https:/
Integration tests - Run test with IE
Addressed by: https:/
Integrtion test - Run test as user just created
Addressed by: https:/
Integration test - Setup Test case using a new user
Addressed by: https:/
Integration tests - Instances tests
Gerrit topic: https:/
Addressed by: https:/
Adding -ac and -noreset arguments to Xvfb
Gerrit topic: https:/
Addressed by: https:/
Testing a remote openstack deployment
Gerrit topic: https:/
Addressed by: https:/
Remove unused wait_for_title method
Addressed by: https:/
Fix editing current project
Addressed by: https:/
Adds router create/delete integration tests
Gerrit topic: https:/
Addressed by: https:/
Integration tests - Object store
Addressed by: https:/
Wait till spinner is visible
Addressed by: https:/
Add project-dropdown
Addressed by: https:/
Add wait till element methods for selenium Integration tests.
Addressed by: https:/
Fix typo in calling _is_element_visible method
Addressed by: https:/
Rename helpers.py to basetestcases.py
Addressed by: https:/
Use IDs in locators instead of CSS when it is possible
Addressed by: https:/
Security groups page and test
Gerrit topic: https:/
Addressed by: https:/
Add log lines change to settings page and test
Addressed by: https:/
Add html source code on test failure for debugging
Addressed by: https:/
Adds floatingip allocate,release integration tests
Gerrit topic: https:/
Addressed by: https:/
Use _wait_for_spinner()
Gerrit topic: https:/
Addressed by: https:/
Avoid failure when spinner is already gone
Addressed by: https:/
Fix skip decorator in integration tests
Addressed by: https:/
New generic _wait_until method which wraps selenium waiting
Addressed by: https:/
Remove hostname from the url
Addressed by: https:/
Updated _tab_locator in menus and Added 'submit' method for TabbedForms: In forms.py: In class TabbedFormRegion: * Added submit method for tabbed for forms In menus.py: In TabbedMenuRegion: * changed the _tab_locator to (by.By.
Gerrit topic: https:/
Addressed by: https:/
Use default values in horizon.conf
Addressed by: https:/
Add integration tests for Identity->Projects page
Addressed by: https:/
FIX integration tests
Addressed by: https:/
Use gen_resource_name in create/delete user test
Addressed by: https:/
WIP:Integration test - create provider netowrk
Addressed by: https:/
reuse a working firefox profile
Gerrit topic: https:/
Addressed by: https:/
Limit max length of gen_random_
Addressed by: https:/
Limit max length of gen_random_
Addressed by: https:/
Refactor of BaseTestCase
Addressed by: https:/
Refactor of BaseTestCase
Addressed by: https:/
Fix for test_image_
Addressed by: https:/
Add _save_screenshot functionality to helpers.
Addressed by: https:/
Fix _wait_till_
Addressed by: https:/
Fix table _get_rows() - always return None
Gerrit topic: https:/
Gerrit topic: https:/
Gerrit topic: https:/
Addressed by: https:/
Fixed the method name reference in instancespage
Addressed by: https:/
Handle id_pattern for instances_
Addressed by: https:/
[wip] select options support
Gerrit topic: https:/
Gerrit topic: https:/
Work Items
Dependency tree

* Blueprints in grey have been implemented.