public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dave Page <[email protected]>
To: George Gelashvili <[email protected]>
Cc: Atira Odhner <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: Acceptance Tests against a browser (WIP)
Date: Tue, 24 Jan 2017 09:43:17 +0000
Message-ID: <CA+OCxoy+miWFpGa6W=1t7swn8vPvDayKtNdGnYUdaYOPNEkQ2A@mail.gmail.com> (raw)
In-Reply-To: <CAHowoHYNQC5kovTvkVoYWRr6NCDvLY-8PsEMcJLsu-7z43VNeg@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>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
On Fri, Jan 20, 2017 at 5:33 PM, George Gelashvili
<[email protected]> wrote:
> Thanks for bringing that to our attention! Here's the latest patch
piranha:pgadmin4 dpage$ git apply
~/Downloads/acceptance-tests-with-server-start-and-polling.diff
error: patch failed: web/regression/test_utils.py:69
error: web/regression/test_utils.py: patch does not apply
:-(
> On Fri, Jan 20, 2017 at 10:38 AM, Dave Page <[email protected]> wrote:
>>
>> On Thu, Jan 19, 2017 at 10:07 PM, George Gelashvili
>> <[email protected]> wrote:
>> >
>> > Here is an updated patch which starts the server up when the test starts
>> > and
>> > uses the values from config.py for server name etc. It still requires
>> > installing chromedriver before running. Should we add something to the
>> > readme about that?
>>
>> Yes, we definitely should (including download site URL)
>>
>> > On Tue, Jan 17, 2017 at 11:09 AM, Atira Odhner <[email protected]>
>> > wrote:
>> >>
>> >> Thanks for your feedback, Dave!
>> >>
>> >> We can put the tests under the regression directory. I think that makes
>> >> sense.
>> >> I'm not picturing these tests being module specific, but we may want to
>> >> enable running it as a separate suite of tests.
>> >>
>> >> Thanks for the callout about the port and title. We'll make sure those
>> >> are
>> >> pulled from config or that the pgAdmin server is spun up by the test
>> >> with
>> >> specific values.
>> >>
>> >> I have a couple ideas about why the test might not have been running
>> >> for
>> >> you. I think the patch we attached didn't spin up its own pgAdmin yet
>> >> and it
>> >> definitely doesn't fill in username/password if your app is running
>> >> that
>> >> way. That's part of the WIP-ness :-P
>> >>
>> >> -Tira
>> >>
>> >> Hi
>> >>
>> >> On Thu, Jan 12, 2017 at 10:41 PM, George Gelashvili
>> >> <ggelashvili(at)pivotal(dot)io> wrote:
>> >> > here's the patch we forgot to attach. Also, you can see work on our
>> >> > branch
>> >> > at:
>> >> >
>> >> >
>> >> > https://github.com/pivotalsoftware/pgadmin4/tree/pivotal/acceptance-tests
>> >> >
>> >> > On Thu, Jan 12, 2017 at 5:26 PM, George Gelashvili
>> >> > <ggelashvili(at)pivotal(dot)io>
>> >> > wrote:
>> >> >>
>> >> >> Hi there,
>> >> >>
>> >> >> We are working on browser-automation-based acceptance tests that
>> >> >> exercise
>> >> >> pgAdmin4 the way a user might.
>> >>
>> >> Nice!
>> >>
>> >> >> The first "connect to database" test works, but at the moment
>> >> >> depends
>> >> >> on
>> >> >> Chrome and chromedriver. We would appreciate feedback on any
>> >> >> possible
>> >> >> license or code style issues at this point, as well as any thoughts
>> >> >> on
>> >> >> adding this sort of test to the codebase.
>> >>
>> >> A few thoughts:
>> >>
>> >> - If these tests are to run as part of the regression suite, the
>> >> framework for them should live under that directory.
>> >>
>> >> - Are any of the tests likely to be module-specific? If so, they
>> >> should really be part of the relevant module as the regression tests
>> >> are. If they're more general/less tightly coupled, then I don't see a
>> >> problem with them residing where they are.
>> >>
>> >> - Please take care not to include changes to .gitgnore files that
>> >> aren't relevant to the rest of us.
>> >>
>> >> - The port number is hard-coded in the test.
>> >>
>> >> - You've hard-coded the string "pgAdmin 4". We've tried to keep that
>> >> title as a config option in config.py, so you should pull the string
>> >> from there rather than hard-coding it.
>> >>
>> >> - The connect test fails for me (Mac, Python 2.7). I have a suspicion
>> >> that this may be because when the test starts chromedriver, OS X
>> >> prompts the user about whether a listening port should be opened, but
>> >> the tests don't wait (though, I tested with 3 servers configured and
>> >> it failed with the same error on the second and third as well, long
>> >> after I clicked OK on the prompt):
>> >>
>> >> Traceback (most recent call last):
>> >> File
>> >>
>> >> "/Users/dpage/git/pgadmin4/web/acceptance/test_connects_to_database.py",
>> >> line 32, in runTest
>> >> self.assertEqual("pgAdmin 4", self.driver.title)
>> >> AssertionError: 'pgAdmin 4' != u'localhost'
>> >>
>> >> - Please keep tests in the pgadmin. namespace (pgadmin.acceptance.??).
>> >>
>> >> - It looks like running a single test won't work yet (because of
>> >> TestsGeneratorRegistry.load_generators('pgadmin.%s.tests' %
>> >> arguments['pkg']))
>> >>
>> >> Thanks!
>> >>
>> >> --
>> >> 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
>> >
>>
>>
>>
>> --
>> 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+OCxoy+miWFpGa6W=1t7swn8vPvDayKtNdGnYUdaYOPNEkQ2A@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