Обсуждение: [pgadmin-hackers][patch] Make feature test app teardown morereliable, and tests faster
[pgadmin-hackers][patch] Make feature test app teardown morereliable, and tests faster
От
Atira Odhner
Дата:
Hi Hackers,
We made the following improvements to the test suite:
Make feature test app teardown more reliable, and tests faster
- don't spin up app and chromedriver between each test
- catching signals also tears down the app
- do layout reset between tests, but assume that tests will not leave a modal opened.
Use selenium built-in waiting function and fix flakiness around clicking the alertify OK button
- we think the OK button does not have its event bound when it is created.
If you see more flakiness around clicking the alertify OK button, let us know. The element is clickable but we have to arbitrarily wait for the event to be bound and that timing may vary system to system.
The feature tests are about 7 seconds faster now.
Tira & Joao
Вложения
Awesome - thanks, patch applied. On Tue, Feb 28, 2017 at 10:40 PM, Atira Odhner <aodhner@pivotal.io> wrote: > > Hi Hackers, > > We made the following improvements to the test suite: > > Make feature test app teardown more reliable, and tests faster > > - don't spin up app and chromedriver between each test > - catching signals also tears down the app > - do layout reset between tests, but assume that tests will not leave a > modal opened. > > Use selenium built-in waiting function and fix flakiness around clicking > the alertify OK button > > - we think the OK button does not have its event bound when it is > created. > > If you see more flakiness around clicking the alertify OK button, let us > know. The element is clickable but we have to arbitrarily wait for the event > to be bound and that timing may vary system to system. > > The feature tests are about 7 seconds faster now. > > Tira & Joao > > > > -- > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-hackers > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Hi On Wed, Mar 1, 2017 at 1:20 PM, Dave Page <dpage@pgadmin.org> wrote: > Awesome - thanks, patch applied. Bad news when it hit the test system I'm afraid: - Python 2.7 had more seemingly random timeouts waiting for elements to appear or be clickable - log attached. - Python 3.5 failed with: Traceback (most recent call last): File "/var/lib/jenkins/workspace/pgadmin4-master-python35/web/regression/runtests.py", line 276, in <module> test_module_list = get_test_modules(args) File "/var/lib/jenkins/workspace/pgadmin4-master-python35/web/regression/runtests.py", line 158, in get_test_modules TestsGeneratorRegistry.load_generators('pgadmin', exclude_pkgs) File "/var/lib/jenkins/workspace/pgadmin4-master-python35/web/pgadmin/utils/route.py", line 71, in load_generators import_module(module_name) File "/var/lib/jenkins/workspace/pgadmin4-master-python35/pgadmin-venv/lib/python3.5/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 986, in _gcd_import File "<frozen importlib._bootstrap>", line 969, in _find_and_load File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 673, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 673, in exec_module File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed File "/var/lib/jenkins/workspace/pgadmin4-master-python35/web/pgadmin/feature_tests/connect_to_server_feature_test.py", line 14, in <module> from regression.feature_utils.base_feature_test import BaseFeatureTest File "/var/lib/jenkins/workspace/pgadmin4-master-python35/web/regression/feature_utils/base_feature_test.py", line 3, in <module> from regression.feature_utils.pgadmin_page import PgadminPage File "/var/lib/jenkins/workspace/pgadmin4-master-python35/web/regression/feature_utils/pgadmin_page.py", line 58 return self.wait_for_element(lambda (driver): driver.find_element_by_xpath(xpath)) ^ SyntaxError: invalid syntax -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company