Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bU9vo-0007Iy-Sc for pgadmin-hackers@arkaria.postgresql.org; Mon, 01 Aug 2016 09:54:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bU9vo-0002m5-9E for pgadmin-hackers@arkaria.postgresql.org; Mon, 01 Aug 2016 09:54:44 +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 1bU9va-0002Y8-RK for pgadmin-hackers@postgresql.org; Mon, 01 Aug 2016 09:54:31 +0000 Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bU9vX-0004YT-EG for pgadmin-hackers@postgresql.org; Mon, 01 Aug 2016 09:54:29 +0000 Received: by mail-qk0-x235.google.com with SMTP id v123so7797926qkh.3 for ; Mon, 01 Aug 2016 02:54:27 -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=hVLiIGfqDfvOSsFfyvkhXY/an500+0/p+2Ylps1d2bI=; b=hLmgvOGIgIllojwIzjFL0WQaLR9XUBt2ZrkQBtb+Vx0N9OTtrSDktc8yV7FsyHN4g2 VdBKpabzpsc0v9/wkbob/3+Aupwnpa7iLUQZ9WjvwXjCLh41jDXMo7Ivo2ykluTW9Qz8 9kHgNVb+U4Zg3V42mYDwyXSyUNpsOCMplJbFNnLnbl49pUJzLxLcQ+S1+kFCxMiyOzpd UPaRmsD6aVyvEp2NSfKmfwXfW6qZ6feJ1Zxs5EmIvEw1Vyu9GVQEzq79o0+o6K9GkNCL P0HHrXDX7fDDu2umds6axfTcOH7NFv65Gglwq/yaCou4DhpYCakqqnuqd0OcFNfmnOs6 iZmw== 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=hVLiIGfqDfvOSsFfyvkhXY/an500+0/p+2Ylps1d2bI=; b=bvrMgojNH576KRXcVmQi9iK/BiSzOSI8tGM/W7G8NyNGPurKjVptYqgVVTBulaocL+ 6UxyVADLLCS5TGVwvELkpsFRMNhWll6GWwF/y6WqfOxww88+aIdP4H011O7fpwiSAtAC v0hvYBF+2SptCNHlBn/GoQ9ZOYHcazLu9OwrHVJEAlh9I1ZxiLj0fHNEvC1FotX5A1fD z7cdVHkijy6ceMMW5IK/QKHDd/iuH2WoIGvoiTcLJuDBtOIxep88lG+sgToZYP1OUaKQ W1y2kgaokNxxsycf6XzNyHEFhsK66cGAeUUBg1IqtHScqiTg6aXJbc73qeSvQ5HI+toD HwvA== X-Gm-Message-State: AEkoouuYBgwTgwPQcrU9/ozCeZlJS2ETA0a/WIeDczsp61+XC0ca00z9eyIwvan1YN+JkkHiuzVGVWOBe4LtwLS3 X-Received: by 10.55.67.138 with SMTP id q132mr68578937qka.191.1470045266430; Mon, 01 Aug 2016 02:54:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.41.90 with HTTP; Mon, 1 Aug 2016 02:54:25 -0700 (PDT) In-Reply-To: References: From: Navnath Gadakh Date: Mon, 1 Aug 2016 15:24:25 +0530 Message-ID: Subject: Re: pgAdmin IV : Unittest modular patch To: Dave Page 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 Hi Dave, On Mon, Aug 1, 2016 at 3:17 PM, Dave Page wrot= e: > 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 = wrote: >>> 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 issu= es: >>> >>> 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. Could you please send me your's regression.log file. While testing SMTP I didn't see encoded password displayed on both logs and stdout. >>> >>> 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. Thanks for additional info. > >>> 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 A= PI >>>>>> testing with different servers i.e. PG and PPAS). >>>>>> >>>>>> This patch includes- >>>>>> >>>>>> Test framework support API testing with multiple server for this we = need to >>>>>> modify test_config.json(for user it=E2=80=99s test_config.json.in) a= nd >>>>>> 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 scenar= io(As >>>>>> per Khushboo's comment in previous email). We need this logic in te= st cases >>>>>> under =E2=80=98browser/tests/=E2=80=99 as for test scenarios like ch= ange password and >>>>>> invalid login test cases as test client should be logged out first. = So, 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.ResetPasswor= dTestCase) >>>>> 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_rese= t_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=

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.ResetPasswor= dTestCase) >>>>> 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_rese= t_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=

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.ResetPasswor= dTestCase) >>>>> 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_rese= t_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=

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 > > > > -- > Dave Page > VP, Chief Architect, Tools & Installers > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake --=20 Thanks, Navnath Gadakh Software Engineer EnterpriseDB Corporation Mobile: +91 9975389878 --=20 Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers