Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bU9p9-000749-Cc for pgadmin-hackers@arkaria.postgresql.org; Mon, 01 Aug 2016 09:47:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bU9p8-0001xz-Vp for pgadmin-hackers@arkaria.postgresql.org; Mon, 01 Aug 2016 09:47:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bU9p8-0001xt-CT for pgadmin-hackers@postgresql.org; Mon, 01 Aug 2016 09:47:50 +0000 Received: from mail-it0-x22b.google.com ([2607:f8b0:4001:c0b::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bU9p4-0006fi-DN for pgadmin-hackers@postgresql.org; Mon, 01 Aug 2016 09:47:49 +0000 Received: by mail-it0-x22b.google.com with SMTP id f6so164870871ith.0 for ; Mon, 01 Aug 2016 02:47:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=fAPomBm3+/WvEkhfPiUBKDHiBxAgIjMrBUu6HWEP/Ko=; b=N/ecN+FB0dCRBNnDhBdhPpQhlyBMtLnxiBazkhw+ISviiW5OKDPv6fyAiQwyBXVYSK dI0sWBcg6Jf4Hav7NI1BjsoU41ZAxCuG++TNXP7LronYVzZd4gTGPD3d+rO0rh+BtqHa H1yEJWsYVQuAOQsBohvRAeu/urw6BJlbkqekS7QQ5pNDdwVCWjrvtue8AS9StKscgk0H vJD+TA8d95PQEeHJalVoDG/S3l1tvPzgeuaPdotVbraz7PNcSSUw3VbJVy7ua8cZ2g6I adZgYQlVQrsAdJGyKmlwljUlYoY907Cjq0WmSbBvCDvBonYxXde72A5OdY/DyyeO6OX8 NHqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=fAPomBm3+/WvEkhfPiUBKDHiBxAgIjMrBUu6HWEP/Ko=; b=gtlg29utng8zcc7WdD0X4cWd/hT4vOIvdOolsf14dR6KvXSrrwA3NjPcXduM6K729J 3qiAQ4CsPhYX94eNHzuC2Vn5zEi2dVXhRwHNosQyizc5KeJiZg8afimJCWMzaOpFngeh Ul5a65fvoQeEt4bznzn6+ESopJUQFFdFN0FkT+/LwKJIZTGMO3SBcM4yxVJORLafhBWK wJ1VvcZAZvrbykllycs+5kiyy76laozVnoBAJ8kAeCm2H5rOyvhxW6b4ZgIufJcTBuoz 6aSTwKX90JgIt2P4vxfOc/109fSgrgq63CkTb9TN/1uyVySu7h3xh/2GBRbGKojqsTOr XtWQ== X-Gm-Message-State: AEkoousxM5H7u74hT5QKAH540pr9LuewDKkyCHqfREja6ACST0L2TiAv4aTKRl60kHBbLcyFOECuyze4Ui94nSvmpzr8aUKmchKsFCMxNF+eYaqKeVKU6CRC49a+H+BXAvs/pFcZfzi/AedM2dXBqLCFjrJe8z7yjAl0ESA4a/K2ivxepTxU9ELutaAb2Bgcx/NBQRrTPg== X-Received: by 10.36.101.195 with SMTP id u186mr52809453itb.80.1470044864157; Mon, 01 Aug 2016 02:47:44 -0700 (PDT) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com. [209.85.214.45]) by smtp.gmail.com with ESMTPSA id b20sm7451747itb.22.2016.08.01.02.47.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Aug 2016 02:47:43 -0700 (PDT) Received: by mail-it0-f45.google.com with SMTP id j124so166790961ith.1 for ; Mon, 01 Aug 2016 02:47:43 -0700 (PDT) X-Received: by 10.107.201.138 with SMTP id z132mr56715980iof.156.1470044862868; Mon, 01 Aug 2016 02:47:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.208.97 with HTTP; Mon, 1 Aug 2016 02:47:42 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Mon, 1 Aug 2016 10:47:42 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: pgAdmin IV : Unittest modular patch To: Navnath Gadakh Cc: pgadmin-hackers , Kanchan Mohitey Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On Thu, Jul 28, 2016 at 8:12 AM, Navnath Gadakh wrote: > Thanks Dave! > > On Wed, Jul 27, 2016 at 8:12 PM, Dave Page w= rote: >> Ahh, that explains it. Nice catch! It's working in both server and >> desktop modes now :-). >> >> I've committed the patch, but can you please look at the following issue= s: >> >> 1) When testing SMTP, the encoded password used to connect to the >> server is displayed in both the logs and stdout (the "send: 'AUTH >> PLAIN ....'" lines). Can you catch that, and replace it with *'s >> please? Sooner or later someone will reveal a password otherwise. > Sure. I will implement in the next patch. >> >> 2) Is the test count in the summary correct when you have multiple >> servers? I think it might be resetting between servers. > In the current code runTest() function calls only one time for > single/multiple server/s that's why it's showing same count for both > (single & multiple). > Question: What exactly we are looking for, only count? Or we need > any more logs like for adding database, it should display in which > server (PG/PPAS) its adding database if this is the case we need a > feasibility check. Right now I would like to see the summary updated so it outputs useful (and correct) information - for example, it could say something like: =3D=3D=3D=3D=3D Testing completed: PostgreSQL 9.4: 23 tests passed, 0 tests failed EPAS 9.5: 25 tests passed, 2 tests failed (foo_test, bar_test) =3D=3D=3D=3D=3D where PostgreSQL 9.4 and EPAS 9.5 are the two servers configured in test_config.py and foo_test and bar_test are the names of the tests that failed. >> 3) Please ensure that test databases that are created are also dropped >> again. I'm getting tired of deleting them manually! > I already added delete databases in tearDown () function, But > yeah, I found two test cases where this code missed. I will add this > in the next patch. Thanks. >> >> Thanks, Dave. >> >> On Wed, Jul 27, 2016 at 1:19 PM, Navnath Gadakh >> wrote: >>> Hi Dave, >>> We have reproduced the issue you mentioned in the previous >>> email. We need to skip the login related test cases when SERVER_MODE =3D >>> False in the web/config_local.py. >>> >>> Please find the revised patch for the same. >>> >>> Thanks! >>> >>> >>> On Fri, Jul 22, 2016 at 9:48 PM, Dave Page = wrote: >>>> Hi >>>> >>>> On Fri, Jul 22, 2016 at 2:22 PM, Navnath Gadakh >>>> wrote: >>>>> Hi Dave, >>>>> >>>>> Please find the attached patch for pgAdmin4 unittest(Support of API >>>>> testing with different servers i.e. PG and PPAS). >>>>> >>>>> This patch includes- >>>>> >>>>> Test framework support API testing with multiple server for this we n= eed to >>>>> modify test_config.json(for user it=E2=80=99s test_config.json.in) and >>>>> test_advanced_config.json(for user it=E2=80=99s test_advanced_config.= json.in). >>>>> Server details of PG and PPAS are included in both .in files. >>>>> >>>>> Removed the logic of logging in the test client on each test scenari= o(As >>>>> per Khushboo's comment in previous email). We need this logic in tes= t cases >>>>> under =E2=80=98browser/tests/=E2=80=99 as for test scenarios like cha= nge password and >>>>> invalid login test cases as test client should be logged out first. S= o, as >>>>> per this the code is slightly modified in =E2=80=98browser/tests/=E2= =80=99. >>>> >>>> OK in principle, but it doesn't seem to work: >>>> >>>> This function will add the server under default server group. (Default >>>> Server Node url) ... ok >>>> >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> FAIL: runTest (pgadmin.browser.tests.test_reset_password.ResetPassword= TestCase) >>>> This function checks reset password functionality. (TestCase for >>>> Validating Empty Email) >>>> ---------------------------------------------------------------------- >>>> Traceback (most recent call last): >>>> File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/tests/test_reset= _password.py", >>>> line 44, in runTest >>>> 'utf-8')) >>>> AssertionError: 'Recover pgAdmin 4 Password' not found in u'>>> HTML PUBLIC "-//W3C//DTD HTML 3.2 >>>> Final//EN">\nRedirecting...\n

Redirecting...

\n<= p>You >>>> should be redirected automatically to target URL: /. >>>> If not click the link.' >>>> >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> FAIL: runTest (pgadmin.browser.tests.test_reset_password.ResetPassword= TestCase) >>>> This function checks reset password functionality. (TestCase for >>>> Validating Invalid_Email) >>>> ---------------------------------------------------------------------- >>>> Traceback (most recent call last): >>>> File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/tests/test_reset= _password.py", >>>> line 44, in runTest >>>> 'utf-8')) >>>> AssertionError: 'Recover pgAdmin 4 Password' not found in u'>>> HTML PUBLIC "-//W3C//DTD HTML 3.2 >>>> Final//EN">\nRedirecting...\n

Redirecting...

\n<= p>You >>>> should be redirected automatically to target URL: /. >>>> If not click the link.' >>>> >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> FAIL: runTest (pgadmin.browser.tests.test_reset_password.ResetPassword= TestCase) >>>> This function checks reset password functionality. (TestCase for >>>> Validating Valid_Email) >>>> ---------------------------------------------------------------------- >>>> Traceback (most recent call last): >>>> File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/tests/test_reset= _password.py", >>>> line 44, in runTest >>>> 'utf-8')) >>>> AssertionError: 'Recover pgAdmin 4 Password' not found in u'>>> HTML PUBLIC "-//W3C//DTD HTML 3.2 >>>> Final//EN">\nRedirecting...\n

Redirecting...

\n<= p>You >>>> should be redirected automatically to target URL: /. >>>> If not click the link.' >>>> >>>> ---------------------------------------------------------------------- >>>> Ran 26 tests in 30.109s >>>> >>>> FAILED (failures=3D3) >>>> >>>> It's very far from obvious what's wrong here (/reset looks just fine >>>> to me). How can we get more useful info out of the framework? >>>> >>>> -- >>>> Dave Page >>>> VP, Chief Architect, Tools & Installers >>>> EnterpriseDB: http://www.enterprisedb.com >>>> The Enterprise PostgreSQL Company >>>> >>>> Blog: http://pgsnake.blogspot.com >>>> Twitter: @pgsnake >>> >>> >>> >>> -- >>> Thanks, >>> Navnath Gadakh >>> Software Engineer >>> EnterpriseDB Corporation >>> Mobile: +91 9975389878 >> >> >> >> -- >> Dave Page >> VP, Chief Architect, Tools & Installers >> EnterpriseDB: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake > > > > -- > Thanks, > Navnath Gadakh > Software Engineer > EnterpriseDB Corporation > Mobile: +91 9975389878 --=20 Dave Page VP, Chief Architect, Tools & Installers EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company Blog: http://pgsnake.blogspot.com Twitter: @pgsnake --=20 Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers