horizon/openstack_dashboard/test/integration_tests
Manpreet Kaur 3230e1fb15 Changes for tacker-horizon integration tests
The tacker-horizon integration test framework has been implemented[1]
While adding integration test cases a selenium exception [2] was
observed for test cases under directory [3].

Tacker-horizon UI Details:

* Most of the Horizon plugins, such as manila-ui and vitrage-dashboard
  support integration tests, these plugins reside under "Project" tab.
* Whereas, tacker-horizon, mistral-dashboard are horizon plugins which
  have their dashboard anchored directly at the top-level alongside
  "Project" tab.
* The tacker-horizon has two-panel groups,
   * VNF Management
   * NFV Orchestration
* The "VNF Management" is a default panel and remains expanded in NFV
  dashboard, whereas "NFV Orchestration" is collapsed initially.

Selenium Exception Details:

* The horizon framework reports an exception
  ElementNotInteractableException, while opening pages under
  "NFV Orchestration" panel group.
* This error occurs when an element is not clicked or it is not visible
  yet.
* The menu item expansion code in the horizon integration framework
  expands only those menu items (level first, second or third) if only
  the previous menu item at the same level was expanded earlier.
* For example, in order to open a page[4] under NVF Orchestration panel
  group, the framework collapses "Project" tab and clicks "NFV"
  dashboard.
  But it never expands "NFV Orchestration" panel as in second-level no
  such transition occured hence it remains collapsed. So test case fails
  to find desired page.
  On the other hand, test cases for pages under "VNF Management" succeed
  as the panel group by default remains open.

This patch adds functionality to detect collapsed menu items and expand
the items.

[1] https://review.opendev.org/c/openstack/tacker-horizon/+/790958
[2] https://zuul.opendev.org/t/openstack/build/b8bd1618206945b68ebdbcdc7f1bdf10/console
[3] tacker_horizon/test/integration/pages/nfv/nfv_orchestration/
[4] tacker_horizon/test/integration/pages/nfv/nfv_orchestration/vimmanagementpage.py

Change-Id: I8fec54eb5f2a9bf218ee36e9c0a1ce9c15c97a26
2021-08-27 09:07:18 +05:30
..
pages Consisent abbreviation of size units 2021-05-04 11:50:17 -03:00
regions Changes for tacker-horizon integration tests 2021-08-27 09:07:18 +05:30
tests integration tests: Relax router interface status check 2021-06-04 16:18:56 +09:00
__init__.py Integration tests - running the tests 2014-02-26 10:45:21 +00:00
basewebobject.py Fix pep8 errors 2018-04-11 00:34:21 +09:00
config.py Update cirros image to cirros-0.5.2-x86_64 2021-03-16 17:11:06 +05:30
decorators.py import "collections.abc" explicitly 2021-03-04 18:47:37 +00:00
helpers.py Don't fail integration tests if browser log couldn't be retrieved 2021-02-03 21:00:48 +01:00
horizon.conf Update cirros image to cirros-0.5.2-x86_64 2021-03-16 17:11:06 +05:30
README.rst Avoid duplicated maintenance of integration test config 2020-01-10 00:55:43 +09:00
video_recorder.py Fix video recording for integration tests 2020-04-09 09:20:04 +00:00

Horizon Integration Tests

Horizon's integration tests treat Horizon as a black box.

Running the integration tests

  1. Set up an OpenStack server

  2. Prepare the configuration file at local-horizon.conf if you need to change the default configurations. Note that horizon.conf can be used for the same purpose too from the historical reason.

    You can generate a sample configuration file by the following command:

    $ oslo-config-generator \
          --namespace openstack_dashboard_integration_tests
          --output-file openstack_dashboard/test/integration_tests/horizon.conf.sample
  3. Run the tests. :

    $ tox -e integration

More information

https://wiki.openstack.org/wiki/Horizon/Testing/UI

https://wiki.mozilla.org/QA/Execution/Web_Testing/Docs/Automation/StyleGuide#Page_Objects