horizon/openstack_dashboard/test/integration_tests
Ivan Kolodyazhny 43f8c3b1f5 Switch integration tests to run with python3
tox env for the integration tests is now renamed to 'integration'
as it is no longer run under python 2.7.

__hash__() method is now defined in integration_tests.helpers.BaseTestCase
to avoid unhashable error during loading django test runner. This is
originally caused by the fact that the base testcase class for integration
tests is implemented on top of testtools and testtools does not define
__hash__() method. In Python 3, __hash__() method must be defined
if a class (re)defines __eq__() method to make the class hashable [1].
Ideally integration base TestCase class can be implemented on top of
Django test case, but the current implementation depends on features
from testtools a lot, so it seems better to add __hash__() method
as a workaround.

Unbound methods don't exist in Python 3[2], so six.create_unbound_method
doesn' work as expected. To dynamic method generation we have to use new
descriptors interface [3] or just generate new
functools.partialmethod [4] function introduced in Python 3.4 to
generate class methods with pre-defined 'path' argument and pass 'self'
as a first function argument for class instance.

[1] https://docs.python.org/3.5/reference/datamodel.html#object.__hash__
[2] https://six.readthedocs.io/#six.create_unbound_method
[3] https://docs.python.org/3/howto/descriptor.html
[4] https://docs.python.org/3/library/functools.html#functools.partialmethod

Change-Id: I5c3078bdc66e33fe676d431bb28d92b35faaf479
2019-03-05 09:10:01 +00:00
..
pages Switch integration tests to run with python3 2019-03-05 09:10:01 +00:00
regions Integration test fixes 2018-06-21 10:59:31 +03:00
tests Add non-voting integration tests job 2019-01-18 19:50:51 +00: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 Align default integration config values with code 2019-02-04 20:47:35 +02:00
decorators.py Fix H405 (multi line docstring) warnings (openstack_dashboard) 2017-06-09 16:05:31 +00:00
helpers.py Switch integration tests to run with python3 2019-03-05 09:10:01 +00:00
horizon.conf Align default integration config values with code 2019-02-04 20:47:35 +02:00
README.rst updated integration tests README.rst 2018-06-29 00:25:32 +00:00
video_recorder.py Clean up logger usage 2017-04-13 04:35:50 +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. Update the configuration file at horizon.conf or add overrides to that file in local-horizon.conf which is ignored by git.

  3. Run the tests. :

    $ tox -e py27integration

More information

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

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