43f8c3b1f5
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 |
||
---|---|---|
.. | ||
pages | ||
regions | ||
tests | ||
__init__.py | ||
basewebobject.py | ||
config.py | ||
decorators.py | ||
helpers.py | ||
horizon.conf | ||
README.rst | ||
video_recorder.py |
Horizon Integration Tests
Horizon's integration tests treat Horizon as a black box.
Running the integration tests
Set up an OpenStack server
Update the configuration file at horizon.conf or add overrides to that file in local-horizon.conf which is ignored by git.
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