public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dave Page <[email protected]>
To: Atira Odhner <[email protected]>
Cc: George Gelashvili <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: Acceptance Tests against a browser (WIP)
Date: Thu, 9 Feb 2017 12:47:17 +0000
Message-ID: <CA+OCxozsTtd+dTRV7=N+xD-0fD4_fPAq+iFrORPk3QU2mHo6UA@mail.gmail.com> (raw)
In-Reply-To: <CA+Vc24ornL=p=eepG+MOt2wAX+A29rhJyMYq-tgHkwLk0F40DQ@mail.gmail.com>
References: <CA+Vc24rPt8BGgtZM5Pv4CARpw7t42A5aqQX5q0_QyWWOfgsGTA@mail.gmail.com>
	<CAHowoHbyxYrnROe+8BDBaf_Z8KneW95be8g-5OMZ4q5jFH28Ow@mail.gmail.com>
	<CA+OCxoyNGb4A6BLV=u4gBCCBzj+HT_5GKPmnmu91WAGrpkEZtg@mail.gmail.com>
	<CAHowoHYNQC5kovTvkVoYWRr6NCDvLY-8PsEMcJLsu-7z43VNeg@mail.gmail.com>
	<CA+OCxoy+miWFpGa6W=1t7swn8vPvDayKtNdGnYUdaYOPNEkQ2A@mail.gmail.com>
	<CAHowoHYZxQxVLxA0N8iKoVGN=0vahSxrc0Kd4LkqoOWQYUSmkQ@mail.gmail.com>
	<CAHowoHa4k7E6LBDaiuUFPBKOcsa_ML7M3KEhDZUsbR-KKujemw@mail.gmail.com>
	<CA+OCxow6adDHsG2VTtVbRQ2ybCOdKTanFGf1hNoVdn_Gt9Betw@mail.gmail.com>
	<CA+OCxozeqDfoAiJ4AYf-Hnoq5FTCwWVXcEE-h460H5-_RVg9jw@mail.gmail.com>
	<CAHowoHa32=Y8zjYjZ_DHLukxHFzJZ9kV6y1ErDUwfPaE5MNCrw@mail.gmail.com>
	<CA+Vc24rpjYertAeAqK0T5eXAe=oGOCg2y09gNshgamih1KrOMg@mail.gmail.com>
	<CA+OCxozuy8DMJq79FTmk5p86jW-Z_88i85Wx-yc2OYLg=FTznQ@mail.gmail.com>
	<CAHowoHbXL2wu2feErTTWhgmcM4=48KATZkvguGRiy-UNNW-mfQ@mail.gmail.com>
	<CA+OCxoymnnPU5N5VU37xNWBGLZUSrSshwQSVVy1ut++YqT6UQQ@mail.gmail.com>
	<CA+OCxoxZMuXOPiNEMbYCBPXaZYBquRpcNd2YpvfwbS1T8bUPzg@mail.gmail.com>
	<CA+Vc24pjFs=Qy4-eFq5bWUAzRfwZkictJ0GykxbNh3hz=1YcBw@mail.gmail.com>
	<CA+OCxozt9evQcAtsLhRvO0xYL7QKr6Gk=RMUzTJ_w0HfFYtVww@mail.gmail.com>
	<CA+Vc24r=B7+2nEMquJde0cCwRS66oEdQhB2BDAkMDzdGtPGtjg@mail.gmail.com>
	<CA+Vc24ornL=p=eepG+MOt2wAX+A29rhJyMYq-tgHkwLk0F40DQ@mail.gmail.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

Hi

I get the following crash when running with Python 3.4 or 3.5:

(pgadmin4-py34) piranha:pgadmin4 dpage$ python web/regression/runtests.py
pgAdmin 4 - Application Initialisation
======================================


The configuration database - '/Users/dpage/.pgadmin/test_pgadmin4.db'
does not exist.
Entering initial setup mode...
NOTE: Configuring authentication for DESKTOP mode.

The configuration database has been created at
/Users/dpage/.pgadmin/test_pgadmin4.db

=============Running the test cases for 'Regression - PG 9.4'=============
runTest (pgadmin.acceptance.tests.connect_to_server_feature_test.ConnectsToServerFeatureTest)
... Traceback (most recent call last):
  File "web/regression/runtests.py", line 276, in <module>
    verbosity=2).run(suite)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/runner.py",
line 168, in run
    test(result)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/suite.py",
line 84, in __call__
    return self.run(*args, **kwds)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/suite.py",
line 122, in run
    test(result)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/case.py",
line 628, in __call__
    return self.run(*args, **kwds)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/case.py",
line 588, in run
    self._feedErrorsToResult(result, outcome.errors)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/case.py",
line 515, in _feedErrorsToResult
    if issubclass(exc_info[0], self.failureException):
TypeError: issubclass() arg 2 must be a class or tuple of classes

With Python 2.7, it initially opens Chrome with the URL "data:,"
(without the quotes), and then spits out:

======================================================================
ERROR: runTest (pgadmin.acceptance.tests.connect_to_server_feature_test.ConnectsToServerFeatureTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/acceptance/tests/connect_to_server_feature_test.py",
line 41, in setUp
    test_utils.create_table(self.server, "acceptance_test_db", "test_table")
AttributeError: 'module' object has no attribute 'create_table'

======================================================================
ERROR: runTest (pgadmin.acceptance.tests.template_selection_feature_test.TemplateSelectionFeatureTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/acceptance/tests/template_selection_feature_test.py",
line 36, in runTest
    test_utils.create_table(self.server, "acceptance_test_db", "test_table")
AttributeError: 'module' object has no attribute 'create_table'

======================================================================
ERROR: runTest (pgadmin.acceptance.tests.template_selection_feature_test.TemplateSelectionFeatureTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/acceptance/tests/template_selection_feature_test.py",
line 66, in tearDown
    self.page.find_by_xpath("//button[contains(.,'Cancel')]").click()
  File "/Users/dpage/git/pgadmin4/web/regression/utils/pgadmin_page.py",
line 46, in find_by_xpath
    return self.wait_for_element(lambda:
self.driver.find_element_by_xpath(xpath))
  File "/Users/dpage/git/pgadmin4/web/regression/utils/pgadmin_page.py",
line 86, in wait_for_element
    return self._wait_for("element to exist", element_if_it_exists)
  File "/Users/dpage/git/pgadmin4/web/regression/utils/pgadmin_page.py",
line 120, in _wait_for
    raise RuntimeError("timed out waiting for " + waiting_for_message)
RuntimeError: timed out waiting for element to exist

----------------------------------------------------------------------
Ran 149 tests in 59.258s

FAILED (errors=3, skipped=12)


On Wed, Feb 8, 2017 at 10:15 PM, Atira Odhner <[email protected]> wrote:
> Hey Dave,
>
> We re-used one of the test helpers for the 'fix-greenplum-show-tables.diff'
> patch, so here is an updated patch which does not include adding that test
> helper in case you apply the show-tables patch first. Also, we saw some
> strange test behavior yesterday where form fields weren't being filled in
> correctly so we changed the way that input fields get filled to be more
> reliable.
>
> In short these need to be applied in this order:
>>
>> git apply fix-greenplum-show-tables.diff
>>
>> git apply
>> acceptance-tests-minus-create-table-helper-with-fixed-inputs.diff
>
>
> We also moved the --exclude flag changes out to a separate patch.
>
> On our side we are still dealing with these as 20 separate commits. What is
> the best way for us to send you these patches? Do you prefer having them all
> squashed down to a single patch or to have smaller patches?
>
>
>
> On Mon, Feb 6, 2017 at 9:54 AM, Atira Odhner <[email protected]> wrote:
>>
>> I agree that we should rename the test. We've renamed it to
>> "template_selection_feature_test".
>> Your other suggestions are captured in our backlog as future improvements.
>> We definitely can and should do those things but I think it would be
>> valuable to go ahead and get this suite in and give other devs a chance to
>> use and iterate on this work.
>>
>> Thanks,
>>
>> Tira & George
>>
>> On Mon, Feb 6, 2017 at 5:32 AM, Dave Page <[email protected]> wrote:
>>>
>>> Hi
>>>
>>> On Fri, Feb 3, 2017 at 9:56 PM, Atira Odhner <[email protected]> wrote:
>>> > Hi Dave,
>>> >
>>> > Here is a new patch which includes the following:
>>> > - randomized ports
>>> > - delete the acceptance_test_db database in setup in case a prior run
>>> > failed
>>> > - fixed size browser window
>>>
>>> Definitely getting there :-). A couple of thoughts/questions:
>>>
>>> - Now there are 2 tests in there, it's clear that both the Python
>>> server and browser session are restarted for each test. Can this be
>>> avoided? It'll really slow down test execution as more and more are
>>> added.
>>>
>>> - We've got a new monster name:
>>>
>>> pgadmin.acceptance.tests.sql_template_selection_by_postgres_version_works_feature_test.SQLTemplateSelectionByPostgresVersionWorksFeatureTest
>>> (which on disk is
>>> sql_template_select_by_postgres_version_works_feature_test.py). Names
>>> like that really must be shortened to something more sane and
>>> manageable.
>>>
>>> - I'm a little confused by why the tests cannot be run in server mode.
>>> The error says it's because the username/password is unknown -
>>> however, both the pgAdmin and database server usernames and passwords
>>> are in test_config.json.
>>>
>>> Thanks!
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>
>>
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers



view thread (30+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Acceptance Tests against a browser (WIP)
  In-Reply-To: <CA+OCxozsTtd+dTRV7=N+xD-0fD4_fPAq+iFrORPk3QU2mHo6UA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox