Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUKs7-0006JA-AQ for pgadmin-hackers@arkaria.postgresql.org; Thu, 19 Jan 2017 22:07:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cUKs6-0002Y6-Mw for pgadmin-hackers@arkaria.postgresql.org; Thu, 19 Jan 2017 22:07:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cUKs5-0002VS-BE for pgadmin-hackers@postgresql.org; Thu, 19 Jan 2017 22:07:53 +0000 Received: from mail-yw0-x234.google.com ([2607:f8b0:4002:c05::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cUKs1-000656-PY for pgadmin-hackers@postgresql.org; Thu, 19 Jan 2017 22:07:52 +0000 Received: by mail-yw0-x234.google.com with SMTP id w75so51902479ywg.1 for ; Thu, 19 Jan 2017 14:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0OdEbnu4TwqMAmvjfvQiPfd7H5SbjEKgRTIj5onY/Bg=; b=kaIy2IDrVwf3eX4LM1ATYh0lxZldN8c71O9pV0cl2gGL3XZMDjZ32oX7SaeipVT48Z tZcOpcw5qwUJfW/7c+SHIA5iFAQIdQFoj7XX96fFc7k+JjPrrF0R+FMTR2hBJ96WHb8K 2EaDvgtbMQqIl6uUzS6NppBfiGKOpfLLdeMM3pPorqcu9/3czpeOXHMCgso9YjpKgl7v ol7OccbVDMbjp0tc8CibZ8qcOA62f92wswzMH2grxLV1Hm0Jf82HcccU5BsRvOEFDvM3 k6Ulr7bsMN+xjHfhzNlilLAJVWdsz1HobYkuGeZo4EdJGSeaZilNmaoTfRHUT/85v3Jn hcAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=0OdEbnu4TwqMAmvjfvQiPfd7H5SbjEKgRTIj5onY/Bg=; b=FaTzedO5tU89B6AOVCpmkuaAa11eOymxLZQ3/1a7l6Ru/Q8vgf8NUEMeg59WqcD3Pg 6xwDKBRyqpFym7bddfpsIr8S/ydusYelJs7td45pYURB+JOVuTRcNjiiCuE9auGaj7n5 ZAgyq0jbsBw9pM7Zgbq8B6+VF31d20pQEUzzlOpgmZK/gzskOxg2J5uOecAbPZl84Lo8 NESnFVLhtJNFsb7pVVv8mwoK8YIyB+gXmah8ViWBCDUwGOgbcO36iFUNOuYQELIs0DQY XOriGAYKVnp68BoVm4R+S9uWoaj8/oAM8fv8c1pvxY3ut1L0sOnJVtbgfI7wnw2lHedQ Rj/g== X-Gm-Message-State: AIkVDXLlXuLCnach8ilgTc/zf4b8tE4ID0OpFjM1mXgDU7zSRjCB0+nO+oeMxXwwUJPdoXiJag5dwkmI2gTik5y8 X-Received: by 10.129.46.213 with SMTP id u204mr8425737ywu.52.1484863665563; Thu, 19 Jan 2017 14:07:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.170.171 with HTTP; Thu, 19 Jan 2017 14:07:44 -0800 (PST) In-Reply-To: References: From: George Gelashvili Date: Thu, 19 Jan 2017 17:07:44 -0500 Message-ID: Subject: Re: Acceptance Tests against a browser (WIP) To: Atira Odhner Cc: pgadmin-hackers Content-Type: multipart/mixed; boundary=001a11407e08544a8e054679c354 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --001a11407e08544a8e054679c354 Content-Type: multipart/alternative; boundary=001a11407e08544a89054679c352 --001a11407e08544a89054679c352 Content-Type: text/plain; charset=UTF-8 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? On Tue, Jan 17, 2017 at 11:09 AM, Atira Odhner 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 > 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 > > 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 > > > --001a11407e08544a89054679c352 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

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 ad= d something to the readme about that?

On Tue, Jan 17, 2017 at 11:09 AM, Atira Odh= ner <aodhner@pivotal.io> wrote:
Thanks for your feedback, Dave!

=
We can put the tests under the regression directory. I think tha= t makes sense.=C2=A0
I'm not picturing these tests being modu= le specific, but we may want to enable running it as a separate suite of te= sts.=C2=A0

Thanks for the callout about the port a= nd title. We'll make sure those are pulled from config or that the pgAd= min server is spun up by the test with specific values.=C2=A0
I have a couple ideas about why the test might not have been ru= nning for you. I think the patch we attached didn't spin up its own pgA= dmin yet and it definitely doesn't fill in username/password if your ap= p 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 ou=
r branch
> at:
> https://github.com/pivotalsoftware/pgadmin4/tree/pivotal/ac=
ceptance-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 e=
xercise
>> pgAdmin4 the way a user might.

Nice!

>> The first "connect to database" test works, but at the m=
oment depends on
>> Chrome and chromedriver. We would appreciate feedback on any possi=
ble
>> license or code style issues at this point, as well as any thought=
s 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 t=
o 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' !=3D 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!

--=20
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com= The Enterprise PostgreSQL Company


--001a11407e08544a89054679c352-- --001a11407e08544a8e054679c354 Content-Type: text/plain; charset=US-ASCII; name="acceptance-tests-with-server-start.diff" Content-Disposition: attachment; filename="acceptance-tests-with-server-start.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iy4x9eki0 ZGlmZiAtLWdpdCBhL3JlcXVpcmVtZW50c19weTIudHh0IGIvcmVxdWlyZW1l bnRzX3B5Mi50eHQKaW5kZXggNTExNzBhNDUuLmRlMTY3MTIxIDEwMDY0NAot LS0gYS9yZXF1aXJlbWVudHNfcHkyLnR4dAorKysgYi9yZXF1aX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gY29u ZmlnCisKKworY2xhc3MgQ29ubmVjdHNUb0RhdGFiYXNlKEJhc2VUZXN0R2Vu ZXJhdG9yKToKKyAgICAiIiIKKyAgICBUZXN0cyB0aGF0IGEgZGF0YWJhc2Ug Y29ubmVjdGlvbiBjYW4gYmUgY3JlYXRlZCBmcm9tIHRoZSBVSQorICAgICIi IgorCisgICAgZGVmIHNldFVwKHNlbGYpOgorICAgICAgICBpZiAoY29uZmln LlNFUlZFUl9NT0RFKToKKyAgICAgICAgICAgIHNlbGYuc2tpcFRlc3QoIkN1 cnJlbnRseSwgY29uZmlnIGlzIHNldCB0byBzdGFydCBwZ2FkbWluIGluIHNl cnZlciBtb2RlLiAiCisgICAgICAgICAgICAgICAgICAgICAgICAgICJUaGlz IHRlc3QgZG9lc24ndCBrbm93IHVzZXJuYW1lIGFuZCBwYXNzd29yZCBzbyBk b2Vzbid0IHdvcmsgaW4gc2VydmVyIG1vZGUiKQorCisgICAgICAgIHNlbGYu cGdhZG1pbl9wcm9jZXNzID0gc3VicHJvY2Vzcy5Qb3BlbihbInB5dGhvbiIs ICJwZ0FkbWluNC5weSJdLCBzaGVsbD1GYWxzZSwgcHJlZXhlY19mbj1vcy5z ZXRzaWQpCisKKyAgICAgICAgcHJpbnQoIndhaXRpbmcgZm9yIHNlcnZlciB0 byBzdGFydCIpCisgICAgICAgIHRpbWUuc2xlZXAoMTApCisKKyAgICAgICAg cHJpbnQoIm9wZW5pbmcgYnJvd3NlciIpCisgICAgICAgIHNlbGYuZHJpdmVy ID0gd2ViZHJpdmVyLkNocm9tZSgpCisgICAgICAgIHNlbGYuc2VydmVyX2Nv bmZpZyA9IHNlbGYuc2VydmVyCisgICAgICAgIHByaW50KGNvbmZpZy5ERUZB VUxUX1NFUlZFUiArICI6IiArIHN0cihjb25maWcuREVGQVVMVF9TRVJWRVJf UE9SVCkpCisgICAgICAgIHNlbGYuZHJpdmVyLmdldCgiaHR0cDovLyIgKyBj b25maWcuREVGQVVMVF9TRVJWRVIg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sZW1lbnQobGFtYmRhOiBzZWxmLmRyaXZlci5maW5kX2VsZW1lbnRf YnlfcGFydGlhbF9saW5rX3RleHQobGlua190ZXh0KSkKKworICAgIGRlZiBf ZmlsbF9pbnB1dF9ieV94cGF0aChzZWxmLCBmaWVsZF9uYW1lLCBmaWVsZF9j b250ZW50KToKKyAgICAgICAgc2VsZi5fZmluZF9ieV94cGF0aCgiLy9pbnB1 dFtAbmFtZT0nIiArIGZpZWxkX25hbWUgKyAiJ10iKS5jbGVhcigpCisgICAg ICAgIHNlbGYuX2ZpbmRfYnlfeHBhdGgoIi8vaW5wdXRbQG5hbWU9JyIgKyBm aWVsZF9uYW1lICsgIiddIikuc2VuZF9rZXlzKAorICAgICAgICAgICAgZmll bGRfY29udGVudCkKKworICAgIGRlZiBfd2FpdF9mb3JfZWxlbWVudChzZWxm LCBmaW5kX21ldGhvZF93aXRoX2FyZ3MpOgorICAgICAgICB0aW1lb3V0ID0g NQorICAgICAgICB0aW1lX3dhaXRlZCA9IDAKKyAgICAgICAgc2xlZXBfdGlt ZSA9IDAuMDEKKworICAgICAgICB3aGlsZSB0aW1lX3dhaXRlZCA8IHRpbWVv dXQ6CisgICAgICAgICAgICB0cnk6CisgICAgICAgICAgICAgICAgZWxlbWVu dCA9IGZpbmRfbWV0aG9kX3dpdGhfYXJncygpCisgICAgICAgICAgICAgICAg aWYgZWxlbWVudC5pc19kaXNwbGF5ZWQoKSAmIGVsZW1lbnQuaXNfZW5hYmxl ZCgpOgorICAgICAgICAgICAgICAgICAgICByZXR1cm4gZWxlbWVudAorICAg ICAgICAgICAgZXhjZXB0IE5vU3VjaEVsZW1lbnRFeGNlcHRpb246CisgICAg ICAgICAgICAgICAgdGltZV93YWl0ZWQgKz0gc2xlZXBfdGltZQorICAgICAg ICAgICAgICAgIHRpbWUuc2xlZXAoc2xlZXBfdGltZSkKKyAgICAgICAgICAg ICAgICBwYXNzCisKKyAgICAgICAgc2VsZi5mYWlsKCJUaW1lZCBvdXQgd2F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jb25maWcuU0VSVkVSX01PREU6Ci0gICAgICAgICAg ICBmb3IgbW9kdWxlX25hbWUgaW4gZmluZF9tb2R1bGVzKHBrZywgRmFsc2Us IFRydWUpOgorICAgICAgICBmb3IgbW9kdWxlX25hbWUgaW4gYWxsX21vZHVs ZXM6CisgICAgICAgICAgICBpZiBjb25maWcuU0VSVkVSX01PREU6CiAgICAg ICAgICAgICAgICAgdHJ5OgogICAgICAgICAgICAgICAgICAgICBpZiAidGVz dHMuIiBpbiBzdHIobW9kdWxlX25hbWUpOgogICAgICAgICAgICAgICAgICAg ICAgICAgaW1wb3J0X21vZHVsZShtb2R1bGVfbmFtZSkKICAgICAgICAgICAg ICAgICBleGNlcHQgSW1wb3J0RXJyb3I6CiAgICAgICAgICAgICAgICAgICAg IHRyYWNlYmFjay5wcmludF9leGMoZmlsZT1zeXMuc3RkZXJyKQotICAgICAg ICBlbHNlOgotICAgICAgICAgICAgZm9yIG1vZHVsZV9uYW1lIGluIGZpbmRf bW9kdWxlcyhwa2csIEZhbHNlLCBUcnVlKToKKyAgICAgICAgICAgIGVsc2U6 CiAgICAgICAgICAgICAgICAgdHJ5OgogICAgICAgICAgICAgICAgICAgICAj IEV4Y2x1ZGUgdGhlIHRlc3QgY2FzZXMgaW4gYnJvd3NlciBub2RlIGlmIFNF UlZFUl9NT0RFCiAgICAgICAgICAgICAgICAgICAgICMgaXMgRmFsc2UKZGlm ZiAtLWdpdCBhL3dlYi9yZWdyZXNzaW9uLy5naXRpZ25vcmUgYi93ZWIvcmVn cmVzc2lvbi8uZ2l0aWdub3JlCmluZGV4IDA1ODE4MTBiLi43MjNmY2U3ZSAx MDA2NDQKLS0tIGEvd2ViL3JlZ3Jlc3Npb24vLmdpdGlnbm9yZQorKysgYi93 ZWIvcmVncmVzc2lvbi8uZ2l0aWdub3JlCkBAIC0xLDQgKzEsNSBAQAogcGFy ZW50X2lkLnBrbAogcmVncmVzc2lvbi5sb2cKK3Rlc3RfZ3JlZW5wbHVtX2Nv bmZpZy5qc29uCiB0ZXN0X2FkdmFuY2VkX2NvbmZpZy5qc29uCiB0ZXN0X2Nv bmZpZy5qc29uCg== --001a11407e08544a8e054679c354 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers --001a11407e08544a8e054679c354--